Skip to content

Commit 38499eb

Browse files
committed
Updated README.md
1 parent 3a7f054 commit 38499eb

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,22 @@ Run `make .merlin` to create the `.merlin` file.
6969

7070
Tests if the content of a file does not match a regular expression (the second argument).
7171

72+
- `CWCompileAndRun ocaml_files* Options options? Driver driver_string`
73+
74+
Compiles and runs given `ocaml_files` and the driver code `driver_string`. The compilation is performed with `ocamlopt` and with the provided `options`.
75+
76+
```coq
77+
Require Extraction.
78+
Extraction "out.ml" plus.
79+
CWCompileAndRun "out.mli" "out.ml" Options "-O3 -verbose" Driver "
80+
open Out
81+
let () = assert (add O (S O) = (S O))
82+
".
83+
```
84+
7285
## Examples
7386

74-
See [cw_example/SolutionTest.v](cw_example/SolutionTest.v).
87+
See [cw_example/SolutionTest.v](cw_example/SolutionTest.v) and [cw_example_extraction/SolutionTest.v](cw_example_extraction/SolutionTest.v)
7588

7689
More examples are in [theories/Demo.v](theories/Demo.v) and [theories/Demo2.v](theories/Demo2.v).
7790

cw_example_extraction/SolutionTest.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ CWTest "Successful Extraction Test".
1414

1515
Extraction "factorial.ml" Solution.factorial.
1616

17-
CWCompileAndRun "factorial.mli" "factorial.ml" Options Driver "
17+
CWCompileAndRun "factorial.mli" "factorial.ml" Options "-O3" Driver "
1818
open Factorial
1919
let () =
2020
assert (factorial 3 = 6);
@@ -28,7 +28,7 @@ Extract Constant mult => "*".
2828

2929
Extraction "factorial.ml" Solution.factorial.
3030

31-
CWCompileAndRun "factorial.mli" "factorial.ml" Options Driver "
31+
CWCompileAndRun "factorial.mli" "factorial.ml" Options "-O2" Driver "
3232
open Factorial
3333
let () =
3434
assert (factorial 3 = 6);

0 commit comments

Comments
 (0)