summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2012-08-14 18:01:02 +0000
committerTim King <taking@cs.nyu.edu>2012-08-14 18:01:02 +0000
commit87dbe20de92232279cf1d48ebfe7113194985208 (patch)
treea0b12b544a35c3493af303baec05145634c2baec
parent5a6a08df0838b7fb70275a70ddc942c3ac802081 (diff)
Implements TheoryArith::collectModelInfo(). The current implementation is quite basic. This may need to be revisited.
-rw-r--r--src/theory/arith/theory_arith.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/theory/arith/theory_arith.cpp b/src/theory/arith/theory_arith.cpp
index 6b7efa1ee..ca2d74cf7 100644
--- a/src/theory/arith/theory_arith.cpp
+++ b/src/theory/arith/theory_arith.cpp
@@ -1926,7 +1926,35 @@ DeltaRational TheoryArith::getDeltaValue(TNode n) {
}
void TheoryArith::collectModelInfo( TheoryModel* m ){
+ Assert(d_qflraStatus == Result::SAT);
+ Debug("arith::collectModelInfo") << "collectModelInfo() begin " << endl;
+
+ // Delta lasts at least the duration of the function call
+ const Rational& delta = d_partialModel.getDelta();
+
+ // TODO:
+ // This is not very good for user push/pop....
+ // Revisit when implementing push/pop
+ for(ArithVar v = 0; v < d_variables.size(); ++v){
+ if(!isSlackVariable(v)){
+ Node term = d_arithvarNodeMap.asNode(v);
+
+ const DeltaRational& mod = d_partialModel.getAssignment(v);
+ Rational qmodel = mod.substituteDelta(delta);
+
+ Node qNode = mkRationalNode(qmodel);
+ Debug("arith::collectModelInfo") << "m->assertEquality(" << term << ", " << qmodel << ", true)" << endl;
+
+ m->assertEquality(term, qNode, true);
+ }
+ }
+
+ // Iterate over equivalence classes in LinearEqualityModule
+ // const eq::EqualityEngine& ee = d_congruenceManager.getEqualityEngine();
+ // m->assertEqualityEngine(&ee);
+
+ Debug("arith::collectModelInfo") << "collectModelInfo() end " << endl;
}
bool TheoryArith::safeToReset() const {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback