-->
R u l e M L

<--


Rule Markup Language




Rules in (and for) the Web have become a mainstream topic since inference rules were marked up for E-Commerce and were identified as a Design Issue of the Semantic Web, and since transformation rules were put to practice for document generation from a central XML repository (as used here). Rules have also continued to play an important role in Intelligent Agents and AI shells for knowledge-based systems, which need a Web interchange format, too. The Rule Markup Initiative has taken initial steps towards defining a shared Rule Markup Language (RuleML), permitting both forward (bottom-up) and backward (top-down) rules in XML for deduction, rewriting, and further inferential-transformational tasks. The initiative started during PRICAI 2000, as described in the Original RuleML Slide, and was launched in the Internet on 2000-11-10. Besides the previous XML-only RuleML and the current XML/RDF-combining RuleML, there is also an approach towards an RDF-only RuleML. Complementary efforts consist of the development of (Java-based) rule engines such as Mandarax RuleML and XSB-RDF RuleML.

There now exists a preliminary RuleML design and a preliminary Version 0.8 system of DTDs for some RuleML sublanguages. On the first day of W3C's Technical Plenary and WG Meeting Event, 26 February - 2 March 2001, RuleML participants organized a Birds Of a Feather session, using this presentation material; in addition, at the RDF Interest Group: Face to face meeting 26/27 Feb 2001 we presented RDF Relationships and DTD Modularization. Further activities are planned in conjunction with IJCAI-01, in August 2001, in Seattle, Washington, and with the third International Conference on Electronic Commmerce, ICEC2001, in Vienna, Austria, in October/November 2001. There will be an Invited Talk on RuleML at the 14th International Conference of Applications of Prolog, INAP2001, in Tokyo, Japan, in October 2001.

Sections

Goals

The participants of the RuleML Initiative constitute an open network of individuals and groups from both industry and academia. We are not commencing from zero but have done some work related to rule markup or have actually proposed some specific tag set for rules. Our main goal is to provide a basis for an integrated rule-markup approach that will be beneficial to all involved and to the rule community at large. This shall be achieved by having all participants collaborate in establishing translations between existing tag sets and in converging on a shared rule-markup vocabulary. This RuleML kernel language can serve as a specification for immediate rule interchange and can be gradually extended - possibly together with related initiatives - towards a proposal that could be submitted to the W3C.

Uses

If you want to review rule principles, (then) you may look at Rules and Rule-based Systems. (BTW, this is itself a simple rule.) If you want to review XML principles, you may go to the beginning of Knowledge Markup Techniques.

Rules are being used for many interconnected purposes, capturing regularities in application domains such as the following:

Rather than reinventing rule principles and markups in each such community, the idea of RuleML is to 'package' the rule aspect of these domains and and make it available as an (XML) namespace, .../RuleML, which can be mixed with a namespace for natural-language (XHTML) texts and possible domain-specific namespaces (much like MathML is mixed into such domain texts).

Scope

Rules can be stated (1) in natural language, (2) in some formal notation, or (3) in a combination of both. Being in the third, 'semiformal' category, the RuleML Initiative is working towards an XML-based markup language that permits Web-based rule storage, interchange, retrieval, and firing/application.

Markup standards and initiatives related to RuleML include:

Participants

Besides on the related work, the RuleML Initiative is based on the following proposals of the participants listed in parentheses:

Steps

