Prism Mechanics, Part 2
Billy Tanksley
btanksley@hifn.com
Wed, 6 Jan 1999 17:28:32 -0800
> -----Original Message-----
> From: Jim Little [SMTP:jiml@inconnect.com]
> Subject: Prism Mechanics, Part 2
>
> I'm not entirely sure of the answer, but in the case of most
> programming
> languages, I think the meta-metamodel is "phrase-structure grammar."
> Most programming languages are defined with phrase-structure grammar,
> which says that you define a grammar by with a phrase and then the
> structure that the phrase represents. It's too much to describe here,
> but if you've ever looked at a language grammar, then you've probably
> looked at a phrase-structure grammar.
>
> I call this type of meta-metamodel a SYNTACTIC meta-metamodel. That's
> because it's entirely focused on syntax. Prism, on the other hand,
> defines a SEMANTIC meta-metamodel. It defines a set of data types
> (which could roughly be described as "bit," "32 bits," and "map") and
> then says that any metamodel may be defined with these data types.
>
Judging from your discussion below, you're still defining a
syntactic meta-model -- or more accurately, failing to define one. The
reason I say this is that your discussion below has to assume some
syntax for the meaning. Your words are big, but the underlying concept
isn't any different from any other compiler compiler I've seen. Whoops,
my mistake. The result defines something that could be compiled into a
library; it doesn't define a language. I'm not sure I see the
advantage. It might be a useful tool.
I see above that your datatypes are bit, 32bit, and map. bit
and map make sense to me; however, 32bit is a little more than
dangerous. Is there some reason why you chose "32"? Do you not trust
the programmer to be able to type "define 32bit as map (int->bit)[32]"
or whatever? It would seem to me that a more valuble semantic concept
would be a "reference", which would serve as a pointer to a bit (or
possibly a map). Like a map, its size is indeterminate.
> One important thing about _pMap is that it can contain other _pMaps.
> But it can't contain itself, not even indirectly. Think of the _pMap
> as
> physically containing other _pMaps, not just references to them.
>
With the 'reference' type, it could.
I'm not sure that the reference type owuld be wanted, of course.
It does seem like it should be a part of the metamodel rather than Prism
-- but then it's possible that even bits should be discarded and
replaced with Numbers.
> An Arrow consists of references to other arrows. In the metamodel,
> this
> is represented by Slots. An Arrow consists of two or more Slots.
> Slots
> are contiguous -- that is, the first one is at index 0x0, the second
> at
> 0x1, the third at 0x2, etc., without any gaps in the sequence.
>
This is a good excuse for replacing bits and 32bits with
Numbers.
> That's it! That's how metamodels work in Prism. The meta-metamodel
> defines a list of data types, and the metamodel describes how they can
> fit together and what they mean. It's like a language specification,
> but without the language part. :) When you write a program, you
> define
> specific data types within the constraints of the metamodel.
>
Thank you. This explanation and example made everything MUCH
more clear. I had no idea what you were talking about before. PLEASE
post an easily accessible example on your web page.
> Jim Little (jiml@inconnect.com)
>
-Billy