# Graphs Design 6.1/Sem

## Contents

# Extensions to the RDF Semantics

## Dataset interpretations

Let *DS* = (*G*, (*u _{1}*,

*G*), … , (

_{1}*u*,

_{n}*G*)) be a dataset;

_{n}*G*is the Default Graph, and

*G*, i=1,…,n be the named graphs.

_{i}Let the vocabulary for the dataset be:

*V(DS)* = *V(G)* ∪ {*u _{i}*: i = 1,…,n} ∪ {rdf:hasGraph, rdf:Graph} ∪

*rdfV*

where *V(G)* is the vocabulary set of *G*, and *rdfV* is the RDF Vocabulary (as defined in the RDF Semantics document). Let I be an RDF interpretation on *V(DS)*, such that the following conditions also hold:

- The range of I is a superset of {
*G*: i = 1,…,n}_{i} - {
*G*: i = 1,…,n} ∩ LV = ∅_{i} - If <I(
*u*),I(rdf:Graph)> ∈ IEXT(I(rdf:type)) then I(_{i}*u*) =_{i}*G*_{i} - ∀
*u*: <I(_{i}*u*),_{i}*G*> ∈ IEXT(I(rdf:hasGraph))_{i} - ∀i,j, i,j=1,…,n: if
*G*⋍_{i}*G*then_{j}*u*= "_{i}*u*(where '⋍' stands for graph equivalence)_{j}

Then I is an RDF-interpretation *of the dataset DS*. Replacing *rdfV* by the corresponding RDFS or OWL Vocabulary the same definition extends to these automatically. (This means a definition for the RDF Compatible Semantics of OWL; I am not sure how this can be translated to the Direct Semantics.)

A few words about each condition:

- Condition #1 means that the
*G*can be “denoted” by terms in_{i}*V(DS)*. It does not say what this “denoting” means, for example, it does not refer to the HTTP GET semantics (nor do I believe that can be explained within this semantics). Condition #2 stays that these graphs are not literals and literals cannot denote a graph. - Condition #3 defines the type for these denoting terms.
- Condition #4 describes what graph
*labeling*means: that there is one and only one term in the vocabulary that denotes the corresponding Graph, and that term has the rdf:hasGraph relation to the label. Due to the restrictions of RDF this also means that*u*cannot be a literal (it cannot appear as a subject for a triple)._{i} - Condition #5 says that equivalent graphs may have only one label in the dataset

Some consequences, and relations to the discussion on the mailing list

## Unicity of the denotation (i.e., can the same graph be denoted by two different URIs?)

Condition #4 ensures that this unicity holds for a specific dataset.

In a more general sense: it is possible to talk about the union of two datasets:

*DS _{1}* = (

*G*, (

*u*,

_{1}*G*), … , (

_{1}*u*,

_{n}*G*))

_{n}*DS*= (

_{2}*H*, (

*v*,

_{1}*H*), … , (

_{1}*v*,

_{k}*H*))

_{k}then, roughly:

*DS _{1}* ∪

*DS*= (

_{2}*G*∪

*H*, (

*u*,

_{1}*G*), … , (

_{1}*u*,

_{n}*G*), (

_{n}*v*,

_{1}*H*), … , (

_{1}*v*,

_{k}*H*))

_{k}(the exact mathematical formula should make sure that if *u _{i}* =

*v*and

_{j}*G*=

_{i}*H*, then the corresponding pair appears only once in the dataset.)

_{j}Coming back to the issue of unicity: if it so happens that we have:

- ∃i: i=1,…,n and ∃j: i=1,…,k such that
*u*=_{i}*v*, and_{j} - (u
_{i}, rdf:type, rdf:Graph) and (v_{j}, rdf:type, rdf:Graph) both hold, and -
*G*≠_{i}*H*_{j}

then *DS _{1}* ∪

*DS*is inconsistent (i.e., there can be no valid interpretation). Which is as far as we can go in terms of semantics.

_{2}Note that the second condition above is essential to establish inconsistency, insofar as this means there may be several *labels* to the same Graph. If we want to reinforce the unicity of that, too, this should be added to the interpretation; however, the difference between labels and denoting terms become insignificant then…

## Subgraphs or Graphs

This issue came up on the mailing list; in case of:

<u> { ... }

Does the curly brackets denote *the* graph labeled by <u> or a subgraph thereof. The semantics is pretty much in terms of identity and it is not clear how the “subgraph” feature could be added to it. That being said, this issue might be a serialization and not a semantics one. After all, it is perfectly feasible to have

<u> { ... } { ... } <u> { ... }

But, conceptually, <u> labels the union of the two set of terms in curly brackets to be in the same graph.

## Graphs are quoted

The consequence of the definition is that the *G _{i}* are really “quoted” here. I.e., for example:

{ <b> rdf:type owl:FunctionalProperty . } <u> { <a> <b> <c>. <a> <b> <d>. <c> owl:differentFrom <d> .}

is *not* inconsistent, because the interpretation on the default graph is not carried over to the named graphs themselves.

This is an open issue, not clear at this moment how to fold that into the semantics: the Working Groups has said, up to now, that blank nodes, among different Graphs within the same dataset, are shared. Not clear how to fold that into the semantics.

Actually… it is worth noting that there is *nothing* in the various semantics conditions that make use of the fact that the *G _{i}*-s are graphs. They could be anything… Not clear whether this is a bug or a feature!