summaryrefslogtreecommitdiff
path: root/src/theory/shared_solver_distributed.h
blob: c14147e53ce92a56d04fa6204cc58c11be4006f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/******************************************************************************
 * Top contributors (to current version):
 *   Andrew Reynolds
 *
 * This file is part of the cvc5 project.
 *
 * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
 * in the top-level source directory and their institutional affiliations.
 * All rights reserved.  See the file COPYING in the top-level source
 * directory for licensing information.
 * ****************************************************************************
 *
 * Shared solver in the distributed architecture.
 */

#include "cvc4_private.h"

#ifndef CVC5__THEORY__SHARED_SOLVER_DISTRIBUTED__H
#define CVC5__THEORY__SHARED_SOLVER_DISTRIBUTED__H

#include "expr/node.h"
#include "theory/shared_solver.h"

namespace cvc5 {
namespace theory {

/**
 * The shared solver in the distributed architecture. This class uses the
 * SharedTermsDatabase for implementing the core methods of a shared solver.
 */
class SharedSolverDistributed : public SharedSolver
{
 public:
  SharedSolverDistributed(TheoryEngine& te, ProofNodeManager* pnm);
  virtual ~SharedSolverDistributed() {}
  //------------------------------------- initialization
  /**
   * Returns true if we need an equality engine, this has the same contract
   * as Theory::needsEqualityEngine.
   */
  bool needsEqualityEngine(theory::EeSetupInfo& esi) override;
  /** Set equality engine in the shared terms database */
  void setEqualityEngine(eq::EqualityEngine* ee) override;
  //------------------------------------- end initialization
  /** Assert equality to the shared terms database. */
  void assertSharedEquality(TNode equality,
                            bool polarity,
                            TNode reason) override;
  /**
   * Get equality status based on the equality engine of shared terms database
   */
  EqualityStatus getEqualityStatus(TNode a, TNode b) override;
  /** Explain literal that was propagated by a theory or using shared terms
   * database */
  TrustNode explain(TNode literal, TheoryId id) override;

 protected:
  /** If t is an equality, add it as one that may be propagated */
  void preRegisterSharedInternal(TNode t) override;
};

}  // namespace theory
}  // namespace cvc5

#endif /* CVC5__THEORY__SHARED_SOLVER_DISTRIBUTED__H */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback