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

Re: [PRD] Default conflict resolution strategy (ISSUE-64) (Was; Re: [Fwd: Re: PRD Review])

From: Gary Hallmark <gary.hallmark@oracle.com>
Date: Tue, 29 Jul 2008 09:39:55 -0700
Message-ID: <488F47DB.8000900@oracle.com>
To: Christian de Sainte Marie <csma@ilog.fr>
CC: Mark Proctor <mproctor@redhat.com>, RIF WG <public-rif-wg@w3.org>

Christian de Sainte Marie wrote:
>
> Mark Proctor wrote:
>>
>> Refaction in JRules is the same as jess/clips/drools no-loop. 
I'd be surprised if it is exactly the same.   What do you expect from 
the following ruleset:

p(1)
q(1)
q(2)
(* rule1[loop->false] *)
Do(external(print("rule1 fired, ?x=" ?x))) :- q(?x)
(* rule2[loop->false] *)
Do(Retract(p(1)) p(1) external(print("rule2 fired, ?x=" ?x))) :- 
And(p(1) q(?x))

With Oracle/Jess, you get
rule2 fired, ?x=2
rule1 fired, ?x=2
rule1 fired, ?x=1

The semantics of Oracle/Jess is that a rule's actions cannot re-activate 
that rule.  Initially, because of the input data, rule1 and rule2 each 
have 2 activations.  When rule2 fires, the retraction removes the other 
rule2 activation.  The assert action cannot reactivate rule2 because of 
the no-loop property. 

>> It's just the default is the opposite way around. didn't JRules have 
>> a "reset" command to allow a rule to refire after a modify?
>
> Right, you can disallow refraction in JRules, so, it is only the 
> default that is the other way around.
>
> So, "no-repeat" cannot be the default in RIF-PRD, since it is not the 
> default strategy in some of the major engines (it seemed so natural to 
> me that I assumed it was the default in most, if not all, engines... 
> Or am I just biased :-).
>
> Which probably means that there should be no default, and the intended 
> conflict resolution strategy must always be explicit (see also 
> Adrian's argument against a default strategy, in [1]).
We need to carefully specify these strategies to be sure we agree what 
they are, and then we need to see what the intersection is, and if it is 
 >= 1, give it an explicit name(s) (and probably not in the metadata as 
my example does).
>
> Cheers,
>
> Christian
>
> [1] http://lists.w3.org/Archives/Public/public-rif-wg/2008Jun/0168.html
>
>
>
>
Received on Tuesday, 29 July 2008 16:42:14 GMT

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