summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2014-06-24 16:46:09 -0400
committerTim King <taking@cs.nyu.edu>2014-06-24 16:46:09 -0400
commit7346e80b4f443b2449a0d211b657e2929e065d62 (patch)
tree177a34c9aef712238dc5151a508ec97990fb7108 /src
parent92b91586e48e5cc47ae998ecd2f9b0037a3ee174 (diff)
Fixing a soundness bug in arithmetic and a roubustness problem in rings.
Diffstat (limited to 'src')
-rw-r--r--src/theory/arith/arith_ite_utils.cpp19
-rw-r--r--src/theory/arith/theory_arith_private.cpp13
2 files changed, 30 insertions, 2 deletions
diff --git a/src/theory/arith/arith_ite_utils.cpp b/src/theory/arith/arith_ite_utils.cpp
index d5dcae726..d3702ccd8 100644
--- a/src/theory/arith/arith_ite_utils.cpp
+++ b/src/theory/arith/arith_ite_utils.cpp
@@ -308,6 +308,9 @@ void ArithIteUtils::addImplications(Node x, Node y){
// (=> (not x) y)
// (=> (not y) x)
+ x = Rewriter::rewrite(x);
+ y = Rewriter::rewrite(y);
+
Node xneg = x.negate();
Node yneg = y.negate();
d_implies[xneg].insert(y);
@@ -369,9 +372,21 @@ bool ArithIteUtils::solveBinOr(TNode binor){
Assert(binor[0].getKind() == kind::EQUAL);
Assert(binor[1].getKind() == kind::EQUAL);
+ //Node n =
Node n = applySubstitutions(binor);
+ if(n != binor){
+ n = Rewriter::rewrite(n);
+
+ if(!(n.getKind() == kind::OR &&
+ n.getNumChildren() == 2 &&
+ n[0].getKind() == kind::EQUAL &&
+ n[1].getKind() == kind::EQUAL)){
+ return false;
+ }
+ }
+
Assert(n.getKind() == kind::OR);
- Assert(binor.getNumChildren() == 2);
+ Assert(n.getNumChildren() == 2);
TNode l = n[0];
TNode r = n[1];
@@ -416,7 +431,7 @@ bool ArithIteUtils::solveBinOr(TNode binor){
NodeManager* nm = NodeManager::currentNM();
- Node cnd = findIteCnd(binor[0], binor[1]);
+ Node cnd = findIteCnd(l, r);
Node sk = nm->mkSkolem("deor", nm->booleanType());
Node ite = sk.iteNode(otherL, otherR);
diff --git a/src/theory/arith/theory_arith_private.cpp b/src/theory/arith/theory_arith_private.cpp
index b2eec924c..0fa9e79f2 100644
--- a/src/theory/arith/theory_arith_private.cpp
+++ b/src/theory/arith/theory_arith_private.cpp
@@ -2965,6 +2965,19 @@ void TheoryArithPrivate::solveInteger(Theory::Effort effortLevel){
if(mipRes == MipClosed){
d_likelyIntegerInfeasible = true;
replayLog(approx);
+
+ if(!anyConflict()){
+ //start up simplex
+ d_partialModel.stopQueueingBoundCounts();
+ UpdateTrackingCallback utcb(&d_linEq);
+ d_partialModel.processBoundsQueue(utcb);
+ d_linEq.startTrackingBoundCounts();
+ //call simplex
+ solveRelaxationOrPanic(effortLevel);
+ // shutdown simplex
+ d_linEq.stopTrackingBoundCounts();
+ d_partialModel.startQueueingBoundCounts();
+ }
}
if(!(anyConflict() || !d_approxCuts.empty())){
turnOffApproxFor(options::replayNumericFailurePenalty());
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback