axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Axiom-developer] Aldor and Lisp


From: Page, Bill
Subject: RE: [Axiom-developer] Aldor and Lisp
Date: Wed, 19 Oct 2005 13:47:10 -0400

On Wednesday, October 19, 2005 5:02 AM Martin Rubey wrote:
> 
> Christian Aistleitner writes:
> 
> > I wrote that parser almost 1.5 years ago (I guess). I still
> > have it on some Backup if someone is interested. It was
> > implemented in Aldor. I could parse all source files I tested.

An Aldor parser written in Aldor?! I did not receive the rest
of the background of this email, but it certainly sounds
interesting. Could you forward a copy to the email list?

> 
> This is great news! I suppose, however, that it parses only 
> the nopile syntax, doesn't it?
>  
> > However, the code is more or less worthless, as it is _not_
> > properly documented. 
> 
> I disagree slightly :-)
>

I disagree completely. I think an Aldor parser written in Aldor
is would be very worthwhile. If you make it available on the
web, then we can help document it.
 
> > Nevertheless, the parser is as far as I remember complete. 
> > But if one does not want to restrict oneself to implementing
> > the compiler in Aldor, I guess you'd be better off with some
> > compiler compiler.
>

I think that it has value in any case as a rigorous definition
of the grammar. And Aldor is close to SPAD, so it is not out
the question to port this code to SPAD.
 
> Am I correct that Aldor is able to compile to lisp?

Yes. This is already used in the Aldor/Axiom integration.

> Then it would probably be possible to run this Aldor parser
> in a Lisp image, maybe our Lisp gurus could do some magic with
> this?

That should be simple. But machine generated lisp is not likely
to be very easy to maintain as primary source and if we can't
get rid of the Aldor dependence then there doesn't seem to be
much point.

> 
> In fact, I know nearly nothing about compilers and interpreters.
> So maybe somebody could detail here the bits and pieces needed
> to morph the current Spad compiler and interpreter of Axiom into
> an Aldor compiler and interpreter for Axiom?

One thing to keep in mind is that successfully parsing a language
is probably about only 1% of the overall problem - main issues
really being code generation and optimization.

BTW here is another very good paper on the Aldor language:
http://portal.axiom-developer.org/refs/articles/thompson-aldor.pdf/view
It includes "a formal account of the semantics and type system of
Aldor". There formal semantics are the kind of specification on
which the code generation must be based.

> 
> As far as I understand, one "problem" is that the Axiom 
> interpreter knows quite a bit about the Algebra, to do it's
> type inference, which is a "must have"...
> 

I don't think that this is a problem, per se.

The Axiom interpreter remains a central component of Axiom
that needs to access and manipulate especially the type
information from the Axiom library. This is done now largely
through the database (daase) files. Both SPAD and the Aldor
Axiom interface code already update the database. A new
compiler would have to do the same.

Regards,
Bill Page.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]