Panos
Panos

Reputation: 57

CLIPS re run the entire program automatically

I have a program in CLIPS that when it starts ask the user for some inputs. I want when is no other rule to execute and finished to run again automatically the (initial-fact). Is there a way to do it?

Upvotes: 0

Views: 37

Answers (1)

Gary Riley
Gary Riley

Reputation: 10757

You could define a rule with a lower salience than all other rules that issues a reset command.

(defrule restart
   (declare (salience -1000))
   =>
   (reset))

Upvotes: 0

Related Questions