CLIPS is quite new to me - I have been trying to dig deeply into this language for 2 days. A question came to my mind, namely: how (if possible) can I create/add new rules dynamically? I would like to do for example sth like this:
(deftemplate action
(slot prev)
(slot curr)
)
(defrule test
(action (prev ?p))
=>
(defrule test_inner
(action (curr ?p))
=>
(printout t "Result of a newly created rule.")
)
)
Please do not pay special attention to the logic of these rules - it is just an example. After invoking above presented commands I receive:
[EXPRNPSR3] Missing function declaration for defrule.
ERROR:
(defrule MAIN::test
(action (prev ?p))
=>
(defrule
Is this error, a matter of command syntax or I can not define new rules "dynamically"?