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

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 UTC