-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More parametric tests and only run tests when z3 available
- Loading branch information
Showing
12 changed files
with
48 additions
and
40 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,3 +41,6 @@ jobs: | |
|
||
- name: Build | ||
run: opam exec -- dune build @install | ||
|
||
- name: Test | ||
run: opam exec -- dune runtest |
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
(libraries smtml)) | ||
|
||
(cram | ||
(enabled_if %{lib-available:z3}) | ||
(deps | ||
./product_mix.exe | ||
(source_tree test))) |
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,4 +1,5 @@ | ||
(cram | ||
(enabled_if %{lib-available:z3}) | ||
(deps | ||
%{bin:smtml} | ||
test_core.smtml | ||
|
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,4 +1,5 @@ | ||
(cram | ||
(enabled_if %{lib-available:z3}) | ||
(deps %{bin:smtml} test_pr_71.smtml)) | ||
|
||
(tests | ||
|
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,18 @@ | ||
open Smtml | ||
|
||
module Make (M : Mappings_intf.S) = struct | ||
module Solver = Solver.Batch (M) | ||
|
||
let () = | ||
let solver = Solver.create () in | ||
assert ( | ||
let x = Expr.mk_symbol Symbol.("x" @: Ty_real) in | ||
let y = Expr.mk_symbol Symbol.("y" @: Ty_real) in | ||
let c0 = Expr.relop Ty_bool Eq x y in | ||
let c1 = | ||
Expr.relop Ty_bool Eq | ||
(Expr.cvtop Ty_real ToString x) | ||
(Expr.cvtop Ty_real ToString y) | ||
in | ||
`Sat = Solver.check solver [ c0; c1 ] ) | ||
end |
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,15 @@ | ||
open Smtml | ||
|
||
module Make (M : Mappings_intf.S) = struct | ||
open Test_harness | ||
module Optimizer = Optimizer.Make (M) | ||
|
||
let () = | ||
let open Infix in | ||
let opt = Optimizer.create () in | ||
let x = symbol "x" Ty_int in | ||
Optimizer.add opt Int.[ x >= int 0; x < int 5 ]; | ||
Optimizer.protect opt (fun () -> | ||
assert (Stdlib.(Some (Value.Int 0) = Optimizer.minimize opt x)) ); | ||
assert (Stdlib.(Some (Value.Int 4) = Optimizer.maximize opt x)) | ||
end |
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,8 +1,6 @@ | ||
(tests | ||
(names | ||
test_expr_hc | ||
test_optimizer | ||
test_real | ||
test_simplify | ||
test_unop | ||
test_binop | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.