Copyright © 2008 W3C^{®} (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.
This document is being published as one of a set of 5 documents:
The Rule Interchange Format (RIF) Working Group seeks public feedback on these Working Drafts. Please send your comments to publicrifcomments@w3.org (public archive). If possible, please offer specific changes to the text that would address your concern. You may also wish to check the Wiki Version of this document for internalreview comments and changes being drafted which may address your concerns.
Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
Contents

The Rule Interchange Format (RIF), specifically the Basic Logic Dialect (BLD) (RIFBLD), is a format for interchanging logical rules over the Web. Rules that are exchanged using RIF may refer to external data sources and may be based on data models that are represented using a language different from RIF. The Resource Description Framework RDF (RDFConcepts) is a Webbased language for the representation and exchange of data; RDF Schema (RDFS) (RDFSchema) and the OWL Web Ontology Language (OWLReference) are Webbased languages for representing and exchanging ontologies (i.e., data models). This document specifies how combinations of RIF BLD Rulesets and RDF data and RDFS and OWL ontologies are interpreted; i.e., it specifies how RIF interoperates with RDF/OWL.
The RIF working group plans to develop further dialects besides BLD, most notably a dialect based on Production Rules (RIFPRD); these dialects are not necessarily extensions of BLD. Future versions of this document may address compatibility of these dialects with RDF and OWL as well. In the remainder of this document, RIF is understood to refer to RIF BLD (RIFBLD).
RDF data and RDFS and OWL ontologies are represented using RDF graphs. Several syntaxes have been proposed for the exchange of RDF graphs, the normative syntax being RDF/XML (RDFSyntax). RIF does not provide a format for exchanging RDF graphs, since this would be a duplication. Instead, it is assumed that RDF graphs are exchanged using RDF/XML, or any other syntax that can be used for representing or exchanging RDF graphs.
A typical scenario for the use of RIF with RDF/OWL is the exchange of rules that either use RDF data or an RDFS or OWL ontology: an interchange partner A has a rules language that is RDF/OWLaware, i.e., it supports the use of RDF data, it uses an RDFS or OWL ontology, or it extends RDF(S)/OWL. A sends its rules using RIF, possibly with references to the appropriate RDF graph(s), to partner B. B receives the rules and retrieves the referenced RDF graph(s) (published as, e.g., RDF/XML (RDFSYNTAX)). The rules are translated to the internal rules language of B and are processed, together with the RDF graphs, using the RDF/OWLaware rule engine of B. The use case Vocabulary Mapping for Data Integration (RIFUCR) is an example of the interchange of RIF rules that use RDF data and RDFS ontologies.
A specialization of this scenario is the publication of RIF rules that refer to RDF graphs: publication is a special kind of interchange: one to many, rather than onetoone. When a rule publisher A publishes its rules on the Web, it is hoped that there are several consumers that retrieve the RIF rules and RDF graphs from the Web, translate the RIF rules to their own rules language, and process them together with the RDF graphs in their own rules engine. The use case Publishing Rules for Interlinked Metadata (RIFUCR) illustrates the publication scenario.
Another specialization of the exchange scenario is the interchange of rule extensions to OWL (RIFUCR). The intention of the rule publisher in this scenario is to extend an OWL ontology with rules: interchange partner A has a rules language that extends OWL. A splits its ontology+rules description into a separate OWL ontology and a RIF ruleset, publishes the OWL ontology, and sends (or publishes) the RIF ruleset, which includes a reference to the OWL ontology. A consumer of the rules retrieves the OWL ontology and translates the ontology and ruleset into a combined ontology+rules description in its own rule extension of OWL.
A RIF ruleset that refers to (imports) RDF graphs and/or
RDFS/OWL ontologies, or any use of a RIF ruleset with RDF graphs,
is viewed as a combination of a ruleset and a number of graphs and
ontologies. This document specifies how, in such a combination, the
ruleset and the graphs and ontologies interoperate in a technical
sense, i.e., the conditions under which the combination is
satisfiable (i.e., consistent), as well as the entailments (i.e.,
logical consequences) of the combination. The interaction between
RIF and RDF/OWL is realized by connecting the model theory of RIF
(specified in (RIFBLD)) with
the model theories of RDF (specified in (RDFSemantics)) and OWL
(specified in (OWLSemantics)), respectively.
Throughout this document the following conventions are used when writing RIF and RDF statements in examples and definitions.
The RDF semantics specification (RDFSemantics) defines four notions of entailment for
RDF graphs. The OWL semantics specification (OWLSemantics) defines two
notions of entailment for OWL ontologies, namely OWL Lite/DL and
OWL Full. This document specifies the interaction between RIF and
RDF/OWL for all six notions.
RIF provides a mechanism for referring to (importing) RDF graphs and a means for specifying the context of this import, which corresponds to the intended entailment regime. Section Importing RDF Graphs in RIF specifies how such import statements are used for representing RIFRDF and RIFOWL combinations.
The Appendix: Embeddings (Informative) describes how reasoning
with combinations of RIF rules with RDF and a subset of OWL DL can
be reduced to reasoning with RIF rulesets, which can be seen as a
guide to describing how a RIF processor could be turned into an
RDF/OWLaware RIF processor. This reduction can be seen as a guide
for interchange partners that do not have RDFaware rule systems,
but want to be able to process RIF rules that refer to RDF graphs.
In terms of the aforementioned scenario: if the interchange partner
B does not have an RDF/OWLaware rule system, but B
can process RIF rules, then the appendix explains how B's
rule system could be used for processing RIFRDF.
This section specifies how a RIF ruleset interacts with a set of RDF graphs in a RIFRDF combination. In other words, how rules can "access" data in the RDF graphs and how additional conclusions that may be drawn from the RIF rules are reflected in the RDF graphs.
There is a correspondence between constant symbols in RIF rulesets and names in RDF graphs. The following table explains the correspondences of symbols.
RDF Symbol  Example  RIF Symbol  Example 

Absolute IRI  <http://www.w3.org/2007/rif>  Absolute IRI  "http://www.w3.org/2007/rif"^^rif:iri 
Plain literal without language tag  "literal string"  String in the symbol space xsd:string  "literal string"^^xsd:string 
Plain literal with language tag  "literal string"@en  String plus language tag in the symbol space rif:text  "literal string@en"^^rif:text 
Literal with datatype  "1"^^xsd:integer  Symbol in symbol space  "1"^^xsd:integer 
There is, furthermore, a correspondence between statements in RDF graphs and certain kinds of formulas in RIF. Namely, there is a correspondence between RDF triples of the form s p o and RIF frame formulas of the form s'[p' > o'], where s', p', and o' are RIF symbols corresponding to the RDF symbols s, p, and o, respectively. This means that whenever a triple s p o is satisfied, the corresponding RIF frame formula s'[p' > o'] is satisfied, and vice versa.
Consider, for example, a combination of an RDF graph that contains the triples
ex:john ex:brotherOf ex:jack . ex:jack ex:parentOf ex:mary .
saying that ex:john is a brother of ex:jack and ex:jack is a parent of ex:mary, and a RIF ruleset that contains the rule
Forall ?x, ?y, ?z (?x[ex:uncleOf > ?z] : And(?x[ex:brotherOf > ?y] ?y[ex:parentOf > ?z]))
which says that whenever some x is a brother of some y and y is a parent of some z, then x is an uncle of z. From this combination the RIF frame formula :john[:uncleOf > :mary], as well as the RDF triple :john :uncleOf :mary, can be derived.
Note that blank nodes cannot be referenced directly from RIF rules, since blank nodes are local to a specific RDF graph. Variables in RIF rules do, however, range over objects denoted by blank nodes. So, it is possible to "access" an object denoted by a blank node from a RIF rule using a variable in a rule.
Typed literals in RDF may be illtyped, which means that the literal string is not part of the lexical space of the datatype under consideration. Examples of such illtyped literals are "abc"^^xsd:integer, "2"^^xsd:boolean, and "<nonvalidXML"^^rdf:XMLLiteral. Illtyped literals are not expected to be used very often. However, as the RDF recommendation (RDFConcepts) allows creating RDF graphs with illtyped literals, their occurrence cannot be completely ruled out.
Rules that include illtyped symbols are not legal RIF rules, so there are no RIF symbols that correspond to illtyped literals. As with blank nodes, variables do range over objects denoted by such literals. The following example illustrates the interaction between RDF and RIF in the face of illtyped literals and blank nodes.
Consider a combination of an RDF graph that contains the triple
_:x ex:hasName "a"^^xsd:integer .
saying that there is some blank node that has a name, which is an illtyped literal, and a RIF ruleset that contains the rules
Forall ?x, ?y ( ?x[rdf:type > ex:nameBearer] : ?x[ex:hasName > ?y] ) Forall ?x, ?y ( "http://a"^^rif:iri["http://p"^^rif:iri > ?y] : ?x[ex:hasName > ?y] )
which say that whenever there is some x that has some name y, then x is of type ex:nameBearer and http://a has a property http://p with value y.
From this combination the following RIF condition formula can be derived:
Exists ?z ( And( ?z[rdf:type > ex:nameBearer] "http://a"^^rif:iri["http://p"^^rif:iri > ?z] ))
as can the following RDF triples:
_:y rdf:type ex:nameBearer . <http://a> <http://p> "a"^^xsd:integer .
However, "http://a"^^rif:iri["http://p"^^rif:iri > "a"^^xsd:integer] cannot be derived, because it is not a wellformed RIF formula, due to the fact that "a" is not an integer; it is not in the lexical space of the datatype xsd:integer.
The remainder of this section formally defines combinations of RIF
rules with RDF graphs and the semantics of such combinations. A
combination consists of a RIF ruleset and a set of RDF graphs. The
semantics of combinations is defined in terms of combined models,
which are pairs of RIF and RDF interpretations. The interaction
between the two interpretations is defined through a number of
conditions. Entailment is defined as model inclusion, as usual.
This section first reviews the definitions of RDF vocabularies and RDF graphs, after which definitions related to datatypes and illtyped literals are reviewed. Finally, RIFRDF combinations are formally defined.
An RDF vocabulary V consists of the following sets of names:
The syntax of the names in these sets is defined in RDF Concepts and Abstract Syntax (RDFConcepts). Besides these names, there is an infinite set of blank nodes, which is disjoint from the sets of literals and IRIs.
DEFINITION: Given an RDF vocabulary V, a generalized RDF triple of V is a statement of the form s p o, where s, p and o are names in V or blank nodes.
DEFINITION: Given an RDF vocabulary V, a generalized RDF graph is a set of generalized RDF triples of V.
(See the (End note on generalized RDF graphs))
Even though RDF allows the use of arbitrary datatype IRIs in typed literals, not all such datatype IRIs are recognized in the semantics. In fact, simple entailment does not recognize any datatype and RDF and RDFS entailment recognize only the datatype rdf:XMLLiteral. Furthermore, RDF allows expressing typed literals for which the literal string is not in the lexical space of the datatype; such literals are called illtyped literals. RIF, in contrast, does not allow illtyped literals in the syntax. To facilitate discussing datatypes, and specifically datatypes supported in specific contexts (required for Dentailment), the notion of datatype maps (RDFSemantics) is used.
A datatype map is a partial mapping from IRIs to datatypes.
RDFS, specifically Dentailment, allows the use of arbitrary datatype maps, as long as the rdf:XMLLiteral datatype is included in the map. RIF BLD additionally requires the following datatypes to be included: xsd:string, xsd:decimal, xsd:time, xsd:date, xsd:dateTime, and rif:text; these datatypes are the RIFrequired datatypes. A conforming datatype map is a datatype map that recognizes at least the RIFrequired datatypes.
DEFINITION: A datatype
map D is a conforming datatype
map if it satisfies the following conditions:
The notions of well and illtyped literals loosely correspond to the notions of legal and illegal symbols in RIF:
DEFINITION: Given a conforming datatype map D, a typed literal (s, d) is a welltyped literal if
Otherwise (s, d) is an illtyped literal.
Editor's Note: The definition of "illtyped literal" should be revisited. Namely, not all literals that are not welltyped are illtyped. Perhaps the notion of illtyped literal is not necessary at all.
A RIFRDF combination consists of a RIF ruleset and zero or more RDF graphs. Formally:
DEFINITION: A RIFRDF combination is a pair < R,S>, where R is a RIF ruleset and S is a set of generalized RDF graphs of a vocabulary V.
When clear from the context, RIFRDF combinations are referred to simply as combinations.
The semantics of RIF rulesets and RDF graphs are defined in terms of model theories. The semantics of RIFRDF combinations is defined through a combination of the RIF and RDF model theories, using a notion of common models. These models are then used to define satisfiability and entailment in the usual way. Combined entailment extends both entailment in RIF and entailment in RDF.
The RDF Semantics document (RDFSemantics) defines four normative kinds of interpretations, as well as corresponding notions of satisfiability and entailment:
Those four types of interpretations are reflected in the definitions of satisfaction and entailment in this section.
This section defines the notion of commonrifrdfinterpretation, which is an interpretation of a RIFRDF combination. This commonrifrdfinterpretation is the basis for the definitions of satisfaction and entailment in the following sections.
The correspondence between RIF semantic structures (interpretations) and RDF interpretations is defined through a number of conditions that ensure the correspondence in the interpretation of names (i.e., IRIs and literals) and formulas, i.e., the correspondence between RDF triples of the form s p o and RIF frames of the form s'[p' > o'], where s', p', and o' are RIF symbols corresponding to the RDF symbols s, p, and o, respectively (cf. Table 1).
The notions of RDF interpretation and RIF semantic structure (interpretation) are briefly reviewed below.
As defined in (RDFSemantics), a simple interpretation of a vocabulary V is a tuple I=< IR, IP, IEXT, IS, IL, LV >, where
Rdf, rdfs, and Dinterpretations are simple interpretations that satisfy certain conditions:
As defined in (RIFBLD), a semantic structure is a tuple of the form I = <TV, DTS, D, D_{ind}, D_{func}, I_{C}, I_{V}, I_{F}, I_{frame}, I_{SF}, I_{sub}, I_{isa}, I_{=}, I_{external}, I_{truth}>. The specification of RIFRDF compatibility is only concerned with DTS, D, I_{C}, I_{V}, I_{frame}, I_{sub}, I_{isa}, and I_{truth}. The other mappings that are parts of a semantic structure are not used in the definition of combinations.
Recall that Const is the set of constant symbols and Var is the set of variable symbols in RIF.
DEFINITION: A commonrifrdfinterpretation is a pair (I, I), where I = <TV, DTS, D, D_{ind}, D_{func}, I_{C}, I_{V}, I_{F}, I_{frame}, I_{SF}, I_{sub}, I_{isa}, I_{=}, I_{external}, I_{truth}> is a RIF semantic structure and I=<IR, IP, IEXT, IS, IL, LV> is an RDF interpretation of a vocabulary V, such that the following conditions hold:
Condition 1 ensures that the combination of resources and
properties corresponds exactly to the RIF domain; note that if I is
an rdf, rdfs, or Dinterpretation, IP is a subset of IR, and thus
IR=D. Condition 2 ensures that the set of RDF
properties at least includes all elements that are used as
properties in frames in the RIF domain. Condition 3 ensures that
all concrete values in D are included in LV.
Condition 4 ensures that RDF triples are interpreted in the same
way as frame formulas. Condition 5 ensures that IRIs are
interpreted in the same way. Condition 6 ensures that typed
literals are interpreted in the same way. Note that no
correspondences are defined for the mapping of names in RDF that
are not symbols of RIF, e.g., illtyped literals and RDF URI
references that are not absolute IRIs. Condition 7 ensures that
typing in RDF and typing in RIF correspond, i.e., a rdf:type
b is true iff a # b is true. Finally, condition 8
ensures that whenever a RIF subclass statement holds, the
corresponding RDF subclass statement holds as well, i.e., a
rdfs:subClassOf b is true if a ## b is true.
One consequence of conditions 5 and 6 is that IRIs of the form http://iri and typed literals of the form "http://iri"^^rif:iri that occur in an RDF graph are treated the same in RIFRDF combinations, even if the RIF Ruleset is empty. For example, consider the combination of an empty ruleset and an RDF graph that contains the triple
<http://a> <http://p> "http://b"^^rif:iri .
This combination allows the derivation of, among other things, the following triple:
<http://a> <http://p> <http://b> .
as well as the following frame formula:
"http://a"^^rif:iri ["http://p"^^rif:iri > "http://b"^^rif:iri]
The notion of satisfiability refers to the conditions under which a commonrifrdfinterpretation (I, I) is a model of a combination < R, S>. The notion of satisfiability is defined for all four entailment regimes of RDF (simple, RDF, RDFS, and D). The definitions are all analogous. Intuitively, a commonrifrdfinterpretation (I, I) satisfies a combination < R, S> if I is a model of R and I satisfies S. Formally:
DEFINITION: A commonrifrdfinterpretation (I, I) satisfies a RIFRDF combination C=< R, S > if I is a model of R and I satisfies every RDF graph S in S; in this case (I, I) is called a simplemodel, or model, of C, and C is satisfiable. (I, I) satisfies a generalized RDF graph S if I satisfies S. (I, I) satisfies a closed RIFBLD condition φ if TVal_{I}(φ)=t.
Notice that not every combination is satisfiable. In fact, not
every RIF ruleset has a model. For example, the ruleset consisting
of the rule
Forall ("1"^^xsd:integer="2"^^xsd:integer)
does not have a model, since the symbols "1"^^xsd:integer and "2"^^xsd:integer are mapped to the (distinct) numbers 1 and 2, respectively, in every semantic structure.
Rdf, rdfs, and Dsatisfiability are defined through additional restrictions on I:
DEFINITION: A model (I, I) of a combination C is an rdfmodel of C if I is an rdfinterpretation; in this case C is rdfsatisfiable.
DEFINITION: A model (I, I) of a combination C is an rdfsmodel of C if I is an rdfsinterpretation; in this case C is rdfssatisfiable.
DEFINITION: Given a conforming datatype map D, a model (I, I) of a combination C is a Dmodel of C if I is a Dinterpretation; in this case C is Dsatisfiable.
Using the notions of models defined above, entailment is defined in the usual way, i.e., through inclusion of sets of models.
DEFINITION: Given a conforming datatype map D, a RIFRDF combination C Dentails a generalized RDF graph S if every Dmodel of C satisfies S. Likewise, C Dentails a closed RIFBLD condition φ if every Dmodel of C satisfies φ.
The other notions of entailment are defined analogously:
DEFINITION: A combination C simpleentails S (resp., φ) if every simple model of C satisfies S (resp., φ).
DEFINITION: A combination C rdfentails S (resp., φ) if every rdfmodel of C satisfies S (resp., φ).
DEFINITION: A combination C rdfsentails S (resp., φ) if every rdfsmodel of C satisfies S (resp., φ).
The syntax for exchanging OWL ontologies is based on RDF graphs. Therefore, RIFOWLcombinations are combinations of RIF rulesets and sets of RDF graphs, analogous to RIFRDF combinations. This section specifies how RIF rulesets and OWL ontologies interoperate in such combinations.
OWL (OWLReference) specifies three increasingly expressive species, namely Lite, DL, and Full. OWL Lite is a syntactic subset of OWL DL, but the semantics is the same (OWLSemantics). Since every OWL Lite ontology is an OWL DL ontology, the Lite species is not considered separately in this document.
Syntactically speaking, OWL DL is a subset of OWL Full, but the semantics of the DL and Full species are different (OWLSemantics). While OWL DL has an abstract syntax with a direct modeltheoretic semantics, the semantics of OWL Full is an extension of the semantics of RDFS, and is defined on the RDF syntax of OWL. Consequently, the OWL Full semantics does not extend the OWL DL semantics; however, all derivations sanctioned by the OWL DL semantics are sanctioned by the OWL Full semantics.
Finally, the OWL DL RDF syntax, which is based on the OWL abstract syntax, does not extend the RDF syntax, but rather restricts it: every OWL DL ontology is an RDF graph, but not every RDF graph is an OWL DL ontology. OWL Full and RDF have the same syntax: every RDF graph is an OWL Full ontology and vice versa. This syntactical difference is reflected in the definition of RIFOWL compatibility: combinations of RIF with OWL DL are based on the OWL abstract syntax, whereas combinations with OWL Full are based on the RDF syntax.
Since the OWL Full syntax is the same as the RDF syntax and the OWL
Full semantics is an extension of the RDF semantics, the definition
of RIFOWL Full compatibility is a straightforward extension of
RIFRDF compatibility. Defining RIFOWL DL compatibility in the
same way would entail losing certain semantic properties of OWL DL.
One of the main reasons for this is the difference in the way
classes and properties are interpreted in OWL Full and OWL DL. In
the Full species, classes and properties are both interpreted as
objects in the domain of interpretation, which are then associated
with subsets of and binary relations over the domain of
interpretation using rdf:type and the extension function
IEXT, as in RDF. In the DL species, classes and properties are
directly interpreted as subsets of and binary relations over the
domain. The latter is a key property of Description Logic semantics
that enables the use of Description Logic reasoning techniques for
processing OWL DL descriptions. Defining RIFOWL DL compatibility
as an extension of RIFRDF compatibility would define a
correspondence between OWL DL statements and RIF frame formulas.
Since RIF frame formulas are interpreted using an extension
function, the same way as in RDF, defining the correspondence
between them and OWL DL statements would change the semantics of
OWL statements, even if the RIF ruleset is empty. Consider, for
example, an OWL DL ontology with a class membership statement
a rdf:type C .
This statement says that the set denoted by C contains at least one element that is denoted by a. The corresponding RIF frame formula is
a[rdf:type > C]
The terms a, rdf:type, and C are all interpreted as elements in the individual domain, and the pair of elements denoted by a and C is in the extension of the element denoted by rdf:type.
This semantic discrepancy has practical implications in terms of entailments. Consider, for example, an OWL DL ontology with two class membership statements
a rdf:type C . D rdf:type owl:Class .
and a RIF ruleset
Forall ?x ?y ?x=?y
which says that every element is the same as every other element (note that such statements can also be written in OWL using owl:Thing and owl:hasValue). From the naïve combination of the two one can derive C=D, and indeed
a rdf:type D .
This derivation is not sanctioned by the OWL DL semantics, because even if every element is the same as every other element, the class D might be interpreted as the empty set.
A RIFOWL combination that is faithful to the OWL DL semantics
requires interpreting classes and properties as sets and binary
relations, respectively, suggesting that correspondence could be
defined with unary and binary predicates. It is, however, also
desirable that there be uniform syntax for the RIF component of
both OWL DL and RDF/OWL Full combinations, because one may not know
at time of writing the rules which type of inference will be used.
Consider, for example, an RDF graph S with the following
statement
a rdf:type C .
and a RIF ruleset with the rule
Forall ?x ?x[rdf:type > D] : ?x[rdf:type > C]
The combination of the two, according to the specification of RDF Compatibility, allows deriving
a rdf:type D .
Now, the RDF graph S is also an OWL DL ontology. Therefore, one would expect the triple to be derived by RIFOWL DL combinations as well.
To ensure that the RIFOWL DL combination is faithful to the OWL DL
semantics and to enable using the same, or similar, rules with both
OWL DL and RDF/OWL Full, the interpretation of frame formulas
s[p > o] in the RIFOWL DL combinations is slightly
different from their interpretation in RIF BLD and syntactical
restrictions are imposed on the use of variables, function terms,
and frame formulas.
Note that the abstract syntax form of OWL DL allows socalled
punning (this is not allowed in the RDF syntax), i.e., the
same IRI may be used in an individual position, a property
position, and a class position; the interpretation of the IRI
depends on its context. Since combinations of RIF and OWL DL are
based on the abstract syntax of OWL DL, punning may also be used in
these combinations. This paves the way towards combination with
OWL 2, which is envisioned to
allow punning in all its syntaxes.
Editor's Note: The semantics of RIFOWL DL combinations is similar in spirit to the Semantic Web Rule Language proposal. However, a reference to SWRL from the above text does not seem appropriate.
Since RDF graphs and OWL Full ontologies cannot be distinguished, the syntax of RIFOWL Full combinations is the same as the syntax of RIFRDF combinations.
The syntax of OWL ontologies in RIFOWL DL combinations is specified by the abstract syntax of OWL DL. Certain restrictions are imposed on the syntax of the RIF rules in combinations with OWL DL. Specifically, the only terms allowed in class and property positions in frame formulas are constant symbols.
DEFINITION: A RIFBLD condition φ is a RIF DLcondition if for every frame formula a[b > c] in φ it holds that b is a constant and if b = rdf:type, then c is a constant.
DEFINITION: A RIFBLD ruleset R is a DLRuleset if for every frame formula a[b > c] in every rule of R it holds that b is a constant and if b = rdf:type, then c is a constant.
DEFINITION: A RIFOWLDLcombination is a pair < R,O>, where R is a DLRuleset and O is a set of OWL DL ontologies in abstract syntax form of a vocabulary V.
When clear from the context, RIFOWLDLcombinations are referred to simply as combinations.
In the literature, several restrictions on the use of variables in combinations of rules and Description Logics have been identified (Motik05, Rosati06) for the purpose of decidable reasoning. These restrictions are specified for RIFOWLDL combinations.
Given a set of OWL DL ontologies in abstract syntax form O, a variable ?x in a RIF rule Q then : if is DLsafe if it occurs in an atomic formula in if that is not of the form s[P > o] or s[rdf:type > A], where P or A, respectively, occurs in one of the ontologies in O. A RIF rule Q then : if is DLsafe, given O if every variable that occurs in then : if is DLsafe. A RIF rule Q then : if is weakly DLsafe, given O if every variable that occurs in then is DLsafe and every variable in if that is not DLsafe occurs only in atomic formulas in if that are of the form s[P > o] or s[rdf:type > A], where P or A, respectively, occurs in one of the ontologies in O.
Editor's Note: It is not strictly necessary to disallow disjunctions in the definition, but it would make the definition a lot more complex. It would require defining the disjunctive normal form of a condition formula and defining safeness with respect to each disjunct. Given that the safeness restriction is meant for implementation purposes, and that converting rules to disjunctive normal form is extremely expensive, it is probably a reasonable restriction to disallow disjunction.
DEFINITION: A RIFOWLDLcombination < R,O> is DLsafe if every rule in R is DLsafe, given O. A RIFOWLDLcombination < R,O> is weakly DLsafe if every rule in R is weakly DLsafe, given O.
Editor's Note: Do we want additional safeness restrictions to ensure that variables do not cross the abstractconcrete domain boundary?
The semantics of RIFOWL Full combinations is a straightforward extension of the Semantics of RIFRDF Combinations.
The semantics of RIFOWLDLcombinations cannot straightforwardly extend the semantics of RIF RDF combinations, because OWL DL does not extend the RDF semantics. In order to keep the syntax of the rules uniform between RIFOWLFull and RIFOWLDLcombinations, the semantics of RIF frame formulas is slightly altered in RIFOWLDLcombinations.
A Dinterpretation I is an OWL Full interpretation if it interprets the OWL vocabulary and it satisfies the conditions in the sections 5.2 and 5.3 in (OWL Semantics).
The semantics of RIFOWL Full combinations is a straightforward extension of the semantics of RIFRDF combinations. It is based on the same notion of commoninterpretations, but defines additional notions of satisfiability and entailment.
DEFINITION: Given a conforming datatype map D, a commonrifrdfinterpretation (I, I) is an OWLFullmodel of a RIFRDF combination C=< R, S > if I is a model of R, I is an OWL Full interpretation, and I satisfies every RDF graph S in S; in this case C is OWLFullsatisfiable.
DEFINITION: Given a conforming datatype map D, a RIFRDF combination C OWLFullentails a generalized RDF graph S if every OWLFullmodel of C satisfies S. Likewise, C OWLFullentails a closed RIFBLD condition φ if every OWLFullmodel of C satisfies φ.
The semantics of RIFOWLDLcombinations is similar in spirit to the semantics of RIFRDF combinations. Analogous to a commonrifrdfinterpretation, there is the notion of commonrifdlinterpretations, which are pairs of RIF and OWL DL interpretations, and which define a number of conditions that relate these interpretations to each other. In contrast to RIFRDF combinations, the conditions below define a correspondence between the interpretation of OWL DL classes and properties and RIF unary and binary predicates.
The modification of the semantics of RIF frame formulas is achieved by modifying the mapping function for frame formulas (I_{frame}), and leaving the RIF BLD semantics (RIFBLD) otherwise unchanged.
Namely, frame formulas of the form s[rdf:type > o] are interpreted as membership of s in the set denoted by o and frame formulas of the form s[p > o], where p is not rdf:type, as membership of the pair (s, o) in the binary relation denoted by p.
DEFINITION: A RIF
DLsemantic structure is a tuple I =
<TV, DTS, D,
D_{ind}, D_{func},
I_{C}, I_{V},
I_{F}, I_{frame'},
I_{SF}, I_{sub},
I_{isa}, I_{=},
I_{external},
I_{truth}>, where
I_{frame'} is a mapping from
D_{ind} to total functions of the form
SetOfFiniteFrame'Bags(D × D) →
D, such that for each pair (a, b) in
SetOfFiniteFrame'Bags(D × D)
holds that if
a≠I_{C}(rdf:type), then
b in D_{ind}; all other elements of
the structure are defined as in RIF semantic
structures.
We define I(o[a_{1}>v_{1} ... a_{k}>v_{k}]) = I_{frame}(I(o))({<I(a_{1}),I(v_{1})>, ..., <I(a_{n}),I(v_{n})>}). The truth valuation function TVal_{I} is then defined as in RIF BLD.
DEFINITION: A RIF DLsemantic structure I is a model of a DLRuleset R if TVal_{I}(R)=t.
As defined in (OWLSemantics), an abstract OWL interpretation with respect to a datatype map D, with vocabulary V is a tuple I=< R, EC, ER, L, S, LV >, where
The OWL semantics imposes a number of further restrictions on the mapping functions as well as on the set of resources R, to achieve a separation of the interpretation of class, datatype, ontology property, datatype property, annotation property, and ontology property identifiers.
DEFINITION: Given a conforming datatype map D, a commonrifdlinterpretation is a pair (I, I), where I = <TV, DTS, D, I_{C}, I_{V}, I_{F}, I_{frame'}, I_{SF}, I_{sub}, I_{isa}, I_{=}, I_{Truth}> is a RIF DLsemantic structure and I=<R, EC, ER, L, S, LV> is an abstract OWL interpretation with respect to D of a vocabulary V, such that the following conditions hold
Condition 1 ensures that the relevant parts of the domains of interpretation are the same. Condition 2 ensures that the interpretation (extension) of an OWL DL class u corresponds to the interpretation of frames of the form ?x[rdf:type > "u"^^rif:iri]. Condition 3 ensures that the interpretation (extension) of an OWL DL object or datatype property u corresponds to to the interpretation of frames of the form ?x["u"^^rif:iri > ?y]. Condition 4 ensures that typed literals of the form (s, d) in OWL DL are interpreted in the same way as constants of the form "s"^^d in RIF. Finally, condition 5 ensures that individual identifiers in the OWL ontologies and the RIF rulesets are interpreted in the same way.
Using the definition of commonrifdlinterpretation, satisfaction,
models, and entailment are defined in the usual way:
DEFINITION: Given a conforming datatype map D, a commonrifdlinterpretation (I, I) is an OWLDLmodel of a RIFOWLDLcombination C=< R, O > if I is a model of R and I satisfies every OWL DL ontology in abstract syntax form O in O; in this case C is OWLDLsatisfiable. (I, I) is an OWLDLmodel of an OWL DL ontology in abstract syntax form O if I satisfies O. (I, I) is an OWLDLmodel of a closed RIFBLD condition φ if TVal_{I}(φ)=t.
DEFINITION: Given a conforming datatype map D, a RIFOWLDLcombination C OWLDLentails an OWL DL ontology in abstract syntax form O if every OWLDLmodel of C is an OWLDLmodel of O. Likewise, C OWLDLentails a closed RIF DLcondition φ if every OWLDLmodel of C is an OWLDLmodel of φ.
Recall that in an abstract OWL interpretation I the sets O, which
is used for interpreting individuals, and LV, which is used for
interpreting literals (data values), are disjoint and that EC maps
class identifiers to subsets of O and datatype identifiers to
subsets of LV. The disjointness entails that data values cannot be
members of a class and individuals cannot be members of a
datatype.
In RIF, variable quantification ranges over D_{ind}. So, the same variable may be assigned to an abstract individual or a concrete data value. Additionally, RIF constants (e.g., IRIs) denoting individuals can be written in place of a data value, such as the value of a datavalued property or in datatype membership statements; similarly for constants denoting data values. Such statements cannot be satisfied in any commonrifdlinterpretation, due to the constraints on the EC and ER functions. The following example illustrates several such statements.
Consider the datatype xsd:string and a RIFOWL DL combination consisting of the set containing only the OWL DL ontology
ex:myiri rdf:type ex:A .
and a RIF ruleset containing the following fact
ex:myiri[rdf:type > xsd:string]
This combination is not OWLDLsatisfiable, because ex:myiri is an individual identifier and S maps individual identifiers to elements in O, which is disjoint from the elements in the datatype xsd:string.
Consider a RIFOWL DL combination consisting of the set containing only the OWL DL ontology
ex:hasChild rdf:type owl:ObjectProperty .
and a RIF ruleset containing the following fact
ex:myiri[ex:hasChild > "John"^^xsd:string]
This combination is not OWLDLsatisfiable, because ex:hasChild is an object property, and values of object properties may not be concrete data values.
Consider a RIFOWL DL combination consisting of the OWL DL ontology
ex:A rdfs:subClassOf ex:B
and a RIF ruleset containing the following rule
Forall ?x ?x[rdf:type > ex:A]
This combination is not OWLDLsatisfiable, because the rule requires every element, including every concrete data value, to be a member of the class ex:A. However, the mapping EC in any abstract OWL interpretation requires every member of ex:A to be an element of O, and concrete data values may not be members of O.
Note that the above definition of RIFOWL DL compatibility does not consider ontology and annotation properties, in contrast to the definition of compatibility of RIF with OWL Full, where there is no clear distinction between annotation and ontology properties and other kinds of properties. Therefore, it is not possible to "access" or use the values of these properties in the RIF rules. This limitation is overcome in the following definition. It is envisioned that the user will choose whether annotation and ontology properties are to be considered. It is currently expected that OWL 2 will not define a semantics for annotation and ontology properties; therefore, the below definition cannot be extended to the case of OWL 2.
DEFINITION: Given a conforming datatype map D, a commonrifdlinterpretation (I, I) is a commonDLannotationinterpretation if the following condition holds
6. ER(u) = set of all pairs (k, l) in O × O such that I_{truth}(I_{frame'}(I_{C}("u"^^rif:iri))( k, l) ) = t (true), for every IRI u in V.
Condition 6, which strengthens condition 3, ensures that the
interpretation of all properties (also annotation and ontology
properties) in the OWL DL ontologies corresponds with their
interpretation in the RIF rules.
DEFINITION: Given a conforming datatype map D, a commonDLannotationinterpretation (I, I) is an OWLDLannotationmodel of a RIFOWLDLcombination C=< R, O > if I is a DLmodel of R and I satisfies every OWL DL ontology in abstract syntax form O in O; in this case C is OWLDLannotationsatisfiable.
DEFINITION: Given a conforming datatype map D, a RIFRDF combination C OWLDLannotationentails an OWL DL ontology in abstract syntax form O if every OWLDLannotationmodel of C is an OWLDLmodel of O. Likewise, C OWLDLannotationentails a closed RIFBLD condition φ if every OWLDLannotationmodel of C is an OWLDLmodel of φ.
The difference between the two kinds of OWL DL entailment can be illustrated using an example. Consider the following OWL DL ontology in abstract syntax form
Ontology (ex:myOntology Annotation(dc:title "Example ontology"))
which defines an ontology with a single annotation (title). Consider also a ruleset consisting of the following rule:
Forall ?x, ?y ( ?x[ex:hasTitle > ?y] : ?x[dc:title > ?y])
which says that whenever something has a dc:title, it has the same ex:hasTitle.
The combination of the ontology and the ruleset OWLDLannotationentails the RIF condition formula ex:myOntology[ex:hasTitle > "Example ontology"^^xsd:string]; the combination does not OWLDLentail the formula.
In the previous sections RIFRDF Combinations and RIFOWL combinations were defined in an abstract way, as pairs of rulesets and sets of RDF graphs/OWL ontologies. In addition, different semantics were specified based on the various RDF and OWL entailment regimes. RIF provides a mechanism for explicitly referring to (importing) RDF graphs from rulesets and specify the intended profile (entailment regime) through the use of Import statements.
This section specifies how RIF rulesets with such import statements should be interpreted.
A RIF ruleset contains a number of Import statements.
Oneary Import statements are used for importing RIF
rulesets, and the interpretation of these statements is defined in
(RIFBLD). This section defines
the interpretation of twoary Import statements:
Import(t_{1} p_{1}) ... Import(t_{n} p_{n})
Here, t_{i} is an IRI constant "absoluteIRI"^^rif:iri, where absoluteIRI is the location of an RDF graph to be imported and p_{i} is an IRI constant denoting the profile to be used.
The profile determines which notions of model, satisfiability, and entailment should be used. For example, if a RIF ruleset R imports an RDF graph S with the RDFS entailment regime, the notions of rdfsmodel, rdfssatisfiability, and rdfsentailment should be used with the combination <R, {S}>.
In case several graphs are imported in a ruleset, and these imports specify different profile, the highest of these profiles is used. For example, if a RIF ruleset R imports an RDF graph S_{1} with the RDF entailment regime and an RDF graph S_{2} with the OWL Full entailment regime, the notions of OWLFullmodel, OWLFullsatisfiability, and OWLFullentailment should be used with the combination <R, {S_{1}, S_{2}}>.
Finally, if a RIF ruleset R imports an RDF graph S with the OWL DL profile, R must be a DLRuleset, S must be the translation to RDF of an OWL DL ontology in abstract syntax form O, and the notions of OWLDLmodel, OWLDLsatisfiability, and OWLDLentailment should be used with the combination <R, {O}>.
RIF defines a specific profile for each of the notions of satisfiability and entailment of combinations, as well as two generic profiles for RDF and OWL, respectively. The use of a specific profile specifies how a combination should be interpreted and a receiver should reject a combination with a profile it cannot handle. The use of a generic profile implies that a receiver may interpret the combination to the best of his ability.
The following table lists the specific profiles, the IRIs of these profiles, and the notions of model, satisfiability, and entailment the should be used with the profile.
The profiles are ordered as follows, where '<' reads "is lower than":
simple < rdf < rdfs < d < OWL Full
OWL DL < OWL DL annotation < OWL Full
The following table lists the generic profiles in RIF along with the IRI of the profile. Note that the use of a generic profile does not imply the use of a specific notion of model, satisfiability, and entailment.
Profile  IRI of the Profile 

RDF  http://www.w3.org/2008/rifimportprofile#RDF 
Let R be a RIF ruleset with the twoary import statements
Import("u_{1}"^^rif:iri "p_{1}"^^rif:iri) ... Import("u_{n}"^^rif:iri "p_{n}"^^rif:iri)
and let Profile be the set of profiles corresponding to the IRIs p_{1},...,p_{n}.
If Profile contains only specific profiles, then:
If Profile contains a generic profile, then the combination C=<R,{S_{1},....,S_{n}}>, where S_{1},....,S_{n} are RDF graphs accessible from the locations u_{1},...,u_{n} and C may be interpreted according to the highest among the specific profiles in Profile or any higher profile.
RIFRDF combinations can be embedded into RIF Rulesets in a fairly straightforward way, thereby demonstrating how a RIFcompliant translator without native support for RDF can process RIFRDF combinations.
RIFOWL combinations cannot be embedded in RIF, in the general case. However, there is a subset of RIFOWL DL combinations that can be embedded.
Throughout this section the function tr is defined, which maps
symbols, triples, RDF graphs, and OWL DL ontologies in abstract
syntax form to RIF symbols, statements, and rulesets.
Given a combination C=< R,S>, the function tr maps RDF symbols of a vocabulary V and a set of blank nodes B to RIF symbols, as defined in following table.
RDF Symbol  RIF Symbol  Mapping 

IRI i in V_{U}  Constant with symbol space rif:iri  tr(i) = "i"^^rif:iri 
Blank node x in B  Variable symbols ?x  tr(x) = ?x 
Plain literal without a language tag xxx in V_{PL}  Constant with the datatype xsd:string  tr("xxx") = "xxx"^^xsd:string 
Plain literal with a language tag (xxx,lang) in V_{PL}  Constant with the datatype rif:text  tr("xxx"@lang) = "xxx@lang"^^rif:text 
Welltyped literal (s,u) in V_{TL}  Constant with the symbol space u  tr("s"^^u) = "s"^^u 
Illtyped literal (s,u) in V_{TL}  Constant s^^u' with symbol space rif:local that is not used in C  tr("s"^^u) = "s^^u'"^^rif:local 
The embedding is not defined for combinations that include RDF graphs with RDF URI references that are not absolute IRIs.
The mapping function tr is extended to embed triples as RIF statements. Finally, two embedding functions, tr_{R} and tr_{Q} embed RDF graphs as RIF rulesets and conditions, respectively. The following section shows how these embeddings can be used for reasoning with combinations.
We define two mappings for RDF graphs, one (tr_{R}) in which variables are Skolemized, i.e., replaced with constant symbols, and one (tr_{Q}) in which variables are existentially quantified.
The function sk takes as an argument a formula R with variables, and returns a formula R', which is obtained from R by replacing every variable symbol ?x in R with "newiri"^^rif:iri, where newiri is a new globally unique IRI.
RDF Construct  RIF Construct  Mapping 

Triple s p o .  Frame formula tr(s)[tr(p) > tr(o)]  tr(s p o .) = tr(s)[tr(p) > tr(o)] 
Graph S  Ruleset tr_{R}(S)  tr_{R}(S) = the set of all sk(Forall tr(s p o .)) where s p o . is a triple in S 
Graph S  Condition (query) tr_{Q}(S)  tr_{Q}(S) = Exists tr(x1), ..., tr(xn) And(tr(t1) ... tr(tm)), where x1, ..., xn are the blank nodes occurring in S and t1, ..., tm are the triples in S 
The following theorem shows how checking simpleentailment of combinations can be reduced to checking entailment of RIF conditions by using the embeddings of RDF graphs of the previous section.
Theorem A combination C=<R,{S1,...,Sn}> simpleentails a generalized RDF graph S iff (R union tr_{R}(S1) union ... union tr_{R}(Sn)) entails tr_{Q}(S). C simpleentails a RIF condition φ iff (R union tr_{R}(S1) union ... union tr_{R}(Sn)) entails φ.
The embeddings of RDF and RDFS entailment require a number of builtin predicate symbols to be available to appropriately deal with literals.
Editor's Note: It is not yet clear which builtin predicates will be available in RIF. Therefore, the builtins mentioned in this section may change. Furthermore, builtins may be axiomatized if they are not provided by the language.
Given a vocabulary V,
We axiomatize the semantics of the RDF vocabulary using the following RIF rules and conditions.
The compact URIs used in the RIF rules in this section and the next are short for the complete URIs with the rif:iri datatype, e.g., rdf:type is short for "http://www.w3.org/1999/02/22rdfsyntaxns#type"^^rif:iri
R^{RDF}  =  (Forall tr(s p o .)) for every RDF axiomatic
triple s p o .) union ( Forall ?x ?x[rdf:type > rdf:Property] : Exists ?y,?z (?y[?x > ?z]),) 
Theorem A combination <R,{S1,...,Sn}> is
rdfsatisfiable iff (R^{RDF} union R union
tr_{R}(S1) union ... union tr_{R}(Sn)) has a
model.
Theorem A combination C=<R,{S1,...,Sn}> rdfentails a generalized RDF graph T iff (R^{RDF} union R union tr_{R}(S1) union ... union tr_{R}(Sn)) entails tr_{Q}(T). C simpleentails a RIF condition φ iff (R^{RDF} union R union tr_{R}(S1) union ... union tr_{R}(Sn)) entails φ.
We axiomatize the semantics of the RDF(S) vocabulary using the following RIF rules and conditions.
R^{RDFS}  =  R^{RDF} union (Forall tr(s p o .)) for every RDFS
axiomatic triple s p o .) union Forall ?x ?x[rdf:type > rdfs:Resource],) 
Theorem A combination <R_{1},{S1,...,Sn}> is
rdfssatisfiable iff (R^{RDFS} union R_{1}
union tr_{R}(S1) union ... union tr_{R}(Sn)) has a
model.
Theorem A combination <R,{S1,...,Sn}> rdfsentails a generalized RDF graph T iff (R^{RDFS} union R union tr_{R}(S1) union ... union tr_{R}(Sn)) entails tr_{Q}(T). C rdfsentails a RIF condition φ iff (R^{RDFS} union R union tr_{R}(S1) union ... union tr_{R}(Sn)) entails φ.
We axiomatize the semantics of the data types using the following RIF rules and conditions.
R^{D}  =  R^{RDFS} union (Forall u[rdf:type > rdfs:Datatype]  for every IRI
u in the domain of D) union 
Theorem A combination <R,{S1,...,Sn}>, where R does not contain the equality symbol, is Dsatisfiable iff (R^{D} union R union tr_{R}(S1) union ... union tr_{R}(Sn)) is satisfiable and does not entail Exists ?x And(dt(?x,u) dt(?x,u')) for any two URIs u and u' in the domain of D such that the value spaces of D(u) and D(u') are disjoint, and does not entail Exists ?x dt(s^^u,"u'"^^rif:iri) for any (s, u) in V_{TL} and u' in the domain of D such that s is not in the lexical space of D(u').
Editor's Note: Since this condition is very complex we might consider discarding this theorem, and suggest the above set of rules (R^{D}) as an approximation of the semantics.
Theorem A Dsatisfiable combination <R,{S1,...,Sn}>,
where R does not contain the equality symbol, Dentails a
generalized RDF graph T iff (R^{D} union R union
tr_{R}(S1) union ... union tr_{R}(Sn)) entails
tr_{Q}(T). C Dentails a RIF condition φ iff
(R^{D} union R union tr_{R}(S1) union ...
union tr_{R}(Sn)) entails φ.
Editor's Note: The restriction to equalityfree rulesets is necessary because, in case different datatype URIs are equal, Dinterpretations impose stronger conditions on the interpretation of typed literals than RIF does.
It is known that expressive Description Logic languages such as OWL DL cannot be straightforwardly embedded into typical rules languages such as RIF BLD.
In this section we therefore consider a subset of OWL DL in RIFOWL DL combinations. We define OWL DLP, which is inspired by socalled Description Logic programs (DLP), and define how reasoning with RIFOWL DLP combinations can be reduced to reasoning with RIF.
Our definition of OWL DLP removes disjunction and extensional quantification from consequents of implications and removes negation and equality.
We introduce OWL DLP through its abstract syntax, which is a subset of the abstract syntax of OWL DL. The semantics of OWL DLP is the same as OWL DL.
The basic syntax of ontologies and identifiers remains the same.
ontology ::= 'Ontology(' [ ontologyID ] { directive } ')' directive ::= 'Annotation(' ontologyPropertyID ontologyID ')'  'Annotation(' annotationPropertyID URIreference ')'  'Annotation(' annotationPropertyID dataLiteral ')'  'Annotation(' annotationPropertyID individual ')'  axiom  fact
datatypeID ::= URIreference classID ::= URIreference individualID ::= URIreference ontologyID ::= URIreference datavaluedPropertyID ::= URIreference individualvaluedPropertyID ::= URIreference annotationPropertyID ::= URIreference ontologyPropertyID ::= URIreference
dataLiteral ::= typedLiteral  plainLiteral typedLiteral ::= lexicalForm^^URIreference plainLiteral ::= lexicalForm  lexicalForm@languageTag lexicalForm ::= as in RDF, a unicode string in normal form C languageTag ::= as in RDF, an XML language tag
Facts are the same as for OWL DL, except that equality and
inequality (SameIndividual and DifferentIndividual), as well as
individuals without an identifier are not allowed.
fact ::= individual individual ::= 'Individual(' individualID { annotation } { 'type(' type ')' } { value } ')' value ::= 'value(' individualvaluedPropertyID individualID ')'  'value(' individualvaluedPropertyID individual ')'  'value(' datavaluedPropertyID dataLiteral ')'
type ::= Rdescription
The main restrictions posed by OWL DLP on the OWL DL syntax are on descriptions and axioms. Specifically, we need to distinguish between descriptions which are allowed on the righthand side (Rdescription) and those allowed on the lefthand side (Ldescription) of subclass statements.
We start with descriptions that may be allowed on both sides
dataRange ::= datatypeID  'rdfs:Literal'
description ::= classID  restriction  'intersectionOf(' { description } ')'
restriction ::= 'restriction(' datavaluedPropertyID dataRestrictionComponent { dataRestrictionComponent } ')'  'restriction(' individualvaluedPropertyID individualRestrictionComponent { individualRestrictionComponent } ')' dataRestrictionComponent ::= 'value(' dataLiteral ')' individualRestrictionComponent ::= 'value(' individualID ')'
We then proceed with the individual sides
Ldescription ::= description  Lrestriction  'unionOf(' { Ldescription } ')'  'intersectionOf(' { Ldescription } ')'  'oneOf(' { individualID } ')'
Lrestriction ::= 'restriction(' datavaluedPropertyID LdataRestrictionComponent { LdataRestrictionComponent } ')'  'restriction(' individualvaluedPropertyID LindividualRestrictionComponent { LindividualRestrictionComponent } ')' LdataRestrictionComponent ::= 'someValuesFrom(' dataRange ')'  'value(' dataLiteral ')' LindividualRestrictionComponent ::= 'someValuesFrom(' description ')'  'value(' individualID ')'
Rdescription ::= description  Rrestriction  'intersectionOf(' { Rdescription } ')'
Rrestriction ::= 'restriction(' datavaluedPropertyID RdataRestrictionComponent { RdataRestrictionComponent } ')'  'restriction(' individualvaluedPropertyID RindividualRestrictionComponent { RindividualRestrictionComponent } ')' RdataRestrictionComponent ::= 'allValuesFrom(' dataRange ')'  'value(' dataLiteral ')' RindividualRestrictionComponent ::= 'allValuesFrom(' description ')'  'value(' individualID ')'
Finally, we turn to axioms. We start with class axioms.
axiom ::= 'Class(' classID ['Deprecated'] 'complete' { annotation } { description } ')' axiom ::= 'Class(' classID ['Deprecated'] 'partial' { annotation } { Rdescription } ')'
axiom ::= 'DisjointClasses(' Ldescription Ldescription { Ldescription } ')'  'EquivalentClasses(' description { description } ')'  'SubClassOf(' Ldescription Rdescription ')'
axiom ::= 'Datatype(' datatypeID ['Deprecated'] { annotation } )'
Property axioms in OWL DLP restrict those in OWL DL by disallowing functional and inverse functional properties, because these involve equality.
axiom ::= 'DatatypeProperty(' datavaluedPropertyID ['Deprecated'] { annotation } { 'super(' datavaluedPropertyID ')'} { 'domain(' description ')' } { 'range(' dataRange ')' } ')'  'ObjectProperty(' individualvaluedPropertyID ['Deprecated'] { annotation } { 'super(' individualvaluedPropertyID ')' } [ 'inverseOf(' individualvaluedPropertyID ')' ] [ 'Symmetric' ] [ 'Transitive' ] { 'domain(' description ')' } { 'range(' description ')' } ')'  'AnnotationProperty(' annotationPropertyID { annotation } ')'  'OntologyProperty(' ontologyPropertyID { annotation } ')'
axiom ::= 'EquivalentProperties(' datavaluedPropertyID datavaluedPropertyID { datavaluedPropertyID } ')'  'SubPropertyOf(' datavaluedPropertyID datavaluedPropertyID ')'  'EquivalentProperties(' individualvaluedPropertyID individualvaluedPropertyID { individualvaluedPropertyID } ')'  'SubPropertyOf(' individualvaluedPropertyID individualvaluedPropertyID ')'
Recall that the semantics of frame formulas in DLrulesets is different from the semantics of frame formulas in RIF BLD.
Frame formulas in DLrulesets are embedded as predicates in RIF BLD.
The mapping tr is the identity mapping on all RIF formulas, with the exception of frame formulas.
RIF Construct  Mapping 

Term x  tr(x)=x 
Atomic formula x that is not a frame formula  tr(x)=x 
a[b > c], where a,c are terms and b ≠ rdf:type is a constant  tr(a[b > c])=b'(a,c), where b' is a constant symbol obtained from b that does not occur in the original ruleset or the ontologies 
a[rdf:type > c], where a is a term and c is a constant  tr(a[rdf:type > c])=c'(a), where c' is a constant symbol obtained from c that does not occur in the original ruleset or the ontologies 
Exists ?V1 ... ?Vn(φ)  tr(Exists ?V1 ... ?Vn(φ))=Exists ?V1 ... ?Vn(tr(φ)) 
And(φ_{1} ... φ_{n})  tr(And(φ_{1} ... φ_{n}))=And(tr(φ_{1}) ... tr(φ_{n})) 
Or(φ_{1} ... φ_{n})  tr(Or(φ_{1} ... φ_{n}))=Or(tr(φ_{1}) ... tr(φ_{n})) 
φ_{1} : φ_{2}  tr(φ_{1} : φ_{2})=tr(φ_{1}) : tr(φ_{2}) 
Forall ?V1 ... ?Vn(φ)  tr(Forall ?V1 ... ?Vn(φ))=Forall ?V1 ... ?Vn(tr(φ)) 
Ruleset(φ_{1} ... φ_{n})  tr(Ruleset(φ_{1} ... φ_{n}))=Ruleset(tr(φ_{1}) ... tr(φ_{n})) 
The embedding of OWL DLP into RIF BLD has two stages: normalization and embedding.
Normalization splits the OWL axioms so that the mapping of the individual axioms results in rules. Additionally, it simplifies the abstract syntax and removes annotations.
Editor's Note: Embedding OWLDLannotation semantics would require maintaining the annotation properties.
Complex OWL  Normalized OWL  

tr_{N}(
Ontology( [ ontologyID ]
directive_{1}
...
directive_{n} )
) 
tr_{N}(directive_{1})
...tr_{N}(directive_{n}) 

tr_{N}(Annotation( ... ))  
tr_{N}(
Individual( individualID
annotation_{1}
...
annotation_{n}
type_{1}
...
type_{m}
value_{1}
...
value_{k} )
) 
tr_{N}(Individual( individualID type_{1} )) ... tr_{N}(Individual( individualID type_{m} )) Individual( individualID value_{1} )
...
Individual( individualID value_{k} )


tr_{N}(
Individual( individualID
type(intersectionOf(
description_{1}
...
description_{n}
))
) 
tr_{N}(Individual( individualID type(description_{1}) )) ... tr_{N}(Individual( individualID type(description_{n}) )) 

tr_{N}(
Individual( individualID type(X))) 
Individual( individualID type(X)) 
X is a classID or value restriction 
tr_{N}(
Individual( individualID type(restriction(propertyID allValuesFrom(X))))) 
tr_{N}(
SubClassOf( oneOf(individualID) restriction(propertyID allValuesFrom(X))) ) 

tr_{N}(
Class( classID [Deprecated]
complete
annotation_{1}
...
annotation_{n}
description_{1}
...
description_{m} )
) 
tr_{N}( EquivalentClasses(classID
intersectionOf(description_{1}
...
description_{m} )
) 

tr_{N}(
Class( classID [Deprecated]
partial
annotation_{1}
...
annotation_{n}
description_{1}
...
description_{m} )
) 
tr_{N}( SubClassOf(classID
intersectionOf(description_{1}
...
description_{m} )
) 

tr_{N}(
DisjointClasses(
description_{1}
...
description_{m} )
) 
tr_{N}(SubClassOf(intersectionOf(description_{1}
description_{2}) owl:Nothing))
... tr_{N}(SubClassOf(intersectionOf(description_{1} description_{m}) owl:Nothing)) ... tr_{N}(SubClassOf(intersectionOf(description_{m1} description_{m}) owl:Nothing)) 

tr_{N}(
EquivalentClasses(
description_{1}
...
description_{m} )
) 
tr_{N}(SubClassOf(description_{1} description_{2})) tr_{N}(SubClassOf(description_{2} description_{1})) ... tr_{N}(SubClassOf(description_{m1} description_{m})) tr_{N}(SubClassOf(description_{m} description_{m1})) 

tr_{N}(
SubClassOf(description X)) 
SubClassOf(description X) 
X is a description that does not contain intersectionOf 
tr_{N}(
SubClassOf(description
...intersectionOf(
description_{1}
...
description_{n}
)...)
) 
tr_{N}(SubClassOf(description ...description_{1}...)) ... tr_{N}(SubClassOf(description ...description_{n}...)) 

tr_{N}(Datatype( ... ))  
tr_{N}(
DatatypeProperty( propertyID [ Deprecated ]
annotation_{1}
...
annotation_{n}
super(superproperty_{1})
...
super(superproperty_{m})
domain(domaindescription_{1})
...
domain(domaindescription_{j})
range(rangedescription_{1})
...
range(rangedescription_{k}) )
) 
SubPropertyOf(propertyID superproperty_{1})
...
SubPropertyOf(propertyID superproperty_{m})
tr_{N}(SubClassof(restriction(propertyID someValuesFrom(owl:Thing)) domaindescription_{1})) ... tr_{N}(SubClassof(restriction(propertyID someValuesFrom(owl:Thing)) domaindescription_{j})) tr_{N}(SubClassof(owl:Thing restriction(propertyID allValuesFrom(rangedescription_{1}))) ... tr_{N}(SubClassof(owl:Thing restriction(propertyID allValuesFrom(rangedescription_{k}))) 

tr_{N}(
ObjectProperty( propertyID [ Deprecated ]
annotation_{1}
...
annotation_{n}
super(superproperty_{1})
...
super(superproperty_{m})
[ inverseOf( inversePropertyID ) ]
[ Symmetric ]
[ Transitive ]
domain(domaindescription_{1})
...
domain(domaindescription_{l})
range(rangedescription_{1})
...
range(rangedescription_{k}) )
) 
SubPropertyOf(propertyID superproperty_{1})
...
SubPropertyOf(propertyID superproperty_{m})
tr_{N}(SubClassof(restriction(propertyID someValuesFrom(owl:Thing)) domaindescription_{1})) ... tr_{N}(SubClassof(restriction(propertyID someValuesFrom(owl:Thing)) domaindescription_{l})) tr_{N}(SubClassof(owl:Thing restriction(propertyID allValuesFrom(rangedescription_{1}))) ... tr_{N}(SubClassof(owl:Thing restriction(propertyID allValuesFrom(rangedescription_{k}))) ObjectProperty( propertyID [ inverseOf( inversePropertyID ) ] ) ObjectProperty( propertyID [ Symmetric ] ) ObjectProperty( propertyID [ Transitive ] ) 

tr_{N}(
EquivalentProperties(
property_{1}
...
property_{m} )
) 
tr_{N}(SubPropertyOf(property_{1} property_{2})) tr_{N}(SubPropertyOf(property_{2} property_{1})) ... tr_{N}(SubPropertyOf(property_{m1} property_{m})) tr_{N}(SubPropertyOf(property_{m} property_{m1})) 
The result of the normalization is a set of individual property value, individual typing, subclass, subproperty, and property inverse, symmetry and transitive statements.
We now proceed with the embedding of normalized OWL DL ontologies into a RIF DLruleset. The embedding extends the embedding function tr. The embeddings of IRIs and literals is as defined in the Section Embedding Symbols.
Editor's Note: This embedding assumes that for a given datatype identifier D, there is unary builtin predicate isD, called the "positive guard" for D, which is always interpreted as the value space of the datatype denoted by D and there is a builtin isNotD, called the "negative guard" for D, which is always interpreted as the complement of the value space of the datatype denoted by D.
Normalized OWL  RIF DLruleset  

tr_{O}(
directive_{1}
...
directive_{n}
) 
tr_{O}(directive_{1})
...tr_{O}(directive_{n}) 

tr_{O}(
Individual( individualID type(A) )) 
tr(individualID)[rdf:type > tr(A)] 
A is a classID 
tr_{O}(
Individual( individualID type(restriction(propertyID value(b))) )) 
tr(individualID)[tr(propertyID) > tr(b)] 

tr_{O}(
Individual( individualID value(propertyID b) )) 
tr(individualID)[tr(propertyID) > tr(b)] 

tr_{O}(
SubPropertyOf(property_{1} property_{2})
) 
Forall ?x, ?y (?x[tr(property_{2}) > ?y] : ?x[tr(property_{1}) > ?y]) 

tr_{O}(
ObjectProperty(propertyID)) 

tr_{O}(
ObjectProperty(property_{1}
inverseOf(property_{2}) )
) 
Forall ?x, ?y (?y[tr(property_{2}) > ?x] : ?x[tr(property_{1}) > ?y]) Forall ?x, ?y (?y[tr(property_{1}) > ?x] : ?x[tr(property_{2}) > ?y]) 

tr_{O}(
ObjectProperty(propertyID Symmetric )) 
Forall ?x, ?y (?y[tr(propertyID) > ?x] : ?x[tr(propertyID) > ?y]) 

tr_{O}(
ObjectProperty(propertyID Transitive )) 
Forall ?x, ?y, ?z (?x[tr(propertyID) > ?z] : And( ?x[tr(propertyID) > ?y] ?y[tr(propertyID) > ?z])) 

tr_{O}(
SubClassOf(description_{1} description_{2})
) 
tr_{O}(description_{1},description_{2},?x) 

tr_{O}(description_{1},X,?x) 
Forall ?x (tr_{O}(X, ?x) : tr_{O}(description_{1}, ?x ) 
X is a classID or value restriction 
tr_{O}(description_{1},D,?x) 
Forall ?x (tr_{O}(owl:Nothing, ?x) : And( isNotD(?x) tr_{O}(description_{1}, ?x ) ) 
D is a datatypeID and isNotD is the "negative guard" for D 
tr_{O}(description_{1},restriction(property_{1} allValuesFrom(...restriction(property_{n} allValuesFrom(X)) ...)),?x) 
Forall ?x, ?y_{1}, ..., ?y_{n} (tr_{O}(X, ?y_{n}) : And( tr_{O}(description_{1}, ?x)?x[tr(property_{1}) > ?y_{1}] ?y_{1}[tr(property_{2}) > ?y_{2}] ... ?y_{n1}[tr(property_{n}) > ?y_{n}])) 
X is a classID or value restriction 
tr_{O}(description_{1},restriction(property_{1} allValuesFrom(...restriction(property_{n} allValuesFrom(D)) ...)),?x) 
Forall ?x, ?y_{1}, ..., ?y_{n} (tr_{O}(owl:Nothing, ?y_{n}) : And( tr_{O}(description_{1}, ?x)?x[tr(property_{1}) > ?y_{1}] ?y_{1}[tr(property_{2}) > ?y_{2}] ... ?y_{n1}[tr(property_{n}) > ?y_{n}] isNotD(?y_{n}))) 
D is a datatypeID or value restriction 
tr_{O}(A,?x) 
?x[rdf:type > tr(A)] 
A is a classID 
tr_{O}(D,?x) 
isD(?x) 
D is a datatypeID and isD is the "guard" for the datatype 
tr_{O}(intersectionOf(description_{1} ... description_{n}, ?x) 
And(tr_{O}(description_{1}, ?x) ... tr_{O}(description_{n}, ?x)) 

tr_{O}(unionOf(description_{1} ... description_{n}, ?x) 
Or(tr_{O}(description_{1}, ?x) ... tr_{O}(description_{n}, ?x)) 

tr_{O}(oneOf(value_{1} ... value_{n}, ?x) 
Or( ?x = tr_{O}(value_{1}) ... ?x = tr_{O}(value_{n})) 

tr_{O}(restriction(propertyID someValuesFrom(description)), ?x) 
Exists ?y(And(?x[tr(propertyID) > ?y] tr_{O}(description, ?y) )) 

tr_{O}(restriction(propertyID value(valueID)), ?x) 
?x[tr(propertyID) > tr(valueID) ] 

tr_{O}(owl:Thing, ?x) 
?x = ?x 

tr_{O}(owl:Nothing, ?x) 
"1"^^xsd:integer="2"^^xsd:integer 
Theorem A RIFOWLDLcombination <R,{O_{1},...,O_{n}}>, where O_{1},...,O_{n} are OWL DLP ontologies, is OWLDLsatisfiable iff tr(R union tr_{O}(tr_{N}(O_{1})) union ... union tr_{O}(tr_{N}(O_{n}))) has a model.
Theorem An OWLDLsatisfiable RIFOWLDLcombination C=<R,{O_{1},...,O_{n}}>, where O_{1},...,O_{n} are OWL DLP ontologies, OWLDLentails a closed RIF condition φ iff tr(R union tr_{O}(tr_{N}(O_{1})) union ... union tr_{O}(tr_{N}(O_{n}))) entails φ.
RDF URI References: There are certain RDF URI references that are not absolute IRIs (e.g., those containing spaces). It is possible to use such RDF URI references in RDF graphs that are combined with RIF rules. However, such URI references cannot be represented in RIF rules and their use in RDF is discouraged.
Generalized RDF graphs: Standard RDF graphs, as defined in (RDFConcepts), do not allow the use of literals in subject and predicate positions and blank nodes in predicate positions. The RDF Core working group has listed two issues questioning the restrictions that literals may not occur in subject and blank nodes may not occur in predicate positions in triples. Anticipating lifting of these restrictions in a possible future version of RDF, we use the more liberal notion of generalized RDF graph. We note that the definitions of interpretations, models, and entailment in the RDF semantics document (RDFSemantics) also apply to such generalized RDF graphs.
We note that every standard RDF graph is a generalized RDF graph. Therefore, our definition of combinations applies to standard RDF graphs as well.
We note also that the notion of generalized RDF graphs is more liberal than the notion of RDF graphs used by SPARQL; generalized RDF graphs additionally allow blank nodes and literals in predicate positions.