Identification and Metadata at Any Level

Hi RIF WG,

Here is a new proposal for moving forward with identification
and metadata, which we hope will satisfy everyone.

The idea, initially articulated by Sandro, is to allow IRIMETA
annotations to appear at any level, now also separating optional
identification from optional metadata, as suggested by Jos and
others.

In the presentation syntax, IRIMETA has the following form:

   ('*i' Const)? ('*m' FORMULA)?
or
   '<*' Const? FORMULA? '*>'

(Left open here: in the first case, an *i marks the Const
as identifier and an *m marks the FORMULA as metadata, while
in the second case the IRIMETA is bracketed with a <* *> pair.)

The Const acts as an optional identifier and the FORMULA (e.g. a Frame
or
a conjunction of Frames) acts as optional metadata. FORMULA cannot be a
constant or a variable (this latter restriction is always fulfilled in
BLD,
but is needed for FLD).

Why formulas instead of just frames? In most cases it would be just a
single frame. Conjunctions of (unnested) frames can be used to express a
set of nested RDF descriptions. But, in general, one might say that the
publisher is either Springer or MIT Press. Or, that the publisher is
NOT Springer. In BLD we might decide to restrict the allowed formulas.

The above annotations can appear in front of any formula, subformula,
or term. Most often they will be used in front of rules or groups,
but other places are also allowed.

This provides for the identification of individual rules as well as
groups, facts, etc. Metadata can also be attached everywhere.

For example, the IRI part

    *i "http://sample.org"^^rif:iri

and the META part

    *m "pd"^^rif:local[dc:publisher->w3:W3C
		           dc:date->"2008-04-04"^^xsd:date]

can be used individually or together in a modified RIF-BLD Example 3
(IRI and META parts):

    *i "http://sample.org"^^rif:iri
    *m "pd"^^rif:local[dc:publisher->w3:W3C
		           dc:date->"2008-04-04"^^xsd:date]
    Group ( rule fact )

or

    <*  "http://sample.org"^^rif:iri
	  "pd"^^rif:local[dc:publisher->w3:W3C
			      dc:date->"2008-04-04"^^xsd:date]
    *>
    Group ( rule fact )

Annotation works the same way at the level of rules.
For example, the following is a rule annotated with a meta part, but
without the id part.

    *m "cn"^^rif:local[dc:creator->nrc:NRC]
    Forall ?item (
	  cpt:reject(ppl:Fred ?item) :- cpt:unsolicited(?item)
		 )

or

    <* "cn"^^rif:local[dc:creator->nrc:NRC] *>
    Forall ?item (
	  cpt:reject(ppl:Fred ?item) :- cpt:unsolicited(?item)
		 )

Here is a similar example where metadata annotates an atom:

    *m "cs"^^rif:local[dc:creator->tools:SIEVE]
    cpt:unsolicited(spam:flyer12)

or

    <* "cs"^^rif:local[dc:creator->tools:SIEVE] *>
    cpt:unsolicited(spam:flyer12)

This can be extended down to the level of Constants like spam:flyer12.

The annotated rule and atomic fact can be inside an annotated Group:

    *i "http://sample.org"^^rif:iri
    *m "pd"^^rif:local[dc:publisher->w3:W3C
		           dc:date->"2008-04-04"^^xsd:date]
    Group (
      *m "cn"^^rif:local[dc:creator->nrc:NRC]
      Forall ?item (
	    cpt:reject(ppl:Fred ?item) :- cpt:unsolicited(?item)
		   )
      *m "cs"^^rif:local[dc:creator->tools:SIEVE]
      cpt:unsolicited(spam:flyer12)
	  )

Note that now the object names of metadata frames are no longer
the identifiers of rules/groups -- unlike in our earlier proposal.
The object names of metadata frames can be rif:local, rif:iri, etc.,
and can now be used to cross-reference other pieces of metadata
(which annotate other formulas). This also captures Paul's desiderata
of sharing metadata.

For example, metadata, below, references the above pd metadata:

    *i "http://sample.org/rule"^^rif:iri
    *m
"http://sample.org/meta"^^rif:iri["crossref"^^xsd:string->"pd"^^rif:loca
l
 
"cost"^^xsd:string->"12"^^currency:USD]
    Group ( rule1 rule2 rule3 )

The EBNF for RIF-BLD can be generalized thus:

  IRIMETA   ::= ('*i' Const)? ('*m' FORMULA)?
or
  IRIMETA   ::= '<*' Const? FORMULA? '*>'

  Document  ::= IRIMETA? 'Document' '(' DIRECTIVE* Group? ')'
  Group     ::= IRIMETA? 'Group' '(' (RULE | Group)* ')'
  RULE      ::= IRIMETA? 'Forall' Var+ '(' CLAUSE ')' | CLAUSE
  CLAUSE    ::= Implies | ATOMIC
  Implies   ::= IRIMETA? ATOMIC ':-' FORMULA
  . . .
  UNITERM   ::= IRIMETA? Const '(' (TERM* | (Name '->' TERM)*) ')'
  Equal     ::= IRIMETA? TERM '=' TERM
  . . .

In the XML syntax, IRIMETA can likewise be split into
an <id>-striped Const and a <meta>-striped FORMULA.
The stripes/roles <id> and <meta> can be XSD-specified
as the optional initial children of <Document>, <Group>,
<Forall>, <Implies>, <Atom>, <Equal>, etc.

The semantics for now just discards IRIMETA, as already done for
Document and Group.

Best,
Harold & Michael

Received on Saturday, 3 May 2008 21:18:11 UTC