NodeManager* nm = NodeManager::currentNM();
Trace("str-deq") << "Process disequalites..." << std::endl;
std::vector<Node> relevantDeqs;
- //for each pair of disequal strings, must determine whether their lengths are equal or disequal
+ // for each pair of disequal strings, must determine whether their lengths
+ // are equal or disequal
for (const Node& eq : deqs)
{
Trace("str-deq") << "- disequality " << eq << std::endl;
std::vector<Node> len_splits;
for (size_t i = 0, csize = col.size(); i < csize; i++)
{
- Trace("strings-model") << "Checking length for {" << col[i];
+ Trace("strings-model") << "Checking length for { " << col[i];
Trace("strings-model") << " } (length is " << lts[i] << ")" << std::endl;
Node len_value;
if( lts[i].isConst() ) {
// in the term set and, as a result, are skipped when the equality
// engine is asserted to the theory model.
m->getEqualityEngine()->addTerm(eqc);
+
+ // For sequences constants, also add the elements (expanding elements
+ // as necessary)
+ if (eqc.getType().isSequence())
+ {
+ const std::vector<Node> elems = eqc.getConst<Sequence>().getVec();
+ std::vector<TNode> visit(elems.begin(), elems.end());
+ for (size_t j = 0; j < visit.size(); j++)
+ {
+ Node se = visit[j];
+ Assert(se.isConst());
+ if (se.getType().isSequence())
+ {
+ const std::vector<Node> selems = se.getConst<Sequence>().getVec();
+ visit.insert(visit.end(), selems.begin(), selems.end());
+ }
+ m->getEqualityEngine()->addTerm(se);
+ }
+ }
+
Trace("strings-model") << "-> constant" << std::endl;
continue;
}
regress0/seq/issue5547-small-seq-len-unit.smt2
regress0/seq/issue5665-invalid-model.smt2
regress0/seq/issue6337-seq.smt2
+ regress0/seq/issue8133-block-const-elems.smt2
regress0/seq/len_simplify.smt2
regress0/seq/mixed-types-seq-nth.smt2
regress0/seq/nth-oob.smt2
--- /dev/null
+(set-logic ALL)
+(declare-fun v () (Seq (Seq Int)))
+(declare-fun a () (Seq Int))
+(declare-fun r () (Seq Int))
+(declare-fun r3 () (Seq (Seq Int)))
+
+(assert (and
+ (not (= v r3))
+ (not (= v (seq.unit (as seq.empty (Seq Int)))))
+ (not (= r3 (seq.unit (as seq.empty (Seq Int)))))))
+
+(set-info :status sat)
+(check-sat)