diff --git a/lib/mell.lmn b/lib/mell.lmn index 5f4ae832..072fb15f 100644 --- a/lib/mell.lmn +++ b/lib/mell.lmn @@ -2,15 +2,6 @@ { module(mell). -mell.copy(M,A1,A2,A3,C1,C2), :- - mell.copy(M,A1,A2,A3,B1,B2,C1,C2), {B1=B2}. - -mell.copy(M,A1,A2,A3,C), {$a[A1,A2,A3]} :- - mell.copy(M,A1,A2,A3,B1,B2,C1,C2), {$a[A1,A2,A3]}, {B1=B2}, $a[C1,C2,C]. - - mell.copy(M,C), :- - mell.copy(M,A1,A2,A3,B1,B2,C1,C2), {cp(A1,A2,A3)}, {B1=B2}, cp(C1,C2,C). - /** * mell.copy(+Mem, +Cont1, +Cont2, +Cont3, +Cut1, +Cut2, +Free1, +Free2): * @@ -27,11 +18,24 @@ mell.copy(M,A1,A2,A3,C), {$a[A1,A2,A3]} :- * ==> * {$p1[M1|*Z1]}, {$p2[M2|*Z2]}, $a[*Z1,*Z2,*Z], $b[M1,C1], $b[M2,C2] */ + +_mell_copy@@ mell.copy(M,A1,A2,A3,B1,B2,C1,C2) :- '$callback'('mell_copy', M, A1, A2, A3, B1, B2, C1, C2). +_mell_copy_sub1@@ +mell.copy(M,A1,A2,A3,C1,C2), :- + mell.copy(M,A1,A2,A3,B1,B2,C1,C2), {B1=B2}. + +_mell_copy_sub2@@ +mell.copy(M,A1,A2,A3,C), {$a[A1,A2,A3]} :- + mell.copy(M,A1,A2,A3,B1,B2,C1,C2), {$a[A1,A2,A3]}, {B1=B2}, $a[C1,C2,C]. + +_mell_copy_sub3@@ +mell.copy(M,C), :- + mell.copy(M,A1,A2,A3,B1,B2,C1,C2), {cp(A1,A2,A3)}, {B1=B2}, cp(C1,C2,C). + -mell.delete(M), :- mell.delete(M, X), {deleted(X)}. /** * mell.delete(+Mem, +Weakn) @@ -42,8 +46,12 @@ mell.delete(M), :- mell.delete(M, X), {deleted(X)}. * @param +Weakn 破棄された膜の自由リンクに接続されるプロセス文脈(weakeningにあたる) * @example mell.delete(M, K),{$p[M|*Z]}, {$k[K]} ==> $k[*Z] */ -//mell.delete(M, T) :- unary(T) | '$callback'('mell_delete', M, T). + +_mell_delete@@ mell.delete(M, T) :- '$callback'('mell_delete', M, T). +_mell_delete_sub@@ +mell.delete(M), :- mell.delete(M, X), {deleted(X)}. + }.