caml-urm

A OCaml module for manipulating unlimited register machines

Commit
3ab7b22bb6a2ccbf780f8e21c53ba1ffb64d7e6c
Parent
898227eed936e1358cc99c86ebf54f9415080028
Author
Pablo <pablo-escobar@riseup.net>
Date

Updated the example

Also added new examples

Diffstat

3 files changed, 46 insertions, 7 deletions

Status File Name N° Changes Insertions Deletions
Added examples/factorial.urm 21 21 0
Added examples/fibonacci.urm 18 18 0
Modified examples/mod.urm 14 7 7
diff --git a/examples/factorial.urm b/examples/factorial.urm
@@ -0,0 +1,21 @@
+Z(2)
+S(2)
+Z(5)
+S(5)
+Z(6)
+J(1, 6, 22)
+J(5, 2, 10)
+S(5)
+J(1, 1, 7)
+Z(3)
+S(3)
+J(3, 1, 20)
+Z(4)
+J(4, 5, 18)
+S(2)
+S(4)
+J(1, 1, 14)
+S(3)
+J(1, 1, 12)
+P(1)
+J(1, 1, 6)
diff --git a/examples/fibonacci.urm b/examples/fibonacci.urm
@@ -0,0 +1,18 @@
+Z(2)
+Z(3)
+S(3)
+Z(4)
+Z(5)
+J(1, 5, 19)
+P(1)
+J(4, 2, 11)
+S(4)
+J(1, 1, 8)
+J(2, 3, 14)
+S(2)
+J(1, 1, 11)
+J(4, 5, 18)
+P(4)
+S(3)
+J(1, 1, 14)
+J(1, 1, 6)
diff --git a/examples/mod.urm b/examples/mod.urm
@@ -1,9 +1,9 @@
-Z(2)
 Z(3)
-J(1, 2, 8)
-J(0, 3, 10)
-S(2)
+Z(4)
+J(2, 3, 8)
+J(1, 4, 10)
 S(3)
-J(0, 0, 3)
-Z(2)
-J(0, 0, 3)
+S(4)
+J(1, 1, 3)
+Z(3)
+J(1, 1, 3)