Difference between revisions of "TFGraphs/Datasetsemantics"
(tentative quoted graph) 
(No difference)

Revision as of 12:45, 22 August 2012
Simple dataset semantics
In substance, this formalization says that each RDF Graph in a Dataset is interpreted separately. This models the fact that different RDF Graphs hold in different contexts. This way, graphs that have been put in different "named graph pairs" can contradict with each other without making the Dataset inconsistent.
Like RDF interpretations, a datasetinterpretation is relative to a vocabulary V. Moreover, dataset interpretations are defined with respect to an entailment regime E, as defined in SPARQL 1.1 Entailment Regimes. Let K_{E} be the set of all Einterpretations. The interpretation of an RDF Dataset (G, (<n_{1}>,G_{n1}), ..., (<n_{k}>,G_{nk})) over vocabulary V is a pair (I,Con) where I is an Einterpretation of G (the default graph) and Con is a mapping from V to K_{E}.
A datasetinterpretation (I,Con) of a vocabulary V wrt entailment regime E satisfies an RDF Dataset (G, (<n_{1}>,G_{n1}), ..., (<n_{k}>,G_{nk})) iff I Esatisfies G, and for all i in [1..k], Con(n_{i}) exists and Esatisfies G_{ni}.
Following standard definitions, we say that a dataset D=(G, (<n_{1}>,G_{n1}), ..., (<n_{k}>,G_{nk})) entails a dataset (H, (<m_{1}>,H_{m1}), ..., (<m_{p}>,H_{mp})) iff all datasetinterpretation (I, Con) that satisfies D also satisfy H.
Some RDF engines or graph store implementation may want to add constraints on valid interpretations, for instance that the default RDF Graph entails all the named RDF Graphs, but this is not mandated by this specification since there are use cases for the contrary. A typical restriction would be that IRIs must be interpreted identically by all Con(u) for all u.
Extension 1: Quotesemantics
This semantic extension of the dataset semantics is made to express the fact that a graph inside a <name,graph> pair is quoted (that is, it has to be taken exactly "as is", without modification). A consequence of this is that it is not allow to infer anything from the quoted graph. What counts is the exact content, not it means.
To do that, we introduce the term rdf:QuotedGraph, which is a class. The following defines formally a "quoteinterpretation".
A quoteinterpretation of a vocabulary V is a datasetinterpretation (I,Con) that satisfies the following conditions:
 if x is in ICEXT(I(rdf:QuotedGraph)) then x is an RDF graph;
 a dataset D = (G, (<n_{1}>,G_{n1}), ..., (<n_{k}>,G_{nk})) is satisfied (or is true) in (I,Con) if it dataset satisfies D **and** I(<n_{1}>) = G_{}n_{1}.
This means that the graph IRI in a name,graph pair must be interpreted as the graph itself. Here is how it is used:
@prefix : <http://example.com/> @prefix rdfs: <http://www.w3.org/2000/01/rdfschema#> # This is the default graph :n2 a rdf:QuotedGraph . :n1 { :ageInText rdfs:subPropertyOf :age; rdfs:range rdf:LangString . :alice :ageInText "twentyeight"@en . } :n2 { :age rdfs:range xsd:decimal . :alice :age 31 . }
This RDFSdatasetentails, for instance:
:n1 { :alice :age "twentyeight"@en . }
but does not entail:
:n2 { :age a rdf:Property . }
since :n2 is forced to denote the RDF graph:
:n2 { :age rdfs:range xsd:decimal . :alice :age 31 . }