raven ioctl

Compiling LWRR into Prolog.

ioctl.org : RDF : lightweight record-retrieval : compilation into Prolog

LWRR query -> Prolog

This page demostrates the compilation of the EASEL lightweight record retrieval constraint specification language (expressed in RDF) into Prolog.

We assume for the purposes of this demonstration that the structure suggested by the semantic units of the SR is directly reflected into Prolog (this can be done with a simple set of mapping declarations); consequently, facts are of two types:

	relationshipName(Parent, Child).

By convention, representational facets are encoded using predicates of the following lexical form:

	hasRepnameRep(Parent, Child).

The other point of note is that we implement the suggested semantics of constraints over different representational facets of the same resource as a disjunction; all other constraints are conjunctive.

As a final note, we observe that given the capabilities of most modern Prologs to interface directly with a relational database, this also demonstrates the direct ability to service LWRR requests from a repository built on an RDBMS.