Skip to content

Commit

Permalink
rename kill->delete
Browse files Browse the repository at this point in the history
  • Loading branch information
kyawaway committed Jun 21, 2024
1 parent 26d0930 commit 858077b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions lib/mell.lmn
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ mell.copy(M,A1,A2,A3,B1,B2,C1,C2) :-
'$callback'('mell_copy', M, A1, A2, A3, B1, B2, C1, C2).


mell.kill({$p,@p}), :- mell.kill({$p,@p}, X), {killed(X)}.
mell.delete({$p,@p}), :- mell.delete({$p,@p}, X), {deleted(X)}.

/**
* mell.kill(+Mem, +Weakn)
* mell.delete(+Mem, +Weakn)
*
* 与えられた膜を破棄する.その膜のMem以外の自由リンクにはそれぞれ、
* 指定されたプロセス文脈の複製が接続される.
* @param +Mem 破棄する膜
* @param +Weakn 破棄された膜の自由リンクに接続されるプロセス文脈(weakeningにあたる)
* @example mell.kill(M, K),{$p[M|*Z]}, {$k[K]} ==> $k[*Z]
* @example mell.delete(M, K),{$p[M|*Z]}, {$k[K]} ==> $k[*Z]
*/
//mell.kill(M, T) :- unary(T) | '$callback'('mell_kill', M, T).
mell.kill(M, T) :- '$callback'('mell_kill', M, T).
//mell.delete(M, T) :- unary(T) | '$callback'('mell_delete', M, T).
mell.delete(M, T) :- '$callback'('mell_delete', M, T).

}.

10 changes: 5 additions & 5 deletions src/ext/mell.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* mell.c - Nonlinear-Membrane
* mell.c - Membrane Extension for Multiplicative Exponential Linear Logic
*
* Copyright (c) 2008, Ueda Laboratory LMNtal Group
* <lmntal@ueda.info.waseda.ac.jp>
Expand Down Expand Up @@ -219,7 +219,7 @@ void mell_copy(LmnReactCxtRef rc, LmnMembraneRef mem,
}
}

void mell_kill(LmnReactCxtRef rc,
void mell_delete(LmnReactCxtRef rc,
LmnMembraneRef mem,
LmnAtomRef a0, LmnLinkAttr t0,
LmnAtomRef a1, LmnLinkAttr t1)
Expand All @@ -233,11 +233,11 @@ void mell_kill(LmnReactCxtRef rc,
LmnMembraneRef tag_mem;

if (((LmnSymbolAtomRef)a0)->get_functor() != LMN_OUT_PROXY_FUNCTOR) {
fprintf(stderr, "mell.C, mell_kill: first argument must be a membrane");
fprintf(stderr, "mell.C, mell_delete: first argument must be a membrane");
return;
}
if (((LmnSymbolAtomRef)a1)->get_functor() != LMN_OUT_PROXY_FUNCTOR) {
fprintf(stderr, "mell.C, mell_kill: second argument must be a membrane");
fprintf(stderr, "mell.C, mell_delete: second argument must be a membrane");
return;
}

Expand Down Expand Up @@ -298,5 +298,5 @@ void mell_kill(LmnReactCxtRef rc,

void init_mell(void) {
CCallback::lmn_register_c_fun("mell_copy", (void *)mell_copy, 8);
CCallback::lmn_register_c_fun("mell_kill", (void *)mell_kill, 2);
CCallback::lmn_register_c_fun("mell_delete", (void *)mell_delete, 2);
}

0 comments on commit 858077b

Please sign in to comment.