W3C

Using RIF with RDF and OWL

W3C Editor's Draft 19 October, 2007

This version:
http://www.w3.org/2005/rules/wg/swc/draft-2007-10-19
Editors:
Jos de Bruijn (Free University of Bozen/Bolzano)

Abstract

Rules interchanged using the Rule Interchange Format RIF may depend on RDF data and/or RDF Schema or OWL data models. This document, developed by the Rule Interchange Format (RIF) Working Group, specifies compatibility of RIF with the Semantic Web languages RDF and RDFS. A future version will address compatibility with OWL.

Status of this Document

May Be Superseded

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/.

Please Comment By ASAP

Working Group participants please send comments as soon as possible, for a 30 October publication decision. There may be new editor's drafts before then.

No Endorsement

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.

Patents

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.


Table of Contents

1. Overview of Semantic Web Compatibility

(Editor's Note: This text is maintained on wiki page Overview of Semantic Web Compatibility).

The Rule Interchange Format (RIF), specifically the Basic Logic Dialect (BLD) [RIF-BLD], defines a means for the interchange of (logical) rules over the Web. Rules which are exchanged using RIF may refer to external data sources and may be based on certain data models, which are expressed using a language different from RIF. The Resource Description Framework RDF [RDF-Concepts] is a Web-based language for the representation and exchange of data; RDF Schema (RDFS) [RDF-Schema] and the Web Ontology Language OWL [OWL-Reference] are Web-based languages for the representation and exchange of ontologies (i.e. data models). This document specifies how RIF BLD Rule sets are combined with RDF data and RDFS ontologies; a future version will address combination with OWL ontologies.

The RIF working group plans to develop further dialects beyond BLD, for example, a dialect based on Production Rules. Future versions of this document will address compatibility of these dialects with RDF and OWL as well. In the remainder of the document, when mentioning RIF, we mean RIF BLD [RIF-BLD].

Both RDF data and RDFS ontologies are represented using RDF graphs. Several syntaxes have been proposed for the exchange of RDF graphs, the normative syntax being RDF/XML [RDF-Syntax], which is an XML-based format. RIF does not provide a format for exchanging RDF; rather, it is assumed that RDF graphs are exchanged using RDF/XML, or any other syntax which can be used for representing RDF graphs.

A typical scenario for the use of RIF with RDF includes the exchange of rules which either use RDF data, or which use an RDFS ontology. In terms of rule interchange the scenario is the following: interchange partner A has a rules language which is RDF-aware, i.e. it allows to use RDF data, its uses an RDFS ontology, or it extends RDF(S). A sends its rules (using RIF), with a reference to the appropriate RDF graph(s) to partner B. B can now translate the RIF rules into its own rules language, retrieve the RDF graph(s) (which is published most likely using RDF/XML), and process the rules in its own rule engine, which is also RDF-aware. The use case Vocabulary Mapping for Data Integration [RIF-UCR] is an example of the interchange of RIF rules related to RDF graphs.

A specific kind of interchange is the publication of RIF rules which refer to RDF graphs. In such a scenario, a rule publisher A publishes its rules on the Web. There may be several consumers who retrieve the RIF rules and RDF graphs from the Web, and translate the RIF rules to their own rules languages. The use case Publishing Rules for Interlinked Metadata [RIF-UCR] is an example of the publication of RIF rules related to RDF graphs.

Future versions of this document are expected to address the use case Interchanging Rule Extensions to OWL [RIF-UCR].

An RIF rule set which refers to RDF graphs, or any use of an RIF rule set with RDF graphs, is viewed as a combination of an RIF rule set and a number of RDF graphs. This document specifies how, in such a combination, the rule set interacts with the RDF graphs. With "interaction" we mean the conditions under which the combination is satisfiable, and the entailments defined for the combination. The interaction between RIF and RDF is realized by connecting the model theories of RIF (specified in [RIF-BLD]) and RDF (specified in [RDF-Semantics]).

Since [RDF-Semantics] specifies 4 notions of entailment, we specify the interaction between RIF and RDF for all 4 cases.

  • *** Currently, this document only defines how combinations of RIF rule sets and RDF graphs should be interpreted; it does not suggest how references to RDF graphs are specified in RIF, nor does it specify which of the RDF entailment regimes (simple, RDF, RDFS, or D) should be used. The preliminary suggestion for the specification of combinations, as well as entailment regimes, through meta data in RIF rule sets was formulated in a preliminary section in the architecture document. Note that no agreement has yet been reached on this issue, and that especially the issue of the specification of entailment regimes is controversial (see http://lists.w3.org/Archives/Public/public-rif-wg/2007Jul/0030.html and the ensuing thread). ***

In the Appendix: Embeddings we describe how reasoning with combinations of RIF rules with RDF graphs can be reduced to reasoning with RIF rule sets. This reduction can be seen as a guide for interchange partners which do not have RDF-aware rule systems, but still want to be able to process RIF rules which refer to RDF graphs. In terms of the scenario above: if the interchange partner B does not have an RDF-aware rule system, but B can process RIF rules, then the appendix explains how the rule system could be used for processing combinations.

2. RDF Compatibility

(Editor's Note: This text is maintained on wiki page RDF Compatibility).

This section defines combinations of RIF rules with RDF graphs, taking into account the various (normative) entailment regimes defined by RDF.

Four semantics are defined for the combination, corresponding to the simple, RDF, RDFS, and D (datatype) entailment regimes of RDF.

Combinations are pairs of RIF rule sets and sets 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.

2.1. Syntax

(Editor's Note: This text is maintained on wiki page Syntax).

This section defines the correspondence between names in RDF vocabularies and symbols in the set of RIF constant symbols Const.

An RDF vocabulary V consists of sets of names:

  • absolute IRIs VU, (correspond to the Concepts and Abstract Syntax term "RDF URI reference")

  • plain literals VPL (i.e. character strings with an optional language tag), and

  • typed literals VTL (i.e. pairs of character strings and datatype IRIs).

The syntax of the names in these sets is defined in RDF Concepts and Abstract Syntax [RDF-Concepts].

*** Note that there are certain RDF URI references which are not absolute IRIs (e.g. those containing spaces). It is possible to use such RDF URI references in RDF graphs in combinations with RIF. However, such URI references cannot be written in RIF rules and their use in RDF is discouraged. ***

Given an RDF vocabulary V and a set of blank nodes B, disjoint from the symbols in V, an RDF graph is a set of RDF triples s p o ., where s is either a blank node or an IRI, p is an IRI, and o is a blank node, an IRI, a plain literal, or a typed literal; see also the section on RDF graphs in [RDF-Concepts].

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 define the notion of generalized RDF graph. We note that the definitions in the RDF semantics document [RDF-Semantics] immediately apply to such generalized RDF graphs.

Given an RDF vocabulary V and a set of blank nodes B, disjoint from the symbols in V, a generalized RDF graph is a set of generalized RDF triples s p o ., where s, p and o are blank nodes, IRIs, plain literals, or typed literals.

  • *** Note that our notion of generalized RDF graphs is more liberal than the notion of RDF graphs used by SPARQL; we additionally allow blank nodes and literals in predicate positions. ***

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 XML content datatype (identified with rdf:XMLLiteral). Furthermore, RDF allows to express typed literals such that the literal string is not in the lexical space of the datatype; such literals are called ill-typed literals. RIF, on the contrary, recognizes a number of different data types, and does not allow to express ill-typed literals.

A datatype map is a mapping from IRIs to datatypes. TODO: map notions in RIF to notion of datatype map; define notion of "conforming" datatype map

In order to ensure that typed literals are interpreted according to the datatypes recognized by RIF, which include the datatypes recognized by RDF and RDFS, we define the notions of well-typed and ill-typed literal relative to the data types recognized by RIF.

Given a conforming datatype map D, a typed literal (s, d) is a well-typed literal if

  1. d is in the domain of D and s is in the lexical space of D(d), or

  2. d is the IRI of a symbol space defined by RIF and s is in the lexical space of the symbol space,

  3. d is not in the domain of D and is not a symbol space defined by RIF.

Otherwise (s, d) is an ill-typed literal.

In contrast to RDF, rules in RIF use symbols from a fixed set of RIF symbols. So, the vocabulary of every RIF rule set is the same set of symbols Const. Similar to typed literals in RDF, symbols in RIF are pairs of Unicode character strings and symbol space IRIs. IRIs themselves are symbols in the rif:iri symbol space, e.g. the IRI http://www.w3.org/2007/rif is represented in RIF with a symbol in the symbol space rif:iri: "http://www.w3.org/2007/rif"^^rif:iri.

We define the RIF equivalent of the RDF names, given an RDF vocabulary V.

VU* is obtained from VU by replacing every IRI http://... in VU with "http://..."^^rif:iri.

VPL* is obtained from VPL by replacing plain literals of the form "abc" with "abc"^^xsd:string, replacing plain literals of the form "abc"@lang with "abc@lang"^^rif:text, and discarding any ill-typed literals.

  • *** The value space of RDF plain literals without language tags consists of all Unicode strings. Both in the current specification of XML schema datatypes and in the current working draft of XML schema 1.1 data types the value space of the string datatype is restricted to the sequences of Unicode characters excluding the surrogate blocks, FFFE, and FFFF; these characters are not actual Unicode characters, but rather reserved codes in UTF-16 encoding. There are some further differences between the specification of the string datatype in XML schema 1.0 and XML schema 1.1; in the former case, the datatype is based on the Char production in XML 1.0; in the latter case, the datatype is based on the Char production in XML 1.1; so, the string datatype in 1.1 is a superset of the string datatype in 1.0. All in all, it appears that the value space of the string datatype in XML Schema 1.1 is a superset of the value space of the RDF plain literals without language tags, but there are RDF plain literals which are not strings in XML Schema 1.0. So, if RIF speaks with the XML Schema 1.0 data types, then we have an issue here. See also http://lists.w3.org/Archives/Public/public-rif-wg/2007Sep/0002.html and the subsequent messages in the thread. ***

VTL* is obtained from VTL by removing all ill-typed literals, i.e., all literals of the form (s, d) such that the string s is not in the lexical space of the symbol space d.

  • *** (ill-typed literals) There is no notion in RIF which corresponds to RDF ill-typed literals. So, it is not possible to write ill-typed literals in RIF rules. It is, however, possible to use ill-typed literals in RDF graphs in combinations with RIF rules. ***

    *** The correspondence between ill-typed literals and IRIs of a specific form has been removed. It is now no longer possible to name ill-typed literals in the RIF rules. ***

    *** (blank nodes) It was not necessary to define corresponding symbols for blank nodes, because blank nodes are interpreted locally in an RDF graph. The equivalent of blank nodes in RIF are existentially quantified variables in the body of the rule. For some considerations on the use of blank nodes in rules and exchanging RDF rule languages, see the preliminary section in the architecture document. ***

    *** The definitions of VU*, VPL*, and VTL* are not really necessary, and might be removed. They have no purpose, except to clarify the correspondence between symbols. This clarification might also be done in another way. ***

An RIF-RDF combination is a tuple C=< R,S>, where R is a Rule set and S is a set of RDF graphs of a vocabulary V. When clear from the context, we refer to RIF-RDF combinations simply as combinations.

  • *** Note that RIF BLD Rule sets are defined with respect to a fixed vocabulary Const, which is a superset of the union of VU*, VPL*, and VTL*, by definition. ***

In RIF-RDF combinations, 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.

2.2. Semantics

(Editor's Note: This text is maintained on wiki page Semantics).

The semantics of both RIF and RDF is defined in terms of a model-theoretic semantics. Hence, the semantics of combinations is defined through a combination of the two semantics, in terms of common models. These models are then used to define entailment in the usual way. Combined entailment extends of entailment in RIF and entailment in RDF.

The RDF Semantics document [RDF-Semantics] defines 4 (normative) kinds of interpretations: simple interpretations (which do not pose any conditions on the RDF and RDFS vocabularies), RDF interpretations (which impose additional conditions on the RDF vocabulary), RDFS interpretations (which impose additional conditions on the RDFS vocabulary), and D-interpretations (which impose additional conditions on the treatment of datatypes, relative to a datatype map D).

2.2.1. Common Interpretations

We define the notion of common interpretation, which is an interpretation of both an RIF rule set and an RDF graph. This common interpretation is the basis for the semantic definitions in the following sections.

The correspondence between RIF semantic structures and RDF interpretations is defined through a number of conditions which 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..

As defined in [RDF-Semantics], a simple interpretation of a vocabulary V is a tuple I=< IR,IP,IEXT,IS,IL,LV >, where

  • IR is a non-empty set of resources (the domain),
  • IP is a set of properties,
  • IEXT is an extension function, which is a mapping from IP into the power set of IR x IR,
  • IS is a mapping from IRIs in V into (IR union IP),

  • IL is a mapping from typed literals in V into IR, and

  • LV is the set of literal values, which is a subset of IR, and includes all plain literals in V.

Rdf-, rdfs-, and D-interpretations are simple interpretations which satisfy certain conditions:

  • A simple interpretation I of a vocabulary V is an rdf-interpretation if V includes the RDF vocabulary and the conditions on rdf-interpretations described in [RDF-Semantics] hold for I.

  • An rdf-interpretation I of a vocabulary V is an rdfs-interpretation if V includes the RDFS vocabulary and the conditions on rdfs-interpretations described in [RDF-Semantics] hold for I.

  • Given a datatype map D, an rdfs-interpretation I of a vocabulary V is a D-interpretation if V includes the IRIs in the domain of D and the conditions on each of the <IRI, datatype> pairs in D described in [RDF-Semantics] hold in I.

As defined in [RIF-BLD], a semantic structure is a tuple of the form I = <D,IC, IV, IF, IR, Islot, ISF, ISR, Isub, Iisa>. We restrict our attention here to D, IC, IV, and Islot. The other mappings which are parts of a semantic structure are not used in the definition of combinations.

  • D is a non-empty set (the domain),

  • IC is a mapping from Const to D,

  • IV is a mapping from Var to D, and

  • Islot is a mapping from D to truth-valued functions of the form D × DTV.

Note that, in RIF, given a conforming datatype map D, the value spaces of all datatypes in the range of D are subsets of D.

Given a conforming datatype map D, a common interpretation is a combination of an RIF semantic structure and an RDF interpretation (I = <D,IC, IV, IF, IR, Islot, ISF, ISR, Isub, Iisa>, I=<IR, IP, IEXT, IS, IL, LV>) such that the following conditions hold:

  1. IR is a subset of D;

  2. IP is a superset of the set of all k in D such that there exist a, b in D and Islot(k)(a,b)=t (i.e. the truth value of Islot(k)(a,b) is true);

  3. (IR union IP) = D;

  4. LV is a superset of (D intersection (union of all value spaces in the range of D));

  5. IEXT(k) = the set of all pairs (a, b), with a, b in D, such that Islot(k)(a,b)=t, for every k in D;

  6. IS(i) = IC("i"^^rif:iri) for every absolute IRI i in VU;

  7. IL((s, d)) = IC("s"^^d) for every well-typed literal (s, d) in VTL.

    *** (explanation of the conditions) RDF makes a distinction between the sets of resources and properties; RIF does not. Condition 1 ensures that all resources in an RDF interpretation correspond to elements in the RIF domain. Condition 2 ensures that the set of properties at least includes all elements which are used as properties in the RIF domain. Condition 3 ensures that the combination of resources and properties corresponds exactly to the RIF domain; note that if I is an rdf- or rdfs-interpretation, IP is a subset of IR, and thus IR=D. Condition 4 ensures that all literal values in D are included in LV. Condition 5 ensures that RDF triples are interpreted in the same way as properties frames. Condition 6 ensures that IRIs are interpreted in the same way. Finally, condition 7 ensures that typed literals are interpreted in the same way. Note that no correspondences are defined for the mapping of names in RDF which are not symbols of RIF, e.g. ill-typed literals and RDF URI references which are not absolute IRIs. ***

    *** Alternatively, IR could be required to be equal to D. This will already be the case for RDF and RDFS entailment, because IP is required to be a subset of IR. However, in simple entailment IP is not required to be a subset of IR. Another possibility would be to additionally require IR to be a superset of D\IP, although it is at this point is not entirely clear what this would buy us. ***

2.2.2. Satisfaction and Models

We now define the notion of satisfiability for common interpretations, i.e. the conditions under which a common interpretation (I, I) is a model of a combination C=< R,S>. We define notions of satisfiability for all 4 entailment regimes of RDF (simple, RDF, RDFS, and D). The definitions are all analogous. Intuitively, a common interpretation (I, I) satisfies a combination C=< R,S> if I satisfies R and I satisfies S.

A common interpretation (I, I) simple satisfies an RIF-RDF combination C=< R,S> if I satisfies R, I is a simple interpretation, and I satisfies every RDF graph S in S; in this case (I, I) is called a simple model, or model, of C, and C is satisfiable.

Rdf-, rdfs-, and D-satisfiability are defined through additional restrictions on I:

  • A model (I, I) of C rdf-satisfies C if I is an rdf-interpretation; in this case (I, I) is called an rdf-model of C, and C is rdf-satisfiable.

  • A model (I, I) of C rdfs-satisfies C if I is an rdfs-interpretation; in this case (I, I) is called an rdfs-model of C, and C is rdfs-satisfiable.

  • Given a conforming datatype map D, a model (I, I) of C D-satisfies C if I is a D-interpretation; in this case (I, I) is called a D-model of C, and C is D-satisfiable.

2.2.3. Entailment

Using the notions of models defined above, we define entailment in the usual way, i.e. through inclusion of sets of models.

  • A combination C1 simple-entails a combination C2 if every simple model of C1 is a model of C2.

  • A combination C1 rdf-entails a combination C2 if every rdf-model of C1 is a model of C2.

  • A combination C1 rdfs-entails a combination C2 if every rdfs-model of C1 is a model of C2.

  • A combination C1 D-entails a combination C2 if every D-model of C1 is a model of C2.

3. References

(Editor's Note: This text is maintained on wiki page References).

3.1. Normative References

[RDF-CONCEPTS]

Resource Description Framework (RDF): Concepts and Abstract Syntax, G. Klyne, J. Carroll (Editors), W3C Recommendation, 10 February 2004, http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/. Latest version available at http://www.w3.org/TR/rdf-concepts/.

[RDF-SEMANTICS]

RDF Semantics, P. Hayes, Editor, W3C Recommendation, 10 February 2004, http://www.w3.org/TR/2004/REC-rdf-mt-20040210/. Latest version available at http://www.w3.org/TR/rdf-mt/.

[RIF-BLD]

RIF Basic Logic Dialect, H. Boley, M. Kifer (Editors), W3C Editors Draft, http://www.w3.org/2005/rules/wg/wiki/Core. Latest version available at http://www.w3.org/2005/rules/wg/wiki/Core.

3.2. Informational References

[RDF-Schema]

RDF Vocabulary Description Language 1.0: RDF Schema, D. Brickley, R.V. Guha, Editors, W3C Recommendation, 10 February 2004, http://www.w3.org/TR/2004/REC-rdf-schema-20040210/. Latest version available at http://www.w3.org/TR/rdf-schema/.

[RDF-SYNTAX]

RDF/XML Syntax Specification (Revised), D. Beckett, Editor, W3C Recommendation, 10 February 2004, http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/. Latest version available at http://www.w3.org/TR/rdf-syntax-grammar/.

[RFC-3066]

RFC 3066 - Tags for the Identification of Languages, H. Alvestrand, IETF, January 2001. This document is http://www.isi.edu/in-notes/rfc3066.txt.

[RIF-UCR]

RIF Use Cases and Requirements, A. Ginsberg, D. Hirtle, F. McCabe, P.-L. Patranjan (Editors), W3C Working Draft, 10 July 2006, http://www.w3.org/TR/2006/WD-rif-ucr-20060710/. Latest version available at http://www.w3.org/TR/rif-ucr.

[OWL-Reference]

OWL Web Ontology Language Reference, M. Dean, G. Schreiber, Editors, W3C Recommendation, 10 February 2004, http://www.w3.org/TR/2004/REC-owl-ref-20040210/. Latest version available at http://www.w3.org/TR/owl-ref/.

[XML-SCHEMA2]

XML Schema Part 2: Datatypes, W3C Recommendation, World Wide Web Consortium, 2 May 2001. This version is http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/. Latest version available at http://www.w3.org/TR/xmlschema-2/.

4. Appendix: Embeddings

(Editor's Note: This text is maintained on wiki page Appendix: Embeddings).

RIF-RDF combinations can be embedded into RIF Rule sets in a fairly straightforward way, thereby demonstrating how an RIF-compliant translator without native support for RDF can process RIF-RDF combinations.

For the embedding we use the concrete syntax of RIF and the N-Triples syntax for RDF.

Throughout this section the function tr is defined, which maps symbols, triples, and RDF graphs to RIF symbols, statements, and rule sets.

4.1. Embedding Symbols

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 VU

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 VPL

Constant with the datatype xsd:string

tr("xxx") = "xxx"^^xsd:string

Plain literal with a language tag (xxx,lang) in VPL

Constant with the datatype rif:text

tr("xxx"@lang) = "xxx@lang"^^rif:text

Well-typed literal (s,u) in VTL

Constant with the symbol space u

tr("s"^^u) = "s"^^u

Ill-typed literal (s,u) in VTL

Constant s^^u' with symbol space rif:local which is not used in C

tr("s"^^u) = "s^^u'"^^rif:local

The embedding is not defined for combinations which include RDF graphs with RDF URI references which are not absolute IRIs.

4.2. Embedding Triples and Graphs

The mapping function tr is extended to embed triples as RIF statements. Finally, two embedding functions, trR and trQ embed RDF graphs as RIF rule sets 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 (trR) in which variables are Skolemized, i.e. replaced with constant symbols, and one (trQ) in which variables are existentially quantified.

The function sk takes as arguments a formula R with variables, and returns a formula R', which is obtained from R by replacing every variable symbol ?x in R with "new-iri"^^rif:iri, where new-iri is a new globally unique IRI.

  • *** alternatively, sk could be defined to replace variables with new globally unique constants with the datatype rif:bNode, as proposed by DaveReynolds. However, as this embedding is only used for reasoning, I (JosDeBruijn) don't think this is necessary. This datatype might be necessary for the exchange of RDF rule languages; see the corresponding preliminary section in the architecture document. ***

RDF Construct

RIF Construct

Mapping

Triple s p o .

Property frame tr(s)[tr(p) -> tr(o)]

tr(s p o .) = tr(s)[tr(p) -> tr(o)]

Graph S

Rule set trR(S)

trR(S) = the set of all sk(Forall tr(s p o .)) such that s p o . is a triple in S

Graph S

Condition (query) trQ(S)

trQ(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

4.3. Embedding Simple Entailment

The following theorem shows how checking simple-entailment 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 C1=<R1,{S1,...,Sn}> simple-entails a combination C2=<c,{T1,...,Tm}>, where c is a condition, iff (R1 union trR(S1) union ... union trR(Sn)) entails c, trQ(T1),..., and trQ(Tm).

4.4. Built-ins required

The embeddings of RDF and RDFS entailment require a number of built-in predicate symbols to be available to appropriately deal with literals.

  • *** Alternatively, these predicates might be axiomatized. However, as this requires a large number of facts, we deem such axiomatization undesirable. ***

Given a vocabulary V,

  • the unary predicate wellxmlV/1 is interpreted as the set of XML values,

  • the unary predicate illxmlV/1 is interpreted as the set of objects corresponding to ill-typed XML literals in VTL, and

  • the unary predicate illDV/1 is interpreted as the set of objects corresponding to ill-typed literals in VTL, and

  • the unary predicate lit/1 is interpreted as the union of the value spaces of all data types.

    *** Depending on the built-in predicates which will eventually be available in RIF (BLD), the suggested built-in predicates might not be necessary. ***

4.5. Embedding RDF Entailment

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/22-rdf-syntax-ns#type"^^rif:iri

RRDF

=

(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]),

Forall ?x ?x[rdf:type -> rdf:XMLLiteral] :- wellxml(?x),

Forall ?x "1"^^xsd:integer="2"^^xsd:integer :- And(?x[rdf:type -> rdf:XMLLiteral] illxml(?x)))

  • *** The last rule in RRDF will cause an inconsistency whenever there is an ill typed XML literal which is of type rdf:XMLLiteral ("1"xsd:integer="2"xsd:integer is not true in every RIF BLD model). ***

Theorem A combination <R1,{S1,...,Sn}> is rdf-satisfiable iff (RRDF union R1 union trR(S1) union ... union trR(Sn)) has a model.

Theorem A combination <R1,{S1,...,Sn}> rdf-entails a combination <c,{T1,...,Tm}>, where c is a condition, iff (RRDF union R1 union trR(S1) union ... union trR(Sn)) entails c, trQ(T1),..., and trQ(Tm).

4.6. Embedding RDFS Entailment

We axiomatize the semantics of the RDF(S) vocabulary using the following RIF rules and conditions.

RRDFS

=

RRDF union

(Forall tr(s p o .)) for every RDFS axiomatic triple s p o .) union

(Forall ?x ?x[rdf:type -> rdfs:Resource],

Forall ?u,?v,?x,?y ?u[rdf:type -> ?y] :- And(?x[rdfs:domain -> ?y] ?u[?x -> ?v]),

Forall ?u,?v,?x,?y ?v[rdf:type -> ?y] :- And(?x[rdfs:range -> ?y] ?u[?x -> ?v]),

Forall ?x ?x[rdfs:subPropertyOf -> ?x] :- ?x[rdf:type -> rdf:Property],

Forall ?x,?y,?z ?x[rdfs:subPropertyOf -> ?z] :- And (?x[rdfs:subPropertyOf -> ?y] ?y[rdfs:subPropertyOf -> ?z]),

Forall ?x,?y,?z1,?z2 ?z1[y -> ?z2] :- And (?x[rdfs:subPropertyOf -> ?y] ?z1[x -> ?z2]),

Forall ?x ?x[rdfs:subClassOf -> rdfs:Resource] :- ?x[rdf:type -> rdfs:Class],

Forall ?x,?y,?z ?z[rdf:type -> ?y] :- And (?x[rdfs:subClassOf -> ?y] ?z[rdf:type -> ?x]),

Forall ?x ?x[rdfs:subClassOf -> ?x] :- ?x[rdf:type -> rdfs:Class],

Forall ?x,?y,?z ?x[rdfs:subClassOf -> ?z] :- And (?x[rdfs:subClassOf -> ?y] ?y[rdfs:subClassOf -> ?z]),

Forall ?x ?x[rdfs:subPropertyOf -> rdfs:member] :- ?x[rdf:type -> rdfs:ContainerMembershipProperty],

Forall ?x ?x[rdfs:subClassOf -> rdfs:Literal] :- ?x[rdf:type -> rdfs:Datatype],

Forall ?x ?x[rdf:type -> rdfs:Literal] :- lit(?x),

Forall ?x "1"^^xsd:integer="2"^^xsd:integer :- And(?x[rdf:type -> rdfs:Literal] illxml(?x)))

Theorem A combination <R1,{S1,...,Sn}> is rdfs-satisfiable iff (RRDFS union R1 union trR(S1) union ... union trR(Sn)) has a model.

Theorem A combination <R1,{S1,...,Sn}> rdfs-entails a combination <c,{T1,...,Tm}> iff (RRDFS union R1 union trR(S1) union ... union trR(Sn)) entails c, trQ(T1),..., and trQ(Tm).

4.7. Embedding D-Entailment

We axiomatize the semantics of the data types using the following RIF rules and conditions.

RD

=

RRDFS union

(Forall u[rdf:type -> rdfs:Datatype] | for every URI in the domain of D) union

(Forall "s"^^u[rdf:type -> "u"^^rif:iri] | for every well-typed literal (, ) in VTL) union

(Forall ?x, ?y dt(?x,?y) :- And(?x[rdf:type -> ?y] ?y[rdf:type -> rdfs:Datatype]))

  • ***Note that the existence of certain built-ins corresponding to data types (e.g. a built-in string/1 which is always interpreted as the set of xsd:strings) would simplify the axiomatization. ***

CD

=

(Exists ?x (And(?x[rdf:type -> rdfs:Literal] illD(?x)))

Theorem A combination <R1,{S1,...,Sn}>, where R1 does not contain the equality symbol, is D-satisfiable iff (RD union R1 union trR(S1) union ... union trR(Sn)) does not entail CD, 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 VTL and u' in the domain of D such that s is not in the lexical space of D(u').

  • *** Since this condition is very complex we might want to leave out this theorem, and suggest the above set of rules (RD) as an approximation of the semantics. ***

Theorem A D-satisfiable combination <R1,{S1,...,Sn}>, where R1 does not contain the equality symbol, D-entails a combination <c,{T1,...,Tm}> iff (RRDFS union R1 union trR(S1) union ... union trR(Sn)) entails c, trQ(T1),..., and trQ(Tm).

  • *** The restriction to equality-free rule sets is necessary because D-interpretations impose stronger conditions on the interpretation of typed literals in case different datatype URIs are equal than RIF does. ***

4.8. Finite Embeddings of RDF and RDFS

A disadvantage of using the axiomatization RRDF is that it is infinite, due to the fact that the RDF vocabulary is infinite. Therefore, we define a finite subset of RRDF, RRDF-, which can be used for reasoning. Note that this subset does not change the semantics; the embedding is still faithful with respect to the semantics of combinations.

RRDF- = RRDF\{Forall tr(s p o .) | s p o . is an RDF axiomatic triple of the form rdf:_i rdf:type rdf:Property ., with i a positive integer, such that rdf:_i does not occur in the context in which RRDF- is used}.

Theorem A combination <R,{S1,...,Sn}> rdf-entails a combination <c,{T1,...,Tm}> iff (RRDF- union R1 union trR(S1) union ... union trR(Sn)) entails c, trQ(T1),..., and trQ(Tm), where the context of RRDF- consists of the combinations <R1,{S1,...,Sn}> and <c,{S1,...,Sn}>.

We define a finite subset of RRDFS analogous to the definition of RRDF-.

RRDFS- = RRDFS\{Forall tr(s p o .) | s p o . is an RDF axiomatic triple of the form rdf:_i rdf:type rdf:Property ., with i a positive integer, such that rdf:_i does not occur in the context in which RRDF- is used}.

Theorem A combination <R,{S1,...,Sn}> rdfs-entails a combination <c,{T1,...,Tm}> iff (RRDFS- union R1 union trR(S1) union ... union trR(Sn)) entails c, trQ(T1),..., and trQ(Tm), where the context of 'RRDFS- consists of the combinations <R1,{S1,...,Sn}> and <c,{S1,...,Sn}>.

5. End Notes

(Editor's Note: This text is maintained on wiki page End Notes).

(No end notes at this time.)


END OF DOCUMENT. WIKI-TR diagnostics:

Warning: SGML2PL(sgml): []:2: Element "p" not allowed here
Warning: SGML2PL(sgml): []:3: Element "h1" not allowed here
Warning: SGML2PL(sgml): []:3: Inserted omitted end-tag for "h1"
Warning: SGML2PL(sgml): []:3: Ignored end-tag for "h1" which is not open
WARNING: missing previousVersion
WARNING: missing otherStatus
retreiving 'Overview'...
Done.
retreiving 'RDF-Compatibility'...
Done.
retreiving 'RDF-Syntax'...
Done.
retreiving 'RDF-Semantics'...
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Warning: SGML2PL(sgml): []:4: Inserted omitted end-tag for "strong"
Warning: SGML2PL(sgml): []:4: Ignored end-tag for "strong" which is not open
Done.
retreiving 'References'...
Done.
retreiving 'Embeddings'...
Warning: SGML2PL(sgml): []:176: Inserted omitted end-tag for "em"
Done.
retreiving 'EndNotes'...
Done.
703: syntax error