d_preregisteredTerms(s.getSatContext()),
d_registeredTerms(s.getUserContext()),
d_registeredTypes(s.getUserContext()),
+ d_proxyVar(s.getUserContext()),
d_lengthLemmaTermsCache(s.getUserContext()),
d_epg(pnm ? new EagerProofGenerator(
pnm,
void TermRegistry::registerTerm(Node n, int effort)
{
- TypeNode tn = n.getType();
+ Trace("strings-register") << "TheoryStrings::registerTerm() " << n
+ << ", effort = " << effort << std::endl;
+ if (d_registeredTerms.find(n) != d_registeredTerms.end())
+ {
+ Trace("strings-register") << "...already registered" << std::endl;
+ return;
+ }
bool do_register = true;
+ TypeNode tn = n.getType();
if (!tn.isStringLike())
{
if (options::stringEagerLen())
}
if (!do_register)
{
+ Trace("strings-register") << "...do not register" << std::endl;
return;
}
- if (d_registeredTerms.find(n) != d_registeredTerms.end())
- {
- return;
- }
+ Trace("strings-register") << "...register" << std::endl;
d_registeredTerms.insert(n);
// ensure the type is registered
registerType(tn);
- Debug("strings-register") << "TheoryStrings::registerTerm() " << n
- << ", effort = " << effort << std::endl;
TrustNode regTermLem;
if (tn.isStringLike())
{
Node TermRegistry::getProxyVariableFor(Node n) const
{
- std::map<Node, Node>::const_iterator it = d_proxyVar.find(n);
+ NodeNodeMap::const_iterator it = d_proxyVar.find(n);
if (it != d_proxyVar.end())
{
return (*it).second;
* which rewrites to 3 = 3.
* In the above example, we store "ABC" -> v_{"ABC"} in this map.
*/
- std::map<Node, Node> d_proxyVar;
+ NodeNodeMap d_proxyVar;
/**
* Map from proxy variables to their normalized length. In the above example,
* we store "ABC" -> 3.
// this is only required for internal facts, others are already registered
if (isInternal && atom.getKind() == EQUAL)
{
- // we must ensure these terms are registered
+ // We must ensure these terms are registered. We register eagerly here for
+ // performance reasons. Alternatively, terms could be registered at full
+ // effort in e.g. BaseSolver::init.
for (const Node& t : atom)
{
- // terms in the equality engine are already registered, hence skip
- // currently done for only string-like terms, but this could potentially
- // be avoided.
- if (!d_equalityEngine->hasTerm(t) && t.getType().isStringLike())
- {
- d_termReg.registerTerm(t, 0);
- }
+ d_termReg.registerTerm(t, 0);
}
}
return false;
regress1/strings/issue5692-infer-proxy.smt2
regress1/strings/issue5940-skc-len-conc.smt2
regress1/strings/issue5940-2-skc-len-conc.smt2
+ regress1/strings/issue6072-inc-no-const-reg.smt2
regress1/strings/issue6075-repl-len-one-rr.smt2
regress1/strings/issue6142-repl-inv-rew.smt2
regress1/strings/kaluza-fl.smt2