-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
以下の例の場合、aアトムから辿れるgroundのリンクをcommit前とcommit後で2度取り直しているが、2度目は必要ない。Optimizer等で打ち消すようにする。
╰─ echo 'a(X) :- ground(X) | b(X)' | lmntal --slimcode --stdin-lmn -O3
...
Compiled Ruleset @601
Compiled Rule
...
--memmatch:
spec [1, 14]
findatom [1, 0, 'a'_1]
getlink [2, 1, 0]
newlist [3]
addtolist [3, 2]
newlist [4]
isground [5, 3, 4]
commit ["_aXgr", 0]
newlist [6]
getlink [7, 1, 0]
addtolist [6, 7]
removeatom [1, 0, 'a'_1]
removeground [6, 0]
...