This is an archive of an inactive wiki and cannot be modified.

Guide to using RIF with the Semantic Web

This document will provide a guide to using RIF with the other Semantic Web technologies, name the RDF, SPARQL, and OWL. It will include a number of common usage patterns.

[Currently, this page is a parking lot; a structure used to be defined, and content is to be updated]

Exchanging N3-like rules

With an N3-like rule we mean a rule whose body consists of a conjunction of generalized RDF triples and whose head is a generalized RDF triple, i.e. an RDF triple where the subject, predicate, or objects may be a variable.

Whereas round-tripping was not an issue in the previously described scenario, it is an important issue here. Specifically, it is important to be able to distinguish between blank nodes, literals, variables, and URIs in the rules which are exchanged using RIF.

An N3-like rule is of the form:

(s0,p0,o0) :- (s1,p1,o1) and ... and (sn,pn,on).

Where si, pi, oi are blank nodes, literals, variables, or URIs.

A generalized triple (s,p,o) is embedded as a frame formula:

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

Literals, variables, and URIs are embedded as follows:

tr("literal") = "literal" [for a discussion on typed literals see [1]]

tr(?variable) = ?variable

tr(URI) = 'URI' [exact syntax for URIs is to be determined]

For the embedding of blank nodes there are a number of issues:

- blank nodes in the body of the rule obviously correspond to existentially quantified variables in the body, so we can use the following translation:

tr(bNode-in-rule-body) = ?variable

However, this might cause problems for round tripping, where one might want to distinguish blank nodes from variables. One possible solution is to use a specific sort for that, e.g.

tr(bNode-in-rule-body) = ?variablerif:bnode

where rif:bnode is a sub-sort of rdfs:Resource.

Using real blank nodes in the head of a rule poses problems, since existentially quantified variables are not allowed in the head of a rule in any rules language.

However, most N3-like rules languages do not allow blank nodes in the head, but rather have some kind of notion like "rigid bnode". Such a rigid bnode can be encoded using a new unique constant symbol, which is local to the rule set, i.e. combination of the rule set with another rule set, as well as entailment checking, requires renaming of all local constants. However, in this case there are similar round tripping problems as with real bnodes in the body of a rule.

tr(rigid-bnode-in-head) = 'rigid-bnode'

We have to be very clear that we do not allow real bnodes in the heads of rule, and we have to make a very clear syntactic distinction between real bnodes and rigid bnodes.


Interoperation with SPARQL

SPARQL queries in rule bodies (?)

Querying RIF with SPARQL

Embedding Useful Subsets of RDFS (non-normative)

The idea of this syntactic subset is that it encompasses a useful subset of RDFS, with all ontology modeling primitives, without most of the hassle introduced by the RDF semantics. This subset is entirely faithful with respect to the RDFS semantics.

[this subset is to be extended to include signature declarations, and possibly other useful ontology modeling features]

We now consider a subset of RDFS which includes all the ontology vocabulary, but which restricts the use of the ontology vocabulary to "standard" places. This subset is based on the subset of RDFS defined by Munoz et al. in their paper "Minimal the Deductive Systems for RDF", published at ESWC 2007.

The purpose of this subset is to define a sublanguage which does not suffer from most of the complications brought by the arbitrary use of the RDFS vocabulary in the language, the infinite RDF vocabulary and the treatment of literals in RDFS, but which is still faithful with respect to the semantics of RDFS.

The sublangauge can be used for representing conceptual models. We expect that this subset is often used when RDFS is used for the exchange of data models.

We call an RDF graph S a minimal RDF graph if S consists only of triples of the form

The RDFS semantics for minimal RDF graphs can be embedded using the following rules.