Skip to content
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

Invalid model for String formula (smt.arith.random_initial_value, rewriter.elim_and, smt.arith.solver 2) #3933

Closed
rainoftime opened this issue Apr 12, 2020 · 1 comment

Comments

@rainoftime
Copy link
Contributor

Hi, for the following formula, z3 (commit db9d6d1) gives an invalid model

(set-option :model_validate true)
(set-option :smt.arith.random_initial_value true)
(set-option :rewriter.elim_and true)
(set-option :smt.arith.solver 2)
(declare-const v11 Bool)
(declare-const i7 Int)
(declare-const Str6 String)
(declare-const Str7 String)
(declare-const Str8 String)
(declare-const v14 Bool)
(declare-const i12 Int)
(declare-const i13 Int)
(assert (and (= Str6 (str.++ Str8 (int.to.str i7))) (> (abs i12) i7)))
(push 1)
(assert-soft v11)
(assert (>= (str.len Str6) i13))
(declare-const v19 Bool)
(assert (>= (str.len Str7) i12))
(assert (ite v19 v14 true))
(check-sat)
@rainoftime rainoftime changed the title Invalid model for String formula ((smt.arith.random_initial_value, rewriter.elim_and, smt.arith.solver 2) Invalid model for String formula (smt.arith.random_initial_value, rewriter.elim_and, smt.arith.solver 2) Apr 12, 2020
NikolajBjorner added a commit that referenced this issue Apr 15, 2020
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
@NikolajBjorner
Copy link
Contributor

it now produces a valid model. The changes made to fix the root causes
are quite invasive and it is very possible I missed the main issue as well.

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

2 participants