summaryrefslogtreecommitdiff
path: root/src/theory/arith/theory_arith.h
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2010-10-22 20:22:39 +0000
committerTim King <taking@cs.nyu.edu>2010-10-22 20:22:39 +0000
commit6dee1d9817d8e9209f0a681b7c601ec6b4b5014d (patch)
tree1c6d2bf7185468cccba01c93cb1f67440dc81de8 /src/theory/arith/theory_arith.h
parent11cb621b7fde60a17386b7da4e383bc15e71ab27 (diff)
Code cleanup for TheoryArith.
Diffstat (limited to 'src/theory/arith/theory_arith.h')
-rw-r--r--src/theory/arith/theory_arith.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/theory/arith/theory_arith.h b/src/theory/arith/theory_arith.h
index 26dcc9825..5d00c4cc8 100644
--- a/src/theory/arith/theory_arith.h
+++ b/src/theory/arith/theory_arith.h
@@ -153,16 +153,18 @@ private:
*
* returns true if a conflict was asserted.
*/
- bool AssertLower(TNode n, TNode orig);
- bool AssertUpper(TNode n, TNode orig);
+ bool AssertLower(ArithVar x_i, const DeltaRational& c_i, TNode orig);
+ bool AssertUpper(ArithVar x_i, const DeltaRational& c_i, TNode orig);
+ bool AssertEquality(ArithVar x_i, const DeltaRational& c_i, TNode orig);
+
+ ArithVar determineLeftVariable(TNode assertion, Kind simpleKind);
- bool AssertEquality(TNode n, TNode orig);
/**
* Updates the assignment of a nonbasic variable x_i to v.
* Also updates the assignment of basic variables accordingly.
*/
- void update(ArithVar x_i, DeltaRational& v);
+ void update(ArithVar x_i, const DeltaRational& v);
/**
* Updates the value of a basic variable x_i to v,
@@ -233,12 +235,14 @@ private:
/** Initial (not context dependent) sets up for a new slack variable.*/
void setupSlack(TNode left);
-
- /** Computes the value of a row in the tableau using the current assignment.*/
- DeltaRational computeRowValueUsingAssignment(ArithVar x);
-
- /** Computes the value of a row in the tableau using the safe assignment.*/
- DeltaRational computeRowValueUsingSavedAssignment(ArithVar x);
+ /**
+ * Computes the value of a basic variable using the assignments
+ * of the values of the variables in the basic variable's row tableau.
+ * This can compute the value using either:
+ * - the the current assignment (useSafe=false) or
+ * - the safe assignment (useSafe = true).
+ */
+ DeltaRational computeRowValue(ArithVar x, bool useSafe);
/** Checks to make sure the assignment is consistent with the tableau. */
void checkTableau();
@@ -250,16 +254,13 @@ private:
* Handles the case splitting for check() for a new assertion.
* returns true if their is a conflict.
*/
- bool assertionCases(TNode original, TNode assertion);
+ bool assertionCases(TNode assertion);
ArithVar findBasicRow(ArithVar variable);
bool shouldEject(ArithVar var);
void ejectInactiveVariables();
void reinjectVariable(ArithVar x);
- //TODO get rid of this!
- Node simulatePreprocessing(TNode n);
-
void asVectors(Polynomial& p,
std::vector<Rational>& coeffs,
std::vector<ArithVar>& variables) const;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback