Link RIF and RIF Core
This specification develops RIF-Core (the Core of the Rule Interchange Format). From a theoretical perspective, RIF-Core corresponds to the language of definite Horn rules without function symbols ('Datalog') and a standard first-order semantics. RIF-Core thus is a subset of RIF-BLD [RIF-BLD]. At the same time, RIF-Core is a language of production rules permitting only assert actions.
To give a preview, here is a simple complete RIF-Core example deriving a ternary relation from its inverse.
Example 1 (An introductory RIF-Core example).
A rule can be written in English to derive the buy relationships (rather than store them) from the sell relationships that are stored as facts (e.g., as exemplified by the English statement below):
A buyer buys an item from a seller if the seller sells the item to the buyer:
John sells LeRif to Mary.
The fact Mary buys LeRif from John can be logically derived by a modus ponens argument. Assuming Web IRIs for the predicates buy and sell, as well as for the individuals John, Mary, and LeRif, the above English text can be represented in RIF-Core Presentation Syntax as follows:
Document( Prefix(cpt http://example.com/concepts#) Prefix(ppl http://example.com/people#) Prefix(bks http://example.com/books#) Group ( Forall ?Buyer ?Item ?Seller ( cpt:buy(?Buyer ?Item ?Seller) :- cpt:sell(?Seller ?Item ?Buyer) ) cpt:sell(ppl:John bks:LeRif ppl:Mary) ) )