This Jess program works correctly if executed with the initial reset,
but the rule does not fire if there is not initial-fact.

;; (reset)
(deftemplate Pair (slot a)(slot b))
(assert (Pair (a a)(b b)))
(defrule noabeq (not (Pair (a ?x)(b ?x)))
   =>
(printout t "no a=b!" crlf))
(run)

If the presence of the initial-fact is required for some things to work,
then there should be a check and an error thrown with a diagnostic. Or
could the initial-fact be supplied automatically when the first fact
is entered into WM?

Cheers
Wolfgang

Reply via email to