-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
939ad2e
commit bb5f913
Showing
7 changed files
with
68 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
(tests | ||
(names test_trivial test_reset test_terms) | ||
(names test_trivial test_reset test_terms test_val_interp) | ||
(libraries cvc5)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
open Cvc5 | ||
|
||
let tm = TermManager.mk_tm () | ||
|
||
(* Check int values construction and interpretation *) | ||
let () = | ||
let one = Term.mk_int tm 1 in | ||
assert (Term.is_int one); | ||
assert (Term.get_int one = 1) | ||
|
||
(* Check real values contruction and interpretation *) | ||
let () = | ||
let one_float_s = Term.mk_real_s tm "1.0" in | ||
assert (Term.is_real one_float_s); | ||
assert (Term.get_real one_float_s = 1.0); | ||
|
||
let one_float_nd = Term.mk_real tm 1 2 in | ||
assert (Term.is_real one_float_nd); | ||
assert (Term.get_real one_float_nd = 0.5); | ||
|
||
let one_float_i = Term.mk_real_i tm 1 in | ||
assert (Term.is_real one_float_i); | ||
assert (Term.get_real one_float_i = 1.0) | ||
|
||
(* Check boolean values construction and interpretation *) | ||
let () = | ||
let true1 = Term.mk_bool tm true in | ||
assert (Term.is_bool true1); | ||
assert (Term.get_bool true1 = true); | ||
|
||
let true2 = Term.mk_true tm in | ||
assert (Term.is_bool true2); | ||
assert (Term.get_bool true2 = true) | ||
|
||
(* Check string values construction and interpretation *) | ||
let () = | ||
let str = Term.mk_string tm "abc" in | ||
assert (Term.is_string str) | ||
|
||
(* Check bit-vector values construction and interpretation *) | ||
(* TODO *) |