W3C home > Mailing lists > Public > public-rif-wg@w3.org > July 2008

Re: [Fwd: Re: PRD Review]

From: Christian de Sainte Marie <csma@ilog.fr>
Date: Wed, 02 Jul 2008 17:48:39 +0200
Message-ID: <486BA357.9030300@ilog.fr>
To: Gary Hallmark <gary.hallmark@oracle.com>
CC: RIF WG <public-rif-wg@w3.org>

Christian de Sainte Marie wrote:
>>
>>
>> Do(Retract(?emp[salary->?salary]) 
>> ?emp[salary->func-numeric-multiply(?salary 1.1)]
>> :-
>> And(?emp#Employee ?emp[salary->?salary] pred:numeric-less-than(?salary 
>> 100000))
>>
>> In OBR and Jess, the above rule will give every employee with salary 
>> less than 100000 a 10% raise
>> only if no-repeat (metadata attached to the rule) is true.  If 
>> no-repeat is false, then the above rule will keep increasing 
>> employees' salaries by 10% until every employee earns at least 100000.
> 
> 
> This is also what the no-repeat strategy would give you, as it is 
> specified in the draft.

Wrong. The spec in the draft does not work because it fails to 
differentiate between the real rule variables (?emp in your example), 
that are scoped on the rule, and the helper variables (?salary in your 
example), that are not (you can declare them within an Exists on each 
side of the Implies).

I knew there was something wrong with that semantics :-(
(my pet example to check that pb is the rule that raise an alert if a 
sensor is above a threshold, and the value continue to increase after 
the alert has been raised; the rule must not re-fire unless the value 
dropped below the threshold in the mean time).

Cheers,

Christian
Received on Wednesday, 2 July 2008 15:50:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:33:50 GMT