summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBrian Campbell2019-01-25 14:23:26 +0000
committerBrian Campbell2019-01-25 14:23:26 +0000
commit5682dd34fce64869a611ba1aee5e1e73b2f2fd0f (patch)
treed82c43a56d5bd78c5988de491108d1f05b3a8524 /test
parent9fffbae81148b2e4c65017d79fde20102c19a3b5 (diff)
Coq: add enough to generate some output for arm-v8.5-a
Now supports mutual recursion, configuration registers (in the same way as Lem), boolean constraints (but produces some ugly stuff that the solver can't handle).
Diffstat (limited to 'test')
-rw-r--r--test/typecheck/pass/mutrec.sail12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/typecheck/pass/mutrec.sail b/test/typecheck/pass/mutrec.sail
new file mode 100644
index 00000000..26dbf729
--- /dev/null
+++ b/test/typecheck/pass/mutrec.sail
@@ -0,0 +1,12 @@
+$include <prelude.sail>
+
+val f : list(int) -> int
+val g : list(int) -> int
+
+function f([| |]) = 0
+and f(h::t) = h + g(t)
+function g([||]) = 0
+and g(h::t) = f(t) - h
+
+val test : unit -> int
+function test() = f([|1,2,3|])