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

Re: [PRD] Default conflict resolution strategy (ISSUE-64)

From: Christian de Sainte Marie <csma@ilog.fr>
Date: Tue, 05 Aug 2008 18:45:25 +0200
Message-ID: <489883A5.6000004@ilog.fr>
To: RIF WG <public-rif-wg@w3.org>

Gary Hallmark wrote:
> Do you mean rule2 fires twice, once with ?x=1 and once with ?x=2?  That 
> demonstrates a difference in semantics.  As I said, with Oracle and 
> Jess, rule2 fires once with ?x=2 (because ?x=2 is the more recent binding)

Yes, absolutely. That was my point: Jess and Jrules have a different 
semantics on this. Which led me to the conclusion that neither could be 
the default in PRD...

>> And that is certainly what you would get with the semantics that was 
>> described in PRD.
> Please clarify whether you mean rule2 fires once or twice, and then 
> please "prove" it using the PRD semantics.

I meant: under the semantics for no-repeat that was in PRD before we 
decided to remove it for FPWD, rule2 would have fired twice, for each 
?x=1 and ?x=2. Sorry for not having been clear enough.

> I don't see how PRD can give 
> the Oracle/Jess semantics without some substantial changes.  PRD assumes 
> that mergeInstances is not called between actions of the same rule; yet 
> in Oracle/Jess (and most engines, I think) the agenda is modified by 
> individual actions and this is why when the (actions of the) first 
> instance of rule2 is executed, the second instance is removed.  But when 
> the first instance of rule1 is executed, nothing happens to the second 
> instance of rule1 and so rule1 is executed twice.

The idea was to specify the intended behaviour in terms of the WM (and 
changes to the WM) and bindings (and changes in the bindings).

I am not sure that this has to do with whether the agenda is modified 
after each individual actions or whatever: these are implementation 
specific.

The Jess/Oracle behaviour that you describe could be described if the 
bindings were not specified in terms of variables, but in terms of 
patterns, that is, not considering the binding (1/?x) but the binding 
(P(1)/P(?x)), which makes sense if the "P(1)"s are "individualised", 
that is, if P(1) before and after Do{Retract(P(1)), Assert(P(1))} are 
different.

So: yes, the spec of the semantics in PRD has to be improved to take all 
the cases into account; but that does not necessarily require changing 
the granularity, I think (that is, specifying the semantics at a grain 
finer than INSTANTIATE-PICK-FINAL).

Cheers,

Christian
Received on Tuesday, 5 August 2008 16:47:57 GMT

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