aboutsummaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorShinya Sato <shinnya.sato@gmail.com>2022-04-28 21:47:28 +0900
committerShinya Sato <shinnya.sato@gmail.com>2022-04-28 21:47:28 +0900
commit7ea48cd96551247ecc763a5e42404ffa3464d0b0 (patch)
treefd1b63ab48d98a9243d3053522e17e31b9dc033f /sample
parent950e2cb2184cb7ead93ba8df691a190598ed242f (diff)
parent429543c748aaf81b2a4207318eb5a05259469b21 (diff)
downloadinpla-7ea48cd96551247ecc763a5e42404ffa3464d0b0.tar.gz
inpla-7ea48cd96551247ecc763a5e42404ffa3464d0b0.zip
Merge branch 'develop'
Diffstat (limited to '')
-rw-r--r--sample/hanoi.in11
1 files changed, 6 insertions, 5 deletions
diff --git a/sample/hanoi.in b/sample/hanoi.in
index 3ba6f5c..2801817 100644
--- a/sample/hanoi.in
+++ b/sample/hanoi.in
@@ -2,7 +2,7 @@
// Rules
hanoi(return, source, target, auxiliary) >< (int n)
-| n==0 => return~[], Eps~source, Eps~target, Eps~auxiliary
+| n==0 => return~[], Eraser~source, Eraser~target, Eraser~auxiliary
| _ => source ~ dup(src1, dup(src2, src3)),
target ~ dup(tgt1, dup(tgt2, tgt3)),
auxiliary ~ dup(aux1, aux2),
@@ -14,9 +14,9 @@ hanoi(return, source, target, auxiliary) >< (int n)
dup(a,b)><A => a~A, b~A;
dup(a,b)><B => a~B, b~B;
dup(a,b)><C => a~C, b~C;
-Eps><A =>;
-Eps><B =>;
-Eps><C =>;
+
+// The `Eraser' is defined as a built-in agent for any agents as follows:
+//Eraser >< Alpha(a1, ..., a5) => Eraser~a1, ..., Eraser~a5;
// Net
@@ -26,7 +26,8 @@ result; // should be [(1,A,C),(2,A,B),(1,C,B),(3,A,C),(1,B,A),(2,B,C),(1,A,C)]
// These are also written using abbreviation as follows:
// hanoi(return, source, target, auxiliary) >< (int n)
-// | n==0 => return~[], << Eps(source), << Eps(target), << Eps(auxiliary)
+// | n==0 => return~[],
+// << Eraser(source), << Eraser(target), << Eraser(auxiliary)
// | _ => src1, dup(src2, src3) << dup(source),
// tgt1, dup(tgt2, tgt3) << dup(target),
// aux1, aux2 << dup(auxiliary),