RIF Overview

W3C Working Group Note 22 June 2010

This version:
Latest version:
Previous version:
http://www.w3.org/TR/2010/WD-rif-overview-20100511/ (color-coded diff)
Michael Kifer, State University of New York at Stony Brook
Harold Boley, National Research Council Canada

This document is also available in these non-normative formats: PDF version.


This document is an overview of the Rule Interchange Format (RIF). It provides a high-level explanation of RIF concepts and architecture as well as a general survey of RIF documents.

Status of this Document

May Be Superseded

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This document is being published as one of a set of 11 documents:

  1. RIF Overview (this document)
  2. RIF Core Dialect
  3. RIF Basic Logic Dialect
  4. RIF Production Rule Dialect
  5. RIF Framework for Logic Dialects
  6. RIF Datatypes and Built-Ins 1.0
  7. RIF RDF and OWL Compatibility
  8. OWL 2 RL in RIF
  9. RIF Combination with XML data
  10. RIF In RDF
  11. RIF Test Cases

XML Schema Datatypes Dependency

RIF is defined to use datatypes defined in the XML Schema Definition Language (XSD). As of this writing, the latest W3C Recommendation for XSD is version 1.0, with version 1.1 progressing toward Recommendation. RIF has been designed to take advantage of the new datatypes and clearer explanations available in XSD 1.1, but for now those advantages are being partially put on hold. Specifically, until XSD 1.1 becomes a W3C Recommendation, the elements of RIF which are based on it should be considered optional, as detailed in Datatypes and Builtins, section 2.3. Upon the publication of XSD 1.1 as a W3C Recommendation, those elements will cease to be optional and are to be considered required as otherwise specified.

We suggest that for now developers and users follow the XSD 1.1 Last Call Working Draft. Based on discussions between the Schema, RIF and OWL Working Groups, we do not expect any implementation changes will be necessary as XSD 1.1 advances to Recommendation.

Summary of Changes

There have been no substantive changes since the previous version. For details on the minor changes see the change log and color-coded diff.

Please Send Comments

Please send any comments to public-rif-comments@w3.org (public archive). Although work on this document by the Rule Interchange Format (RIF) Working Group is complete, comments may be addressed in the errata or in future revisions. Open discussion among developers is welcome at public-rif-dev@w3.org (public archive).

No Endorsement

Publication as a Working Group Note does not imply endorsement by the W3C Membership. This document may be updated, replaced or obsoleted by other documents at any time. Therefore, quotes or references to specific information in the document should include the publication date of this version, 22 June 2010. It is inappropriate to cite this document as other than a Working Group Note, which is not an endorsed W3C Recommendation.


This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. The group does not expect this document to become a W3C Recommendation. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Table of Contents

1 Introduction

The Rule Interchange Format (RIF) Working Group was chartered by the World Wide Web Consortium in 2005 to create a standard for exchanging rules among rule systems, in particular among Web rule engines. RIF focused on exchange rather than trying to develop a single one-fits-all rule language because, in contrast to other Semantic Web standards, such as RDF, OWL, and SPARQL, it was immediately clear that a single language would not satisfy the needs of many popular paradigms for using rules in knowledge representation and business modeling. But even rule exchange alone was recognized as a daunting task. Known rule systems fall into three broad categories: first-order, logic-programming, and action rules. These paradigms share little in the way of syntax and semantics. Moreover, there are large differences between systems even within the same paradigm.

Given this diversity, what is the most useful notion of rule exchange? The approach taken by the Working Group was to design a family of languages, called dialects, with rigorously specified syntax and semantics. The family of RIF dialects is intended to be uniform and extensible. RIF uniformity means that dialects are expected to share as much as possible of the existing syntactic and semantic apparatus. Extensibility here means that it should be possible for motivated experts to define a new RIF dialect as a syntactic extension to an existing RIF dialect, with new elements corresponding to desired additional functionality. These new RIF dialects would be non-standard when defined, but might eventually become standards.

Because of the emphasis on rigor, the word format in the name of RIF is somewhat of an understatement. RIF in fact provides more than just a format. However, the concept of format is essential to the way RIF is intended to be used. Ultimately, the medium of exchange between different rule systems is XML, a format for data exchange. Central to the idea behind rule exchange through RIF is that different systems will provide syntactic mappings from their native languages to RIF dialects and back. These mappings are required to be semantics-preserving, and thus rule sets can be communicated from one system to another provided that the systems can talk through a suitable dialect, which they both support.

