NormalForm& nf = d_csolver.getNormalForm(r);
Trace("seq-array-debug") << "...normal form " << nf.d_nf << std::endl;
std::vector<Node> nfChildren;
+
+ if (k == SEQ_NTH)
+ {
+ // The core solver must process all `nth` terms
+ d_currTerms[SEQ_NTH].push_back(t);
+ }
+
if (checkInv)
{
if (k != STRING_UPDATE)
Node uf = SkolemCache::mkSkolemSeqNth(t[0].getType(), "Uf");
elseBranch = nm->mkNode(APPLY_UF, uf, t[0], t[1]);
iid = InferenceId::STRINGS_ARRAY_NTH_UNIT;
- d_currTerms[k].push_back(t);
}
std::vector<Node> exp;
d_im.addToExplanation(t[0], nf.d_nf[0], exp);
}
else if (ck != CONST_SEQUENCE)
{
- bool isAtomic = true;
if (k == STRING_UPDATE)
{
// If the term we are updating is atomic, but the update itself
// concat rule, based on the normal form of the term itself.
rself = d_state.getRepresentative(t);
NormalForm& nfSelf = d_csolver.getNormalForm(rself);
- if (nfSelf.d_nf.size() > 1)
+ if (nfSelf.d_nf.size() == 1)
{
- isAtomic = false;
+ // otherwise, if the normal form is not a constant sequence, and we
+ // are an atomic update term, then this term will be given to the
+ // core array solver.
+ d_currTerms[k].push_back(t);
}
}
- if (isAtomic)
- {
- // otherwise, if the normal form is not a constant sequence, and we
- // are not a non-atomic update term, then this term will be given to
- // the core array solver.
- d_currTerms[k].push_back(t);
- }
return;
}
else