Rule Interchange Format
Encyclopedia
The Rule Interchange Format (RIF) is a W3C Recommendation
W3C recommendation
A W3C Recommendation is the final stage of a ratification process of the World Wide Web Consortium working group concerning a technical standard. This designation signifies that a document has been subjected to a public and W3C-member organization's review. It aims to standardise the Web technology...

. RIF is part of the infrastructure for the semantic web
Semantic Web
The Semantic Web is a collaborative movement led by the World Wide Web Consortium that promotes common formats for data on the World Wide Web. By encouraging the inclusion of semantic content in web pages, the Semantic Web aims at converting the current web of unstructured documents into a "web of...

, along with (principally) SPARQL
SPARQL
SPARQL is an RDF query language; its name is an acronym that stands for SPARQL Protocol and RDF Query Language. It was made a standard by the RDF Data Access Working Group of the World Wide Web Consortium, and considered as one of the key technologies of semantic web...

, RDF
Resource Description Framework
The Resource Description Framework is a family of World Wide Web Consortium specifications originally designed as a metadata data model...

 and OWL
Web Ontology Language
The Web Ontology Language is a family of knowledge representation languages for authoring ontologies.The languages are characterised by formal semantics and RDF/XML-based serializations for the Semantic Web...

. Although originally envisioned by many as a "rules layer" for the semantic web, in reality the design of RIF is based on the observation that there are many "rules languages" in existence, and what is needed is to exchange rules between them.

RIF includes three dialects, a Core dialect which is extended into a Basic Logic Dialect (BLD) and Production Rule Dialect (PRD).

History

The RIF working group was chartered in late 2005. Among its goals was drawing in members of the commercial rules marketplace. The working group started with more than 50 members and two chairs drawn from industry, Christian de Sainte Marie of ILOG
ILOG
ILOG is an international software company owned by IBM. It creates enterprise software products for supply chain, business rule management, visualization and optimization....

, and Chris Welty
Chris Welty
Chris Welty, an American computer scientist, is a Research Scientist at IBM Thomas J. Watson Research Center in Hawthorne, NY, and formerly a professor in the Computer Science Department of Vassar College and a distinguished lecturer of the Association for Computing Machinery. He is best known for...

 of IBM
IBM
International Business Machines Corporation or IBM is an American multinational technology and consulting corporation headquartered in Armonk, New York, United States. IBM manufactures and sells computer hardware and software, and it offers infrastructure, hosting and consulting services in areas...

. The charter, to develop an interchange format between existing rule systems was influenced by a workshop in the spring of 2005 in which it was clear that one rule language would not serve the needs of all interested parties (Dr. Welty described the outcome of the workshop as Nash Equilibrium
Nash equilibrium
In game theory, Nash equilibrium is a solution concept of a game involving two or more players, in which each player is assumed to know the equilibrium strategies of the other players, and no player has anything to gain by changing only his own strategy unilaterally...

).

RIF became a W3C Recommendation
W3C recommendation
A W3C Recommendation is the final stage of a ratification process of the World Wide Web Consortium working group concerning a technical standard. This designation signifies that a document has been subjected to a public and W3C-member organization's review. It aims to standardise the Web technology...

 on June 22, 2010.

Rules and Rule Systems

A rule is perhaps one of the simplest notions in computer science: it is an IF - THEN construct. If some condition (the IF part) that is checkable in some dataset holds, then the conclusion (the THEN part) is processed. Deriving somewhat from its roots in Logic
Logic
In philosophy, Logic is the formal systematic study of the principles of valid inference and correct reasoning. Logic is used in most intellectual activities, but is studied primarily in the disciplines of philosophy, mathematics, semantics, and computer science...

, rule systems use a notion of predicates that hold or not of some data object or objects. For example, the fact that two people are married might be represented with predicates as MARRIED(LISA,JOHN). MARRIED is a predicate that can be said to hold between LISA and JOHN. Adding the notion of variables, a rule could be something like:

IF MARRIED(?x, ?y) THEN LOVES(?x, ?y)

We would expect that for every pair of ?x and ?y (e.g. LISA and JOHN) for which the MARRIED predicate holds, some computer system that could understand this rule would conclude that the LOVES predicate holds for that pair as well.

