Semantics: Andy's proposal - w3c/rdf-star-wg GitHub Wiki

RDF-star semantics: Andy's proposal

(DRAFT 2024.01.05)

ABSTRACT SYNTAX:

graph            ::= (triple)* 
triple           ::= subject predicate object 
subject          ::= iri | BlankNode | tripleOccurrence 
predicate        ::= iri 
object           ::= term 
term             ::= iri | BlankNode | literal | tripleOccurrence 
tripleOccurrence ::= identifier triple
identifier       ::= iri | BlankNode  

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

SEMANTICS:

An RDF-star simple interpretation I is a structure <IR, IP, IS, IL, IEXT, IT, IO> 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 binary relation IO over IR x (IR x IP x IR), called the occurrence of a triple term.

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) = IL(r) if r is a literal
  • [I+A](r) = IS(r) if r is a iri
  • [I+A](r) = A(r) if r is a BlankNode
  • [I+A](r) = [I+A](r.id) if r is a tripleOccurrence

  • [I+A](t) = TRUE if and only if <[I+A](t.s),[I+A](t.o)> ∈ IEXT([I+A](t.p)) and
    • <[I+A](ts.id), <[I+A](ts.s),[I+A](ts.p),[I+A](ts.o)>> ∈ IO
      if t.s is a tripleOccurrence ts
    • <[I+A](to.id), <[I+A](to.s),[I+A](to.p),[I+A](to.o)>> ∈ IO
      if t.o is a tripleOccurrence to

  • [I+A](g) = TRUE if and only if ∀ t ∈ g . [I+A](t) = TRUE

An interpretation I is called a model of a graph g if there exists A such that [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').

Note:
RDF 1.1 semantics is the above without the IO binary relation in the interpretation.
A review of the standard semantics of RDF 1.0: semantics of RDF.pdf.

EXAMPLE CASES IN CONCRETE SYNTAX:

<< :wed-1 | :liz :spouse :richard >>
 :starts 1964 ;
 :ends 1974 .
<< :wed-1 | :richard :spouse :liz >> 
 :location :montreal .
<< :wed-2 | :liz :spouse :richard >>
 :starts 1975 ;
 :ends 1976 .
<< :wed-2 | :liz a :wife >> 
 :location :botswana .

The above entails:

:wed-1 :starts 1964 .
<< [] | _:x a :wife >>
 :starts 1975 .

More examples:

<< _:bp1-23 | :book1 :datePublished 2023 >> 
  a :PublicationEvent .
<< _:bp1-23 | :book1 :publisher :p1 >> 
  :location :London .

 

:john :believes 
 << :s1 | << [] | :liz :spouse :richard >> 
           :starts 1964 >> .
:s1 :certified-by :us-census .
:paul :believes 
 << :s2 | << [] | :liz :spouse :richard >> 
           :starts 1965 >> .

Shortcuts in concrete syntax:

  • Triple term shortcut: << :s :p :o >> ➡️
    << [] | :s :p :o >>
  • Annotation shortcut: :s :p :o {| :id | :p1 o1; :p2 o2 |} . ➡️
    << :id | :s :p :o >> :p1 o1; :p2 o2 .
    :s :p :o .
⚠️ **GitHub.com Fallback** ⚠️