Skip to content

seq.indexOf with a non-0 start #4086

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
LeventErkok opened this issue Apr 24, 2020 · 0 comments
Closed

seq.indexOf with a non-0 start #4086

LeventErkok opened this issue Apr 24, 2020 · 0 comments

Comments

@LeventErkok
Copy link

This is quite similar to #4076, except we start searching not at the beginning but in the middle somewhere:

(set-option :produce-models true)
(set-logic ALL)
(define-fun s0 () (Seq Int) (seq.++ (seq.unit 1) (seq.unit 2) (seq.unit 3)))
(define-fun s1 () (Seq Int) (seq.unit 2))
(declare-fun s2 () Int)
(assert (= s2 (seq.indexof s0 s1 1)))
(check-sat)
(get-value (s2))

The value of s2 must be 1, but we're getting:

$ z3 a.smt2
sat
((s2 0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant