Branch data Line data Source code
1 : : /****************************************************************************** 2 : : * This file is part of the cvc5 project. 3 : : * 4 : : * Copyright (c) 2009-2026 by the authors listed in the file AUTHORS 5 : : * in the top-level source directory and their institutional affiliations. 6 : : * All rights reserved. See the file COPYING in the top-level source 7 : : * directory for licensing information. 8 : : * **************************************************************************** 9 : : * 10 : : * The care pair argument callback. 11 : : */ 12 : : 13 : : #include "cvc5_private.h" 14 : : 15 : : #ifndef CVC5__THEORY__CARE_PAIR_ARGUMENT_CALLBACK_H 16 : : #define CVC5__THEORY__CARE_PAIR_ARGUMENT_CALLBACK_H 17 : : 18 : : #include "expr/node_trie_algorithm.h" 19 : : #include "theory/theory.h" 20 : : 21 : : namespace cvc5::internal { 22 : : namespace theory { 23 : : 24 : : /** 25 : : * The standard callback for computing the care pairs from a node trie. 26 : : */ 27 : : class CarePairArgumentCallback : public NodeTriePathPairProcessCallback 28 : : { 29 : : public: 30 : : CarePairArgumentCallback(Theory& t); 31 : 249155 : ~CarePairArgumentCallback() {} 32 : : /** 33 : : * Call on the arguments a and b of two function applications we are 34 : : * computing care pairs for. Returns true if a and b are not already 35 : : * disequal according to theory combination (Theory::areCareDisequal). 36 : : */ 37 : : bool considerPath(TNode a, TNode b) override; 38 : : /** 39 : : * Called when we have two function applications that do not have pairs 40 : : * of disequal arguments at any position. We call Theory::processCarePairArgs 41 : : * to add all relevant care pairs. 42 : : */ 43 : : void processData(TNode fa, TNode fb) override; 44 : : 45 : : private: 46 : : /** Reference to theory */ 47 : : Theory& d_theory; 48 : : }; 49 : : 50 : : } // namespace theory 51 : : } // namespace cvc5::internal 52 : : 53 : : #endif /* CVC5__THEORY__CARE_ARGUMENT_CALLBACK_H */