RDF star "liberal baseline" - w3c/rdf-star-wg GitHub Wiki
RDF-star liberal baseline (2025-02-04) - aligned with the RDF Semantics deliverable
graph ::= triple*
triple ::= tripleStructure
tripleStructure ::= subject predicate object
subject ::= iri | blankNode | tripleTerm
predicate ::= iri
object ::= term
tripleTerm ::= tripleStructure
term ::= iri | blankNode | literal | tripleTerm
- RDF 1.1 syntax is the above without the tripleTerm category and its dependents.
- A term is denoted by
r, a triple byt, and a graph byg. - Given a triple structure
s, we denote the subject, predicate, object ofsass.s,s.p,s.o, respectively. - A term appears in a graph
gif it is in the setTM(g), defined inductively as follows: (1) for each tripletin the graphg,t.s,t.p, andt.oare inTM(g); (2) for each triple termsinTM(g),s.s,s.p, ands.oare inTM(g).
A tripletappears in a graphgiftis ingor if the triple term composed byt.s,t.p, andt.oappears ing.
An RDF simple interpretation I is a structure <IR, IP, IS, IL, IEXT, IT> consisting of:
- A non-empty set
IRof resources, called the domain or universe ofI. - A set
IP, called the set of properties ofI. - A mapping
ISfrom IRIs intoIR ⋃ IP, called the interpretation of IRIs. - A partial mapping
ILfrom literal intoIR, called the interpretation of literals. - A mapping
IEXTfromIPinto2IR x IR, called the extension of properties. - ⏩ An injective mapping
ITfromIR x IP x IRintoIR, called the interpretation of triple terms. ⏪
A is a mapping from BlankNode to IR.
Given I and A, the function [I+A](.) is defined over terms, triples, and graphs as follows.
-
[I+A](r) = IS(r)ifris a iri -
[I+A](r) = IL(r)ifris a literal - ⏩
[I+A](r) = IT([I+A](r.s), [I+A](r.p), [I+A](r.o))ifris a tripleTerm ⏪️ -
[I+A](r) = A(r)ifris a BlankNode
-
[I+A](t) = TRUEif and only if<[I+A](t.s), [I+A](t.o)> ∈ IEXT([I+A](t.p)) -
[I+A](g) = TRUEif and only if∀ t ∈ g . [I+A](t) = TRUE
A simple interpretation I is a model of a graph g if and only if ∃ A . [I+A](g) = TRUE.
The set of all models of a graph g is called models(g).
Simple entailment: g ⊨ g' if and only if models(g) ⊆ models(g').
- RDF 1.1 simple semantics is the above without the parts within ⏩...⏪ marks.
⏩ RDF interpretations add the following new IRI with the namespace prefix rdf: rdf:reifies. ⏪️
⏩ The rdfD2 RDF entailment pattern is replaced by the following entailment pattern, so to have a sound and complete set of metamodelling RDF entailment patterns: ⏪
| if the triple structure appears in S | then S RDF entails | |
|---|---|---|
| rdfD2-ts | sss aaa ooo | aaa rdf:type rdf:Property . |
⏩ Additional RDF axiomatic triple: ⏪
rdf:reifies rdf:type rdf:Property .
- RDF 1.1 RDF semantics is the above without the parts within ⏩...⏪ marks.
⏩ RDFS Interpretations add the following new IRI with the namespace prefix rdfs: rdfs:Proposition. ⏪️
⏩ RDFS semantics restricts the function [I+A](.) with the following additional metamodelling condition:
⏪️
<r, [I+A](rdfs:Proposition)> ∈ IEXT([I+A](rdf:type))
if ∃ x,y,z . IT(x,z,y)=r or
if ∃ x . <x,r> ∈ IEXT([I+A](rdf:reifies))
⏩ The rdfs4a and rdfs4b RDFS entailment patterns are replaced by the following entailment patterns: ⏪
| if the triple structure appears in S | then S RDFS entails | |
|---|---|---|
| rdfs4a-ts | sss aaa ooo | sss rdf:type rdfs:Resource . |
| rdfs4b-ts | sss aaa ooo | ooo rdf:type rdfs:Resource . |
⏩ Additional metamodelling RDFS entailment patterns, valid only for generalised RDFS: ⏪
| if S contains | then S RDFS entails | |
|---|---|---|
| Grdfs14 | xxx rdf:type rdfs:Resource yyy rdf:type rdf:Property zzz rdf:type rdfs:Resource |
<<(xxx yyy zzz)>> rdf:type rdfs:Proposition . |
⏩ Additional RDFS axiomatic triple: ⏪
rdf:reifies rdf:range rdfs:Proposition .
⏩ Incomplete metamodelling RDFS entailment pattern, replacing Grdfs14, valid for RDFS: ⏪
| if the triple structure appears in S | then S RDFS entails | |
|---|---|---|
| rdfs14 | xxx yyy <<(aaa bbb ccc)>> |
the graph graph S with the appearance replaced with xxx yyy _:nnn _:nnn rdf:type rdfs:Proposition . |
- RDF 1.1 RDFS semantics is the above without the parts within ⏩...⏪ marks.
The RDF-concepts and RDF-primer documents should be conveying the right message 😊, namely reification is sanctioned only if it makes use of the property rdf:reifies or any of its subproperties; the subject of rdf:reifies is called a reifier and the object is called a proposition.
A triple term is represented in Turtle as follows:
<<( s p o )>>
The following temporary shortcut for a term (a triple term reifier) is added to Turtle, which can be used in arbitrary subject or object position:
<< s p o ~ e >>
which expands in Turtle, following the best practice, as follows:
<< s p o ~ e >> p1 o1 . ==> e rdf:reifies <<( s p o )>> . e p1 o1 .
s1 p1 << s p o ~ e >> . ==> e rdf:reifies <<( s p o )>> . s1 p1 e .