summaryrefslogtreecommitdiff
path: root/src/theory/theory_engine.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-07-28 11:03:33 -0500
committerGitHub <noreply@github.com>2020-07-28 11:03:33 -0500
commitc38f35164adc5ab255803765a568ef820fa8f3b2 (patch)
tree6cbd4b21e8e9ff364b5b2f14467cd986ea69acf2 /src/theory/theory_engine.cpp
parentb90cfb462bde3e75c07bb14e2393ee8e4b4f4d42 (diff)
Use lemma property enum for OutputChannel::lemma (#4755)
There are 3 Boolean flags for OutputChannel::lemma, and plans to add another for relevance. This makes them into a enum.
Diffstat (limited to 'src/theory/theory_engine.cpp')
-rw-r--r--src/theory/theory_engine.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp
index 9955be850..ef237e76d 100644
--- a/src/theory/theory_engine.cpp
+++ b/src/theory/theory_engine.cpp
@@ -41,6 +41,7 @@
#include "theory/arith/arith_ite_utils.h"
#include "theory/bv/theory_bv_utils.h"
#include "theory/care_graph.h"
+#include "theory/decision_manager.h"
#include "theory/quantifiers/first_order_model.h"
#include "theory/quantifiers/fmf/model_engine.h"
#include "theory/quantifiers/theory_quantifiers.h"
@@ -621,8 +622,7 @@ void TheoryEngine::combineTheories() {
lemma(equality.orNode(equality.notNode()),
RULE_INVALID,
false,
- false,
- false,
+ LemmaProperty::NONE,
carePair.d_theory);
// This code is supposed to force preference to follow what the theory models already have
@@ -1587,9 +1587,9 @@ void TheoryEngine::ensureLemmaAtoms(const std::vector<TNode>& atoms, theory::The
theory::LemmaStatus TheoryEngine::lemma(TNode node,
ProofRule rule,
bool negated,
- bool removable,
- bool preprocess,
- theory::TheoryId atomsTo) {
+ theory::LemmaProperty p,
+ theory::TheoryId atomsTo)
+{
// For resource-limiting (also does a time check).
// spendResource();
@@ -1609,6 +1609,8 @@ theory::LemmaStatus TheoryEngine::lemma(TNode node,
Dump("t-lemmas") << CommentCommand("theory lemma: expect valid")
<< CheckSatCommand(n.toExpr());
}
+ bool removable = isLemmaPropertyRemovable(p);
+ bool preprocess = isLemmaPropertyPreprocess(p);
// call preprocessor
std::vector<TrustNode> newLemmas;
@@ -1705,8 +1707,11 @@ void TheoryEngine::conflict(TNode conflict, TheoryId theoryId) {
Node fullConflict = mkExplanation(explanationVector);
Debug("theory::conflict") << "TheoryEngine::conflict(" << conflict << ", " << theoryId << "): full = " << fullConflict << endl;
Assert(properConflict(fullConflict));
- lemma(fullConflict, RULE_CONFLICT, true, true, false, THEORY_LAST);
-
+ lemma(fullConflict,
+ RULE_CONFLICT,
+ true,
+ LemmaProperty::REMOVABLE,
+ THEORY_LAST);
} else {
// When only one theory, the conflict should need no processing
Assert(properConflict(conflict));
@@ -1735,7 +1740,7 @@ void TheoryEngine::conflict(TNode conflict, TheoryId theoryId) {
ProofManager::getCnfProof()->setProofRecipe(proofRecipe);
});
- lemma(conflict, RULE_CONFLICT, true, true, false, THEORY_LAST);
+ lemma(conflict, RULE_CONFLICT, true, LemmaProperty::REMOVABLE, THEORY_LAST);
}
PROOF({
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback