W3C home > Mailing lists > Public > public-rif-wg@w3.org > September 2010

review of primer

From: Sandro Hawke <sandro@w3.org>
Date: Mon, 27 Sep 2010 21:52:30 -0400
To: public-rif-wg <public-rif-wg@w3.org>
Message-ID: <1285638750.20861.344.camel@waldron>
Here are my comments from Sept 17th, that I mentioned in last week's
meeting and hoped to implement myself.   Unfortunately, I've been sick
and haven't been able to do much; I'm still happy to do them if I have
time before any of the editors.    Sorry, but a few of these (esp on the
title of the document) may have been obsoleted by more recent discussion
and comments - I don't remember right now how that got resolved, so I
left my comments as I'd written them before last week's meeting.   

  -- Sandro

The capitalization of "IMDb" and "DBpedia" were often incorrect.  I went
ahead and fixed this.   Also, IMDb and IBDB where expanded as
"International..." but it's really "Internet...".  I also fixed this.
>  Existing RIF dialects that are not discussed in this document include
>  [PRD] and [FLD].

FLD is not a dialect; it's a specification for a way to make more
dialects.  I suggest something like:

        The RIF Production Rules Dialect [PRD] is not discussed in this
        document, nor is the Framework for Logic Dialects [FLD].
In general, I wonder about changing the title and branding this a "RIF
Core Primer"?  I think that would be good, especially for not
marginalizing PRD folks.   As far as I can tell, BLD features are only
used in section 5.1 ("Functions, Equality") and that could be usefully
retitled "BLD Features: Functions, Equality".   We could similarly add a
section, like that, on actions.
RIF CS isn't very well explained, I'm afraid.  Most critically, the
relationship to XML isn't even mentioned.  Maybe somewhere in the
introduction we can say something like:

        The standard syntax for RIF is a verbose XML syntax, designed so
        that programs can easily generate and parse it.  For human
        readers and writers, we generally use a more terse syntax which
        has a simple 1-1 correspondence to the XML. For example, in
        [BLD], the "RIF Presentation Syntax" is used to help make
        semantics of BLD more
        readable.   The correspondence between RIF PS and RIF XML is
        in section 5.1
        In this document, we use a slight variation on RIF PS, which we
        call RIF Convenience Syntax and do not formally define.  The
        difference is simply that we use the words "if" and "then"
        instead of the ":-" operator.
Personally, I would also advocate for using infix operators for And, Or,
and the builtins in RIF CS, but I guess it's a little late.   (Also,
taking the name "Conveniences Syntax" seems a little silly for such a
small change.  I would go for Primer Presentation Syntax, I guess, and
appreciate the humor in "PPS".   But whatever -- not important.)

Also, of course, it would be nice to use multi-syntax examples, so
people can see the RIF CS, RIF PS, RIF XML, and RIF-in-RDF versions of
each rule, something like what is done in the OWL Primer.  I understand
if we don't have time for that.
> Note that our examples v0.2 and v0.2.1 are now valid RIF syntax.
> However, they are not yet complete RIF documents, and are therefore 
> still shown in red.

This is not quite true; the comment syntax is still the incorrect
shortcut at that point.   

I wonder about not using comments, but instead using captions on the
examples.  I could do some CSS to make a caption which is centered or
floated to the right side of the page, if you want.
>  dbpedia:awardwinner

I've generally heard it considered somewhere between bad practice and
rude to make up terms in someone else's domain.   Can we put the made-up
terms in our example namespace?

   -> switch to madeup namespace

> rdfs:comment 

rdfs is missing from some of the Prefix lists.

Also, it's odd to use it before it's defined.  My implementation doesn't
handle that, but I guess it should.

    * CS could use # for comments.
In section 5.1, we should say something about this stuff being in BLD,
not Core -- perhaps as I suggested above.
The RifStars1.0 rule doesn't use year 2, so it'll match if there are
only two such appearances.   Simplest is probably to add that
year1<year2 and year2<year3, and update the english to say "in three
separate years".
> imdbcpt:filmframe[imdbcpt:filmname -> ?Film imdbcpt:filmyear -> ?Year]

Um, that's not right for frames.   The frame id (before the "[") should
be ex:GoneWiththeWind to match later bits of this example.
There are some "(add pointer)" notes that obviously need to be
In the example RDF triple, it should be annotated with which RDF syntax
is being used.  In this case it looks like Turtle.
> Two notable variants of OWL 2 are OWL 2 DL and OWL 2 Full.

How about: OWL 2 has several standard subsets (profiles) and two similar
semantics, called the Direct Semantics and the RDF-Based-Semantics.
> OWL 2 Full is semantically equivalent to RDF; therefore, since RDF is
intercompatible with RIF, OWL 2 Full is as well.  That is, one can infer
conclusions from OWL 2 Full axioms and RIF rules and facts.

I have no idea what that means.    Certainly OWL 2 Full is not
equivalent to RDF!

I'm afraid this OWL section isn't very helpful.   I'd rather see it
removed then left in substantially this form.  I think the important
things to say about RIF and OWL are:

      * their use together is well defined
      * sometimes one has a choice whether to do something in RIF or
        OWL; many logic sentences can be expressed in either languae
      * OWL RL can be implemented with a RIF ruleset, as shown in
      * when writing RIF to work with OWL, you can pick which OWL
        semantics you want by picking how you import the RDF and OWL.

The canonical example would be to define the semantics of an rdf "uncle"
predicate, ?x[uncle->?y] iff exists ?z ?x[parent->?z]
and ?z[brother->?y].   That can't be said in OWL 1, but it can be said
in OWL2, as in:
http://www.w3.org/TR/owl2-primer/#Property_Chains and

I'm pretty sure you can't have an OWL property chain that ends in a data
value, so you can't, for instance, define assistantsPhoneNumber (seen in
some phonebook apps) as the phone number of someone's assistant, since
phone numbers are (typically) data values.   So for that, you still need

My bottom line advice to folks is: if you can express your rules more
naturally in rules, go ahead and use RIF.  If you want to use some of
each, stick to the RL subset, so that it can all be handled as RIF.
Personally, I'd drop 7.2 (RIF in RDF).   I think it's just confusing to
people who don't need it, and those who do will find it elsewhere.  If
it stays, I may have some minor wording suggestions.
I think there should be some section at the end, like Next Steps,
pointing to
the Overview http://www.w3.org/TR/rif-overview/
and FAQ http://www.w3.org/2005/rules/wiki/RIF_FAQ
and developer's mailing list
I'd also lean slightly toward dropping the IFvsRL section in favor of
putting it in the FAQ.  It seems out of place here.  (The RIF-vs-OWL
stuff above could go into the FAQ, as well.)

That's it!    Thanks for all the hard work putting this together.   I
think with a little more polish this'll be great.

    -- Sandro
Received on Tuesday, 28 September 2010 01:52:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:47:58 UTC