1

CLIPS で 1 つの事実を削除するにはどうすればよいですか? 事実は人によって入力され、存在していたベースと比較して削除されます。

私はそうしようとしました:

(defrule Deleting::ruleDeleteOneSynSoftgoal "This rule delete one synsoftagoal found in the basis of fact." 
   (declare (salience 42))
   (printout t "Enter below the two softgoals field that want to be deleting:" crlf crlf
             "the synonyms of the <[TYPE]QUALITY ATTRIBUTE> and the <[TOPIC]SUBJECT/OBJECT LAL> need to be entered one per line." crlf crlf)
   (bind ?dsyntype (readline))
   (bind ?dsyntopic (readline))
   ?fact3 <- (synSoftgoal 
   (ttId ?ttId3)
   (syntopic ?syntopic3)      
   (syntype ?syntype3)
   )
   (test (and (eq ?dsyntopic ?syntopic3) (eq ?dsyntype ?syntype3)))
   =>
   (retract ?fact3

)

しかし、それはこのエラーを示しています:

[PRNTUTIL2] Syntax Error:  Check appropriate syntax for defrule.

ERROR:
(defrule Deleting::ruleDeleteOneSynSoftgoal "This rule delete one synsoftagoal found in the basis of fact."
   (declare (salience 42))
   (printout t "Enter below the two softgoals field that want to be deleting:" crlf crlf "the synonyms of the <[TYPE]QUALITY ATTRIBUTE> and the <[TOPIC]SUBJECT/OBJECT LAL> need to be entered one per line." crlf crlf)
   (bind ?dsyntype (

手伝って頂けますか?

4

1 に答える 1