- From: Paul Vincent <pvincent@tibco.com>
- Date: Thu, 26 Nov 2009 00:52:37 -0800
- To: "Gary Hallmark" <gary.hallmark@oracle.com>
- Cc: "RIF WG" <public-rif-wg@w3.org>, "Neal Wyse" <neal.wyse@oracle.com>
Gary - can you explain what you mean by " PRD should consider all rule vars in the IF part, even existential vars, as part of the rule instance" ? Surely PRD accommodates this now - i.e. rule chaining is not restricted to some explicitly defined rule variable? Paul Vincent > -----Original Message----- > From: public-rif-wg-request@w3.org [mailto:public-rif-wg-request@w3.org] > On Behalf Of Gary Hallmark > Sent: 25 November 2009 16:14 > To: RIF WG; Neal Wyse > Subject: Fwd: Clips behavior > > A colleague and I have tested OBR, Jess, and Clips refraction behavior. > All are consistent. All contradict PRD. I do not think the issue is > whether actions are effective immediately, although there may also be > issues with that. Rather, the issue ssems to be that PRD should > consider all rule vars in the IF part, even existential vars, as part > of the rule instance. Thus far, I have only heard that ILOG works like > PRD says, and I haven't actually seen a test report verifying that. > > -------- Original Message -------- > Subject: Clips behavior > From: Neal Wyse <neal.wyse@oracle.com> > To: Gary Hallmark <Gary.Hallmark@oracle.com> > CC: null > > Hi Gary, > > I've attached 3 Clips examples. > rif1.clp - Modify_loop test > rif2.clp, rif3.clp - two approaches to the Modify_noloop test > They all loop with Clips which is what I expected. > I'm not sure if we can get closer than that for the noloop test. > > Neal > (deftemplate foo > (slot count) > ) > > (defrule r3 > (and > ?f1 <- (foo (count ?c)) > (not (not (test (> ?c 0)))) > ) > => > (modify ?f1 (count (- ?c 1))) > (printout t (str-cat "r3 fired: ") ?c crlf) > ) > > (assert (foo (count 10))) > (run) > (deftemplate foo > (slot count) > ) > > (defrule r1 > ?f1 <- (foo (count ?c&:(> ?c 0))) > => > (modify ?f1 (count (- ?c 1))) > (printout t (str-cat "r1 fired: ") ?c crlf) > ) > > (assert (foo (count 10))) > (run) > (deftemplate foo > (slot count) > ) > > (defrule r2 > (and > ?f1 <- (foo) > (not (and (foo (count ?c)) > (test (not (> ?c 0)))) > ) > ) > => > (bind ?cnt (fact-slot-value ?f1 count)) > ;(modify ?f1 (count (- (fact-slot-value ?f1 count) 1))) > (modify ?f1 (count (- ?cnt 1))) > (printout t (str-cat "r2 fired: ") ?cnt crlf) > ) > > (assert (foo (count 10))) > (run)
Received on Thursday, 26 November 2009 08:53:21 UTC