RE: [PRD] Refraction Semantics may be WRONG!

Hi Gary: I'm probably misunderstanding, but....
testing for the existence of a property of an object/class does not make
much sense in a static OO type system. 
- either x has a property count - the rule compiles
- or x has no property count - any reference to x.count will be a
compilation error.
e.g. x exists implies x.count exists

So adding "not(not(x.count>0))" has (/and tested to show) no effect on
the result...

/* Note: I can maybe "cheat" here by exploiting an assumption that
"exists" implies "already updated" in an OO system:
"If no-chaining-required then only update the count (or indeed any other
action) if it hasn't been updated already".

I can achieve this by adding either a condition on the history of
x.count (ie condition: x.count.historySize = 0 and x.count > 0)
Or by adding a condition to the action in the rule: (ie action: if
x.count.historySize = 0 then x.count -= 1)

I would not want a RIF interpreter to make assumptions over the implied
behaviour though - I'd expect the requirement to chain or not to be
explicit in the rule specification (/grammar). :)
*/

Paul Vincent 
+1 650 206 2493 / mobile +44 781 493 7229 


> -----Original Message-----
> From: Gary Hallmark [mailto:gary.hallmark@oracle.com]
> Sent: 17 November 2009 20:30
> To: Paul Vincent
> Cc: RIF WG; neal Wyse
> Subject: Re: [PRD] Refraction Semantics may be WRONG!
> 
> Thanks, Paul. But this looks more like the modify_loop test. Can you
> specify a condition
> 
> exists(x.count > 0);
> 
> or perhaps,
> 
> not(not(x.count>0));
> 
> Do these rules also loop?
> 
> Paul Vincent wrote:
> >
> > TIBCO BusinessEvents rule engine also loops in this case - the
action
> > is updating a property in the rule condition so the rule is placed
> > back on the agenda. In some other rule engines, the condition state
> > change (versus referenced rule variable state change) is what
> > determines whether a rule is placed back on the agenda.
> >
> > [Assuming I interpreted/mapped the PRD rule specification
correctly...
> > I'm not sure whether ?C is just an intermediate term required by
> RIF's
> > expression language, or whether this is part of the test (have a
rule
> > variable or term that is not a rule variable). Either way, I can't
> see
> > how adding another rule or simple variable will halt the rule
looping
> > without some external influencer. ]
> >
> > Cheers
> >
> > Paul Vincent
> >
> > TIBCO
> >
> > > -----Original Message-----
> >
> > > From: public-rif-wg-request@w3.org [mailto:public-rif-wg-
> request@w3.org]
> >
> > > On Behalf Of Gary Hallmark
> >
> > > Sent: 17 November 2009 00:36
> >
> > > To: RIF WG
> >
> > > Cc: neal Wyse
> >
> > > Subject: [PRD] Refraction Semantics may be WRONG!
> >
> > >
> >
> > > I've discovered that refraction in OBR and Jess do not conform to
> the
> >
> > > PRD spec. In particular, the
> >
> > > http://www.w3.org/2005/rules/wiki/Modify_noloop test case will
> always
> >
> > > loop. The issue is that the PRD spec includes only the Forall
> variables
> >
> > > in the rule instance, but my system(s) also includes the Exists
> >
> > > variables in the rule instance.
> >
> > >
> >
> > > What do the other PR systems do? Can you please try the
> Modify_noloop
> >
> > > test?
> >
> > >
> >

Received on Wednesday, 18 November 2009 00:40:19 UTC