This is a simple form of what's called "truth maintenence." Jess
doesn't have direct support for this; you'd indeed have to write another rule
to retract the fact.
CLIPS has the (logical) conditional element to support this. (logical)
is on the long list of things I've said I might add to Jess someday,
but I wouldn't delay your project to wait for it.
I think Moore, John R. wrote:
>
>
> I'm brand new to Jess (using 50a6) and couldn't find a related example or
> specific reference in the manuals.
>
> Is it possible to make Jess retract facts that were asserted by a rule a
> rule is no longer true? In the example below, I expected (foo far) to be
> automatically retracted since the fact that caused it to be asserted is no
> longer true, that was not the case. Can Jess do this without having to
> write a rule to specifically retract the fact, if so how? I could write
> the converse rule to look for (foo far) and retract it when (foo bar)
> doesn't exist but that seems like unnecessary work.
>
> Thanks in Advance,
> John Moore
>
> Example:
>
> (defrule foo-is-bar
> (foo bar)
> =>
> (assert (foo far))
> )
> (assert (foo bar))
> (run)
>
> { (foo far) is asserted }
>
> (retract 0)
> (run)
>
>
>
>
>
> > John R. Moore
> > Web Applications Team Leader
> > Software Engineering
> > NBCS Development Center
> > [EMAIL PROTECTED]
> >
> >
> ---------------------------------------------------------------------
> 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]
> ---------------------------------------------------------------------
>
>
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
Org. 8920, MS 9214 [EMAIL PROTECTED]
PO Box 969 http://herzberg.ca.sandia.gov
Livermore, CA 94550
---------------------------------------------------------------------
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]
---------------------------------------------------------------------