CLIPS-断点

一、

1、(set-break third)设置断点,对规则设置断点,在执行前暂停

2、

CLIPS> (remove-break third)
CLIPS> (show-breaks)
second

删除和显示断点

3、(defrule first
=>
(assert (fire second))
)
定义了无前件的规则

系统自动生成的

f-0(initial-fact)

的作用就是使没有前件的规则进入议程

使程序可RUN

二、操作

CLIPS (Quicksilver Beta 09/24/07)
CLIPS> (defrule first
=>
(assert (fire second))
)
CLIPS> (defrule second
=>
(assert (fire third)))
CLIPS> (defrule third
(fire third)
=>)
CLIPS> (agenda)
0second: *
0first: *
For a total of 2 activations.
CLIPS> (set-break second)
CLIPS> (set-break third)
CLIPS> (watch rules)
CLIPS> (reset)
CLIPS> (run)
FIRE 1 first:*
Breaking on rule second.
CLIPS> (run)
FIRE 1second: *
Breaking on rule third.
CLIPS> (run)
FIRE 1 third:f-2
CLIPS> (run)
CLIPS> (show-breaks)
second
third
CLIPS> (remove-break third)
CLIPS> (show-breaks)
second

你可能感兴趣的:(F#)