Re: Notation for sets in n3

this is a while ago and I thought I mentioned alternative,
but can't find it on this list.. what we often write is
  ( <a> <b> <c> )^owl:oneOf
and treat it internally as 1 term (it can't denote 2 sets)

-- 
Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/




Dan Connolly <connolly@w3.org>
Sent by: public-cwm-talk-request@w3.org
04/08/2004 18:49

 
        To:     Sandro Hawke <sandro@w3.org>
        cc:     Tim Berners-Lee <timbl@w3.org>, Jos 
De_Roo/AMDUS/MOR/Agfa-NV/BE/BAYER@AGFA, Yosi Scharf <syosi@mit.edu>, 
public-cwm-talk@w3.org
        Subject:        Re: Notation for sets in n3



On Wed, 2004-08-04 at 11:29, Sandro Hawke wrote:
> > True.  I had been thinking that formulae were too different from lists
> > for sets to look like them - but then, formulae are indeed unordered
> > sets of statements.
> >
> > { <a>, <b>, <c> }
> >
> > works for me, as I also kinda expect {} for a set since high school.
> >
> > Currently N3 is an LR1 language which can be predictively parsed: you
> > know which production is being expanded by looking just at the first
> > token.   This change would mess that up, in that one would have to try
> > both productions to distinguish
> >
> > { <a> <b> <c> }  from  { <a> , <b>, <c> }
> >
> > where <a> could be any path expression.
>
> Yeah....   Yosi pointed that out to me yesterday.   Ugh.
>
> I'm inclined to let the machine do the work.

I'm inclined the other way, in this case.

>   Prolog DCGs and
> blindfold's btyacc parser allow unlimitted lookahead, which gives you
> expontial worst case performance problems, but there's no penalty in
> the normal case, and I don't think this grammar ambiguity allows one
> to construct a bad situation.  But it would be an obstacle to N3
> spreading.

Yes, I think so...

"worse-is-better, even in its strawman form, has better survival
characteristics than the-right-thing"
-- http://www.jwz.org/doc/worse-is-better.html

> > The inelegant but effective solution to that would be
> > { , <a>, <b>, <c> }
> > which would be consistent with
> > {,}
> > as the null set and
> > {,<a>}
> > as a singleton set.
>
> Is it okay to use { } as both the empty set and the empty formula?

My first reaction is "ew" but I can't think of any technical
reason why not.

I'm partial to {| <a>, <b> |} at this point, though I'd like
to be pleasantly surprised by some other alternative.

>      -- sandro
--
Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Tuesday, 16 August 2005 15:18:50 UTC