Re: merged presentation syntax (MPS)

> > > > The idea is to have one presentation syntax for all dialects.
> > > > The code isn't done enough for me to say with confidence whether it's
> > > > currently a superset of the BLD PS, but I've tried to make it so.
> > > 
> > > Interesting. This is essentially part of what FLD is trying to achieve fo
> r
> > > logical dialects.
> > > 
> > > Since you want this to be a syntax for all dialects, it should
> > > be a superset of the FLD PS, not just BLD PS. Furthermore, it must then a
> lso
> > > subsume PRD (if by "all dialects" you really mean all dialects).
> > 
> > Yes, of course.  I hadn't looked at them yet, but within this framework,
> > I wouldn't expect them to be difficult.  
> > 
> > Looking at it a little, I think MPS is a superset of FLD-PS (give or
> > take any vagueness in how its specified).  (Okay, I cheated, and just
> > added NEG and NAF, which I hadn't gotten to.)  I imagine there's similar
> > stuff in PRD.
> > 
> > Actually, I see now I didn't generalize External.  What does External
> > with two arguments mean?  Honestly, I have no intuition about how
> > anything other than a predicate or function-name could be external...
> 
> One argument indicates the source that defines the external.

Ah.  The way that's usually done with the Semantic Web is to use the
identifier's text as a source location address (since it's a URI).  I
know there are some use cases where that's problematic, but it's a good
default at least.  There may not be any need for an override, if there
is one, to be standard.

> Re intuition, we discussed this many times. Especially external
> frames, equality, and classification.

Yeah, some of those I understood better than others.  I don't think we
have any test cases about any of them.  But we can talk about that
later; it's not essential to the syntax issue that's bothering me.

> But in BLD we decided to limit things to predicates and
> functions at the last f2f.

Yeah, I think what's confusing to me about externals is:

  1.  We write this:

             External(my:p(my:f(3)))

      and it means that my:p is external, but my:f is not.  You'd
      need to write:

             External(my:p(External(my:f(3))))

      if they both were.   That's just a little odd.  It kind of makes
      more sense to say:

             External(my:p)(my:f(3))

      But this is just a style/intuition thing, I guess.  *shrug* I
      don't have a proposal to address this....

  2.  All IRI terms are in some sense externals; some of the meaning may
      be defined elsewhere.

      The meaning of External I'm left with is procedural: it means you
      have to throw and error if you don't happen to have a value
      defined for the given argument.  So the External is probably
      optional for using RIF builtins, since they're required to be
      there anyway.

I'm sure I'm thinking about this differently from how you are.  I hope
from this e-mail you can at least understand what the difference is,
because I don't really understand your intent.

      -- Sandro
   


> michael
> 
> 
> >        -- Sandro
> > 
> > 
> > > michael
> > > 
> > > 
> > > On Fri, 13 Feb 2009 16:13:30 -0500
> > > Sandro Hawke <sandro@w3.org> wrote:
> > > 
> > > > 
> > > > 
> > > > I've been toying with an idea for the past week or two, and I've now
> > > > implemented enough of it that I'm pretty sure it's a good idea.
> > > > 
> > > > The idea is to have one presentation syntax for all dialects.  This
> > > > "merged" presentation syntax would be essentially the union of all RIF
> > > > dialects.  Its grammar would NOT attempt to enforce any of the
> > > > restrictions of each dialect; that would be left to a higher "schema"
> > > > level.
> > > > 
> > > > So, for instance, in MPS, it's perfectly valid syntax to say:
> > > >     
> > > >     forall ?x ( ?x(1) )
> > > > 
> > > > even though that kind of higher-order construct isn't valid in any
> > > > current dialect.  Moreover, MPS makes no attempt to enforce the
> > > > difference between formulas and terms, so it's syntactically valid to s
> ay:
> > > > 
> > > >     (x:p(3) and x:q(x:p(3)+1)) < 4
> > > >  
> > > > The idea is that it's left to the dialect definition/schema to say
> > > > whether that's valid in the particular dialect.  In either case, it
> > > still has a well-defined mapping to XML.
> > > > 
> > > > Part of my playing around with MPS has been to see if I can add the
> > > > things I'd like to see in a PS to make it more readable.  For example, 
> I
> > > > prefer "if" and "then" to an infix operator.  I propose that we let the
> > > > person authoring a particular MPS document decide which to use.  (In
> > > > some situations there might be style guidelines, eg saying to use ":-"
> > > > or to not use ":-", but that's just style.  Both are available in the
> > > > language, as is "=>" for infix if-then.)
> > > > 
> > > > Here are some things in the current (unambiguous LALR) grammar:
> > > > 
> > > >     -- infix operators for math and logic, with the normal
> > > >        precedence rules
> > > >     -- parens allowed everywhere, to override precedence
> > > >     -- "if" and "then" keywords, in addition to ":-" and "=>"
> > > >     -- variables not needing the leading "?"
> > > >     -- local symbols required to have a leading "_" (as in DTB but
> > > >        not in example 4 of BLD), or alternatively declared as local
> > > >        in the header
> > > >     -- keywords True and False (for rif:And() and rif:Or())
> > > >     -- keywords InstanceOf and SubclassOf allowed along with # and ##
> > > >     -- optional comma separator for arguments
> > > >     -- optional semicolon separator for elements (formulas) in a group
> > > >     -- bare uris and curies are allowed everywhere, although you have t
> o
> > > >        be a little careful in using them, since their syntax includes
> > > >        some operators    ( "p:x-3" is one curie; it's not "p:x - 3" ).
> > > >        I'm torn about using qnames instead to avoid this problem.
> > > >     -- Document and Group wrappers are optional
> > > >     -- headers (eg Base(...)) and metadata can be given before ANY expr
> essi
> > > on
> > > >     -- and finally, as an experiment, I threw in { ... } for blocks of
> > > >        N3 triples (another frame syntax, common in the semantic web
> > > >        community).  (it's not full n3 -- the term syntax within the
> > > >        triples is MPS's term syntax, no N3's.)
> > > > 
> > > > The code isn't done enough for me to say with confidence whether it's
> > > > currently a superset of the BLD PS, but I've tried to make it so.
> > > > 
> > > > I hope to be able to demo it, and run it against the test cases, in a
> > > > few days....
> > > > 
> > > > The current MPS BNF is here:  http://dev.w3.org/2009/rif/mps.bnf
> > > > 
> > > >        -- Sandro
> > > > 
> > > > 
> > 
> > 

Received on Saturday, 14 February 2009 20:11:08 UTC