AnotherSpin

From RDF Working Group Wiki
Revision as of 01:37, 19 April 2012 by Phayes3 (Talk | contribs)

Jump to: navigation, search

Another Spin on RDF with Contexts

OK, describing the RDFC idea as finding a compromise between global and local views of IRI meanings, and as a revision of RDF itself, has raised some hackles and concerns. This Wiki page is a different way to spin essentially the same idea, making it sound a lot less threatening (I hope).

We dont say we are redefining RDF, and we don't talk about RDFC. We don't use the term 'local' or talk about changing the meanings of IRIs. Instead, we talk about extending RDF with an option that allows users to describe and name their own semantic extensions, so that they and others can use them to express more things in RDF. Its a kind of do-it-yourself RDF-extending kit.

The idea of semantic extension is already introduced and sketchily defined in the 2004 specs, the relevant text being "Particular uses of RDF, including as a basis for more expressive languages such as DAML+OIL [DAML] and OWL [OWL], may impose further semantic conditions in addition to those described here, and such extra semantic conditions can also be imposed on the meanings of terms in particular RDF vocabularies. Extensions or dialects of RDF which are obtained by imposing such extra semantic conditions may be referred to as semantic extensions of RDF. " So the proposal is now to take this idea and run a little further with it.

Although the terminology has changed, the formal machinery and its intended uses are exactly as in the earlier proposal, so I have kept the same IRI names for comparison. However, if this way of describing it is preferred, then we might want to change rdf:inherits to something like rdf:inExtension.

Semantic Extensions to RDF

A semantic extension, or simply an extension, to RDF represents a named public agreement to use a particular vocabulary of IRIs, called the reserved vocabulary of the extension, with a particular meaning defined by the extension. Semantic extensions must not violate the basic semantics of RDF, but they can extend it by imposing special meanings on IRIs. The OWL and RDFS standards are semantic extensions to RDF defined by their W3C specifications documents. (In these cases the reserved vocabulary constitutes a namespace, but this is not required.) Users may invent their own extensions and indicate them by an IRI. Then, including a triple

<> rdf:inherits C .

in an RDF graph, where C indicates the semantic extension, means that C-reserved IRIs which occur in the rest of the graph are to be interpreted using the semantic constraints of that extension. Several such triples may be included in a graph, in which case all the indicated extensions apply, each to its own reserved vocabulary.

(***This presumes that there is a clear notion of a graph boundary, which is not true in current (2004) RDF, but is widely presumed. This is something we need to fix.***)

Note, we use the term 'indicates' because the indicating URI might denote something else. In general, any IRI may be used to indicate a semantic extension, but it does not therefore denote or refer to or identify that extension. Semantic extensions are not things in the universe of discourse of RDF. An IRI indicates a semantic extension simply by being used as the object of an rdf:inherits triple. The recommended practice is to have the IRI which is used to indicate an extension identify a document which defines the reserved vocabulary and semantic conditions of the extension; but any IRI, for example one which identifies a human person or an OWL class, may be used to indicate an extension.

(***This is to allow current practice where an IRI is used to 'label' an RDF graph in a dataset while also being used to denote something else. Several major RDF supporters use this, so we need to allow it.***)

It is possible that two extensions might impose inconsistent conditions on the same reserved vocabulary, so that a graph which inherits both of them cannot be satisfied. In this case the graph is considered to be RDF-inconsistent, and this situation may be flagged as an error.

A description of a semantic extension must define the restricted vocabulary of the extension, so that there is an algorithm which will determine, for any IRI, whether or not it is in the vocabulary; and may describe the intended meanings of these IRIs in a form which defines a set of RDF interpretations on the vocabulary as being those which satisfy the semantic conditions of the extension. A semantic extension may specify certain syntactic conditions on RDF graphs or combinations of RDF triples; in which case an algorithm must be defined which can determine, for any RDF graph, whether or not it satisfies these syntactic constraints of the extension. (*** Thinking of OWL-DL, obviously. ***)

