(! r (^ (sc_concat_eq s t rev) res)
(holds res))))))))
+; Helper method for PfRule::CONCAT_UNIFY. Returns ok if s or its head is equal to s1,
+; where the head of the reverse of s is checked if rev is tt. Fails otherwise.
+(program sc_concat_head_or_self ((s term) (s1 term) (rev flag)) Ok
+ (ifequal s s1
+ ok
+ (ifequal (sc_string_head (sc_string_rev s rev)) s1
+ ok
+ (fail Ok)))
+)
+
; Computes whether the heads of the premise (= s t) match s1 and t1 for the
; PfRule::CONCAT_UNIFY rule
(program sc_concat_unify ((s term) (t term) (s1 term) (t1 term) (rev flag)) Ok
- (ifequal (sc_string_head (sc_string_rev s rev)) s1
- (ifequal (sc_string_head (sc_string_rev t rev)) t1
+ (ifequal (sc_concat_head_or_self s s1 rev) ok
+ (ifequal (sc_concat_head_or_self t t1 rev) ok
ok
(fail Ok))
(fail Ok)))
regress1/strings/regexp001.smt2
regress1/strings/regexp002.smt2
regress1/strings/regexp003.smt2
+ regress1/strings/regexp-050-multiply-graft-fuzz-dd.smt2
regress1/strings/regexp-strat-fix.smt2
regress1/strings/reloop.smt2
regress1/strings/repl-empty-sem.smt2
--- /dev/null
+; COMMAND-LINE: --strings-exp
+; EXPECT: unsat
+(set-logic ALL)
+(set-info :status unsat)
+(declare-const y String)
+(assert (= 2 (str.len y)))
+(assert (str.in_re y (re.+ (re.range "!" "3"))))
+(assert (str.contains "1kN" y))
+(check-sat)