RE: [RAF] small comment on discriminator "declarative vs. procedural"

From: public-rif-wg-request@w3.org [mailto:public-rif-wg-request@w3.org]
On Behalf Of Piero A. Bonatti
Sent: Friday, February 10, 2006 2:45 PM
To: public-rif-wg@w3.org
Subject: Re: [RAF] small comment on discriminator "declarative vs.
procedural"

 

 

On Friday 10 February 2006 15:38, you wrote:

> If I execute rules "declaratively" I do not take account of their

> ordering.

 

"execution" implies an underlying deterministic algorithm run on some 

computer.  any such algorithm has to adopt some ordering (or more
generally, 

an execution strategy)

 

The ordering is dictated by the rule algorithm, not the physical
ordering of the rules in their representation. I assume RIF will end up
being a "document format" that has an implicit ordering of rules.
However, I cannot assume that, for example, the rule algorithm /
execution is carried out in *any* order (imagine a highly parallel rule
processor, for example).

 

> 

> If I execute rules "procedurally" I test them sequentially, even if
the

> execution may be logically invalid from a logical perspective. This is

> akin to common process execution and coding rules in a 3GL.

 

would you please clarify the context (syntax, semantics)?  usually in
horn 

clauses all orderings yield logically valid conclusions.  sticking to a 

particular order may only affect completeness

 

Well, I am considering the class of rules used in production rule
engines. The rule actions for these are updates on some object model
(assertions that represent some value change) or invocations of some
other processes. In effect, the rule actions are classic programming
constructs. 

 

if currentAccount's balance is less than 3000 // order independent

then {                                          // order dependent

      set currentAccount's promotion to waiverPromotion,    

      print(currentAccount's customerName " qualifies for a waiver on
opening fee for saving account.").

      execute customerApprovalCheck with { account = currentAccount},

      }

 

Good books on these classes of rule systems are Business Rules Applied
and JESS In Action.

 

piero

 

 

Received on Friday, 10 February 2006 15:06:12 UTC