summaryrefslogtreecommitdiff
path: root/src/theory/theory_engine.cpp
diff options
context:
space:
mode:
authorDejan Jovanović <dejan.jovanovic@gmail.com>2011-12-10 08:34:41 +0000
committerDejan Jovanović <dejan.jovanovic@gmail.com>2011-12-10 08:34:41 +0000
commit933a1ea506fd553e756be942087ef82154b6f959 (patch)
treec8215f3a756e64eb4820acecf71094b662ad421c /src/theory/theory_engine.cpp
parent3fd65ea9f5b5cdb2fe4b511b76abcad89e1cd71d (diff)
adding additional checks for theories propagating literals that already have a value
Diffstat (limited to 'src/theory/theory_engine.cpp')
-rw-r--r--src/theory/theory_engine.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp
index 5ef7480e8..4c289b5c1 100644
--- a/src/theory/theory_engine.cpp
+++ b/src/theory/theory_engine.cpp
@@ -573,7 +573,14 @@ void TheoryEngine::propagate(TNode literal, theory::TheoryId theory) {
Node normalizedEquality = Rewriter::rewrite(literal);
if (d_propEngine->isSatLiteral(normalizedEquality)) {
// If there is a literal, just enqueue it, same as above
- d_propagatedLiterals.push_back(normalizedEquality);
+ bool value;
+ if (d_propEngine->hasValue(normalizedEquality, value)) {
+ // if we are propagting something that already has a sat value we better be the same
+ Debug("theory") << "literal " << literal << " (" << normalizedEquality << ") propagated by " << theory << " but already has a sat value" << std::endl;
+ Assert((value && (literal.getKind() != kind::NOT)) || (!value && literal.getKind() == kind::NOT));
+ } else {
+ d_propagatedLiterals.push_back(normalizedEquality);
+ }
}
// Otherwise, we assert it to all interested theories
Theory::Set lhsNotified = d_sharedTerms.getNotifiedTheories(atom[0]);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback