Checking for a reviewed temperature

ASK checks whether an accepted review names a recorded temperature using an RDF 1.2 triple term.

reviewed-measurement-rq.rq · data/reviewed-measurement-rq.ttl · output · proof · check · playground


The question

The station log records temperatures separately from the reviews that name them. Is there an accepted review of a recorded north-station temperature?


Historical background

RDF 1.2 introduced a way to refer to a triple’s content within another RDF statement. A review can then point to the actual temperature triple. The ASK query checks that point of contact between the review and a recorded measurement. W3C, RDF 1.2 Concepts and Abstract Data Model


What we tell eyemind

The north station recorded 18 °C. One accepted review names that reading. Another names 19 °C, which does not occur as a north-station reading in the log. The query joins a recorded reading to a review using the subject, predicate and object of the reading.

ASK WHERE {
  VALUES ?station { :northStation }
  ?station :temperatureC ?reading .
  ?review :about <<( ?station :temperatureC ?reading )>> ;
    :status :accepted .
}

What eyemind concludes

The answer is true. The review of 18 °C matches both patterns. The triple term in the review of 19 °C names that temperature statement. Only the separate log triples supply recorded readings.

sparql_ask('true')

What the proof establishes

The saved report ends with verdict('checked'). The checker verifies that the compiled pattern has a solution in the data. The boolean describes the log and its review records.


Try it

Run these commands from the repository root.

node bin/eyemind.js examples/reviewed-measurement-rq.rq examples/data/reviewed-measurement-rq.ttl
node bin/eyemind.js --proof examples/reviewed-measurement-rq.rq examples/data/reviewed-measurement-rq.ttl
node bin/eyemind.js --check-proof examples/proof/reviewed-measurement-rq.js examples/reviewed-measurement-rq.rq examples/data/reviewed-measurement-rq.ttl

Remove the accepted review of 18 °C in the playground to see the answer change to false.