A (recommended) way to define the reserved vocabulary is to include an RDF graph in the documentation which uses all the IRIs in the reserved vocabulary, called the context graph. This context graph may also represent some of the semantic conditions on the vocabulary. However, semantic conditions may be defined in any way, for example by stating conditions on interpretations directly, by providing axioms or rules, or in natural-language text. They may be omitted altogether, but of course the less information that is provided about the semantic conditions, the less useful the extension may be. We leave this situation under-defined deliberately, in anticipation of a scenario where a relatively under-defined extension gradually becomes clearer as it gets used by a community.

(***I believe that it is important to keep this under-defined, allowing informally expressed descriptions of extensions, to make it very easy for people to use extensions even if their definitions are informal. It also provides a semi-official way to connect RDF semantic content to what used to be called 'social meaning'. For example, the text might specify that a given class name IRI is interpreted to mean the class of all adult human beings, without giving any further explanation or being obliged to 'axiomatize' this idea.***)

A semantic extension which does not define its semantic constraints may be used as a public flag to draw attention to the fact that graphs which inherit that extension are all in explicit agreement concerning the meaning of the restricted vocabulary, whatever it may be. Of course, simply using a given set of IRIs should imply this agreement, but in practice this rule is sometimes unreliable, and the semantic extension mechanism provides an additional level of explicit confirmation of an intention to use a vocabulary in a strictly consistent manner.

The context graph, if provided, must be true under the semantic conditions of the extension. An extension may be completely specified by a context graph, in which case the semantic constraint is simply that the graph be true. In this case, called a graph extension, rdf:inherits has exactly the same meaning as owl:imports. This is understood to be the case when the extension is indicated by an IRI identifying an RDF graph, or a graph container, or a document which parses to a graph in some accepted RDF notation.

If the context graph of an extension A includes an inheritance triple of the form <> rdf:inherits B . , then the extension A is called an extension of B, and includes all of the semantic constraints of B, plus (presumably) some others of its own. The reserved vocabulary of A may overlap with that of B, which indicates that A imposes further conditions on this part of the vocabulary. An extension of an extension B must not contradict any of the conditions imposed by B, but it may add further conditions. (For example, if A extends B and B specifies that the IRI x:Person is the class of human beings, then A may specify that this IRI is the class of American citizens, but it may not claim that it is the class of insects.) An extension may be an extension of several other extensions.

A special case

A graph may be asserted in itself; that is, in the graph extension defined by treating it as the context graph of that extension. This means that its entire vocabulary is classified as restricted to it, and so has the effect of 'isolating' the IRIs in the graph from any meaning they might have in other graphs, allowing them to be interpreted locally in that particular graph as a unique context of meaning. We could call this a solipsist graph. It reproduces exactly the semantics of datasets as defined by Antoine. This technique may be found useful when sorting RDF content found "in the wild" into coherent groups, without being obliged to treat IRIs in separate groups as necessarily identical in meaning. This can be done using graph naming in a SPARQL dataset:

{ <u1> a rdf:Graph }

<u1> { <u1> rdf:inherits <u1> ...}

==Semantics== ///not yet complete///

(*** For semanticians, this is more like a 'punning' approach, different from the way the context semantics was defined. Although that was more in the spirit of the 2004 semantics, I think this is more intuitive and has better entailments. But we could go either way.***)

A semantic extension selects a subset of the interpretations of its reserved vocabulary as being those which satisfy its constraints. We model this by mappings voc from IRIs to sets of IRIs, and CON from IRIs to sets of interpretations, so that J in CON(X) means that J is an interpretation of voc(X) which satisfies the constraints of the extension indicated by the IRI X. Note that voc and CON are defined independently from any interpretation of X itself.



Examples

Time-dependent properties and intervals.

Progressive refinement a la Cyc

Mutual agreement on standard definitions eg in ISO

Links to legal texts, government documents, etc..