Prism criticism

Maneesh Yadav 97yadavm@scar.utoronto.ca
Mon, 14 Jun 1999 13:23:03 -0400 (EDT)


Please take me off your cc's
Thanks, 
Maneesh

On Sun, 13 Jun 1999, Jim Little wrote:

> "Thomas M. Farrelly" wrote:
> > 
> > James Little wrote:
> > [ prism ]
> > 
> > I think I follow your idea. I just use a different terminology. I.e. in
> > an oo-context you would say that a class specifies a consept and the
> > protocol of the class specifies the language.
> 
> I think you could look at it that way.  I'm a little dubious about using
> OO terminology because Prism is definitely not OO.  But I think I see
> where you're coming from.
> 
> > Just two questions:
> > 
> > How do you write the meta-models, languages? In other words what is the
> > language of the meta-meta model?
> 
> Well, I'm not sure if you got this far in the spec, but programs are
> represented internally in Prism with three basic "atoms" -- _Bit,
> _Stream, _Map.  I call these representations of programs "models."  The
> internal format is important because mini-compilers interoperate by
> manipulating these models, not source code.
> 
> So a metamodel doesn't define a "language" per se.  It defines how a
> program (or other concept) may be modeled.  It does so by describing a
> set of models and then using natural language to define how each model
> is interpreted.  It's not as complex as it sounds... check out my web
> site (http://www.teleport.com/~sphere) for some simple examples for
> representing strings, integers, etc.  (They're all linked from the front
> page.  Look for "Xxx Metamodel Specification.")
> 
> > And what do you do when languages conflict? I.e. when I reserve the
> > notation ' ${foo.foo} ', or ' ** use ... ** ' in own little sublanguage.
> 
> I haven't figured this part out yet.  :)  I've got some ideas for a
> 'universal language' which will be extensible with arbitrary
> sub-languages.   I think it will contain a lot of meta-syntax allowing
> the programmer to define how it is parsed.  (I.e., "${...} constructs
> should be parsed into a FOO model by the Prism/FOO parser...")
> 
> > Also, when going about the problem as you do, i.e. code within code and
> > languages within languages, there is an accute need to clearly define
> > the order of evaluation. For example:
> [example deleted]
> 
> Good points.  As I've said, I haven't really determined how I'm going to
> make the languages interact.  At this time, I'm focusing on making
> metamodels interact.  (Well, I will be once the Prism compiler is done,
> which will be in the next month or so.)  If I can get that solved, then
> I'll have a solid foundation, and a little bit of trial and error with
> the languages is okay.
> 
> > I haven't gone into to much detail on the Prism specification, so this
> 
> The Prism specification doesn't really say anything about languages. 
> :)  Just that the Prism compiler has to be able to read in text files
> and represent them in terms of such-and-such metamodel.  Once they're
> inside the compiler, transforming them to "actual" models is the job of
> a mini-compiler, or mini-parser, really.  So we've got free reign in
> terms of how we deal with languages, including the possibility of
> multiple 'universal' languages.  So if I come up with a solution, then
> you come up with a better one, both can be used.  :)
> 
> Good comments all around... thanks!
> 
> Jim
> 
> PS: I'm going on vacation, so if you respond I won't be able to answer
> for about 5-7 days.
>