Rules are a simple way of encoding knowledge, and are a drastic simplification of First Order Logic for which it is relatively easy to implement inference engines that can process the conditions and draw the right conclusions. A rule system is an implementation of a particular syntax
Syntax
In linguistics, syntax is the study of the principles and rules for constructing phrases and sentences in natural languages....

 and semantics
Semantics
Semantics is the study of meaning. It focuses on the relation between signifiers, such as words, phrases, signs and symbols, and what they stand for, their denotata....

 of rules, which may extend the simple notion described above to include existential quantification
Existential quantification
In predicate logic, an existential quantification is the predication of a property or relation to at least one member of the domain. It is denoted by the logical operator symbol ∃ , which is called the existential quantifier...

, disjunction, logical conjunction
Logical conjunction
In logic and mathematics, a two-place logical operator and, also known as logical conjunction, results in true if both of its operands are true, otherwise the value of false....

, negation
Negation
In logic and mathematics, negation, also called logical complement, is an operation on propositions, truth values, or semantic values more generally. Intuitively, the negation of a proposition is true when that proposition is false, and vice versa. In classical logic negation is normally identified...

, functions
Function (mathematics)
In mathematics, a function associates one quantity, the argument of the function, also known as the input, with another quantity, the value of the function, also known as the output. A function assigns exactly one output to each input. The argument and the value may be real numbers, but they can...

, non monotonicity
Non-monotonic logic
A non-monotonic logic is a formal logic whose consequence relation is not monotonic. Most studied formal logics have a monotonic consequence relation, meaning that adding a formula to a theory never produces a reduction of its set of consequences. Intuitively, monotonicity indicates that learning a...

, and many other features. Rule systems have been implemented and studied since the mid-1970s and saw significant uptake in the 1980s during the height of so-called Expert Systems
Expert system
In artificial intelligence, an expert system is a computer system that emulates the decision-making ability of a human expert. Expert systems are designed to solve complex problems by reasoning about knowledge, like an expert, and not by following the procedure of a developer as is the case in...

.

Standard RIF Dialects

The standard RIF dialects are Core, BLD and PRD. These dialects depend on an extensive list of datatypes with builtin functions and predicates on those datatypes.

Relations of various RIF dialects are shown in the following Venn diagram.

DTB

Datatypes and Built-Ins (DTB) specifies a list of datatypes, built-in functions and built-in predicates expected to be supported by RIF dialects. Some of the datatypes are adapted from XML Schema
XML Schema
XML Schema, published as a W3C recommendation in May 2001, is one of several XML schema languages. It was the first separate schema language for XML to achieve Recommendation status by the W3C...

 Datatypes, XPath
XPath
XPath is a language for selecting nodes from an XML document. In addition, XPath may be used to compute values from the content of an XML document...

 functions and rdf:PlainLiteral functions .

Core

The Core dialect comprises a common subset of most rule dialect. RIF-Core is a subset of both RIF-BLD and RIF-PRD.

FLD

Framework for Logic Dialects (FLD) describes mechanisms for specifying the syntax and semantics of logic RIF dialects, including the RIF-BLD and RIF-Core, but not RIF-PRD which is not a logic-based RIF dialect.

BLD

The Basic Logic Dialect (BLD) adds features to the Core dialect that are not directly available such as: logic functions, equality in the then-part and named arguments. RIF BLD corresponds to positive datalogs, that is, logic programs without functions or negations.

RIF-BLD has a model-theoretic semantics.

PRD

The Production Rules Dialect (PRD) can be used to model production rule
Production rule
Production rule may refer to:*For production rules used in business rule engines, cognitive modeling and artificial intelligence, see production system*For production rules that expand nodes in formal grammars, see formal grammar-See also:...

s. Features that are notably in PRD but not BLD include negation and retraction of facts (thus, PRD is not monotonic). PRD rules are order dependent, hence conflict resolution strategies are needed when multiple rules can be fired. The PRD specification defines one such resolution strategy based on forward-chaining reasoning.

