// Equalities due to theory reasoning
if (d_id == MERGED_THROUGH_CONSTANTS)
{
- Assert(!d_node.isNull() && d_node.getKind() == kind::EQUAL
- && d_node[1].isConst())
+ Assert(!d_node.isNull()
+ && ((d_node.getKind() == kind::EQUAL && d_node[1].isConst())
+ || (d_node.getKind() == kind::NOT
+ && d_node[0].getKind() == kind::EQUAL
+ && d_node[0][0].isConst() && d_node[0][1].isConst())))
<< ". Conclusion " << d_node << " from " << d_id
- << " was expected to be (= (f t1 ... tn) c)\n";
+ << " was expected to be (= (f t1 ... tn) c) or (not (= c1 c2))\n";
Assert(!assumptions.count(d_node))
<< "Conclusion " << d_node << " from " << d_id << " is an assumption\n";
+ // The step has the form (not (= c1 c2)). We conclude it via
+ // MACRO_SR_PRED_INTRO and turn it into an equality with false, so that the
+ // rest of the reconstruction works
+ if (d_children.empty())
+ {
+ Node conclusion =
+ d_node[0].eqNode(NodeManager::currentNM()->mkConst<bool>(false));
+ p->addStep(d_node, PfRule::MACRO_SR_PRED_INTRO, {}, {d_node});
+ p->addStep(conclusion, PfRule::FALSE_INTRO, {}, {d_node});
+ visited[d_node] = conclusion;
+ return conclusion;
+ }
// The step has the form
// [(= t1 c1)] ... [(= tn cn)]
// ------------------------
// The terms must be there already
Assert(hasTerm(t1) && hasTerm(t2));
+ // Get the ids
+ EqualityNodeId t1Id = getNodeId(t1);
+ EqualityNodeId t2Id = getNodeId(t2);
+
+ Trace("pf::ee") << "Ids: " << t1Id << ", " << t2Id << "\n";
+
if (TraceIsOn("equality::internal"))
{
debugPrintGraph();
}
- // Get the ids
- EqualityNodeId t1Id = getNodeId(t1);
- EqualityNodeId t2Id = getNodeId(t2);
std::map<std::pair<EqualityNodeId, EqualityNodeId>, EqProof*> cache;
if (polarity) {
regress1/proj-issue406-diff-unsat-core.smt2
regress1/proj-issue476-theoryOf-no-uf.smt2
regress1/proof00.smt2
+ regress1/proofs/eq-engine-corner-case-constants-disequal.smt2
regress1/proofs/issue6625-unsat-core-proofs.smt2
regress1/proofs/macro-res-exp-crowding-lit-inside-unit.smt2
regress1/proofs/macro-res-exp-singleton-after-elimCrowd.smt2
--- /dev/null
+; COMMAND-LINE: --produce-proofs
+; EXPECT: sat
+(set-logic QF_SLIA)
+(declare-const x Bool)
+(declare-fun s () String)
+(assert (ite (str.prefixof "-" (str.substr s 1 1)) true x))
+(assert (> (- (str.len s) 1 (+ 1 1) (+ 1 1)) 0))
+(assert (str.in_re s (re.+ (re.range "0" "9"))))
+(assert (= 1 (str.to_int (str.substr s (+ 1 1 1 1) (+ 1 1)))))
+(check-sat)