diff options
author | Yann Herklotz <git@yannherklotz.com> | 2020-02-04 19:49:51 +0000 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2020-02-04 19:49:51 +0000 |
commit | 9179bf0a7227f49cc89b84263b6fb3229ee632b3 (patch) | |
tree | 3355e965708583b30905eb3695466e7e76f3ebb1 /extraction | |
parent | 3c4dab8035971fbb150d74dab7ebfa2622aee4cd (diff) | |
download | vericert-9179bf0a7227f49cc89b84263b6fb3229ee632b3.tar.gz vericert-9179bf0a7227f49cc89b84263b6fb3229ee632b3.zip |
Add main.ml file
Diffstat (limited to 'extraction')
-rw-r--r-- | extraction/dune | 3 | ||||
-rw-r--r-- | extraction/main.ml | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/extraction/dune b/extraction/dune new file mode 100644 index 0000000..ec44a53 --- /dev/null +++ b/extraction/dune @@ -0,0 +1,3 @@ +(executable + (name main) + (flags (:standard -warn-error -A))) diff --git a/extraction/main.ml b/extraction/main.ml new file mode 100644 index 0000000..235a155 --- /dev/null +++ b/extraction/main.ml @@ -0,0 +1,9 @@ +open Verilog +open Datatypes + +let rec nat_to_int = function + | O -> 0 + | S n -> 1 + nat_to_int n + +let () = + print_endline ("Result: " ^ (Verilog.value_to_nat (Verilog.VBool Coq_true) |> nat_to_int)) |