2 RIF Dialects

The RIF Working Group has focused on two kinds of dialects: logic-based dialects and dialects for rules with actions. Generally, logic-based dialects include languages that employ some kind of logic, such as first-order logic (often restricted to Horn logic) or non-first-order logics underlying the various logic programming languages (e.g., logic programming under the well-founded or stable semantics). The rules-with-actions dialects include production rule systems, such as Jess, Drools and JRules, as well as reactive (or event-condition-action) rules, such as Reaction RuleML and XChange. Due to the limited resources of the RIF Working Group, it defined only two logic dialects, the Basic Logic Dialect (RIF-BLD) and a subset, the RIF Core Dialect, shared with RIF-PRD; the Production Rule Dialect (RIF-PRD) is the only rules-with-actions dialect defined by the group. Other dialects are expected to be defined by the various user communities.

Present and future RIF dialects are expected to share datatypes, built-in functions, and built-in predicates as defined by RIF Datatypes and Built-Ins (RIF-DTB). In particular, the current dialects RIF-BLD, RIF-Core, and RIF-PRD all share the foundations of RIF-DTB 1.0.

3 RIF Framework for Logic Dialects

The RIF Working Group spent almost four years on developing the above three dialects, and this begs a question: If dialect development is so time consuming, who will donate the necessary resources for the next round of development and who will ensure the uniformity of community-developed dialects once the RIF Working Group disbands? The Working Group partially addressed these questions by also developing an extensibility framework, called the Framework for Logic Dialects, or RIF-FLD. A comparable framework for rules with actions might be developed later.

Developing RIF-FLD as a framework turned out to be feasible because despite the diversity of logical theories underlying the different logic rule systems, they share much of the same syntactic and semantic machinery. Moreover, the ways to combine the different pieces of that machinery in order to create those logic systems are well studied. However, the RIF-FLD specification is unique in that it digests much of this knowledge, presents it in a coherent form, and uses XML even on the framework level.

RIF-FLD is a very general logic language that includes a great deal of commonly used syntactic and semantic apparatus; however, it purposely leaves certain parameters unspecified to enable designers of concrete dialects to fill in the necessary details. For instance, RIF-FLD provides machinery to tweak the rules of syntax through the notion of signatures. It also specifies certain semantic notions, such as models and logical entailment, but it leaves certain other options open (for instance, which exact models are to be used for entailment). A dialect designer can then define the syntax of a dialect by specializing it from the syntax of RIF-FLD, and the semantics by specializing it from the semantics of RIF-FLD. While doing so, the designer will make choices by selecting from the options provided by RIF-FLD, but he or she will not have to repeat the definitions of formulas, datatypes, models, entailment, and so on. This approach is illustrated using the RIF-BLD dialect. This dialect is specified in two ways, both normative: directly, by spelling out all the definitions, which takes about 40 dense pages, and by specialization from RIF-FLD -- just about 5 pages. Any discrepancy between the two specifications is to be treated as a bug that must be clarified and corrected. This dual specification of RIF-BLD is also intended to serve as an example of dialect design by specialization from the RIF framework -- the preferred mode of specification for various future logic dialects.

The RIF framework is not a monument that is cut in stone and is likely to see several extensions in the future. One, as we already mentioned, might be to cover the paradigm of actions and reactive rules.

4 RDF and OWL Compatibility

Recognizing that RIF rules should be able to interface with RDF and OWL ontologies, the RIF Working Group has also defined the necessary concepts to ensure compatibility of RIF with RDF and OWL. RIF, RDF, and OWL are exchange languages with dissimilar syntaxes and semantics. How, then, should RIF rules refer to RDF and OWL facts, and what is the logical meaning of the overall language? RIF-RDF and OWL Compatibility defines just that. The basic idea is that RIF uses its frame syntax to communicate with RDF/OWL. These frames are mapped onto RDF triples and a joint semantics is defined for the combination.

5 A General Survey of the RIF Documents

The RIF Working Group has produced ten documents, six of which are intended to become W3C Recommendations. The following general survey can help the reader to navigate these documents.

6 References

OWL Web Ontology Language Reference, M. Dean, G. Schreiber, Editors, W3C Recommendation, 10 February 2004. Latest version available at http://www.w3.org/TR/owl-ref/.

Resource Description Framework (RDF): Concepts and Abstract Syntax], G. Klyne, J. Carrol, Editors, W3C Recommendation, 10 February 2004, http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/. Latest version available at http://www.w3.org/TR/rdf-concepts/.

RIF Basic Logic Dialect Harold Boley, Michael Kifer, eds. W3C Recommendation, 22 June 2010, http://www.w3.org/TR/2010/REC-rif-bld-20100622/. Latest version available at http://www.w3.org/TR/rif-bld/.

RIF Core Dialect Harold Boley, Gary Hallmark, Michael Kifer, Adrian Paschke, Axel Polleres, Dave Reynolds, eds. W3C Recommendation, 22 June 2010, http://www.w3.org/TR/2010/REC-rif-core-20100622/. Latest version available at http://www.w3.org/TR/rif-core/.

RIF Datatypes and Built-Ins 1.0 Axel Polleres, Harold Boley, Michael Kifer, eds. W3C Recommendation, 22 June 2010, http://www.w3.org/TR/2010/REC-rif-dtb-20100622/. Latest version available at http://www.w3.org/TR/rif-dtb/.

[RIF in RDF]
RIF In RDF Sandro Hawke, editor. W3C Working Draft, 22 June 2010, http://www.w3.org/TR/2010/WD-rif-in-rdf-20100622/. Latest version available at http://www.w3.org/TR/rif-in-rdf/.

RIF Combination with XML Data, Christian de Sainte Marie (Editor), W3C Rule Interchange Format Working Group Draft. Latest Version available at http://www.w3.org/2005/rules/wiki/RIF%2BXML_data-schema.

OWL 2 RL in RIF Dave Reynolds, editor. W3C Working Group Note, 22 June 2010, http://www.w3.org/TR/2010/NOTE-rif-owl-rl-20100622/. Latest version available at http://www.w3.org/TR/rif-owl-rl/.

RIF Framework for Logic Dialects Harold Boley, Michael Kifer, eds. W3C Recommendation, 22 June 2010, http://www.w3.org/TR/2010/REC-rif-fld-20100622/. Latest version available at http://www.w3.org/TR/rif-fld/.

RIF Production Rule Dialect Christian de Sainte Marie, Gary Hallmark, Adrian Paschke, eds. W3C Recommendation, 22 June 2010, http://www.w3.org/TR/2010/REC-rif-prd-20100622/. Latest version available at http://www.w3.org/TR/rif-prd/.

RIF RDF and OWL Compatibility Jos de Bruijn, editor. W3C Recommendation, 22 June 2010, http://www.w3.org/TR/2010/REC-rif-rdf-owl-20100622/. Latest version available at http://www.w3.org/TR/rif-rdf-owl/.

RIF Test Cases Stella Mitchell, Leora Morgenstern, Adrian Paschke, eds. W3C Working Draft, 22 June 2010, http://www.w3.org/TR/2010/WD-rif-test-20100622/. Latest version available at http://www.w3.org/TR/rif-test/.

RIF Use Cases and Requirements Adrian Paschke, David Hirtle, Allen Ginsberg, Paula-Lavinia Patranjan, Frank McCabe, Eds. W3C Working Draft, 18 December 2008, http://www.w3.org/TR/2008/WD-rif-ucr-20081218/. Latest version available at http://www.w3.org/TR/rif-ucr/.

SPARQL Query Language for RDF, E. Prud'hommeaux, A. Seaborne (Editors), W3C Recommendation, World Wide Web Consortium, 12 January 2008, http://www.w3.org/TR/2008/REC-rdf-sparql-query-20080115/. Latest version available at http://www.w3.org/TR/rdf-sparql-query/.

The Stable Model Semantics for Logic Programming, M. Gelfond and V. Lifschitz. Logic Programming: Proceedings of the Fifth Conference and Symposium, pages 1070-1080, 1988.

The Well-Founded Semantics for General Logic Programs, A. Van Gelder, K.A. Ross, J.S. Schlipf. Journal of ACM, 38:3, pages 620-650, 1991.

7 Appendix: Change Log (Informative)