Skip to content

Commit

Permalink
Add more smt2 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
filipeom committed Sep 13, 2024
1 parent 8404516 commit 7fae2c9
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 6 deletions.
4 changes: 3 additions & 1 deletion test/smt2/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
(enabled_if %{lib-available:z3})
(deps
%{bin:smtml}
test_bitv_simple.smt2
test_bitv_const.smt2
test_bitv_sort.smt2
test_bitv_funs.smt2
test_core_all.smt2
test_core_binary.smt2
test_core_const.smt2
Expand Down
3 changes: 3 additions & 0 deletions test/smt2/test_bitv_const.smt2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(declare-fun symbol_0 () (_ BitVec 32))
(assert (= symbol_0 (_ bv0 32)))
(check-sat)
9 changes: 9 additions & 0 deletions test/smt2/test_bitv_funs.smt2
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(declare-const x (_ BitVec 32))
(declare-const y (_ BitVec 32))
(declare-const z (_ BitVec 32))
(declare-const u (_ BitVec 65))
(declare-const v (_ BitVec 64))
(declare-const w (_ BitVec 64))
(assert (= x (bvnot (bvnot x))))
(assert (= (bvneg y) (bvneg y)))
(check-sat)
4 changes: 0 additions & 4 deletions test/smt2/test_bitv_simple.smt2

This file was deleted.

3 changes: 3 additions & 0 deletions test/smt2/test_bitv_sort.smt2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(declare-fun symbol_0 () (_ BitVec 8))
(declare-fun symbol_1 () (_ BitVec 32))
(declare-fun symbol_2 () (_ BitVec 64))
5 changes: 4 additions & 1 deletion test/smt2/test_smt2.t
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,8 @@ Test String parsing:
(x "abcd"))

Test BitVector parsing:
$ smtml run test_bitv_simple.smt2
$ smtml run test_bitv_sort.smt2
$ smtml run test_bitv_const.smt2
sat
$ smtml run test_bitv_funs.smt2
sat

0 comments on commit 7fae2c9

Please sign in to comment.