Hi Win,

That's what I thought when I first saw this. But my suspicion made me take a second look.

Simply inserting a (reset) will disrupt things because it additionally asserts the (MAIN::initial-fact). This coupled with retracting the "hard coded" facts F-0 and F-1 means that now the "initial fact" and fact "a" are retracted instead of facts "a" and "b" which is a different situation.

-Ed



Win Carus wrote:

Hi Ernest.

I took a short look at this problem yesterday and noticed: If you perform a (reset) -- and create an initial-fact -- before performing (run) this problem does NOT appear. Here's what I ran (a very slightly modified form of the original list of commands):

(defrule r
(logical (a))
(not (b))
=>
(assert (b)))

(defmodule mod)

(defrule bad-rule
(b)
=>
(printout t "BAD!!!" crlf))

(watch all)
(reset) ;; added by Win Carus
(assert (a))
(facts *) ;; added by Win Carus
(run)
(retract 1) ;; (retract (b))
(run)
(facts *) ;; added by Win Carus
(retract 0) ;; (retract (a))
(focus mod)
(run)
(facts *)

Regards,

Win

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to