Mon, 28 Sep 1998 22:31:57 -0400 (EDT)
Here something going on in my mind.
To have reflection, one have to have a meta-model in which to express
knowledge about itself. There are many lame meta-model already in use.
One of them, is the class concept like in Smalltalk. An other one that come
in mind is the model of database we do before designing one. Some 4th
generation database language have a meta-model that knows wich
entities exist, what are the relations, and so you can define the database
in a user interface by using this meta-model to express a database.
But this meta-model, you can't change it. I am
thinking at Progress and Access when I say this.
One of the best reflective language is english, french, dutch, etc. In these
language, you can use all the word of the language to describe the language.
In fact there is what I would call meta-words like: word, phrase, expression,
meta, language,etc that can be use to talk about the language.
But in current state of things, I dont think we could have a natural language
compiler. But we already have something almost like that.
We have tools to make programming languagess like lex and
yacc (flex and bison).
So in my opinion, a good HLL must have a way to define grammars,
and use a small language to describe what to do each time a token
of the grammar is encontered. One basic language that could be used
to describe what to do is hexadecimal machine code.
With this basic language, one could describe an assembler, translating
mnemonics, in code machine. Then the assembler could be use to
translate a higher-level language, and any programming language.
Languages in which you can express a grammar and say what to do when
you encounter a token of this grammar already exists. The only one that
come to my mind is ML. I think I saw an other one like taht but can't figure
out which one. The only big problem I see with ML is that you must describe
what to do when you see a token in ML, you can't say I have just define
a garak interpreter, now I wish to explain what to do when you see a
token with markota's grammar (garak and markota are names coming
from my imagination) using the garak language I just defined.
Anyway, that is the king (oops typo: kind :-)) of meta-model I think
we should use in Tunes. I guess it is not a new idea. In fact I think I saw
this kind of idea express in the mailing list some years ago. Its just that
I was thinking about what I read somewhere about making some kind of
universal recursive annotation system (I can only guess what annotation
means) and I was thinking about it and what's the best meta-model I
can think and came back on this old idea. Does someone knows of others
language like ML where you can easily define grammars and give the
semantics by using the language?