1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
(* SPDX-License-Identifier: AGPL-3.0-or-later *)
(* Copyright © 2021-2026 OCamlPro *)
(* Written by the Owi programmers *)
open Syntax
let abs ~arch ~debug_trace ~eacsl ~entry_point ~files ~includes ~opt_lvl
~out_file ~property ~unsafe ~workspace =
let* source_file =
(* TODO: I guess property is not needed in abstract mode, it could be removed ? *)
Compile.C.files_to_wasm_file ~arch ~eacsl ~entry_point ~includes ~opt_lvl
~out_file ~property ~workspace files
in
Cmd_wasm_abs.cmd ~debug_trace ~entry_point ~source_file ~unsafe
(* TODO: use testcomp! *)
let fuzz ~arch ~eacsl ~entry_point ~files ~includes ~opt_lvl ~out_file ~property
~rounds ~seed ~testcomp:_ ~timeout ~timeout_instr ~unsafe ~workspace =
let* source_file =
Compile.C.files_to_wasm_file ~arch ~eacsl ~entry_point ~includes ~opt_lvl
~out_file ~property ~workspace files
in
Cmd_wasm_fuzz.cmd ~entry_point ~rounds ~seed ~source_file ~timeout
~timeout_instr ~unsafe
let hunt ~arch ~eacsl ~entry_point ~files ~includes ~opt_lvl ~out_file ~property
~rounds ~seed ~(symbolic_parameters : Symbolic_parameters.t) ~workspace =
let* source_file =
Compile.C.files_to_wasm_file ~arch ~eacsl ~entry_point ~includes ~opt_lvl
~out_file ~property ~workspace files
in
(* TODO: move these 3 out of symbolic param and put them in a dedicated monadic_interpreter_parameters ? *)
let { Symbolic_parameters.timeout; timeout_instr; unsafe; _ } =
symbolic_parameters
in
Cmd_wasm_hunt.cmd ~entry_point ~rounds ~seed ~source_file ~symbolic_parameters
~timeout ~timeout_instr ~unsafe ~workspace
let run ~arch ~eacsl ~entry_point ~files ~includes ~opt_lvl ~out_file ~property
~timeout ~timeout_instr ~unsafe ~workspace =
let* source_file =
(* TODO: I guess property is not needed in concrete run mode, it could be removed ? *)
Compile.C.files_to_wasm_file ~arch ~eacsl ~entry_point ~includes ~opt_lvl
~out_file ~property ~workspace files
in
Cmd_wasm_run.cmd ~source_file ~timeout ~timeout_instr ~unsafe
(* TODO: use testcomp *)
let sym ~arch ~eacsl ~entry_point ~files ~includes ~opt_lvl ~out_file ~property
~symbolic_parameters ~testcomp:_ ~workspace =
let* source_file =
Compile.C.files_to_wasm_file ~arch ~eacsl ~entry_point ~includes ~opt_lvl
~out_file ~property ~workspace files
in
Cmd_wasm_sym.cmd ~entry_point ~source_file ~symbolic_parameters ~workspace