summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDejan Jovanović <dejan.jovanovic@gmail.com>2011-12-10 06:05:13 +0000
committerDejan Jovanović <dejan.jovanovic@gmail.com>2011-12-10 06:05:13 +0000
commit48b147577ba6a894f8f0498c39c7e77d466b0538 (patch)
treee13ec9eb56af775363228fbdd03164ae652273ab /src
parent67dc3b98a30a6ad2f93743f3313ba5f4149af389 (diff)
attempt to fix bug 293: if a split on a trivial shared pair is requested from a theory, such as 1 = 0, it is reasserted to the theory.
Diffstat (limited to 'src')
-rw-r--r--src/theory/theory_engine.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp
index e36d163a4..aa897b244 100644
--- a/src/theory/theory_engine.cpp
+++ b/src/theory/theory_engine.cpp
@@ -230,11 +230,18 @@ void TheoryEngine::combineTheories() {
Node equality = carePair.a.eqNode(carePair.b);
Node normalizedEquality = Rewriter::rewrite(equality);
+ bool isTrivial = normalizedEquality.getKind() == kind::CONST_BOOLEAN;
+
// If the node has a literal, it has been asserted so we should just check it
bool value;
- if (d_propEngine->isSatLiteral(normalizedEquality) && d_propEngine->hasValue(normalizedEquality, value)) {
- Debug("sharing") << "TheoryEngine::combineTheories(): has a literal " << std::endl;
+ if (isTrivial || (d_propEngine->isSatLiteral(normalizedEquality) && d_propEngine->hasValue(normalizedEquality, value))) {
+ Debug("sharing") << "TheoryEngine::combineTheories(): has a literal or is trivial" << std::endl;
+
+ if (isTrivial) {
+ // if the equality is trivial, we assert it back to the theory saying the sat solver should explain
+ value = normalizedEquality.getConst<bool>();
+ }
// Normalize the equality to the theory that requested it
Node toAssert = Rewriter::rewriteEquality(carePair.theory, equality);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback