Based on the RIF Use Cases and Requirements, this document develops the RIF Core (core of the Rule Interchange Format) through a set of foundational concepts shared by all RIF dialects. The overall RIF design takes the form of a layered architecture organized around the notion of a dialect.
A dialect is a rule language with a well-defined syntax and semantics. This semantics must be model-theoretic, proof-theoretic, or operational in this order of preference. Some dialects might be proper extensions of others (both syntactically and semantically) and some may have incompatible expressive power. However, all dialects are required to extend the RIF Core dialect.
From a theoretical perspective, RIF Core corresponds to the language of definite Horn rules (see Horn Logic) with equality (and with a standard first-order semantics). Syntactically, however, RIF Core has a number of extensions to support features such as objects and frames, international resource identifiers (or IRIs) as identifiers for concepts, and XML Schema data types. These features make RIF a Web language. However, RIF is designed to enable interoperability among rule languages in general, and its uses are not limited to the Web. The semantics of RIF has provisions for future extensions towards dialects that support pure FOL, dialects that support negation as failure (NAF), business (or production) rules, reactive rules, and other features.
Eventually, it is hoped that RIF dialects will cover a number of important paradigms in rule-based specification and programming. Our main target paradigms include production rules, logic programming, FOL-based rules, reactive rules, and normative rules (integrity constraints).
The central part of RIF Core is its Condition Language. The condition language defines the syntax and semantics for the bodies of the rules in the core of RIF and the syntax for the queries. However, it is hoped that the condition language will have wider applicability in RIF. In particular, it might be reusable as a sublanguage for specifying the conditional part of the bodies in production rules, reactive rules, and in normative rules.
As mentioned, making RIF a Web language entails that IRI constants can serve both as logical constants and as names of predicate and function symbols. This is not normally allowed in first-order logic, but is common practice in Logic Programming (e.g., [Prolog], [F-logic], [HiLog]) and in [RDF]. Nevertheless, RIF Core supports these features while remaining completely within the realm of the first order semantics. This is achieved by building RIF on the basis of a multisorted first-order logic, which permits symbols to be polymorphic, i.e., to have more than one sort. A symbol can simultaneously have a primitive sort (for instance, a string), an arrow sort (which permits the symbol to appear in the role of a function symbol), and a Boolean sort (which enables that symbol to play the role of a predicate symbol). In this setting, IRIs are constants in just one of the primitive sorts of RIF. Integers, strings, dates, time, and others are treated as other primitive sorts. Thus, the single mechanism of a polymorphic multisorted logic provides support for the use of IRIs as concept designators, for primitive data types of [XML Schema], and for other possible types. This also provides for a more natural support for RDF and makes higher-order dialects, based on formalisms such as [HiLog] and [Common Logic], possible.
RIF Core is described in the current document by means of the following:
- An asn06 specification visualized by a UML diagram (abstract syntax)
- An EBNF syntax (concrete human-oriented syntax, for illustration/explanation purposes only)
- An XML syntax (concrete serialization syntax, for illustration purposes only)
- A model-theoretic semantics
The EBNF and XML syntaxes are derived from the abstract syntax. The model-theoretic semantics is designed for modularity and to enable further extensions.
The current document is a first draft of the RIF Core specification. A number of extensions are planned to support frame-based syntax, built-ins, additional primitive XML data types, the notions of compliance with RIF, and so on. Tool support for RIF Core is forthcoming. Additional RIF dialects, which extend the Core, will be specified in other documents by this working group.