// 11* : drop the constraint, do not propagate x or c
if(!c->hasProof() && x != rewritten){
- pushBack(x, rewritten);
+ if(c->assertedToTheTheory()){
+ pushBack(x, rewritten, c->getWitness());
+ }else{
+ pushBack(x, rewritten);
+ }
c->setEqualityEngineProof();
if(c->canBePropagated() && !c->assertedToTheTheory()){
c->propagate();
}
}else if(!c->hasProof() && x == rewritten){
- pushBack(x, rewritten);
+ if(c->assertedToTheTheory()){
+ pushBack(x, c->getWitness());
+ }else{
+ pushBack(x);
+ }
c->setEqualityEngineProof();
}else if(c->hasProof() && x != rewritten){
- pushBack(x, rewritten);
+ if(c->assertedToTheTheory()){
+ pushBack(x, rewritten, c->getWitness());
+ }else{
+ pushBack(x, rewritten);
+ }
}else{
Assert(c->hasProof() && x == rewritten);
}
++(d_statistics.d_propagations);
}
+ void pushBack(TNode n, TNode r, TNode w){
+ d_explanationMap.insert(w, d_propagatations.size());
+ d_explanationMap.insert(r, d_propagatations.size());
+ d_explanationMap.insert(n, d_propagatations.size());
+ d_propagatations.enqueue(n);
+
+ ++(d_statistics.d_propagations);
+ }
+
bool propagate(TNode x);
void explain(TNode literal, std::vector<TNode>& assumptions);
d_hasDoneWorkSinceCut(false),
d_learner(d_pbSubstitutions),
d_setupLiteralCallback(this),
+ d_assertionsThatDoNotMatchTheirLiterals(c),
d_nextIntegerCheckVar(0),
d_constantIntegerVariables(c),
d_diseqQueue(c, false),
}
Node reAssertion = isDistinct ? reEq.notNode() : reEq;
constraint = d_constraintDatabase.lookup(reAssertion);
+
+ if(assertion != reAssertion){
+ Debug("arith::nf") << "getting non-nf assertion " << assertion << " |-> " << reAssertion << endl;
+ Assert(constraint != NullConstraint);
+ d_assertionsThatDoNotMatchTheirLiterals[assertion] = constraint;
+ }
}
// Kind simpleKind = Comparison::comparisonKind(assertion);
Node exp = c->explainForPropagation();
Debug("arith::explain") << "constraint explanation" << n << ":" << exp << endl;
return exp;
+ }else if(d_assertionsThatDoNotMatchTheirLiterals.find(n) != d_assertionsThatDoNotMatchTheirLiterals.end()){
+ c = d_assertionsThatDoNotMatchTheirLiterals[n];
+ Node exp = c->explainForPropagation();
+ Debug("arith::explain") << "assertions explanation" << n << ":" << exp << endl;
+ return exp;
}else{
Assert(d_congruenceManager.canExplain(n));
Debug("arith::explain") << "dm explanation" << n << endl;
}
} d_setupLiteralCallback;
-
+ /**
+ * A superset of all of the assertions that currently are not the literal for
+ * their constraint do not match constraint literals. Not just the witnesses.
+ */
+ context::CDHashMap<TNode, Constraint, TNodeHashFunction> d_assertionsThatDoNotMatchTheirLiterals;
/**
* (For the moment) the type hierarchy goes as: