Who supplied a statement?

A named reifier links an asserted statement to its author and recording date.

annotation-evidence-srl.srl · output · proof · check · playground


The question

Can the statement, its identifier, its author and its recording date all be recovered?


Historical background

RDF 1.2 added triple terms and generalized the connection between a statement and a reifier. A named reifier can carry an author and recording date about the statement associated with it. The rules here join those facts to the original statement. W3C, RDF 1.2 Concepts and Abstract Data Model


What the program says

annotation-evidence-srl.srl:

# A named statement records who supplied Alice's name and on which date.
# Rules recover the reifier, its author and its date, showing RDF 1.2
# annotations and triple-term patterns alongside the asserted statement.

PREFIX : <http://example.org/annotation-evidence#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

DATA {
  :a :name "Alice" ~ :t {| :statedBy :bob ; :recorded "2021-07-07"^^xsd:date |} .
}

RULE { :test :hasStatement true }
WHERE { :a :name "Alice" }

RULE { :test :hasNamedStatement ?statement }
WHERE { ?statement rdf:reifies <<(:a :name "Alice")>> }

RULE { :test :statementAuthor ?who }
WHERE {
  ?statement rdf:reifies <<(:a :name "Alice")>> .
  ?statement :statedBy ?who .
}

RULE { :test :statementDate ?date }
WHERE {
  ?statement rdf:reifies <<(:a :name "Alice")>> .
  ?statement :recorded ?date .
}

What eyemind concludes

The Turtle output contains the supplied DATA and the rule conclusions:

PREFIX : <http://example.org/annotation-evidence#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

:a :name "Alice" .
:t rdf:reifies <<( :a :name "Alice" )>> .
:t :statedBy :bob .
:t :recorded "2021-07-07"^^xsd:date .
:test :hasStatement true .
:test :hasNamedStatement :t .
:test :statementAuthor :bob .
:test :statementDate "2021-07-07"^^xsd:date .

The name statement is asserted. The named reifier t identifies that statement and records Bob as its author and 7 July 2021 as its date. Triple-term patterns let the rules join those pieces of evidence.

The check report records, among its claims:

inf(iri('http://example.org/annotation-evidence#test'), iri('http://example.org/annotation-evidence#hasNamedStatement'), iri('http://example.org/annotation-evidence#t'))
inf(iri('http://example.org/annotation-evidence#test'), iri('http://example.org/annotation-evidence#statementAuthor'), iri('http://example.org/annotation-evidence#bob'))
inf(iri('http://example.org/annotation-evidence#test'), iri('http://example.org/annotation-evidence#statementDate'), literal('2021-07-07', datatype('http://www.w3.org/2001/XMLSchema#date')))

What the proof establishes

The saved report ends with verdict('checked'). The proof holds the eight claims, 12 steps recording which compiled rule derived each inferred triple and from which triples, and a certificate: derived(...) listings of the facts the rules derived and a called(...) table of every answer of the question. The checker answers the question from that table, expanding it one level against the compiled program, requires each listing to be closed under the rules, and replays each listed fact’s recorded firing. It follows the certificate without calling the reasoning engine.

The verdict checked establishes that the claims follow from the rules and are every answer of the question.


Try it

From the repository root:

node bin/eyemind.js examples/annotation-evidence-srl.srl
node bin/eyemind.js --proof examples/annotation-evidence-srl.srl
node bin/eyemind.js --check-proof examples/proof/annotation-evidence-srl.js examples/annotation-evidence-srl.srl