Skip to content

smt2_solver gives incorrect result on multidimensional arrays #4749

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

Open
romainbrenguier opened this issue Jun 4, 2019 · 0 comments
Open

Comments

@romainbrenguier
Copy link
Contributor

I encountered a problem on an smt2 instance that I minimized into this example:

; SMT 2

; a = nondet && a < 2
(declare-fun |a| () (_ BitVec 64))
(assert (not (bvuge |a| (_ bv2 64))))

; int input_array[][]
(declare-fun input_array () (Array (_ BitVec 64) (Array (_ BitVec 64) (_ BitVec 64))))

; tmp_array = input_array with a <- (input_array[a] with 0 <- 2)
(define-fun |tmp_array| () (Array (_ BitVec 64) (Array (_ BitVec 64) (_ BitVec 64))) (store input_array |a| (store (select input_array |a|) (_ bv0 64) (_ bv2 64))))

; result_array == {tmp_array[0]; tmp_array[1]}
(declare-fun result_array () (Array (_ BitVec 64) (Array (_ BitVec 64) (_ BitVec 64))))
(assert (= (select result_array (_ bv0 64)) (select |tmp_array| (_ bv0 64))))
(assert (= (select result_array (_ bv1 64)) (select |tmp_array| (_ bv1 64))))

; p == result_array[a][0]
(declare-fun |p| () (_ BitVec 64))
(assert (= |p| (select (select result_array |a|) (_ bv0 64))))

; p != 2
(assert (not (= |p| (_ bv2 64))))

(check-sat)
(exit)
; end of SMT2 file

CBMC version: 5.12
Operating system: 64-bit x86_64 linux
Exact command line resulting in the issue: smt2_solver test.smt2
What behaviour did you expect: this should be unsat, as is confirmed by running z3 on the same file
What happened instead: smt2_solver returns sat

romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Jun 4, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Jun 4, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Jun 10, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Jun 11, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Jun 13, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Jun 27, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Jun 27, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Jun 27, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Jun 27, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Jul 12, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Jul 12, 2019
This is failing because of this bug:
diffblue#4749
smowton pushed a commit to smowton/cbmc that referenced this issue Jul 24, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Jul 29, 2019
This is failing because of this bug:
diffblue#4749
smowton pushed a commit to smowton/cbmc that referenced this issue Jul 29, 2019
This is failing because of this bug:
diffblue#4749
smowton pushed a commit to smowton/cbmc that referenced this issue Jul 29, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Jul 30, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Jul 31, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Aug 6, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Aug 6, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Aug 6, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Aug 6, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Aug 7, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Aug 10, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Aug 13, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Aug 14, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Aug 14, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Aug 15, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Aug 15, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Aug 16, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Aug 20, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Aug 20, 2019
This is failing because of this bug:
diffblue#4749
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this issue Aug 21, 2019
This is failing because of this bug:
diffblue#4749
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

3 participants