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

z3str3 invalid model on QF_SLIA formula #3069

Open
muchang opened this issue Feb 21, 2020 · 2 comments
Open

z3str3 invalid model on QF_SLIA formula #3069

muchang opened this issue Feb 21, 2020 · 2 comments
Assignees
Labels
performance Issues that relate primarily to the performance of Z3, such as timeouts z3str3

Comments

@muchang
Copy link

muchang commented Feb 21, 2020

Hi,
For this formula:

(declare-fun a () String)
(declare-fun b () Int)
(assert (distinct (str.replace "A" (int.to.str b) a)
         (str.replace "" (int.to.str b) a)))
(assert (= (str.replace a (str.at a b) "") a))
(check-sat)
(get-model)

Z3 smt.string_solver=z3str3 gives an invalid model:

(model 
  (define-fun b () Int
    1)
  (define-fun a () String
    "\x00\x00\x00")
)

if I feed this model to the formula, Z3 reports unsat.

OS: Ubuntu 18.04
Commit: 1aea0d2

@mtrberzi
Copy link
Collaborator

This case times out as of the latest commit. Do you know the expected response from the solver?

@zhendongsu
Copy link

zhendongsu commented Feb 28, 2020

Both Z3 and CVC4 report sat. Below is the model from Z3:

(model 
  (define-fun b () Int
    (- 2))
  (define-fun a () String
    "\x00\x00\x00")
)

@mtrberzi mtrberzi added the performance Issues that relate primarily to the performance of Z3, such as timeouts label Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Issues that relate primarily to the performance of Z3, such as timeouts z3str3
Projects
None yet
Development

No branches or pull requests

4 participants