summaryrefslogtreecommitdiff
path: root/src/theory/builtin
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-07-10 19:03:24 -0500
committerGitHub <noreply@github.com>2020-07-10 19:03:24 -0500
commitc5a6aa2e03b05a5db6150563a4d5994abf5b24e9 (patch)
treec15020e9c60baafd1fa285be3d7488b06ea688be /src/theory/builtin
parent88da95573d600f2af8538c3c5a29459a1146127c (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/builtin')
-rw-r--r--src/theory/builtin/theory_builtin.cpp12
-rw-r--r--src/theory/builtin/theory_builtin.h6
2 files changed, 15 insertions, 3 deletions
diff --git a/src/theory/builtin/theory_builtin.cpp b/src/theory/builtin/theory_builtin.cpp
index 695d5b91b..f6ce4414e 100644
--- a/src/theory/builtin/theory_builtin.cpp
+++ b/src/theory/builtin/theory_builtin.cpp
@@ -17,6 +17,7 @@
#include "theory/builtin/theory_builtin.h"
#include "expr/kind.h"
+#include "expr/proof_node_manager.h"
#include "theory/builtin/theory_builtin_rewriter.h"
#include "theory/theory_model.h"
#include "theory/valuation.h"
@@ -31,9 +32,16 @@ TheoryBuiltin::TheoryBuiltin(context::Context* c,
context::UserContext* u,
OutputChannel& out,
Valuation valuation,
- const LogicInfo& logicInfo)
- : Theory(THEORY_BUILTIN, c, u, out, valuation, logicInfo)
+ const LogicInfo& logicInfo,
+ ProofNodeManager* pnm)
+ : Theory(THEORY_BUILTIN, c, u, out, valuation, logicInfo, pnm)
{
+ ProofChecker* pc = pnm != nullptr ? pnm->getChecker() : nullptr;
+ if (pc != nullptr)
+ {
+ // add checkers
+ d_bProofChecker.registerTo(pc);
+ }
}
std::string TheoryBuiltin::identify() const
diff --git a/src/theory/builtin/theory_builtin.h b/src/theory/builtin/theory_builtin.h
index e4767645e..beca0b76a 100644
--- a/src/theory/builtin/theory_builtin.h
+++ b/src/theory/builtin/theory_builtin.h
@@ -19,6 +19,7 @@
#ifndef CVC4__THEORY__BUILTIN__THEORY_BUILTIN_H
#define CVC4__THEORY__BUILTIN__THEORY_BUILTIN_H
+#include "theory/builtin/proof_checker.h"
#include "theory/builtin/theory_builtin_rewriter.h"
#include "theory/theory.h"
@@ -33,7 +34,8 @@ class TheoryBuiltin : public Theory
context::UserContext* u,
OutputChannel& out,
Valuation valuation,
- const LogicInfo& logicInfo);
+ const LogicInfo& logicInfo,
+ ProofNodeManager* pnm = nullptr);
TheoryRewriter* getTheoryRewriter() override { return &d_rewriter; }
@@ -45,6 +47,8 @@ class TheoryBuiltin : public Theory
private:
/** The theory rewriter for this theory. */
TheoryBuiltinRewriter d_rewriter;
+ /** Proof rule checker */
+ BuiltinProofRuleChecker d_bProofChecker;
}; /* class TheoryBuiltin */
} // namespace builtin
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback