Re: [PRD] ACTION-619: Examples in JRules to support discussion on Assert and Modify

Changhai Ke wrote:
> 
> *Non-intrusiveness of production rule systems*
> 
> One important principle of rule systems is being non-intrusive to the 
> application object model. When an application is designed, the designer 
> had the freedom to design the object model accordingly to the pure 
> business requirements. He/she designs the classes, and will assign them 
> some constructors. Some of them will be with arguments, and some others 
> without arguments, this is dictated by the business needs. Only later 
> on, the rules are brought into the application. The rules must then 
> infer on an existing object model, without requiring altering it. As a 
> matter of fact, people who write rules are not necessarily the ones who 
> designed the object model. In this sense, the inability of RIF-PRD to 
> use any form of constructor violates the non-intrusiveness of production 
> rule systems. Although we are making the decision to support only 
> zero-arg constructors, this weakness needs to be understood and 
> acknowledged.

On the other hand, in an interchange context, using your constructor when you produce a RIF-PRD document is intrusive wrt to the consumer of that document, who will translate it back into his own PR language, and apply the rules on his own data/object model...

That would be an argument for no constructor, and all initializations have to be explicit, thus moving the burden on the translators (which, we have to assume, are able to take the specifics of their side's data/object model into account).

Of course, as Gary remarks, as soon as we will have added the capability to include calls to methods in rules interchanged using PRD, you will be able to use your constructors in PRD documents that assume that they are shared as some kind of externals.

But your argument on non-intrusiveness leads me to conclude that the default, and thus the basic, way to insert a new object/frame must be using a zero-arg constructor.

Cheers,

Christian

Received on Tuesday, 14 October 2008 14:16:07 UTC