namespace theory {
namespace strings {
-struct StringsProxyVarAttributeId
-{
-};
-typedef expr::Attribute<StringsProxyVarAttributeId, bool>
- StringsProxyVarAttribute;
-
TermRegistry::TermRegistry(Env& env,
SolverState& s,
SequencesStatistics& statistics,
d_registeredTerms(userContext()),
d_registeredTypes(userContext()),
d_proxyVar(userContext()),
+ d_proxyVarToLength(userContext()),
d_lengthLemmaTermsCache(userContext()),
- d_epg(pnm ? new EagerProofGenerator(
- pnm,
- userContext(),
- "strings::TermRegistry::EagerProofGenerator")
- : nullptr)
+ d_epg(
+ pnm ? new EagerProofGenerator(
+ pnm, userContext(), "strings::TermRegistry::EagerProofGenerator")
+ : nullptr)
{
NodeManager* nm = NodeManager::currentNM();
d_zero = nm->mkConst(Rational(0));
}
}
Node sk = d_skCache.mkSkolemCached(n, SkolemCache::SK_PURIFY, "lsym");
- StringsProxyVarAttribute spva;
- sk.setAttribute(spva, true);
Node eq = Rewriter::rewrite(sk.eqNode(n));
d_proxyVar[n] = sk;
// If we are introducing a proxy for a constant or concat term, we do not
if (n.getKind() == STRING_CONCAT)
{
std::vector<Node> nodeVec;
+ NodeNodeMap::const_iterator itl;
for (const Node& nc : n)
{
- if (nc.getAttribute(StringsProxyVarAttribute()))
+ itl = d_proxyVarToLength.find(nc);
+ if (itl != d_proxyVarToLength.end())
{
- Assert(d_proxyVarToLength.find(nc) != d_proxyVarToLength.end());
- nodeVec.push_back(d_proxyVarToLength[nc]);
+ nodeVec.push_back(itl->second);
}
else
{
for (size_t i = 0; i < 2; i++)
{
// determine whether this side has a proxy variable
- if (ns[i].getAttribute(StringsProxyVarAttribute()))
+ if (d_proxyVar.find(ns[i]) != d_proxyVar.end())
{
if (getProxyVariableFor(ns[1 - i]) == ns[i])
{
regress1/strings/issue6101-2.smt2
regress1/strings/issue6132-non-unique-skolem.smt2
regress1/strings/issue6142-repl-inv-rew.smt2
+ regress1/strings/issue6180-proxy-vars.smt2
+ regress1/strings/issue6180-2-proxy-vars.smt2
regress1/strings/issue6184-unsat-core.smt2
regress1/strings/issue6191-replace-all.smt2
regress1/strings/issue6203-1-substr-ctn-strip.smt2