aboutsummaryrefslogtreecommitdiffstats
path: root/extraction
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2020-02-04 19:49:51 +0000
committerYann Herklotz <git@yannherklotz.com>2020-02-04 19:49:51 +0000
commit9179bf0a7227f49cc89b84263b6fb3229ee632b3 (patch)
tree3355e965708583b30905eb3695466e7e76f3ebb1 /extraction
parent3c4dab8035971fbb150d74dab7ebfa2622aee4cd (diff)
downloadvericert-9179bf0a7227f49cc89b84263b6fb3229ee632b3.tar.gz
vericert-9179bf0a7227f49cc89b84263b6fb3229ee632b3.zip
Add main.ml file
Diffstat (limited to 'extraction')
-rw-r--r--extraction/dune3
-rw-r--r--extraction/main.ml9
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))