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

z3 reports sat on trivally unsolvable String formula #2513

Closed
wintered opened this issue Aug 22, 2019 · 1 comment
Closed

z3 reports sat on trivally unsolvable String formula #2513

wintered opened this issue Aug 22, 2019 · 1 comment

Comments

@wintered
Copy link

Hi,
for the following formula z3 will incorrectly report sat.

(declare-fun a () String)
(declare-fun b () String)
(declare-fun c () String)
(declare-fun d () String)
(assert (= a (str.++ b d))) 
(assert
  (or
    (and
        (= (str.indexof (str.substr a 0 (str.len b)) "=" 0) 0)
        (= (str.indexof b "=" 0) 1) 
    ) 
    (not 
      (= (str.suffixof "A" d) (str.suffixof "A" (str.replace c c d)))
    )
  )
)
(check-sat)

We crosschecked with CVC4 which correctly returns unsat on this formula.

OS: Ubuntu18.04
Revision: eea0413

NikolajBjorner added a commit that referenced this issue Aug 24, 2019
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
@NikolajBjorner
Copy link
Contributor

this is now addressed with current master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants