summaryrefslogtreecommitdiff
path: root/src/theory/arith/congruence_manager.cpp
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2012-06-13 20:37:43 +0000
committerTim King <taking@cs.nyu.edu>2012-06-13 20:37:43 +0000
commitd0b33af0cf910ca7adb0357dad13e7e88baedebc (patch)
treefc9c1fae8b7c4e9a26656e81314800852996e2f6 /src/theory/arith/congruence_manager.cpp
parent6acb8e96739df11859d3bca8a9e67bdaff5600c6 (diff)
- Added a loop to internally assert constraints that are marked as true.
- Changes how CongruenceManager reports conflicts. - ConstraintDatabase can now detect and raise conflicts when doing unate propagation.
Diffstat (limited to 'src/theory/arith/congruence_manager.cpp')
-rw-r--r--src/theory/arith/congruence_manager.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/theory/arith/congruence_manager.cpp b/src/theory/arith/congruence_manager.cpp
index 649e34134..14d2370ab 100644
--- a/src/theory/arith/congruence_manager.cpp
+++ b/src/theory/arith/congruence_manager.cpp
@@ -7,8 +7,9 @@ namespace CVC4 {
namespace theory {
namespace arith {
-ArithCongruenceManager::ArithCongruenceManager(context::Context* c, ConstraintDatabase& cd, TNodeCallBack& setup, const ArithVarNodeMap& av2Node)
- : d_conflict(c),
+ArithCongruenceManager::ArithCongruenceManager(context::Context* c, ConstraintDatabase& cd, TNodeCallBack& setup, const ArithVarNodeMap& av2Node, NodeCallBack& raiseConflict)
+ : d_inConflict(c),
+ d_raiseConflict(raiseConflict),
d_notify(*this),
d_keepAlive(c),
d_propagatations(c),
@@ -112,7 +113,7 @@ bool ArithCongruenceManager::propagate(TNode x){
++(d_statistics.d_conflicts);
Node conf = flattenAnd(explainInternal(x));
- d_conflict.set(conf);
+ raiseConflict(conf);
Debug("arith::congruenceManager") << "rewritten to false "<<x<<" with explanation "<< conf << std::endl;
return false;
}
@@ -141,7 +142,7 @@ bool ArithCongruenceManager::propagate(TNode x){
Node final = flattenAnd(conf);
++(d_statistics.d_conflicts);
- d_conflict.set(final);
+ raiseConflict(final);
Debug("arith::congruenceManager") << "congruenceManager found a conflict " << final << std::endl;
return false;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback