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

AW: [PRD] ACTION-531 Update PRD examples complete

From: Adrian Paschke <adrian.paschke@biotec.tu-dresden.de>
Date: Thu, 19 Jun 2008 10:25:40 +0200
To: "'Gary Hallmark'" <gary.hallmark@oracle.com>, "'pu >> RIF WG'" <public-rif-wg@w3.org>
Cc: "'Christian de Sainte Marie'" <csma@ilog.fr>
Message-Id: <20080619082530.93DA170000DA@mailserver.biotec.tu-dresden.de>

Gary,

Excellent job! 


Christian, Gary,

I added a small extension to the presentation syntax in chapter 2.5.
allowing variables in the assert and retract actions

   ASSERT    ::= Atom | Frame | Var
   Retract   ::= 'Retract' '(' Atom | Frame | Var ')'

In many production rule systems it is common to use variables in the assert
/ retract actions. For instance, imagine the following production rule (in
CLIPS):

(defrule r1
    ?f1 <- (valve ?v open)
    ?f2 <- (set ?v close)
=>
    (retract ?f1 ?f2)
    (assert (valve ?v close))
)

The informal meaning of the rule is to match two facts in the intensional
knowledge base, retract both of them and insert a new fact in their place.

We already use equal for single assignment to variables such as "?f1 =
(valve ?v open)".

I would even propose to add a "*" to the EBNF, so that we can directly
describe multiple retracts / asserts such as "(retract ?f1 ?f2)", instead of
splitting them into two retracts, retract(?f1) retract(?f2).

-Adrian 

BTW: ":-" is part of a widely known and used ISO rules standard. Just to
support my argument to use ":-" to describe (business) rules in a dialect
independent presentation syntax. 


-----Ursprüngliche Nachricht-----
Von: public-rif-wg-request@w3.org [mailto:public-rif-wg-request@w3.org] Im
Auftrag von Gary Hallmark
Gesendet: Donnerstag, 19. Juni 2008 01:36
An: pu >> RIF WG
Betreff: [PRD] ACTION-531 Update PRD examples complete


I first found it necessary to edit 2.5 Presentation Syntax to succinctly 
specify the EBNF for PRD PS.  I took a bit of
initiative and removed some of what I took to be arbitrary differences.  
E.g. I don't really like named argument UNITERMs, but I can see 
absolutely no reason why BLD should have them and PRD should not.

I had to reconcile 6.1 and 2.5.  I left Christian's extended Forall in 
6.1 but not in 2.5.

I then changed all the chicken examples (1.3, 2.3.1.2, 3.1) to use the 
PS defined in 2.5.

I think there are some minor inconsistencies between 2.5, 6.1, and 2.* 
where the XML syntax is explained.  I don't think I made it worse, 
though :-)
Received on Thursday, 19 June 2008 08:26:27 GMT

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