RIF-PRD has a operational semantics
Operational semantics
In computer science, operational semantics is a way to give meaning to computer programs in a mathematically rigorous way. Operational semantics are classified into two categories: structural operational semantics formally describe how the individual steps of a computation take place in a...

, whereas the condition formulas also have a model-theoretic semantics.

Example (Example 1.2 in )

Prefix(ex )
(* ex:rule_1 *)
Forall ?customer ?purchasesYTD (
If And( ?customer#ex:Customer
?customer[ex:purchasesYTD->?purchasesYTD]
External(pred:numeric-greater-than(?purchasesYTD 5000)) )
Then Do( Modify(?customer[ex:status->"Gold"]) ) )

Non-standard RIF Dialects

Several other RIF dialects exist. None of them is officially endorsed by W3C and is not part of the RIF specification.

CASPD

The Core Answer Set Programming Dialect (CASPD) is based on Answer Set Programming
Answer set programming
Answer set programming is a form of declarative programming oriented towards difficult search problems. It is based on the stable model semantics of logic programming. In ASP, search problems are reduced to computing stable models, and answer set solvers -- programs for generating stable...

, that is, declarative logic programming based on the answer set semantics (stable model semantics
Stable model semantics
The concept of a stable model, or answer set, is used to define a declarative semantics for logic programs with negation as failure. This is one of several standard approaches to the meaning of negation in logic programming, along with program completion and the well-founded semantics...

).

Example:

Document(
Prefix(ex )

Group (
Forall ?S (
ex:afraid(?S ex:Math) :- And ( ?S#ex:Student (Naf Neg ex:afraid(?S ex:Math)) )
)

Forall ?S (
Neg ex:afraid(?S ex:Math) :- And ( ?S#ex:Student ?S[ex:majors -> ex:Math] )
)
)

URD

The Uncertainty Rule Dialect (URD) supports a direct representation of uncertain knowledge.

Example:

Document(
Import ()
Group
(
Forall ?x ?y(
cheapFlight(?x ?y) :- affordableFlight(?x ?y)
) / 0.4
Forall ?x ?y(affordableFlight(?x ?y)) / left_shoulder0k4k1k3k(?y)
) )

SILK

RIF-SILK can be used to model default logic
Default logic
Default logic is a non-monotonic logic proposed by Raymond Reiter to formalize reasoning with default assumptions.Default logic can express facts like “by default, something is true”; by contrast, standard logic can only express that something is true or that something is false...

. It is based on declarative logic programming with the well-founded semantics
Well-founded semantics
In logic programming, the well-founded semantics is one definition of how we can make conclusions from a set of logical rules. In logic programming, we give a computer a set of facts, and a set of "inference rules" about how these facts relate...

. RIF-SILK also includes a number of other features present in more sophisticated declarative logic programming languages such as SILK.

Example

Document {
Prefix(foaf http://xmlns.com/foaf/0.1/)
Prefix(pub http://example.org/pub#)
Prefix(silk http://TBD/silk#)
Group {
(* r1 *) Forall ?a1 ?a2 ?paper
(?a1[foaf:knows->?a2]
:- ?paper # pub:Publication[pub:author->?a1,
pub:author->?a2}])
(* r2 *) Forall ?a1 ?a2
(neg ?a1[foaf:knows->?a2]
:- ?a1[hasNeverMet->?a2])
silk:overrides(r2, r1)
}
}

See also

  • Ontology alignment
    Ontology alignment
    Ontology alignment, or ontology matching, is the process of determining correspondences between concepts. A set of correspondences is also called an alignment. The phrase takes on a slightly different meaning, in computer science, cognitive science or philosophy.-Computer Science:For computer...

  • R2ML
    R2ML
    The REWERSE Rule Markup Language is developed by the for the purpose of rules interchange between different systems and tools.-Scope:* An XML based rule language;...

  • Production Rule Representation
    Production Rule Representation
    The Production Rule Representation is a proposed standard of the Object Management Group to provide a vendor-neutral rule-model representation in UML for production rules as used in forward-chaining rule engines.- History :...

    - comparable to the dialect of RIF called Production Rule Dialect, although targeting modeling not run-time interchange.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK