Re: [stack] How the Interpreter Works

"Christopher Diggins" <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
>
> On 4/5/07, Christopher Diggins <[email protected]> wrote:
> > I've written a short article about how the Cat interpreter works on
> > the Cat wiki
> > http://code.google.com/p/cat-language/wiki/HowTheInterpreterWorks.
> > I am hoping that it will help other people who are interested in
> > learning how to construct interpreters and compilers.
> >
> > Any comments or suggestions would be much appreciated!
> >
> > Christopher Diggins
> > http://www.cdiggins.com
> >
>On 4/7/07, chris glur <[email protected]> wrote:
>
> From a superficial initial read it seems to be a well structured
> top-down presentation. I've avoided C#, because I don't want
> to be screwed by M$, but I was able to understand what I
> examined of the text.
>
> I know a bit about compilers/interpreters and it's not clear
> why I would want to analyse another one. I was hoping that
> 'concatinative methods' would lead towards a formal
> [mathematical like] way of anlysing algorithms and/or
> proving code correctness. Does it ?
>

Thanks for compliment Chris.

In general the concatenative approach greatly simplifies reasoning
about algorithms and code. It also simplifies automated translation,
analysis, compilation, and optimization. Check out Manfred von Thun's
writing about algebraic manipulation of concatenative code (
http://www.latrobe.edu.au/philosophy/phimvt/joy/j04alg.html ).

It is common for most compilers to reduce code to a point-free form
(e.g. nameless) before conducting further analysis, which I think
testifies to the usefulness of point-free forms (concatenative or
otherwise). The fact that call-by-push-value semantics (
http://citeseer.ist.psu.edu/234600.html ) subsumes call by name and
call by value semantics may also indicate that stack-based approaches
are perhaps a more general formalism than either of them.

There are of course some who disagree on the value of concatenative
approaches ( http://lambda-the-ultimate.org/node/2099 )

By the way, the Mono implementation of C# (
http://www.mono-project.com/ ) is quite good, and the Cat
implementation has been reported to compile on implementations of
Mono. So you aren't completely bound to MS, but I understand the
reluctance.

Hope this helps,
Christopher Diggins
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.