aboutsummaryrefslogtreecommitdiff
path: root/comparison/Inpla/src
diff options
context:
space:
mode:
Diffstat (limited to 'comparison/Inpla/src')
-rw-r--r--comparison/Inpla/src/ack-stream_3-11-reuse.in4
-rw-r--r--comparison/Inpla/src/bsort-20000-reuse.in8
-rw-r--r--comparison/Inpla/src/isort-20000-reuse.in6
-rw-r--r--comparison/Inpla/src/msort-260000-reuse.in10
-rw-r--r--comparison/Inpla/src/msort-800000-reuse.in10
-rw-r--r--comparison/Inpla/src/nqueen-12-reuse.in16
6 files changed, 27 insertions, 27 deletions
diff --git a/comparison/Inpla/src/ack-stream_3-11-reuse.in b/comparison/Inpla/src/ack-stream_3-11-reuse.in
index 4a05f82..dc1a0fd 100644
--- a/comparison/Inpla/src/ack-stream_3-11-reuse.in
+++ b/comparison/Inpla/src/ack-stream_3-11-reuse.in
@@ -28,13 +28,13 @@ Ackm(ret, int m) >< (int n)
| _ => (*L)Ack(cnt,n-1)~m, Ack(ret,cnt)~(m-1);
Ackm(ret, int m) >< Inc(n)
-=> (*L)Ack(cnt,n)~m, (*R)Ack(ret,cnt)~(m-1);
+=> (*R)Ack(cnt,n)~m, (*L)Ack(ret,cnt)~(m-1);
Sumup(ret, int sum) >< Inc(x) => (*L)Sumup(ret, sum+1)~x;
Sumup(ret, int sum) >< (int n) => ret~sum+n;
-AckMain(ret)><(int m, int n) => (*L)Ack(cnt,n)~m, (*R)Sumup(ret,0)~cnt;
+AckMain(ret)><(int m, int n) => (*R)Ack(cnt,n)~m, (*L)Sumup(ret,0)~cnt;
//AckMain(ret)><(int m, int n) => Ack(cnt,n)~m, Sumup(ret,0)~cnt;
AckMain(ret)~(3,11);
diff --git a/comparison/Inpla/src/bsort-20000-reuse.in b/comparison/Inpla/src/bsort-20000-reuse.in
index 0b7e551..f7348d5 100644
--- a/comparison/Inpla/src/bsort-20000-reuse.in
+++ b/comparison/Inpla/src/bsort-20000-reuse.in
@@ -22,8 +22,8 @@ bs_Cons(r, int n)>< x:xs => (*L)bs_ConsCons(r, n, x) ~ xs;
bs_Cons(r, int n)>< [] => r~(*R)[];
bs_ConsCons(r, int n, int x) >< (int y):ys
-| x < y => r~x:cnt, (*L)bs(cnt, (*R)(y:ys)) ~(n-1)
-| _ => r~y:cnt, (*L)bs(cnt, (*R)(x:ys))~(n-1);
+| x < y => r~(*R)(x:cnt), (*L)bs(cnt, y:ys) ~(n-1)
+| _ => r~(*R)(y:cnt), (*L)bs(cnt, x:ys)~(n-1);
bs_ConsCons(r, int n, int x) >< [] => r~(*R)[x];
go(r,xs) >< (int n)
@@ -45,13 +45,13 @@ make_RandList(ret) >< (int n)
// validation checks
-valid(ret) >< [] => ret~True;
+valid(ret) >< [] => ret~(*L)True;
valid(ret) >< x:xs => (*L)valid_Cons(ret,x)~xs;
valid_Cons(ret, int x) >< [] => ret~True;
valid_Cons(ret, int x) >< (int y):ys
| x<=y => (*L)valid_Cons(ret,y)~ys
-| _ => ret~False, Eraser~ys;
+| _ => ret~(*L)False, (*R)Eraser~ys;
// The `Eraser' is a built-in agent defined for any agents as follows:
//Eraser >< Alpha(a1, ..., a5) => Eraser~a1, ..., Eraser~a5;
diff --git a/comparison/Inpla/src/isort-20000-reuse.in b/comparison/Inpla/src/isort-20000-reuse.in
index aa63652..76bc4ff 100644
--- a/comparison/Inpla/src/isort-20000-reuse.in
+++ b/comparison/Inpla/src/isort-20000-reuse.in
@@ -2,7 +2,7 @@
isort(ret) >< [] => ret~(*R)[];
isort(ret) >< x:xs => (*R)I(ret, x)~cnt, (*L)isort(cnt)~xs;
-I(ret, int x) >< [] => ret~[x];
+I(ret, int x) >< [] => ret~(*R)[x];
I(ret, int x) >< (int y):ys
| x<=y => ret~(*L)(x:(*R)(y:ys))
| _ => (*L)I(cnt, x)~ys, ret~(*R)(y:cnt);
@@ -16,13 +16,13 @@ make_RandList(ret) >< (int n)
// validation checks
-valid(ret) >< [] => ret~True;
+valid(ret) >< [] => ret~(*L)True;
valid(ret) >< x:xs => (*L)valid_Cons(ret,x)~xs;
valid_Cons(ret, int x) >< [] => ret~True;
valid_Cons(ret, int x) >< (int y):ys
| x<=y => (*L)valid_Cons(ret,y)~ys
-| _ => ret~False, Eraser~ys;
+| _ => ret~(*L)False, (*R)Eraser~ys;
// The `Eraser' is a built-in agent defined for any agents as follows:
//Eraser >< Alpha(a1, ..., a5) => Eraser~a1, ..., Eraser~a5;
diff --git a/comparison/Inpla/src/msort-260000-reuse.in b/comparison/Inpla/src/msort-260000-reuse.in
index 14aa4a3..075fa7b 100644
--- a/comparison/Inpla/src/msort-260000-reuse.in
+++ b/comparison/Inpla/src/msort-260000-reuse.in
@@ -12,10 +12,10 @@ merge(ret, snd) >< x:xs => (*L)mergeCC(ret, x, xs)~snd;
mergeCC(ret, int y, ys) >< [] => ret~(*R)(y:ys);
mergeCC(ret, int y, ys) >< (int x):xs
-| x <= y => ret~(x:cnt), (*L)mergeCC(cnt, y, ys) ~ xs
-| _ => ret~(y:cnt), (*L)mergeCC(cnt, x, xs) ~ ys;
+| x <= y => ret~(*R)(x:cnt), (*L)mergeCC(cnt, y, ys) ~ xs
+| _ => ret~(*R)(y:cnt), (*L)mergeCC(cnt, x, xs) ~ ys;
-split(right,left) >< [] => right~[], left~[];
+split(right,left) >< [] => right~(*L)[], left~(*R)[];
split(right,left) >< x:xs =>
right~(*R)(x:cntl), left~cntr, (*L)split(cntr,cntl)~xs;
@@ -28,13 +28,13 @@ make_RandList(ret) >< (int n)
// validation checks
-valid(ret) >< [] => ret~True;
+valid(ret) >< [] => ret~(*L)True;
valid(ret) >< x:xs => (*L)valid_Cons(ret,x)~xs;
valid_Cons(ret, int x) >< [] => ret~True;
valid_Cons(ret, int x) >< (int y):ys
| x<=y => (*L)valid_Cons(ret,y)~ys
-| _ => ret~False, Eraser~ys;
+| _ => ret~(*L)False, (*R)Eraser~ys;
// The `Eraser' is a built-in agent defined for any agents as follows:
//Eraser >< Alpha(a1, ..., a5) => Eraser~a1, ..., Eraser~a5;
diff --git a/comparison/Inpla/src/msort-800000-reuse.in b/comparison/Inpla/src/msort-800000-reuse.in
index f50f359..e1aa31d 100644
--- a/comparison/Inpla/src/msort-800000-reuse.in
+++ b/comparison/Inpla/src/msort-800000-reuse.in
@@ -12,10 +12,10 @@ merge(ret, snd) >< x:xs => (*L)mergeCC(ret, x, xs)~snd;
mergeCC(ret, int y, ys) >< [] => ret~(*R)(y:ys);
mergeCC(ret, int y, ys) >< (int x):xs
-| x <= y => ret~(x:cnt), (*L)mergeCC(cnt, y, ys) ~ xs
-| _ => ret~(y:cnt), (*L)mergeCC(cnt, x, xs) ~ ys;
+| x <= y => ret~(*R)(x:cnt), (*L)mergeCC(cnt, y, ys) ~ xs
+| _ => ret~(*R)(y:cnt), (*L)mergeCC(cnt, x, xs) ~ ys;
-split(right,left) >< [] => right~[], left~[];
+split(right,left) >< [] => right~(*L)[], left~(*R)[];
split(right,left) >< x:xs =>
right~(*R)(x:cntl), left~cntr, (*L)split(cntr,cntl)~xs;
@@ -28,13 +28,13 @@ make_RandList(ret) >< (int n)
// validation checks
-valid(ret) >< [] => ret~True;
+valid(ret) >< [] => ret~(*L)True;
valid(ret) >< x:xs => (*L)valid_Cons(ret,x)~xs;
valid_Cons(ret, int x) >< [] => ret~True;
valid_Cons(ret, int x) >< (int y):ys
| x<=y => (*L)valid_Cons(ret,y)~ys
-| _ => ret~False, Eraser~ys;
+| _ => ret~(*L)False, (*R)Eraser~ys;
// The `Eraser' is a built-in agent defined for any agents as follows:
//Eraser >< Alpha(a1, ..., a5) => Eraser~a1, ..., Eraser~a5;
diff --git a/comparison/Inpla/src/nqueen-12-reuse.in b/comparison/Inpla/src/nqueen-12-reuse.in
index 4e5a6b6..c7b06b8 100644
--- a/comparison/Inpla/src/nqueen-12-reuse.in
+++ b/comparison/Inpla/src/nqueen-12-reuse.in
@@ -20,7 +20,7 @@ member(r, list, int x) >< (int y):ys
| x==y =>
r~1, list~(*R)(y:ys)
| _ =>
- list~(*R)(y:cnt), member(r, cnt, x)~ys;
+ list~(*R)(y:cnt), (*L)member(r, cnt, x)~ys;
/**
@@ -35,13 +35,13 @@ len_list(len, done) >< [] =>
len~0, done~(*R)[];
len_list(len, done) >< x:xs =>
done~(*R)(x:cnt),
- len_list_(len, cnt, 1)~xs;
+ (*L)len_list_(len, cnt, 1)~xs;
len_list_(len, done, int ct) >< [] =>
len~ct, done~(*R)[];
len_list_(len, done, int ct) >< x:xs =>
done~(*R)(x:cnt),
- len_list_(len, cnt, ct+1) ~ xs;
+ (*L)len_list_(len, cnt, ct+1) ~ xs;
/**
* len (non-stream version)
@@ -53,7 +53,7 @@ len_list_(len, done, int ct) >< x:xs =>
len(ret) >< [] =>
ret~0;
len(ret) >< x:xs =>
- len_list(ret, Eraser)~(*R)(x:xs);
+ (*L)len_list(ret, Eraser)~(*R)(x:xs);
@@ -88,7 +88,7 @@ threat(r, done, int k, int q)><(int x):xs
| (k == x-q) or (k == q-x) =>
r~1, done~(*R)(x:xs)
| _ =>
- done~(*R)(x:cnt), threat(r, cnt, k+1, q)~xs;
+ done~(*R)(x:cnt), (*L)threat(r, cnt, k+1, q)~xs;
@@ -99,14 +99,14 @@ threat(r, done, int k, int q)><(int x):xs
// else (queen1 (m::b) n n) @ (queen1 b n (m-1));
// fun queen n = queen1 n [] n;
-queen(ret) >< (int n) => queen_(ret, [], n)~n;
+queen(ret) >< (int n) => (*L)queen_(ret, [], n)~n;
queen_(r, b, int n) >< (int m)
| m==0 =>
- r~[], (*L)Eraser~b
+ r~(*L)[], Eraser~b
| _ =>
mem_ret, done_b << member(m,b),
- queen__chk_m_in_b(r, done_b, n, m)~mem_ret;
+ (*L)queen__chk_m_in_b(r, done_b, n, m)~mem_ret;
queen__chk_m_in_b(r, b, int n, int m) >< (int mem_ret)
| mem_ret == 1 =>