return TrustNode::mkTrustRewrite(n, ns, nullptr);
}
Node eq = n.eqNode(ns);
- // remember the index
- d_eqtIndex[eq] = d_tsubs.size();
+ // If we haven't already stored an index, remember the index. Otherwise, a
+ // (possibly shorter) prefix of the substitution already suffices to show eq
+ if (d_eqtIndex.find(eq) == d_eqtIndex.end())
+ {
+ d_eqtIndex[eq] = d_tsubs.size();
+ }
// this class will provide a proof if asked
return TrustNode::mkTrustRewrite(n, ns, this);
}
{
return d_subsPg->getProofFor(eq);
}
+ Trace("trust-subs-pf") << "getProofFor " << eq << std::endl;
+ AlwaysAssert(d_proving.find(eq) == d_proving.end())
+ << "Repeat getProofFor in TrustSubstitutionMap " << eq;
+ d_proving.insert(eq);
NodeUIntMap::iterator it = d_eqtIndex.find(eq);
Assert(it != d_eqtIndex.end());
Trace("trust-subs-pf") << "TrustSubstitutionMap::getProofFor, # assumptions= "
<< it->second << std::endl;
Node cs = getSubstitution(it->second);
+ Trace("trust-subs-pf") << "getProofFor substitution is " << cs << std::endl;
Assert(eq != cs);
std::vector<Node> pfChildren;
if (!cs.isConst())
d_applyPg->addSteps(*d_tspb.get());
d_tspb->clear();
Trace("trust-subs-pf") << "...finish, make proof" << std::endl;
- return d_applyPg->getProofFor(eq);
+ std::shared_ptr<ProofNode> ret = d_applyPg->getProofFor(eq);
+ d_proving.erase(eq);
+ return ret;
}
std::string TrustSubstitutionMap::identify() const { return d_name; }
regress1/proofs/qgu-fuzz-arrays-1-dd-te-auto.smt2
regress1/proofs/quant-alpha-eq.smt2
regress1/proofs/sat-trivial-cycle.smt2
+ regress1/proofs/str-ovf-dd.smt2
regress1/proofs/unsat-cores-proofs.smt2
regress1/push-pop/arith_lra_01.smt2
regress1/push-pop/arith_lra_02.smt2
--- /dev/null
+(set-logic ALL)
+(set-info :status unsat)
+(declare-const x Bool)
+(declare-const a String)
+(declare-const a4 String)
+(assert (= a4 "-"))
+(assert (str.in_re (str.++ a4 a a4) re.allchar))
+(assert (= x (str.in_re a re.allchar)))
+(check-sat)