You are on page 1of 4

Rule Interchange Format

The Rule Interchange Format (RIF) is a W3C Rec- rule would conclude that the LOVES predicate holds for
ommendation. RIF is part of the infrastructure for the that pair as well.
semantic web, along with (principally) SPARQL, RDF
Rules are a simple way of encoding knowledge, and are
and OWL. Although originally envisioned by many as a a drastic simplication of rst order logic for which it is
rules layer for the semantic web, in reality the design
relatively easy to implement inference engines that can
of RIF is based on the observation that there are many process the conditions and draw the right conclusions. A
rules languages in existence, and what is needed is to
rule system is an implementation of a particular syntax
exchange rules between them.[1] and semantics of rules, which may extend the simple no-
RIF includes three dialects, a Core dialect which is ex- tion described above to include existential quantication,
tended into a Basic Logic Dialect (BLD) and Production disjunction, logical conjunction, negation, functions, non
Rule Dialect (PRD).[2] monotonicity, and many other features. Rule systems
have been implemented and studied since the mid-1970s
and saw signicant uptake in the 1980s during the height
of so-called Expert Systems.
1 History
The RIF working group was chartered in late 2005.
Among its goals was drawing in members of the com- 3 Standard RIF Dialects
mercial rules marketplace. The working group started
with more than 50 members and two chairs drawn from The standard RIF dialects are Core, BLD and PRD.
industry, Christian de Sainte Marie of ILOG, and Chris These dialects depend on an extensive list of datatypes
Welty of IBM. The charter, to develop an interchange for- with builtin functions and predicates on those datatypes.
mat between existing rule systems was inuenced by a
workshop in the spring of 2005 in which it was clear that Relations of various RIF dialects are shown in the follow-
one rule language would not serve the needs of all inter- ing Venn diagram.[5]
ested parties (Dr. Welty described the outcome of the
workshop as Nash Equilibrium[3] ).
RIF became a W3C Recommendation on June 22, 3.1 DTB
2010.[4]
Datatypes and Built-Ins (DTB) species a list of
datatypes, built-in functions and built-in predicates ex-
pected to be supported by RIF dialects. Some of the
2 Rules and Rule Systems datatypes are adapted from XML Schema Datatypes,[6]
XPath functions[7] and rdf:PlainLiteral functions.[8]
A rule is perhaps one of the simplest notions in computer
science: it is an IF - THEN construct. If some condi-
tion (the IF part) that is checkable in some dataset holds, 3.2 Core
then the conclusion (the THEN part) is processed. De-
riving somewhat from its roots in logic, rule systems use The Core dialect comprises a common subset of most rule
a notion of predicates that hold or not of some data ob- dialect. RIF-Core is a subset of both RIF-BLD and RIF-
ject or objects. For example, the fact that two people are PRD.
married might be represented with predicates as MAR-
RIED(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: 3.3 FLD
IF MARRIED(?x, ?y) THEN LOVES(?x, ?y) Framework for Logic Dialects (FLD) describes mecha-
We would expect that for every pair of ?x and ?y (e.g. nisms for specifying the syntax and semantics of logic
LISA and JOHN) for which the MARRIED predicate RIF dialects, including the RIF-BLD and RIF-Core, but
holds, some computer system that could understand this not RIF-PRD which is not a logic-based RIF dialect.

1
2 6 REFERENCES

3.4 BLD 4.2 URD

The Basic Logic Dialect (BLD) adds features to the Core The Uncertainty Rule Dialect (URD)[12] supports a direct
dialect that are not directly available such as: logic func- representation of uncertain knowledge.
tions, equality in the then-part and named arguments. Example:
RIF BLD corresponds to positive datalogs, that is, logic
programs without functions or negations. Document( Import (<http://example.org/fuzzy/
membershipfunction >) Group ( Forall ?x ?y( cheap-
RIF-BLD has a model-theoretic semantics. Flight(?x ?y) :- aordableFlight(?x ?y) ) / 0.4 Forall ?x
The frame syntax of RIF BLD is based on F-logic, but ?y(aordableFlight(?x ?y)) / left_shoulder0k4k1k3k(?y)
RIF BLD doesn't have the non-monotonic reasoning fea- ) )
tures of F-logic.[9]

4.3 SILK
3.5 PRD
RIF-SILK[13] can be used to model default logic. It is
based on declarative logic programming with the well-
The Production Rules Dialect (PRD) can be used to
founded semantics. RIF-SILK also includes a number of
model production rules. Features that are notably in PRD
other features present in more sophisticated declarative
but not BLD include negation and retraction of facts
logic programming languages such as SILK.[14]
(thus, PRD is not monotonic). PRD rules are order de-
pendent, hence conict resolution strategies are needed Example
when multiple rules can be red. The PRD specica- Document { Prex(foaf http://xmlns.com/foaf/0.1/)
tion denes one such resolution strategy based on forward Prex(pub http://example.org/pub#) Prex(silk
chaining reasoning. http://TBD/silk#) Group { (* r1 *) Forall ?a1 ?a2
RIF-PRD has an operational semantics, whereas the con- ?paper (?a1[foaf:knows->?a2] :- ?paper # pub:
dition formulas also have a model-theoretic semantics. Publication{[}pub:author->?a1, pub:author->?a2}])
(* r2 *) Forall ?a1 ?a2 (neg ?a1[foaf:knows->?a2] :-
Example (Example 1.2 in [10] )
?a1[hasNeverMet->?a2]) silk:overrides(r2, r1) } }
Prex(ex <http://example.com/2008/prd1#>) (*
ex:rule_1 *) Forall ?customer ?purchasesYTD (
If And( ?customer#ex:Customer ?customer[ex: 5 See also
purchasesYTD->?purchasesYTD] External(pred:
numeric-greater-than(?purchasesYTD 5000)) ) Then
Ontology alignment
Do( Modify(?customer[ex:status->"Gold"]) ) )
R2ML

Production Rule Representation - comparable to the


dialect of RIF called Production Rule Dialect, al-
4 Non-standard RIF Dialects though targeting modeling not run-time interchange.

Several other RIF dialects exist. None of them are o-


cially endorsed by W3C and they are not part of the RIF 6 References
specication.
[1] Kifer, Michael (2008). "Rule Interchange Format: The
Framework". in: Web Reasoning and Rule Systems.
4.1 CASPD Lecture Notes in Computer Science

[2] RIF Overview


The Core Answer Set Programming Dialect (CASPD)[11]
is based on answer set programming, that is, declarative [3] Welty, Chris (2009). "Rule Interchange Format". Invited
logic programming based on the answer set semantics presentation to the NY Semantic Web Meetup.
(stable model semantics).
[4] RIF Core Dialect
Example:
[5] RIF Use Cases and Requirements
Document( Prex(ex <http://example.com/concepts#>)
Group ( Forall ?S ( ex:afraid(?S ex:Math) :- And ( ?S#ex: [6] XML Schema Datatypes
Student (Naf Neg ex:afraid(?S ex:Math)) ) ) Forall ?S ( [7] XPath-Functions
Neg ex:afraid(?S ex:Math) :- And ( ?S#ex:Student ?S[ex:
majors -> ex:Math] ) ) ) [8] rdf:PlainLiteral: A Datatype for RDF Plain Literals
3

[9] M. Krtzsch (October 2010). Description Logic Rules.


IOS Press. p. 10. ISBN 978-1-61499-342-1.

[10] RIF-PRD specication

[11] RIF Core Answer Set Programming Dialect

[12] Zhao & Boley. Uncertainty Treatment in the Rule Inter-


change Format: From Encoding to Extension. In The 4th
International Workshop on Uncertainty Reasoning for the
Semantic Web (URSW), 2008.

[13] RIF SILK dialect

[14] The SILK Language, Benjamin Grosof, Michael Kifer,


Mike Dean. Vulcan Inc., 2009.

7 External links
RIF Working Group
RIF FAQ
4 8 TEXT AND IMAGE SOURCES, CONTRIBUTORS, AND LICENSES

8 Text and image sources, contributors, and licenses


8.1 Text
Rule Interchange Format Source: https://en.wikipedia.org/wiki/Rule_Interchange_Format?oldid=746719384 Contributors: Scott, Bao-
jie, Tea2min, Beland, Neumann, Xmlizer, Rich Farmbrough, Mdd, GregorB, AnmaFinotera, BD2412, Ultimatewisdom, Bobdc, Cedar101,
SmackBot, Sergio Agostinho, Alaibot, Dougher, Jodi.a.schneider, R'n'B, CommonsDelinker, Luksuh, Andy Dingley, Markus12, Linfor-
est, Geldsack, MystBot, Addbot, Mabdul, Jarble, Yobot, Bunnyhop11, MarioS, Jez1, Dayures, 4th-otaku, Xqbot, FrescoBot, Minimac,
Semanticon, EmausBot, John of Reading, Djembayz, Karima Rafes, Justincheng12345-bot, Someone not using his real name, Bender the
Bot and Anonymous: 16

8.2 Images
File:Question_book-new.svg Source: https://upload.wikimedia.org/wikipedia/en/9/99/Question_book-new.svg License: Cc-by-sa-3.0
Contributors:
Created from scratch in Adobe Illustrator. Based on Image:Question book.png created by User:Equazcion Original artist:
Tkgd2007

8.3 Content license


Creative Commons Attribution-Share Alike 3.0

You might also like