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 : : * Shared solver in the distributed architecture. 11 : : */ 12 : : 13 : : #include "cvc5_private.h" 14 : : 15 : : #ifndef CVC5__THEORY__SHARED_SOLVER_DISTRIBUTED__H 16 : : #define CVC5__THEORY__SHARED_SOLVER_DISTRIBUTED__H 17 : : 18 : : #include "expr/node.h" 19 : : #include "theory/shared_solver.h" 20 : : 21 : : namespace cvc5::internal { 22 : : namespace theory { 23 : : 24 : : /** 25 : : * The shared solver in the distributed architecture. This class uses the 26 : : * SharedTermsDatabase for implementing the core methods of a shared solver. 27 : : */ 28 : : class SharedSolverDistributed : public SharedSolver 29 : : { 30 : : public: 31 : : SharedSolverDistributed(Env& env, TheoryEngine& te); 32 : 99224 : virtual ~SharedSolverDistributed() {} 33 : : //------------------------------------- initialization 34 : : /** 35 : : * Returns true if we need an equality engine, this has the same contract 36 : : * as Theory::needsEqualityEngine. 37 : : */ 38 : : bool needsEqualityEngine(theory::EeSetupInfo& esi) override; 39 : : /** Set equality engine in the shared terms database */ 40 : : void setEqualityEngine(eq::EqualityEngine* ee) override; 41 : : //------------------------------------- end initialization 42 : : /** Assert n to the shared terms database. */ 43 : : void assertShared(TNode n, bool polarity, TNode reason) override; 44 : : /** 45 : : * Get equality status based on the equality engine of shared terms database 46 : : */ 47 : : EqualityStatus getEqualityStatus(TNode a, TNode b) override; 48 : : /** Explain literal that was propagated by a theory or using shared terms 49 : : * database */ 50 : : TrustNode explain(TNode literal, TheoryId id) override; 51 : : 52 : : protected: 53 : : /** If t is an equality, add it as one that may be propagated */ 54 : : void preRegisterSharedInternal(TNode t) override; 55 : : }; 56 : : 57 : : } // namespace theory 58 : : } // namespace cvc5::internal 59 : : 60 : : #endif /* CVC5__THEORY__SHARED_SOLVER_DISTRIBUTED__H */