# Difference between revisions of "Graphs Design 6.1/Sem"

Line 16: | Line 16: | ||

# If <I(''u<sub>i</sub>''),I(rdf:Graph)> ∈ IEXT(I(rdf:type)) then I(''u<sub>i</sub>'') = ''G<sub>i</sub>'' | # If <I(''u<sub>i</sub>''),I(rdf:Graph)> ∈ IEXT(I(rdf:type)) then I(''u<sub>i</sub>'') = ''G<sub>i</sub>'' | ||

# ∀''u<sub>i</sub>'': <I(''u<sub>i</sub>''),''G<sub>i</sub>''> ∈ IEXT(I(rdf:hasGraph)) | # ∀''u<sub>i</sub>'': <I(''u<sub>i</sub>''),''G<sub>i</sub>''> ∈ IEXT(I(rdf:hasGraph)) | ||

− | # ∀i,j, i,j=1,…,n: if ''G<sub>i</sub>'' ⟚ ''G<sub>j</sub>'' then ''u<sub>i</sub>'' = | + | # ∀i,j, i,j=1,…,n: if ''G<sub>i</sub>'' ⟚ ''G<sub>j</sub>'' then ''u<sub>i</sub>'' = ''u<sub>j</sub>'' (where '⟚' stands for graph equivalence) |

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.) | 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: | A few words about each condition: | ||

− | # Condition #1 means that the ''G<sub>i</sub>'' 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 | + | # Condition #1 means that the ''G<sub>i</sub>'' 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. |

# Condition #3 defines the type for these denoting terms. | # Condition #3 defines the type for these denoting terms. | ||

− | # Condition #4 describes what graph ''labeling'' means: that there is | + | # 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<sub>i</sub>'' cannot be a literal (it cannot appear as a subject for a triple). |

# Condition #5 says that equivalent graphs may have only one label in the dataset | # 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 | + | Some consequences, and relations to the discussion on the mailing list: |

− | == | + | == Global 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. | Condition #4 ensures that this unicity holds for a specific dataset. | ||

Line 42: | Line 42: | ||

''DS<sub>1</sub>'' ∪ ''DS<sub>2</sub>'' = ( ''G'' ∪ ''H'', (''u<sub>1</sub>'',''G<sub>1</sub>''), … , (''u<sub>n</sub>'', ''G<sub>n</sub>''), (''v<sub>1</sub>'',''H<sub>1</sub>''), … , (''v<sub>k</sub>'', ''H<sub>k</sub>'')) | ''DS<sub>1</sub>'' ∪ ''DS<sub>2</sub>'' = ( ''G'' ∪ ''H'', (''u<sub>1</sub>'',''G<sub>1</sub>''), … , (''u<sub>n</sub>'', ''G<sub>n</sub>''), (''v<sub>1</sub>'',''H<sub>1</sub>''), … , (''v<sub>k</sub>'', ''H<sub>k</sub>'')) | ||

− | (the exact mathematical formula should make sure that if ''u<sub>i</sub>'' = ''v<sub>j</sub>'' and ''G<sub>i</sub>'' | + | (the exact mathematical formula should make sure that if ''u<sub>i</sub>'' = ''v<sub>j</sub>'' and ''G<sub>i</sub>'' ⟚ ''H<sub>j</sub>'', then the corresponding pair appears only once in the dataset.) |

Coming back to the issue of unicity: if it so happens that we have: | 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<sub>i</sub>'' = ''v<sub>j</sub>'', and | # ∃i: i=1,…,n and ∃j: i=1,…,k such that ''u<sub>i</sub>'' = ''v<sub>j</sub>'', and | ||

− | + | # ''G<sub>i</sub>'' ⟚ ''H<sub>j</sub>'' does ''not'' hold | |

− | # ''G<sub>i</sub>'' | + | |

then ''DS<sub>1</sub>'' ∪ ''DS<sub>2</sub>'' is inconsistent (i.e., there can be no valid interpretation). Which is as far as we can go in terms of semantics. | then ''DS<sub>1</sub>'' ∪ ''DS<sub>2</sub>'' is inconsistent (i.e., there can be no valid interpretation). Which is as far as we can go in terms of semantics. | ||

− | |||

− | |||

== Subgraphs or Graphs == | == Subgraphs or Graphs == |

## Revision as of 08:21, 11 April 2012

## 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 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 equivalent graphs may have only one label in the dataset

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

## Global 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} -
*G*⟚_{i}*H*does_{j}*not*hold

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