Re: [PRD] Rule instances, refraction and Modify [Was: Re: Fwd: Clips behavior]

Christian wrote:

That point is not really a problem, as far as regards CR etc, because 
this, is, really, what the spec says it does, already. My suggestion is 
that we, only, make the fact that Modify = Retract+Assert more explicit, 
in PRD (if only because this is not what the spec was intended to say :-). 
 [1]


Actually, Modify = RetractAll + Assert. Too bad we didn't expose 
RetractAll as an atomic action.
By the way, the spec says Modify is an atomic action. How can that be so 
if Modify = RetractAll + Assert?

Clearly we need to define RetractAll as an atomic action that is used 
only to define the compound action Modify.

3. the binding of the rule (universal) variables is not always 
discriminant enough to characterize a rule instance. That is, it does not 
allow to decide, in all cases, whether two instances of a rule are equal 
or not: in the following example, the rule should have two different 
instances, for the conflict resolution algo, but the binding of the unique 
rule variable is not enough to distinguish them:
   Rule: FORALL ?x, IF test(?x) AND ( foo(1) OR bar(B) ) THEN...
   Facts: (test a), (foo 1), (bar B)
That shows that the characterization of a rule instance, in PRD, should 
take the facts that matched the condition into account, not only the 
binding of the rule variables (at least, I found no other way to take this 
kind of cases into account).


Can you do a simple transformation:

   Rule: FORALL ?x, ?y, ?z, IF test(?x) AND ( ?y=1 AND foo(?y) OR ?z=B AND bar(?z) ) THEN...

And then use our existing rule instances. I'm a bit concerned about a 
new notion of matchedFact. I don't know what that is, exactly.

Received on Monday, 1 February 2010 00:02:06 UTC