aboutsummaryrefslogtreecommitdiff
path: root/sample/ack_3_5.in
diff options
context:
space:
mode:
Diffstat (limited to 'sample/ack_3_5.in')
-rw-r--r--sample/ack_3_5.in32
1 files changed, 0 insertions, 32 deletions
diff --git a/sample/ack_3_5.in b/sample/ack_3_5.in
deleted file mode 100644
index 19f92fa..0000000
--- a/sample/ack_3_5.in
+++ /dev/null
@@ -1,32 +0,0 @@
-// Ackermann Function
-//
-// fun ack(0,n) = n+1
-// | ack(m,0) = ack(m-1,1)
-// | ack(m,n) = ack(m-1,ack(m,n-1));
-
-// The following rule is wrong because there is no gurantee that
-// the 'cnt' is connected to an integer agent
-// when ack(r)~(m-1,cnt) is evaluated.
-//
-// ack(r) >< (int m, int n)
-// | m==0 => r~(n+1)
-// | n==0 => ack(r) ~ (m-1,1)
-// | _ => ack(cnt)~(m,n-1), ack(r)~(m-1,cnt);
-//
-// So, the `cnt' should be connected as an element of connections.
-
-ack(ret, int m) >< (int n)
-| m==0 => ret~(n+1)
-| n==0 => ack(ret, m-1)~1
-| _ => ack(cnt, m)~(n-1), ack(ret, m-1)~cnt;
-
-ackMain(ret)><(int m, int n) => ack(ret,m)~n;
-
-
-// main
-const M=3;
-const N=5;
-ackMain(ret)~(M,N);
-ret;
-free ret;
-