W3C home > Mailing lists > Public > public-rif-wg@w3.org > June 2009

Re: [Core](PRD] safeness

From: Christian De Sainte Marie <csma@fr.ibm.com>
Date: Wed, 10 Jun 2009 23:13:44 +0200
To: Gary Hallmark <gary.hallmark@oracle.com>
Cc: gary.hallmark@gmail.com, RIF <public-rif-wg@w3.org>
Message-ID: <OFDEA288F3.9037FB0B-ONC12575D1.0071676F-C12575D1.00749D88@fr.ibm.com>
********* NOTICE **********
My new email address at IBM is: csma@fr.ibm.com
My ILOG email address will not be forwarded after June 8
*****************************


gary.hallmark@gmail.com wrote on 10/06/2009 18:47:28:
> 
> In production rule systems such as CLIPS and Jess (and JRules, too, I
> think), if a rule such as
> 
> if P then Q
> 
> is safe, and if Q references no variables in P, then
> 
> if not(P) then Q
> 
> is also safe.

I do not think so. At least, not always:

Forall x If Px Then print("hello world") is safe

and Forall x if Not(Px) then print("hello world") is not. I would be 
surprised if JRules accepted such a rule. Changhai?

I do not know about Jess and CLIPS, but I would be surprised, too, if the 
accepted the rule.
 
> I will not be happy with a PRD safeness definition that does not
> properly account for this.

I will not be happy with a definition that does not account for what the 
systems we want to cover do, either.

If Q does not reference any variable that is in P, then the only 
restriction is that all the variable in the condition must be bound in the 
condition. Which means that, if your entire condition, P, is negated, then 
the only thing that is allowed for P is an existential formula, because 
existentially quantified variables need only be bound inside the scope of 
the quantifier; and you cannot move an existential quantifier out of a 
negation (not without changing it for an universal, which you do not want 
to do).

So, if P is an existential formula, and there are no (universally 
quantified) rule variables outside of P, then, indeed, "if not(P) then Q" 
is safe.

I think (but that must be confirmed by Changhai), that this (not exists) 
is the only case where an entirely negated condition is allowed in JRules. 
Can you give examples of what is allowed in CLIPS and Jess and that would 
go beyond that, so that we can repair the definition, if it is repairable?

One thing that needs be added in PRD, anyway, if just for the sake of 
clarification, is that existential quantifiers cannot be moved out of a 
negation, in the preprocessing step.

Cheers,

Christian


ILOG, an IBM Company
9 rue de Verdun
94253 - Gentilly cedex - FRANCE
Tel. +33 1 49 08 35 00
Fax +33 1 49 08 35 10



Sauf indication contraire ci-dessus:/ Unless stated otherwise above:
Compagnie IBM France
Siège Social : Tour Descartes, 2, avenue Gambetta, La Défense 5, 92400 
Courbevoie
RCS Nanterre 552 118 465
Forme Sociale : S.A.S.
Capital Social : 609.751.783,30 ?
SIREN/SIRET : 552 118 465 02430
Received on Wednesday, 10 June 2009 21:14:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 10 June 2009 21:14:26 GMT