# Graphs Design 6.1/Sem

Jump to: navigation, search

# Extensions to the RDF Semantics

## Dataset interpretations

Let DS = (G, (u1,G1), … , (un, Gn)) be a dataset; G is the Default Graph, and Gi, i=1,…,n be the named graphs.

Let the vocabulary for the dataset be:

V(DS) = V(G) ∪ {ui: 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:

1. The range of I is a superset of {Gi : i = 1,…,n}
2. {Gi : i = 1,…,n} ∩ LV = ∅
3. If <I(ui),I(rdf:Graph)> ∈ IEXT(I(rdf:type)) then I(ui) = Gi
4. ui: <I(ui),Gi> ∈ IEXT(I(rdf:hasGraph))
5. ∀i,j, i,j=1,…,n: if ui = uj then Gi and Gj are equivalent.

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:

1. Condition #1 means that the Gi can be “denoted” by terms in 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.
2. Condition #3 defines the type for these denoting terms.
3. 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 ui cannot be a literal (it cannot appear as a subject for a triple).
4. 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:

DS1 = (G, (u1,G1), … , (un, Gn))
DS2 = (H, (v1,H1), … , (vk, Hk))

then, roughly:

DS1DS2 = ( GH, (u1,G1), … , (un, Gn), (v1,H1), … , (vk, Hk))

(Union of graphs are meant as RDF Graph unions, ie, modulo blank nodes; the exact mathematical formula should make sure that if ui = vj and Gi and Hj are equivalent, then the corresponding pair appears only once in the dataset.)

Coming back to the issue of unicity: if it so happens that we have:

1. ∃i: i=1,…,n and ∃j: i=1,…,k such that ui = vj, and
2. Gi and Hj are not equivalent

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

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

## Shared blank nodes

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.

# Semantic Variants

The semantic in the previous section has the characteristics that the Gi are “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.

A variant to this semantics, that may be called “union“ semantics, would differ from the quoting semantics in the way the vocabulary of the interpretation is defined. Instead of

Vq(DS) = V(G) ∪ {ui: i = 1,…,n} ∪ {rdf:hasGraph, rdf:Graph} ∪ rdfV

the following formula is used:

Vu(DS) = V(G) ∪ {ui: i = 1,…,n} ∪ {V(Gi): i = 1,…,n} ∪ {rdf:hasGraph, rdf:Graph} ∪ rdfV

and all semantic conditions remain unchanged. In other words, tshe resulting interpretations (and subsequent entailments) are defined on the graph union of all graphs involved in a dataset. Following such a "union" semantics the TriG example above is inconsistent.