Fixes #8936.
if( changed ){
tmp = NodeManager::currentNM()->mkNode( t.getKind(), cc );
}
- retNode = simplify(tmp, asserts);
+ // We cannot statically reduce seq.nth due to it being partial function.
+ // Reducing it here would violate the functional property of seq.nth.
+ if (tmp.getKind() != SEQ_NTH)
+ {
+ retNode = simplify(tmp, asserts);
+ }
}
d_visited[t] = retNode;
return retNode;
* (exists k) asserts => t = t'
* is valid, where k are the free skolems introduced when constructing
* asserts.
+ *
+ * This method is called only for eager preprocessing of extended functions.
*/
Node processAssertion(Node t, std::vector<Node>& asserts);
* Applies simplify to all top-level extended function subterms of t. New
* assertions created in this reduction are added to asserts. The argument
* visited stores a cache of previous results.
+ *
+ * This method is called only for eager preprocessing of extended functions.
*/
Node simplifyRec(Node t, std::vector<Node>& asserts);
/**
regress1/sep/wand-simp-unsat.smt2
regress1/seq/issue8148-2-const-mv.smt2
regress1/seq/issue8148-const-mv.smt2
+ regress1/seq/issue8936-nth-eager-red.smt2
regress1/sets/choose.cvc.smt2
regress1/sets/choose1.smt2
regress1/sets/choose2.smt2
--- /dev/null
+; COMMAND-LINE: --strings-exp --no-strings-lazy-pp
+; EXPECT: unsat
+(set-logic ALL)
+(declare-fun a () (Seq Int))
+(declare-fun b () (Seq Int))
+(declare-fun c () Int)
+(assert (= a b))
+(assert (not (= (seq.nth a c) (seq.nth b c))))
+(check-sat)
-; COMMAND-LINE: -q
+; COMMAND-LINE: --strings-exp -q
; EXPECT: sat
(set-logic ALL)
(set-info :status sat)