diff options
author | Haniel Barbosa <hanielbbarbosa@gmail.com> | 2021-04-05 15:47:40 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-05 18:47:40 +0000 |
commit | b75f48683c08e66e0d47d29c5262f32f33b36c49 (patch) | |
tree | 0a76b276add9a8d0acd3a52167747e5664f12569 /src/theory/quantifiers | |
parent | ca5fd891038a93bd63b3863faa8c5e39fff88ed0 (diff) |
[proof-new] Registering proof checkers uniformly from the SMT solver (#6275)
Each theory has its own proof checker, responsible for checking the rules pertaining to that theory. The main proof checker uses these specialized checkers. Previously the main proof checker (of the proof node manager used across the SMT solver) was connected to these theory proof checkers during initialization of the theory. This commit adds an interface to the theories for retrieving its proof checker (analogous to how one retrieves the rewriter of a theory) which is used by a new method in the theory engine to register a theory proof checker to a given proof checker according to a theory id.
This is in preparation for the new unsat cores based on proofs.
Diffstat (limited to 'src/theory/quantifiers')
-rw-r--r-- | src/theory/quantifiers/theory_quantifiers.cpp | 10 | ||||
-rw-r--r-- | src/theory/quantifiers/theory_quantifiers.h | 4 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/theory/quantifiers/theory_quantifiers.cpp b/src/theory/quantifiers/theory_quantifiers.cpp index c3c3fe7b6..31b4f8c24 100644 --- a/src/theory/quantifiers/theory_quantifiers.cpp +++ b/src/theory/quantifiers/theory_quantifiers.cpp @@ -48,13 +48,6 @@ TheoryQuantifiers::TheoryQuantifiers(Context* c, out.handleUserAttribute( "quant-elim", this ); out.handleUserAttribute( "quant-elim-partial", this ); - ProofChecker* pc = pnm != nullptr ? pnm->getChecker() : nullptr; - if (pc != nullptr) - { - // add the proof rules - d_qChecker.registerTo(pc); - } - // Finish initializing the term registry by hooking it up to the inference // manager. This is required due to a cyclic dependency between the term // database and the instantiate module. Term database needs inference manager @@ -82,6 +75,9 @@ TheoryQuantifiers::~TheoryQuantifiers() { } TheoryRewriter* TheoryQuantifiers::getTheoryRewriter() { return &d_rewriter; } + +ProofRuleChecker* TheoryQuantifiers::getProofChecker() { return &d_checker; } + void TheoryQuantifiers::finishInit() { // quantifiers are not evaluated in getModelValue diff --git a/src/theory/quantifiers/theory_quantifiers.h b/src/theory/quantifiers/theory_quantifiers.h index 21c30390c..716e8cdbd 100644 --- a/src/theory/quantifiers/theory_quantifiers.h +++ b/src/theory/quantifiers/theory_quantifiers.h @@ -47,6 +47,8 @@ class TheoryQuantifiers : public Theory { //--------------------------------- initialization /** get the official theory rewriter of this theory */ TheoryRewriter* getTheoryRewriter() override; + /** get the proof checker of this theory */ + ProofRuleChecker* getProofChecker() override; /** finish initialization */ void finishInit() override; /** needs equality engine */ @@ -83,7 +85,7 @@ class TheoryQuantifiers : public Theory { /** The theory rewriter for this theory. */ QuantifiersRewriter d_rewriter; /** The proof rule checker */ - QuantifiersProofRuleChecker d_qChecker; + QuantifiersProofRuleChecker d_checker; /** The quantifiers state */ QuantifiersState d_qstate; /** The quantifiers registry */ |