On Fri, Oct 31, 2008 at 2:59 PM, Ernest Friedman-Hill <[EMAIL PROTECTED]>wrote:

> Hi Wolfgang,
>
> I'm surprised you would bring this up;


Thanks for the sweet coating!


> it's very well-documented behavior duplicated exactly from CLIPS. FOr
> example, in section 6.5 of the Jess 7.1 manual:


Suitably touché'd, I seize the (admittedly petty) opportunity to correct
you: it's section 6.10 ;-)

>
>   A not CE is evaluated only when either a fact matching it exists, or when
> the pattern immediately
>   before the not on the rule's LHS is evaluated. If a not CE is the first
>   pattern on a rule's LHS, or is the the first the pattern in an and group,
> or is the only
>   pattern on a given branch of an or group, the pattern (initial-fact) is
> inserted to
>   become this important preceding pattern. Therefore, the fact
> (initial-fact) created by the
>   reset command is necessary to the proper functioning of some not
> patterns. For
>   this reason, it is especially important to issue a reset command before
> attempting to run
>   the rule engine when working with not patterns.


But since we rely on computers to remind us of anything from a to z,
wouldn't it be nice if Jess
would complain if there is no initial-fact to insert? Or is there some
convincing reason to not
have it?


>
> On Oct 31, 2008, at 8:45 AM, Wolfgang Laun wrote:
>
>  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
>>
>>
>>
> ---------------------------------------------------------
> Ernest Friedman-Hill
> Informatics & Decision Sciences, Sandia National Laboratories
> PO Box 969, MS 9012, Livermore, CA 94550
> http://www.jessrules.com
>
>
>
>
>
>
>
> --------------------------------------------------------------------
> 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