summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDejan Jovanović <dejan@cs.nyu.edu>2013-05-07 15:01:16 -0400
committerDejan Jovanović <dejan@cs.nyu.edu>2013-05-07 15:02:44 -0400
commite138840f8dbe4eedf692ca81a99e6415737b573c (patch)
tree5d1f185a255c70d97632f6604edf7d1547298173 /src
parent09813b6f7c68db999503af16ec53fbfb757e5665 (diff)
fix for bug500
Diffstat (limited to 'src')
-rw-r--r--src/theory/theory_engine.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp
index 63fc1ae65..a81b38fe9 100644
--- a/src/theory/theory_engine.cpp
+++ b/src/theory/theory_engine.cpp
@@ -931,8 +931,10 @@ void TheoryEngine::assertToTheory(TNode assertion, TNode originalAssertion, theo
if (fromTheoryId == THEORY_SAT_SOLVER) {
// We know that this is normalized, so just send it off to the theory
if (markPropagation(assertion, originalAssertion, toTheoryId, fromTheoryId)) {
- // We assert it, and we know it's preregistereed coming from the SAT solver directly
- theoryOf(toTheoryId)->assertFact(assertion, assertion == originalAssertion);
+ // Is it preregistered
+ bool preregistered = d_propEngine->isSatLiteral(assertion) && Theory::theoryOf(assertion) == toTheoryId;
+ // We assert it
+ theoryOf(toTheoryId)->assertFact(assertion, preregistered);
// Mark that we have more information
d_factsAsserted = true;
}
@@ -1211,6 +1213,9 @@ void TheoryEngine::ensureLemmaAtoms(const std::vector<TNode>& atoms, theory::The
// Rewrite the equality
Node eqNormalized = Rewriter::rewrite(atoms[i]);
+
+ Debug("theory::atoms") << "TheoryEngine::ensureLemmaAtoms(): " << eq << " with nf " << eqNormalized << std::endl;
+
// If the equality is a boolean constant, we send immediately
if (eqNormalized.isConst()) {
if (eqNormalized.getConst<bool>()) {
@@ -1221,8 +1226,11 @@ void TheoryEngine::ensureLemmaAtoms(const std::vector<TNode>& atoms, theory::The
continue;
}
+ Assert(eqNormalized.getKind() == kind::EQUAL);
+
+
// If the normalization did the just flips, keep the flip
- if (eqNormalized[0] == eq[1]) {
+ if (eqNormalized[0] == eq[1] && eqNormalized[1] == eq[0]) {
eq = eqNormalized;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback