Node res = d_trie.add(bn, this, 0, d_samples.size(), forceKeep);
if (d_use_sygus_type)
{
- Assert(d_builtin_to_sygus.find(res) == d_builtin_to_sygus.end());
+ Assert(d_builtin_to_sygus.find(res) != d_builtin_to_sygus.end());
res = res != bn ? d_builtin_to_sygus[res] : n;
}
return res;
{
return n;
}
+ Node bn = n;
+ Node beq_n = eq_n;
+ if (d_use_sygus_type)
+ {
+ bn = d_tds->sygusToBuiltin(n);
+ beq_n = d_tds->sygusToBuiltin(eq_n);
+ }
// one of eq_n or n must be ordered
- bool eqor = isOrdered(eq_n);
- bool nor = isOrdered(n);
+ bool eqor = isOrdered(beq_n);
+ bool nor = isOrdered(bn);
Trace("sygus-synth-rr-debug")
<< "Ordered? : " << nor << " " << eqor << std::endl;
bool isUnique = false;
// free variables of the other
if (!eqor)
{
- isUnique = containsFreeVariables(n, eq_n);
+ isUnique = containsFreeVariables(bn, beq_n);
}
else if (!nor)
{
- isUnique = containsFreeVariables(eq_n, n);
+ isUnique = containsFreeVariables(beq_n, bn);
}
}
Trace("sygus-synth-rr-debug") << "AlphaEq unique: " << isUnique << std::endl;
if (d_drewrite != nullptr)
{
Trace("sygus-synth-rr-debug") << "Add rewrite..." << std::endl;
- if (!d_drewrite->addRewrite(n, eq_n))
+ if (!d_drewrite->addRewrite(bn, beq_n))
{
rewRedundant = isUnique;
// must be unique according to the dynamic rewriter
// sampler database.
if (!eqor)
{
- registerTerm(n, true);
+ SygusSampler::registerTerm(n, true);
}
return eq_n;
}