[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Embedding Axiom
Re: [Axiom-developer] Embedding Axiom
Tue, 17 Nov 2009 00:26:59 -0500
Thunderbird 220.127.116.11 (Windows/20090302)
Stephen Wilson wrote:
A rewrite from scratch? Well, more like a "remolding of the clay" than a
The idea is to move from a working system to a working system with each
eventually restructure the internals cleanly. At the moment I am in the
restructuring the interpreter/compiler into literate form (book volume
5). As I do
On Sun, Nov 15, 2009 at 11:35:00PM -0500, Tim Daly wrote:
This is a request for design discussion for those who are interested.
Your message is very interesting.
I have some plans on how to get "from here to there" in a slow, incremental
fashion. These plans involve things like finding the basis-set of the algebra
in terms of lisp functions and then trying to find a closure of this basis set
so that the algebra embeds cleanly in this set. The compiler should compile
that basis set into an embedding in the prior layer. Lisp can support this by
defining domain-specific languages for each layer and macros from one layer to
Could you please expand on this point? How do you propose to do this
incrementally from an implementation point of view? I am asking these questions
from an engineering standpoint. In particular, are you suggesting a rewrite
(essentially from scratch, using the current implementation as a guide)?
this I am rewriting the code to be functionally equivalent.
The above comment about finding the basis set for the algebra amounts to
every lisp-source-level function call from every lisp algebra object. I
"calls" function to walk lisp code and extract the non-common-lisp
This set will be gathered, arranged, and studied. The idea is to find
the "right level"
of abstraction (ala "On Lisp" and "Structure and Interpretation"). This
abstraction forms the current base language hosting the algebra. It
forms a design
target for the top level embedded layer. Next we re-arrange the system
to make this layer
explicit (define an API, so to speak). Then we recurse the process with
the new layer.
Code in the system that uses nothing but common lisp calls forms the
other end of
the spectrum. The game is to build the two layers toward each other in a
way so that each layer embeds properly in the prior one. Because Axiom
was written by
so many different people the internals are more like "tent poles" of
where each one builds from nothing all the way to the top, reproducing
in different ways.
Along the way the code needs major cleanup work. On Lisp and SICP stress
functional programming but the Axiom internals are wildly coupled
through the use
of special variables. Some of these can be eliminated with extra
most of those that cannot will still be able to be limited using lexical
In addition, the use of Boot code led to a fantastic amount of list
where it is not appropriate. Major structures in the system should be
objects or some other kind of structuring. Because of the Boot idioms it
to impossible to find all the places a data structure is modified.
global state happens all over the place. Now that the boot code is gone
can take a more natural and better disciplined shape.
Even better for the long term would be to make each structure immutable
"Purely Functional Data Structure" by Chris Okasaki). This would make it
to move the system to a parallel base of code. This level of rewrite is
on the queue
to think about and study but might take some experimenting.
I have roughly 140 files still to merge into the interpreter volume and
it takes about a
week of moving/testing/documenting/rewriting/xrefing/latexing for each
one so this
is going to take a while.
- [Axiom-developer] Embedding Axiom, Tim Daly, 2009/11/15
- Re: [Axiom-developer] Embedding Axiom, Martin Baker, 2009/11/16
- Re: [Axiom-developer] Embedding Axiom, Stephen Wilson, 2009/11/16
- Re: [Axiom-developer] Embedding Axiom,
Tim Daly <=
- Re: [Axiom-developer] Embedding Axiom, M. Edward (Ed) Borasky, 2009/11/17
- Re: [Axiom-developer] Embedding Axiom, Bertfried Fauser, 2009/11/17
- Re: [Axiom-developer] Embedding Axiom, Tim Daly, 2009/11/17
- Message not available
- [Axiom-developer] Embedding Axiom (Hickey and fold/unfold), Tim Daly, 2009/11/20
- Re: [Axiom-developer] Embedding Axiom (Hickey and fold/unfold), Martin Baker, 2009/11/21
- [Axiom-developer] Embedding Axiom (Hickey and fold/unfold) and rule based programming, Tim Daly, 2009/11/21
- [Axiom-developer] Embedding Axiom (Hickey and fold/unfold) and Reifying time, Tim Daly, 2009/11/21
- [Axiom-developer] Embedding Axiom (Hickey and fold/unfold) Folding and generalization, Tim Daly, 2009/11/21
- [Axiom-developer] Re: Embedding Axiom (Hickey and fold/unfold) Folding and generalization, Martin Baker, 2009/11/21
- [Axiom-developer] Re: Embedding Axiom (Hickey and fold/unfold) Folding and generalization, Tim Daly, 2009/11/21