Skip to content

RDF‐star semantics: option 3

Enrico Franconi edited this page Feb 29, 2024 · 74 revisions

RDF-star semantics: option 3

(DRAFT 2024.02.29)

ABSTRACT SYNTAX

graph            ::= (triple)* 
triple           ::= subject predicate object 
subject          ::= iri | BlankNode | tripleTerm
predicate        ::= iri 
object           ::= iri | BlankNode | literal | tripleTerm
tripleTerm       ::= triple
iri              ::= ... | rdf:reifies | ...

UPFRONT RESTRICTED ABSTRACT SYNTAX (should be stronger)

graph            ::= ( triple | subject rdf:reifies tripleTerm | 
                                tripleTerm rdf:reifies object )*
triple           ::= subject predicate object 
subject          ::= iri | BlankNode
predicate        ::= iri 
object           ::= iri | BlankNode | literal
tripleTerm       ::= triple
iri              ::= any iri but rdf:reifies

Notes:

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

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. A mapping RE from IR x IP x IR into IR, called the reification 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

An 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 semantics is the above without the parts within ⏩...⏪ marks, involving the tripleTerm category.

Best practice for reification, property graph edges, n-ary relations

We introduce a macro for triple reification, which, as we will see, captures the use cases for reification, property graph edges, n-ary relations. The syntax is extended as follows.

(...)
subject           ::= iri | BlankNode | tripleTerm | tripleReification 
object            ::= iri | BlankNode | literal | tripleTerm | tripleReification 
tripleReification ::= identifier triple
identifier        ::= iri | BlankNode  
(...)

The macro for triple reification expands in the following way.

X1 X2 ( identifier triple ) . ➡️ identifier rdf:reifies triple . X1 X2 identifier .
( identifier triple ) X3 X4 . ➡️ identifier rdf:reifies triple . identifier X3 X4 .

An RDF graph which does not contain any triple term nor any rdf:reifies triple but for the ones coming from the expansion of the macro for triple reification is called reification well-formed.

Any graph conforming the upfront restricted abstract syntax is always reification well-formed (NOTE: we need a stronger version of the upfront restricted abstract syntax for this to hold).

(...)

Clone this wiki locally