Skip to content

Semantics: Andy's proposal

Enrico Franconi edited this page Dec 19, 2023 · 36 revisions

RDF-star semantics: Andy's proposal as understood by Enrico (DRAFT 2023.12.19)

ABSTRACT SYNTAX:

graph ::= *(triple)
triple ::= no-lit-term iri term
no-lit-term ::= iri | bnode | triple-term
term ::= no-lit-term | literal
triple-term ::= type-triple-term | token-triple-term
type-triple-term ::= triple
token-triple-term ::= [iri | bnode] triple

Terms are denoted by r, triples by t, and graphs by g.
Given a triple term 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.

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 literals into IR, called the interpretation of literals.
  5. A mapping IEXT from IP into 2IR x IR, called the extension of properties.
  6. A bijective binary relation IT over (IR x IP x IR) x IR, called the type of triple terms.
  7. A binary relation IO over (IR x IP x IR) x IR, called the occurrence of triple terms.

A is a mapping from blank nodes 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 blank node
  • [I+A](r) = IT(r) if r is a type-triple term
  • [I+A](r) = [I+A](r.id) if r is a token-triple term

  • [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.s),[I+A](ts.p),[I+A](ts.o)>, [I+A](ts.id)> ∈ IO
      if t.s is a token-triple term ts
    • <<[I+A](to.s),[I+A](to.p),[I+A](to.o)>, [I+A](to.id)> ∈ IO
      if t.o is a token-triple term to

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

An interpretation I is called a model for g if there exists A such that [I+A](g) = TRUE.

Simple entailment: g ⊨ g' if and only if models(g) ⊆ models(g').

( A review of the standard semantics of RDF 1.0: semantics of RDF.pdf ).

EXAMPLE CASES IN CONCRETE SYNTAX:

<< :wed-1 | :liz :spouse :richard >>
 :start 1964 ;
 :end 1974 .
<< :wed-2 | :liz :spouse :richard >>
 :start 1975 ;
 :end 1976 .

The above entails:

<< [] | :liz :spouse _:x >>
 :start 1964.

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