如何检索具有特定名称的规则断言的事实?

How to retrive facts asserted by a rule having particular name?

我有如下定义的模板:

(deftemplate action
    (slot name)
    (slot field)
    (slot value))

我有其他规则将使用其他事实来断言动作事实。

现在我只想通过模板操作检索事实。

目前,我使用find-fact检索,但这里我不得不使用我不想提供的查询。

(find-fact ((?fact action)) (= (str-compare ?fact:name 'Action1') 0))

我想要模板操作的所有事实,不想使用 Action1、Action2 等对所有名称编写循环。

提前致谢。

         CLIPS (6.31 4/1/19)
CLIPS> 
(deftemplate action
    (slot name)
    (slot field)
    (slot value))
CLIPS> 
(deffacts actions
   (action (name Action1) (field x) (value 3))
   (action (name Action2) (field y) (value 4))
   (action (name Action3) (field z) (value 5)))
CLIPS>        
(defrule find-Action1
   (action (name Action1))
   =>)
CLIPS> (reset)
CLIPS> (agenda)
0      find-Action1: f-1
For a total of 1 activation.
CLIPS> (facts)
f-0     (initial-fact)
f-1     (action (name Action1) (field x) (value 3))
f-2     (action (name Action2) (field y) (value 4))
f-3     (action (name Action3) (field z) (value 5))
For a total of 4 facts.
CLIPS>