summaryrefslogtreecommitdiff
path: root/src/theory/arith/arithvar.cpp
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2015-04-17 15:22:53 +0200
committerTim King <taking@cs.nyu.edu>2015-04-18 13:32:28 +0200
commit174e03832db4325d79880a2048aaad5c405ff699 (patch)
treef739b2428a8a2e9262e0d0b1fc77c04b5ec707ea /src/theory/arith/arithvar.cpp
parent4d359ce4470c44c3e7532edb6b60bcb61b51f862 (diff)
Farkas proof coefficients.
This commit adds tracking of Farkas coefficients to proof enabled builds in the theory of linear real arithmetic when proofs are enabled. There could be some performance changes due to subtly different search paths being taken. Additional bug fixes: - Polynomial::exactDivide did not satisfy preconditions to the Monomial constructor. To prevent future problems, Monomials should now be made via one of the mkMonomial functions. - Fixes a bug in SumOfInfeasibilitiesSPD::greedyConflictSubsets(). There was a way to use a row twice in the construction of the conflicts. This was violating an assumption in the Tableau when constructing the intermediate rows. Constraints: - To enable proofs, all conflicts and propagations are designed to go through the Constraint system before they are converted to externally understandable conflicts and propagations in the form of Node. - Constraints must now be given a reason for marking them as true that corresponds to a proof. - Constraints should now be marked as being true by one of the impliedbyX functions. - Each impliedByX function has an ArithProofType associated with it. - Each call to an impliedByX function stores a context dependent ConstraintRule object to track the proof. - After marking the node as true the caller should either try to propagate the constraint or raise a conflict. - There are no more special cases for marking a node as being true when its negation has a proof vs. when the negation does not have a proof. One must now explicitly pass in a inConflict flag to the impliedByX (and similar functions). For example,this is now longer both: void setAssertedToTheTheory(TNode witness); void setAssertedToTheTheoryWithNegationTrue(TNode witness); There is just: void setAssertedToTheTheory(TNode witness, bool inConflict);
Diffstat (limited to 'src/theory/arith/arithvar.cpp')
-rw-r--r--src/theory/arith/arithvar.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/theory/arith/arithvar.cpp b/src/theory/arith/arithvar.cpp
index 9a7878750..acae61db0 100644
--- a/src/theory/arith/arithvar.cpp
+++ b/src/theory/arith/arithvar.cpp
@@ -18,6 +18,7 @@
#include "theory/arith/arithvar.h"
#include <limits>
+#include <set>
namespace CVC4 {
namespace theory {
@@ -25,6 +26,11 @@ namespace arith {
const ArithVar ARITHVAR_SENTINEL = std::numeric_limits<ArithVar>::max();
+bool debugIsASet(const std::vector<ArithVar>& variables){
+ std::set<ArithVar> asSet(variables.begin(), variables.end());
+ return asSet.size() == variables.size();
+}
+
}/* CVC4::theory::arith namespace */
}/* CVC4::theory namespace */
}/* CVC4 namespace */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback