This is an archive of an inactive wiki and cannot be modified.

As the name implies, a Rule Interchange Format (RIF) should enable interchange of rules. The use cases presented in section 2 of this document illustrate situations in which such interchanges enable some desirable functionality. In this section we attempt to clarify in more general terms what rule interchange is and why it is important.

By "rules" we mean formal entities in some "executable rule-language." An executable rule-language, as we understand that term here, consists of the following elements: 1) a precise syntax and/or effective procedure for determining whether or not any expression is a well-formed formula (wff) of the language, and 2) a derivation procedure, which is defined as a partial function that takes a set of wffs in the language, together with a set of zero or more queries (also wffs), and for each query either returns an answer after some finite time, or terminates without returning an answer. (The notion a "derivation procedure" is in line with the notion of a "load-and-query rule engine" in the RIF charter, section 2.2.3, except that we here explicitly account for the possibility that a bona-fide rule-engine can "go on forever" in certain cases.)

Let r-1 represent a set of wffs in a rule language RL-1, let q-1 represent a set of query wffs in the same language, and let RL-1(r-1,q-1) represent the result of executing the derivation procedure of rule language RL-1 on the given arguments. Let RL-2 represent a rule language distinct from RL-1. Then a fundamental question regarding the possibility of rule-interchange between these two rule-languages for this case is whether there is a mapping M from r-1 and q-1 into RL-2 sets r-2 and q-2 such that r-2 = M(r-1) and q-2 = M(q-2), and such that RL-2(r-2,q-2) = M(RL-1(r-1,q-1)). In words: is there a way to translate the items in r-1 and q-1 into RL-2 such that equivalent results are achieved?

In any particular case there seem to be three possible answers of interest to this question: 1) such a mapping exists, 2) such a mapping does not exist, but a mapping that is "close enough" to make the interchange useful does exist, and 3) such a mapping does not exist and there is also no mapping "close enough" to make the interchange useful.

Let RL-1, RL-2,...RL-n represent n rule-languages. Suppose that for these languages the answer to the fundamental question regarding rule-interchange falls into categories (1) and (2) enough of the time that it is clear that automating interchange of rules among this family of languages is worth the effort. One way to facilitate rule-interchange among these languages would be to design pairwise translation alogrithms for each possible pair in the family. For n languages we need to design n(n-1) algorithms: for each rule-language we have to implement a translation algorithm to each of the other n-1 lanaguages.

An alternative approach is to design one overarching representation mechanism, a RIF, that allows the structure of each language in RL-1, RL-2,...RL-n to be expressed in some standard way. Then for each language one would only have to write two translation algorithms: one from the language to the RIF and vice versa, for a total of 2n.

Besides representing an order of magnitude less effort for the implementation of translation algorithms, the use of a RIF has the potential for additional benefits. For example, in cases where rule-interchange mappings cannot be reliably automated, the information provided by the RIF representation should, at the very least, be useful in automatically constructing explanations of the translation impasse.

It is important to understand, however, that the RIF itself provides neither a translation algorithm nor an explicit mapping between rule languages. Rather the RIF includes a framework of concepts, represented as tags in a markup language, that can be used to provide information about the meaning of wffs in a rule language. For rule authors who wish to make their rules accessible across languages and platforms, the more completely, precisely, and accurately they tag their creations using the RIF, the more likely it is that their rules will be capable of being automatically translated correctly.