Re: proposed: use abstract syntax notation (asn06)

On Mon, 2006-11-13 at 14:23 -0500, Sandro Hawke wrote:
[...]
> > I think what you are trying to define is an ontology for rule parts
> > (or maybe a UML-like diagram). This is fine and useful, but I don't think
> > it is a substitute for a concise BNF. 
> 
> I don't think either one substitutes for the other, exactly, but I think
> the BNF introduces a lot of details (like term ordering, keywords, and
> punctuation)

A BNF need not introduce punctuation nor keywords.
BNF grammars are routinely used to specify abstract types.

Term ordering is perhaps overspecification, but I'm not sure.


>  which need to vary from one concrete syntax to another, and
> which are generally irrelevant for an XML syntax.   I think an asn06
> syntax lets the WG proceed without getting stuck on details of a
> concrete syntax.

Getting stuck learning and debugging a new notation is no fun
either. It's not yet clear to me that a new notation is cost-effective.

> To be specific: would you propose that the First Public Working Draft of
> the RIF Specification include a plain-text concrete syntax for rules?

No. I like the combination of a BNF abstract grammar that has
a pretty transparent mapping to XML concrete syntax.

> We don't have consensus in the WG on such a syntax or on whether we
> should standardize one.
> 
> > Also, I don't agree that BNF's parts
> > are unnamed. They look perfectly named to me (by nonterminals).
> 
> The classes are named, but not the properties/roles.  Like in this part
> of the grammar [1]:
> 
>   HEAD     ::= LITFORM
>   BODY     ::= CONDIT
>   Implies  ::= HEAD ':-' BODY
>   
> we see a very clever hack, introducing a special kind of non-terminal
> (distinguished by being all upper case and implemented in the DTD as XML
> Entities instead of grammar productions).  This is a common pattern in
> modeling, where class names and role names are the same ("my mother is
> an instance of class 'Mother', my friend is an instance of class
> 'Friend'), but I think it quickly turns into an anti-pattern and muddies
> the waters.
> 
> I find the formulation
> 
>     Implies
>        head: LitForm
>        body: Condit
> 
> makes it much more clear that "head" and "body" name the roles that the
> parts of the implication statement play.

Ah; that's a good illustration.

Like Michael (13 Nov 2006 20:21:21 +0100) I'm happy to use turtle,
I'm beginning to see your point.


> Personally, I'd probably change the names to be closer to what I see in
> logic books (and CommonLogic):
> 
>    ImplicationSentence
>       if: Sentence
>       then: AtomicSentence

I agree.

> but that's a different issue.

Well, it's perhaps a more important issue. And it's sufficiently
close that I'm happy to discuss them in the same thread.

>     -- Sandro
> 
> [1] http://www.w3.org/2005/rules/wg/wiki/B.1_Horn_Rules
-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E

Received on Monday, 13 November 2006 20:13:55 UTC