diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2020-07-10 19:03:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-10 19:03:24 -0500 |
commit | c5a6aa2e03b05a5db6150563a4d5994abf5b24e9 (patch) | |
tree | c15020e9c60baafd1fa285be3d7488b06ea688be /src/theory/arith/theory_arith.h | |
parent | 88da95573d600f2af8538c3c5a29459a1146127c (diff) |
(proof-new) Update Theory interface for proof-new (#4648)
This includes 4 changes:
Theory constructor takes a ProofNodeManager,
Theory::explain returns a TrustNode (of kind PROP_EXP),
Theory::expandDefinitions returns a TrustNode (of kind REWRITE),
Theory::ppRewrite returns a TrustNode (of kind REWRITE).
These are all currently planned updates to the interface of Theory.
This PR also connects some of the existing proof rule checkers into the proof checker, if one is provided to the constructor. It updates TheoryEngine and other places to process TrustNode in trivial ways (converting them into Node). These calls will later be updated as needed for proof support.
This PR is also contingent on the performance tests for proof-new on SMT-LIB.
Diffstat (limited to 'src/theory/arith/theory_arith.h')
-rw-r--r-- | src/theory/arith/theory_arith.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/theory/arith/theory_arith.h b/src/theory/arith/theory_arith.h index 5b68e3e7a..9381b7341 100644 --- a/src/theory/arith/theory_arith.h +++ b/src/theory/arith/theory_arith.h @@ -34,7 +34,7 @@ namespace arith { * http://research.microsoft.com/en-us/um/people/leonardo/cav06.pdf */ class TheoryArith : public Theory { -private: + private: friend class TheoryArithPrivate; TheoryArithPrivate* d_internal; @@ -46,9 +46,13 @@ private: */ proof::ArithProofRecorder * d_proofRecorder; -public: - TheoryArith(context::Context* c, context::UserContext* u, OutputChannel& out, - Valuation valuation, const LogicInfo& logicInfo); + public: + TheoryArith(context::Context* c, + context::UserContext* u, + OutputChannel& out, + Valuation valuation, + const LogicInfo& logicInfo, + ProofNodeManager* pnm = nullptr); virtual ~TheoryArith(); TheoryRewriter* getTheoryRewriter() override; @@ -60,14 +64,14 @@ public: void finishInit() override; - Node expandDefinition(Node node) override; + TrustNode expandDefinition(Node node) override; void setMasterEqualityEngine(eq::EqualityEngine* eq) override; void check(Effort e) override; bool needsCheckLastEffort() override; void propagate(Effort e) override; - Node explain(TNode n) override; + TrustNode explain(TNode n) override; bool getCurrentSubstitution(int effort, std::vector<Node>& vars, std::vector<Node>& subs, @@ -84,7 +88,7 @@ public: void presolve() override; void notifyRestart() override; PPAssertStatus ppAssert(TNode in, SubstitutionMap& outSubstitutions) override; - Node ppRewrite(TNode atom) override; + TrustNode ppRewrite(TNode atom) override; void ppStaticLearn(TNode in, NodeBuilder<>& learned) override; std::string identify() const override { return std::string("TheoryArith"); } @@ -100,7 +104,7 @@ public: const EntailmentCheckParameters* params, EntailmentCheckSideEffects* out) override; - void setProofRecorder(proof::ArithProofRecorder * proofRecorder) + void setProofRecorder(proof::ArithProofRecorder* proofRecorder) { d_proofRecorder = proofRecorder; } |