Rule Interchange Format
   HOME

TheInfoList



OR:

The Rule Interchange Format (RIF) is a
W3C Recommendation The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 and led by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working t ...
. RIF is part of the infrastructure for the semantic web, along with (principally)
SPARQL SPARQL (pronounced " sparkle" , a recursive acronym for SPARQL Protocol and RDF Query Language) is an RDF query language—that is, a semantic query language for databases—able to retrieve and manipulate data stored in Resource Description ...
, RDF and
OWL Owls are birds from the order Strigiformes (), which includes over 200 species of mostly solitary and nocturnal birds of prey typified by an upright stance, a large, broad head, binocular vision, binaural hearing, sharp talons, and feathers a ...
. 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 S.A. was an international software company purchased and incorporated into IBM announced in January, 2009. It created enterprise software products for supply chain, business rule management, visualization and optimization. The main product ...
, and
Chris Welty Christopher A. Welty is an American computer scientist, who works at Google Research in New York. He is best known for his work on ontologies, in the Semantic Web, and on IBM's Watson. While on sabbatical from Vassar College from 1999 to 200 ...
of IBM. 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). RIF became a
W3C Recommendation The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 and led by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working t ...
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 is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the science of deductively valid inferences or of logical truths. It is a formal science investigating how conclusions follow from premise ...
, 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 First-order logic—also known as predicate logic, quantificational logic, and first-order predicate calculus—is a collection of formal systems used in mathematics, philosophy, linguistics, and computer science. First-order logic uses quantifie ...
, 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 and
semantics Semantics (from grc, σημαντικός ''sēmantikós'', "significant") is the study of reference, meaning, or truth. The term can be used to refer to subfields of several distinct disciplines, including philosophy, linguistics and comp ...
of rules, which may extend the simple notion described above to include
existential quantification In predicate logic, an existential quantification is a type of quantifier, a logical constant which is interpreted as "there exists", "there is at least one", or "for some". It is usually denoted by the logical operator symbol ∃, which, ...
,
disjunction In logic, disjunction is a logical connective typically notated as \lor and read aloud as "or". For instance, the English language sentence "it is raining or it is snowing" can be represented in logic using the disjunctive formula R \lor S ...
,
logical conjunction In logic, mathematics and linguistics, And (\wedge) is the truth-functional operator of logical conjunction; the ''and'' of a set of operands is true if and only if ''all'' of its operands are true. The logical connective that represents thi ...
, negation, functions, non monotonicity, 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 In artificial intelligence, an expert system is a computer system emulating the decision-making ability of a human expert. Expert systems are designed to solve complex problems by reasoning through bodies of knowledge, represented mainly as if ...
.


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 An XML schema is a description of a type of XML document, typically expressed in terms of constraints on the structure and content of documents of that type, above and beyond the basic syntactical constraints imposed by XML itself. These constra ...
Datatypes,
XPath XPath (XML Path Language) is an expression language designed to support the query or transformation of XML documents. It was defined by the World Wide Web Consortium (W3C) and can be used to compute values (e.g., strings, numbers, or Boolean v ...
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. The
frame A frame is often a structural system that supports other components of a physical construction and/or steel frame that limits the construction's extent. Frame and FRAME may also refer to: Physical objects In building construction *Framing (con ...
syntax of RIF BLD is based on
F-logic F-logic ( frame logic) is a knowledge representation and ontology language. F-logic combines the advantages of conceptual modeling with object-oriented, frame-based languages and offers a declarative, compact and simple syntax, as well as the wel ...
, but RIF BLD doesn't have the
non-monotonic reasoning A non-monotonic logic is a formal logic whose conclusion relation is not monotonic. In other words, non-monotonic logics are devised to capture and represent defeasible inferences (cf. defeasible reasoning), i.e., a kind of inference in which re ...
features of F-logic.


PRD

The Production Rules Dialect (PRD) can be used to model production rules. 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 Forward chaining (or forward reasoning) is one of the two main methods of reasoning when using an inference engine and can be described logically as repeated application of ''modus ponens''. Forward chaining is a popular implementation strategy ...
reasoning. RIF-PRD has an
operational semantics Operational semantics is a category of formal programming language semantics in which certain desired properties of a program, such as correctness, safety or security, are verified by constructing proofs from logical statements about its execut ...
, 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 x:purchasesYTD->?purchasesYTD External(pred:numeric-greater-than(?purchasesYTD 5000)) ) Then Do( Modify(?customer x:status->"Gold" ) )


Non-standard RIF Dialects

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


CASPD

The Core Answer Set Programming Dialect (CASPD) is based on answer set programming, that is, declarative logic programming based on the answer set semantics ( stable model 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 x: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 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 somethi ...
. It is based on declarative logic programming with the well-founded semantics. RIF-SILK also includes a number of other features present in more sophisticated declarative logic programming languages such as SILK.The SILK Language, Benjamin Grosof, Michael Kifer, Mike Dean. Vulcan Inc., 2009.
/ref> Example
Document 
}


See also

*
Ontology alignment Ontology alignment, or ontology matching, is the process of determining correspondences between concepts in ontologies. A set of correspondences is also called an alignment. The phrase takes on a slightly different meaning, in computer science, ...
* R2ML *
Production Rule Representation The Production Rule Representation (PRR) is a proposed standard of the Object Management Group (OMG) to provide a vendor-neutral rule-model representation in UML for production rules as used in forward-chaining rule engines. History The OMG set ...
- comparable to the dialect of RIF called Production Rule Dialect, although targeting modeling not run-time interchange.


References


External links


RIF Working Group

RIF FAQ
{{Semantic Web Semantic Web Knowledge representation languages