Skip to content

RDF star "alternative baseline"

Enrico Franconi edited this page Nov 8, 2024 · 24 revisions

RDF-star alternative baseline
(WORKING DRAFT 2024.11.07)

ABSTRACT SYNTAX

graph                 ::= triple*
triple                ::= tripleStructure
tripleStructure       ::= subject predicate object
subject               ::= NoLiteralTerm
predicate             ::= iri 
object                ::= term
NoLiteralTerm         ::= NoLiteralAtomicTerm | tripleTerm
NoLiteralAtomicTerm   ::= iri | BlankNode
tripleTerm            ::= tripleStructure
term                  ::= NoLiteralTerm | literal

Notes:

  • RDF 1.1 syntax is the above without the tripleTerm category and its dependents.
  • A term is denoted by r, a triple by t, and a graph by g.
  • Given a triple structure s, we denote the subject, predicate, object of s as s.s, s.p, s.o, respectively.

SIMPLE SEMANTICS

An RDF simple interpretation I is a structure <IR, IP, IS, IL, IEXT, RE> consisting of:

  1. A non-empty set IR of resources, called the domain or universe of I.
  2. A set IP, called the set of properties of I.
  3. A mapping IS from IRIs into IR ⋃ IP, called the interpretation of IRIs.
  4. A partial mapping IL from literal into IR, called the interpretation of literals.
  5. A mapping IEXT from IP into 2IR x IR, called the extension of properties.
  6. An injective function RE from IR x IP x IR into IR, called the denotation 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)   if r is a iri
  • [I+A](r) = IL(r)   if r is a literal
  • [I+A](r) = RE([I+A](r.s), [I+A](r.p), [I+A](r.o))   if r is a tripleTerm ⏪️
  • [I+A](r) = A(r)   if r is a BlankNode
  • [I+A](t) = TRUE   if and only if   <[I+A](t.s), [I+A](t.o)> ∈ IEXT([I+A](t.p))

  • [I+A](g) = TRUE   if 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').

Notes:

  • RDF 1.1 simple semantics is the above without the parts within ⏩...⏪ marks.

RDF SEMANTICS

RDF semantics restricts the function [I+A](.) with the following additional conditions:

[I+A](t) = TRUE   implies
          <[I+A](t.s), [I+A](rdf:tripleTerm)> ∈ IEXT([I+A](rdf:type))
          if t.s is a triple term
⏪️

[I+A](t) = TRUE   implies
          <[I+A](t.o), [I+A](rdf:tripleTerm)> ∈ IEXT([I+A](rdf:type))
          if t.o is a triple term
⏪️

[I+A](t) = TRUE   implies
          <[I+A](t.p), [I+A](rdf:ReificationProperty)> ∈ IEXT([I+A](rdf:type))
          if <[I+A](t.o), [I+A](rdf:tripleTerm)> ∈ IEXT([I+A](rdf:type))
⏪️

[I+A](t) = TRUE   implies
          <[I+A](t.p), [I+A](rdf:InverseReificationProperty)> ∈ IEXT([I+A](rdf:type))
          if <[I+A](t.s), [I+A](rdf:tripleTerm)> ∈ IEXT([I+A](rdf:type))
⏪️

A RDF interpretation I is a RDF model of a graph g   if and only if   ∃ A . [I+A](g) = TRUE.

The set of all RDF models of a graph g is called rdf-models(g).

RDF entailment: g ⊨ g'   if and only if   rdf-models(g) ⊆ rdf-models(g').

Notes:

  • RDF 1.1 RDF semantics is the above without the parts within ⏩...⏪ marks.

Metamodelling: entailment patterns and axiomatic triples

if S contains then S RDF entails
reif1 sss aaa <<(xxx yyy zzz)>> . aaa rdf:type rdf:ReificationProperty .
reif2 <<(xxx yyy zzz)>> aaa ooo . aaa rdf:type rdf:InverseReificationProperty .
triple1 sss aaa <<(xxx yyy zzz)>> . <<(xxx yyy zzz)>> rdf:type rdf:tripleTerm .
triple2 <<(xxx yyy zzz)>> aaa ooo . <<(xxx yyy zzz)>> rdf:type rdf:tripleTerm .
RDF axiomatic triples
rdf:reifies rdf:type rdf:ReificationProperty .

BEST PRACTICE (informative) -- to be expanded...

Let the WG decide in the RDF 1.2 Concepts and Abstract Syntax document to reflect that triple terms SHOULD or MUST appear only in object position:

A triple term is an RDF term with the components of an RDF triple, which can be used as the object of another triple.

and weaken or expand the following, to reflect that we can use alternative reification properties:

Every triple with a triple term as its object SHOULD use http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies (rdf:reifies) as its predicate. Every triple whose object is not a triple term SHOULD NOT use http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies (rdf:reifies) as its predicate.

TURTLE SYNTAX

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 .
Clone this wiki locally