# 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
*u*=_{i}*u*then_{j}*G*and_{i}*G*are equivalent._{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 does it seem possible to explain that 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 the label appears in a semantic relation with the graph. Note that this condition does*not*say that there is an element in the original vocabulary that denotes that graph. Note also that, 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 the same label can refer to one graphs only

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

## Global unicity of labeling (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}(Union of graphs are meant as RDF Graph unions, ie, modulo blank nodes; the exact mathematical formula should make sure that if *u _{i}* =

*v*and

_{j}*G*and

_{i}*H*are equivalent, 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} -
*G*and_{i}*H*are_{j}*not*equivalent

then *DS _{1}* ∪

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

_{2}## 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.

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.