out << " ";
ProofManager::getTheoryProofEngine()->printConstantDisequalityProof(out,
n1[0].toExpr(),
- n1[1].toExpr());
+ n1[1].toExpr(),
+ map);
}
out << "))" << std::endl;
ProofManager::getTheoryProofEngine()->printConstantDisequalityProof(out,
n[0].toExpr(),
- n[1].toExpr());
+ n[1].toExpr(),
+ map);
return pf->d_node;
}
// subproof already shows constant = t3
Assert(t3 == subproof[1]);
out << "(negtrans _ _ _ _ ";
- tp->printConstantDisequalityProof(out, t2.toExpr(), subproof[0].toExpr());
+ tp->printConstantDisequalityProof(out, t2.toExpr(), subproof[0].toExpr(), map);
out << " ";
out << ss.str();
out << ")";
Assert(t2 == subproof[1]);
out << "(negsymm _ _ _ ";
out << "(negtrans _ _ _ _ ";
- tp->printConstantDisequalityProof(out, t3.toExpr(), subproof[0].toExpr());
+ tp->printConstantDisequalityProof(out, t3.toExpr(), subproof[0].toExpr(), map);
out << " ";
out << ss.str();
out << "))";
// subproof already shows constant = t3
Assert(t3 == subproof[0]);
out << "(negtrans _ _ _ _ ";
- tp->printConstantDisequalityProof(out, t2.toExpr(), subproof[1].toExpr());
+ tp->printConstantDisequalityProof(out, t2.toExpr(), subproof[1].toExpr(), map);
out << " ";
out << "(symm _ _ _ " << ss.str() << ")";
out << ")";
Assert(t2 == subproof[0]);
out << "(negsymm _ _ _ ";
out << "(negtrans _ _ _ _ ";
- tp->printConstantDisequalityProof(out, t3.toExpr(), subproof[1].toExpr());
+ tp->printConstantDisequalityProof(out, t3.toExpr(), subproof[1].toExpr(), map);
out << " ";
out << "(symm _ _ _ " << ss.str() << ")";
out << "))";
d_exprToTheoryIds[term].insert(id);
}
-void TheoryProofEngine::printConstantDisequalityProof(std::ostream& os, Expr c1, Expr c2) {
+void TheoryProofEngine::printConstantDisequalityProof(std::ostream& os, Expr c1, Expr c2, const ProofLetMap &globalLetMap) {
Assert(c1.isConst());
Assert(c2.isConst());
Assert(theory::Theory::theoryOf(c1) == theory::Theory::theoryOf(c2));
- getTheoryProof(theory::Theory::theoryOf(c1))->printConstantDisequalityProof(os, c1, c2);
+ getTheoryProof(theory::Theory::theoryOf(c1))->printConstantDisequalityProof(os, c1, c2, globalLetMap);
}
void TheoryProofEngine::registerTerm(Expr term) {
Assert(!oc.d_lemma.isNull());
Trace("pf::tp") << "; ++ but got lemma: " << oc.d_lemma << std::endl;
- // Original, as in Liana's branch
- // Trace("pf::tp") << "; asserting " << oc.d_lemma[1].negate() << std::endl;
- // th->assertFact(oc.d_lemma[1].negate(), false);
- // th->check(theory::Theory::EFFORT_FULL);
-
- // Altered version, to handle OR lemmas
-
if (oc.d_lemma.getKind() == kind::OR) {
Debug("pf::tp") << "OR lemma. Negating each child separately" << std::endl;
for (unsigned i = 0; i < oc.d_lemma.getNumChildren(); ++i) {
}
// The let map should already have the current expression.
- ProofLetMap::const_iterator it = map.find(currentExpression.toExpr());
+ ProofLetMap::const_iterator it = map.find(term);
if (it != map.end()) {
unsigned id = it->second.id;
unsigned count = it->second.count;
Unreachable("No boolean lemmas yet!");
}
-void TheoryProof::printConstantDisequalityProof(std::ostream& os, Expr c1, Expr c2) {
+void TheoryProof::printConstantDisequalityProof(std::ostream& os, Expr c1, Expr c2, const ProofLetMap &globalLetMap) {
// By default, we just print a trust statement. Specific theories can implement
// better proofs.
- ProofLetMap emptyMap;
os << "(trust_f (not (= _ ";
- d_proofEngine->printBoundTerm(c1, os, emptyMap);
+ d_proofEngine->printBoundTerm(c1, os, globalLetMap);
os << " ";
- d_proofEngine->printBoundTerm(c2, os, emptyMap);
+ d_proofEngine->printBoundTerm(c2, os, globalLetMap);
os << ")))";
}
void markTermForFutureRegistration(Expr term, theory::TheoryId id);
- void printConstantDisequalityProof(std::ostream& os, Expr c1, Expr c2);
+ void printConstantDisequalityProof(std::ostream& os, Expr c1, Expr c2, const ProofLetMap &globalLetMap);
virtual void treatBoolsAsFormulas(bool value) {};
*
* @param term
*/
- virtual void printConstantDisequalityProof(std::ostream& os, Expr c1, Expr c2);
+ virtual void printConstantDisequalityProof(std::ostream& os, Expr c1, Expr c2, const ProofLetMap &globalLetMap);
/**
* Print a proof for the equivalence of n1 and n2.
*
out << ss.str();
out << " ";
- ProofManager::getTheoryProofEngine()->printConstantDisequalityProof(out, n1[0].toExpr(), n1[1].toExpr());
+ ProofManager::getTheoryProofEngine()->printConstantDisequalityProof(out, n1[0].toExpr(), n1[1].toExpr(), map);
out << "))" << std::endl;
}