GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

Rule Interchange Format

The Rule Interchange Format (RIF) is a W3C Recommendation. RIF is part of the infrastructure for the semantic web, along with (principally) SPARQL, RDF and OWL. 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). Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

The Rule Interchange Format (RIF) is a W3C Recommendation. RIF is part of the infrastructure for the semantic web, along with (principally) SPARQL, RDF and OWL. 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). ==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 Datatypes, XPath 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 syntax of RIF BLD is based on F-logic, but RIF BLD doesn't have the non-monotonic reasoning 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 reasoning. RIF-PRD has an operational semantics, 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 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[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. 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. 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) } }

source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"Rule Interchange Format". 1754030828. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1303656993

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·