comment on RIF-PRD

The W3C RIF Working Group has achieved a remarkable goal: no less than the
definition of a coherent set of languages for abstract rule notation and
interchange. Built around a Basic Logic Dialect and a set of data types
similar to what we have in XML schema, the framework promises the capability
to be adapted to rule languages that are (by design) not fully covered by
BLD.

Current work has me interested in Production Rule systems, which are
addressed by the Group's RIF-PRD document with its very ambitious goal to
add action parts to (purely descriptive) BLD rules and, notably, an abstract
execution model for forward chaining rule engines. (What I miss in RIF-PRD
is a statement similar to the one found in RIF-BLD, where is says that "the
design clearly indicates a decision to avoid solving the (probably
impossible) problem of rule interchange in general". Clearly, this "probable
impossibility" is much more probable in the realm of full-blown PR systems.)

However, it is important to note that the basic definitions are here, for
Actions and a PR Engine, with an abstract algorithm defining the state
transition typical for such systems. A basic Conflict Resolution is defined
in terms of Refraction, Priority and Recency, as implemented in real-word
systems. (Here, another comment on more or less essential - from a pragmatic
point of view - features must be made. Isn't switching between rule groups
important? How can one express the "no-loop" feature for upholding
refraction in spite of an update of a contributing fact in the rule's action
part?)

A minor point is the absence of globals, i.e., variables with visibility in
all action parts. This is a common convenience feature that permits you to
implement general actions.

More specifically, in reference to the "running example", there are several
points that appear unusual when compared with some existing real-world
systems.

   - Example 3.3 illustrates "assert" and "retract" actions, showing that
   they operate on "ground atomic formulas", representing what implementations
   usually have as fields or attributes of a record or objects, and where they
   would require a "modify" operation on the containing entity.
   - Rules that require binding of facts to variables to be used in the
   action part have to be represented by "Forall ?var such that ...", where the
   natural domain of the ?var, i.e., all facts of some class, is defined by a
   term (?var # class) of the following condition. Forall is also used where a
   condition's term will match at most once. While this is (FOP-)technically
   correct, it seems to make the addition of a "forall" pattern where the range
   is defined by a condition impossible? (Cf. "forall" in Jess or Drools.)
   - Similarly, Exists must apparently be used to introduce variables to be
   bound to facts, for matching arbitrary values. Again, the "exists" (as in
   Jess or Drools) appears to be barred (but this can still be expressed using
   double negation).

It is surprising that the notation does not include any (explicit)
definition of fact classes. While much of the structure is implied by the
terms in the rules (e.g., ?customer[ex1:status->",,,"]) there seems to be no
way to express class hierarchies, let alone projections (such as Java's
interfaces).

It seems that RIF-PRD is capable to express subsets of the semantic features
of existing systems. But it remains to be seen whether non-trivial
applications can be interchanged between different PR systems.

Regards
Wolfgang Laun

Received on Monday, 3 August 2009 09:17:36 UTC