Some initial steps taken by the RuleML Initiative have been to structure the area of rule markup, to raise issues and identify tasks, and to propose tentative rule tags/attributes:
  1. Web research: What related work exists? Preliminary results are collected in this page. Who else should be involved? For example, members of the CLIPS/Jess (forward rules), Prolog (backward rules), and related AI-language communities already expressed their interest. Feel free to contact us, send URLs, etc.
  2. Proposal comparison: Which ones cover what kinds of rules? Where are overlaps between the proposals? The result should be a 'family tree' of rule markup languages, preparing rule translations, language revisions, etc. For exemplary tag comparisons by alignment see sections 3 and 4 of Markup Languages for Functional-Logic Programming.
  3. DTD translation: Can (revised) proposals of participants' rule languages (often described by DTDs) be (XSLT-)translated into each other? In which cases will only partial translations be possible?
  4. Markup harmonization: If different XML tag or attribute names have been used for the same rule parts, which names should be chosen in RuleML? The original tentative RuleML kernel comprised the tags <rule> ... </rule> for rules with unspecified use direction (possibly employing the 'attributed' <rule dir="forward"> ... </rule> and <rule dir="backward"> ... </rule> for the two specified use directions), <conc> ... </conc> and <prem> ... </prem> for a rule conclusion ('then'-part, action, consequent) and premise ('if'-part, condition, antecedent), and <var> ... </var> for rule variables. Besides the top-level rule elements of conclusions and premises, further ones may be needed such as trigger conditions for forward rules and exception (unless) conditions for non-monotonic logics. However, there now exists a preliminary RuleML design and a preliminary system of DTDs for some RuleML sublanguages.
  5. Rule syntaxes: Rules with 1 conclusion and N conjunctive premises could be written equivalently as <rule> prem1 ... premN conc </rule> or as <rule> conc prem1 ... premN </rule>. Should we also allow rules with M>1 conclusions, interpreted conjunctively as in forward rules (rather than the disjunctive interpretation in Gentzen sequents, whose effect could be obtained by an explicit or as the single conclusion)? They could be written equivalently as <rule> prem1 ... premN conc1 ... concM </rule> or as <rule> conc1 ... concM prem1 ... premN </rule>. Here is an (XHTML-p-containing, semiformal) example with M=N=1, in the first of the two equivalent syntaxes: <rule> <prem> <p>You want to review rule principles</p> </prem> <conc> <p>You may look at <a href="http://www.cs.brandeis.edu/~cs35a/notes/rules/index.htm">Rule-Based Systems</a></p> </conc> </rule>. Once in this semiformal markup, the example could be refined into more and more formal markups, up to a rule in some "logic of recommendation".
  6. Rule modules: A rule module, set, package, or base can be enclosed by explicit tags such as <rulebase> ... </rulebase>. Its elements would constitute an ordered or unordered set of rules. Attributes could specify this and additional properties of a rulebase besides giving it a name, version number, etc.
  7. Rule application: How should rules be called? Will we need <iterate> rulebase-to-be-iterated </iterate> and <goal> query-to-be-proved </goal> 'statements' for forward and backward rules? Or should, e.g., goal be identified with prem? Besides such deduction rules, will certain rules also be called implicitly for checking integrity constraints?
  8. Rule expressiveness: What should be supported in the classical logic spectrum of propositional, Horn, negated-premise, implicational-premise, full-first-order, and higher-order rules? Should also non-classical logics with non-monotonicity (e.g., negation as failure) or rule prioritizing (e.g., Prolog-like cuts or control/meta rules) be supported? Alternatively, can we develop a new logic for the Web, which is open, uncertain, and paraconsistent? Besides such (extended) logic rules, what kinds of transformation rules should be supported? A deductive-transformational bridge could be directed conditional equations as discussed in the Curry Mailing List. Besides the easier derivation or state-preserving ('read-only') rules, what should be supported in the spectrum of reaction rules, from state-changing ('write-enabled') rules that assert and retract instances/facts or rules, to planning rules that generate action sequences effecting changes in some (modeled or real) environment, to reactive rules that are directly coupled to (softbot/robot) effectors operating on the (virtual/physical) world?
  9. Rule semantics: Should we try to fix some (declarative) rule semantics? Should we incorporate, on the rulebase level, (operational) semantics attributes such as for conflict resolution (textual vs. specificity order, "don't care" vs. "don't know" non-determinism) or search strategies (backtracking, iterative deepening, best-first search), or should we leave most of these issues to the receivers of rulebases? For a related discussion of deductive-transformational systems see section 7 of Markup Languages ...
  10. RDF rules: Should we try to avoid rule markup/inferencing to diverge into Resource Description Framework applications and other XML applications? E.g., should a sequential conjunction of N>1 premises of a rule <rule> conc prem1 ... premN </rule> be represented with binary relations via RDF's Sequence container? Discussions of this and many more "RDF-logic" issues started with RDF and Logic Programming. There now is a preliminary example (creator.ruleml, creator.ruleml.txt) and DTD for RDF triples (ruleml-urcbindatagroundfact.dtd, ruleml-urcbindatagroundfact.dtd.txt).
  11. Ontology coupling: How are rules best coupled to (the taxonomy part of) an ontology? The SHOE language appears to be the first to have achieved such a coupling on the Web. Building on this, DAML and OIL may lead the way on how to achieve such a coupling, starting from the ontology side of the dichotomy.
  12. Rule validation: Which XML tools can we use for rule validation? Conversely, which static-analysis tools for the validation and verification of rules could be of interest to the XML community at large? One candidate may be cross-referencing/call-graph programs. This can be seen as complementing rule induction and the markup of its results, as supported by PMML's association rules.
  13. Rule compilation: Should we classify rules according to the compilation targets that can be used for executing them more efficiently, e.g. Rete networks, decisions trees, WAM code, etc.? We could employ markup languages also for these intermediate and low-level rule representations.
  14. XML stylesheets: What (XSLT) stylesheets should be used for external (browser) presentations of rules (cf. RFML's stylesheet)? Which one should be the standard presentation, if any? Should some preprocessing, with XSLT, transform certain restricted rule forms into XSLT rules?
  15. Semiformal rules: How should natural-language rules be incorporated into RuleML? Within <conc> ... </conc> conclusions and <prem> ... </prem> premises, we could, as illustrated, use XHTML's paragraph tags with informal content as an alternative to formal-language tags (the RuleML DTD/Schema would have to accommodate this via something like "p | formala"). Should we allow informal-formal mixtures not only within rulebases but also within individual rules (say, one premise is still expressed in English, while all other rule parts are formalized in Horn logic)? How can we use XML's (natural) language encodings for the natural languages used in semiformal rules, or even in (relation, constant, variable names of) formal rules?
  16. Rule documents: On the level of entire XML documents, how do we best mix rulebases with (XHTML) texts? How can rulebases be made '(inter)active' in such mixed documents, with users running the rules while reading the accompanying texts? This would involve declaring both RuleML and XHTML namespaces as well as a suitable plug-in for a rule engine.

Design

The current RuleML design is summarized in this section. RuleML encompasses a hierarchy of rules, from reaction rules (event-condition-action rules), via integrity-constraint rules (consistency-maintenance rules) and derivation rules (implicational-inference rules), to facts (premiseless derivation rules). Till now, we have been mostly working on derivation rules and facts (cf. current DTDs).

The RuleML hierarchy of rules constitues a partial order rooted in reaction rules. Its second main layer consists of, next to each other, integrity-constraint rules and derivation rules. The third layer just specializes derivation rules to facts. Thus, the global RuleML picture looks as follows:


                reaction rules
                      / \
                  1. /   \ 2.
                    /     \
integrity constraints     derivation rules
                                   |
                                3. |
                                   |
                                 facts

Let us discuss the hierarchy's numbered specialization links in turn. (For a more fine-grained discussion of derivation rules, facts, and their further specialization to RDF triples see KR Principles and DTD Modularization, in particular the hierarchy slide 11.)

  1. Integrity constraints are considered as "denials" or special reaction rules whose only possible kind of action is to signal inconsistency when certain conditions are fulfilled.
  2. Derivation rules are considered as special reaction rules whose action happens to only add or 'assert' a conclusion when certain conditions (premises) are fulfilled. This asserting of conclusions can be regarded as a purely declarative step, as used for model generation and fixpoint semantics. Such rules can thus also be applied backward for proving a conclusion from premises.
  3. Facts are considered as special derivation rules that happen to have an empty (hence, 'true') conjunction of premises.

We can now make more precise our views regarding the application direction for the four rule categories:

While reaction rules, as the all-encompassing rule category, could implement all other ones, in RuleML we are introducing tailored special-purpose syntaxes for each of these categories. The following markup syntax only serves for our preliminary distinction of the four categories (for instance, we plan to permit and/or nestings besides flat conjunctions as premises):

DTDs

2001-01-31: A preliminary RuleML DTD has been released: RuleML DTD Version 0.7.
2001-06-26: A revised version has been (PRE-)released: RuleML DTD Version 0.8. The discounting business rules example shows some of the envisaged features: discount.ruleml (discount.ruleml.txt).

RDF

An experimental RDF translator for a subset of RuleML 0.7 is available in XSLT: RuleML in RDF Version 0.2.

2001-06-20: Michael Sintek has implemented a (Java) parser for an RDF version of the Horn-logic subset of RuleML 0.8; it reflects an RDF RuleML syntax by (Java) classes that currently generate textual Horn clauses but could be adapted for generating the XML RuleML syntax: The FRODO rdf2java Tool. A converse translator from XML RuleML 0.8 to RDF RuleML 0.8 should be easier to write in XSLT than was possible for the above-linked RuleML 0.7 translator.

Induction

The FLIP Group uses RuleML in machine learning: About using RuleML for expressing machine learning knowledge.

Engines

One or more rule engines will be needed for executing RuleML rulebases. On 2000-11-15, the RuleML Initiative thus joined forces with the Java Specification Request JSR-000094 Java Rule Engine API. This cooperation will enable a direct cross-fertilization between the complementary specifications of the open XML-based Rule Markup Language and of the Java runtime API for rule engines.

2001-06-04: Jens Dietrich has implemented the first complete input-processing-output environment for RuleML. To download the api (source code) click Mandarax RuleML. Any feedback is welcome! If you have problems, don't hesitate to contact Jens for assistance.

2001-06-26: Michael Sintek has implemented a small but intriguing piece of code that can be looked at as the first RuleML querying agent. It's a servlet (running in Tomcat) that receives RuleML rulebases in RDF RuleML syntax (since he uses rdf2java) together with some queries, evaluates them with XSB Prolog (in auto-tabling mode, which should be equivalent to bottom-up evaluation!), and returns the result as an HTML page containing the bindings as facts of instantiated queries. A future version must, of course, return a RuleML file. Simply try this URL. Click on 'example' and paste the RDF RuleML popping up into the input window (note that pasting XML/RDF cannot be directly done in IE, only in Netscape; use "view source" in IE). Alternatively, you can use the Prolog parser and RDF translator to generate the RDF RuleML. Since we cannot guarantee that the above URLs always work (server reboots etc.), this picture shows the agent in action. Any feedback is welcome! If you have problems, don't hesitate to contact Michael for assistance.

Contacts

If you are interested to join the RuleML Initiative, please send a link describing your work related to rule markup to Harold Boley and Said Tabet. Depending on your RuleML suggestions, you may contact some (select above) or all (RuleML distribution) of the current participants.


Site Contact: Harold Boley. Page Version: 2001-06-21


"Practice what you preach": XML source of this homepage at index.xml (index.xml.txt);
transformed to HTML via the adaptation of Michael Sintek's SliML XSLT stylesheet at homepage.xsl (View | Page Source)

Powered by Cocoon