-
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
Showing
13 changed files
with
112 additions
and
17 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 |
---|---|---|
|
@@ -27,5 +27,5 @@ result | |
.DS_Store | ||
nix/profiles/ | ||
|
||
**/wasp-out/ | ||
wasp-out/* | ||
bin/libc.wasm |
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,30 @@ | ||
let main filename = Format.printf "%a@." Fpath.pp filename | ||
open Prelude | ||
module Flags = Interpreter.Flags | ||
|
||
let run_concolic filename unchecked trace timeout workspace no_simplify policy | ||
queries log = | ||
let open Wasp.Std.Let_syntax.Result in | ||
Flags.unchecked := unchecked; | ||
Flags.trace := trace; | ||
Flags.timeout := timeout; | ||
Flags.output := workspace; | ||
Flags.simplify := no_simplify; | ||
(* Flags.policy := *) | ||
Flags.queries := queries; | ||
Flags.log := log; | ||
let+ data = Bos.OS.File.read filename in | ||
if not (Wasp.Run.run_string_concolic data policy) then 1 else 0 | ||
|
||
let cli = | ||
let open Cmdliner in | ||
let info = Cmd.info "wasp" ~version:"%%VERSION%%" in | ||
Cmd.v info Term.(const main $ Options.file0) | ||
let info = Cmdliner.Cmd.info "wasp" ~version:"%%VERSION%%" in | ||
Cmdliner.Cmd.group info [ Options.cmd_concolic run_concolic ] | ||
|
||
let () = exit (Cmdliner.Cmd.eval cli) | ||
let () = | ||
match Cmdliner.Cmd.eval_value' cli with | ||
| `Ok result -> ( | ||
match result with | ||
| Ok n -> exit n | ||
| Error (`Msg msg) -> | ||
Fmt.epr "unexpected error: %s@." msg; | ||
exit 2 ) | ||
| `Exit n -> exit n |
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
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,6 @@ | ||
module Let_syntax = struct | ||
module Result = struct | ||
let ( let* ) = Result.bind | ||
let ( let+ ) v f = Result.map f v | ||
end | ||
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,4 @@ | ||
(cram | ||
(deps | ||
%{bin:wasp} | ||
test1.wast)) |
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,2 @@ | ||
Run tests with assertion failures in concolic: | ||
$ wasp concolic test1.wast |
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,4 @@ | ||
(cram | ||
(deps | ||
%{bin:wasp} | ||
test1.wast)) |
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,2 @@ | ||
Run tests without issues in concolic: | ||
$ wasp concolic test1.wast |