Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

遷移規則 (R4) について #235

Open
nikosai opened this issue Aug 3, 2020 · 0 comments
Open

遷移規則 (R4) について #235

nikosai opened this issue Aug 3, 2020 · 0 comments

Comments

@nikosai
Copy link
Contributor

nikosai commented Aug 3, 2020

LMNtalの遷移規則 (R4) によれば、

{X=Y, P} --> X=Y, {P} (ただしX,YはPに現れず、XとYは異なる)

なので、例えば {X=Y},a(X,Y) は1ステップで {},a(L,L) へと遷移するはずである。

しかし、現処理系では以下のように通常実行と非決定実行のそれぞれにおいて、上記と食い違った挙動になっている。

通常実行

0: a(L0,L0). {}.
---->
1: a(L0,L0). {}.
a(L0,L0). {}.

1ステップ掛かっているのは正しいが、初期グラフの表示があまり適切に見えない。
ただし、 --dump-json オプションを付けてみると

{"id":1,"name":"","atoms":[{"id":6,"name":"$out","links":[{"attr":0,"data":3},{"attr":0,"data":5}]},{"id":7,"name":"$out","links":[{"attr":0,"data":4},{"attr":1,"data":5}]},{"id":5,"name":"a","links":[{"attr":1,"data":6},{"attr":1,"data":7}]}],"membranes":[{"id":2,"name":"","atoms":[{"id":3,"name":"$in","links":[{"attr":0,"data":6},{"attr":1,"data":4}]},{"id":4,"name":"$in","links":[{"attr":0,"data":7},{"attr":1,"data":3}]}],"membranes":[]}]}
{"id":1,"name":"","atoms":[{"id":5,"name":"a","links":[{"attr":1,"data":5},{"attr":0,"data":5}]}],"membranes":[{"id":2,"name":"","atoms":[],"membranes":[]}]}

となっているので、プロキシアトムは生成されている。

To reproduce

lmntal -e '{X=Y},a(X,Y)' --slimcode | slim -t -

非決定実行

States
1::{a(L0,L0). {}. }

Transitions
init:1
1::

'# of States'(stored)   = 1.
'# of States'(end)      = 1.

そもそも状態数が正しくない(正:2, 誤:1)。かつ(R4)による遷移が状態空間に出現していない。

なお、 --dump-json によればこの唯一の状態にはプロキシアトムが含まれている。

States
1::{"id":8,"name":"","atoms":[{"id":12,"name":"$out","links":[{"attr":0,"data":11},{"attr":0,"data":9}]},{"id":14,"name":"$out","links":[{"attr":0,"data":13},{"attr":1,"data":9}]},{"id":9,"name":"a","links":[{"attr":1,"data":12},{"attr":1,"data":14}]}],"membranes":[{"id":10,"name":"","atoms":[{"id":11,"name":"$in","links":[{"attr":0,"data":12},{"attr":1,"data":13}]},{"id":13,"name":"$in","links":[{"attr":0,"data":14},{"attr":1,"data":11}]}],"membranes":[]}]}

Transitions
init:1
1::

'# of States'(stored)   = 1.
'# of States'(end)      = 1.

To reproduce

lmntal -e '{X=Y},a(X,Y)' --slimcode | slim --nd -t -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants