axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] Low-level stuff and where to look for documentatio


From: Guillaume Yziquel
Subject: Re: [Axiom-developer] Low-level stuff and where to look for documentation.
Date: Tue, 17 Aug 2010 22:49:01 +0200
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707)

Tim Daly a écrit :

Guillaume Yziquel wrote:

Hello.

I've been reading a few things, as time allows, when it comes to my project of embedding Axiom into OCaml.

As far as I understand it, it seems to be better to bind a GCL interpreter (I do not know Lisp well, so feel free to correct), and access Axiom stuff from this interpreter. So I'm currently looking as to how this should be done.

This is a possible path. It would be possible to grab the top level of the
lisp loop using pseudo-ttys (an expect-like interface). GCL is just a big C program
so you can add your own code to the GCL build.

I've been looking at ECL for embedding ECL into OCaml.

I'd really love to avoid pushing custom code into my GCL build if it doesn't end up upstream. My hope would be to use things as packaged by Debian, and therefore be able to repackage an OCaml-GCL binding.

I haven't looked at GCL very much yet, as ECL seems to be better suited for bindings. I'll look into GCL source code for something like a C API when I find the time for it.

Should I expect Axiom to run seemlessly under ECL?

But, on the other hand, The Axiom / Lisp 'interface' isn't so clear to me. I've been reading chapter 4, and specifically section entitled "Understanding a compiled function", which is the only place I've found low-level information. I've got a few questions on this topic:

-1- What is the purpose of the vmlisp.lisp.pamphlet file?

"Axiom" used to be written in Maclisp (MIT), then was rewritten into VMLisp
(IBM Mainframe), and then I helped rewrite it into common lisp. Because of
the complexity of the system the vmlisp port was written by implementing the
maclisp primitives. Because of the complexity of the system the common lisp
port was written by implementing the maclisp and vmlisp primitives in common lisp.
These "foreign primitive implementations" live in vmlisp.lisp

Reading that, I'm wondering whether ECL is really an option. And even an unmodified GCL doesn't seem to fit entirely the bill.

Would you welcome modifications in the source code allowing to expose a C API? (I'm not committing to that, mind you...)

The low-level information does not yet exist. The fundamental task of the Axiom project has been, and continues to be, writing this kind of documentation. But Axiom is about 1 million things of code and we are still in the phase of collecting
the code into a literate form so it can be documented.

I do not have much against literate programming, but I must admit that I'm having a tough time with a build system that I cannot easily find nor understand.

-2- It also seems that the commands

    )trace ONEP )break
    (trace (ONEP :entry (break))

are equivalent but that one is on the Axiom command prompt and that the other is on the Lisp command prompt. How do you access the Lisp command prompt

They are equivalent.
You can access the lisp command line with
  )lisp ...some lisp s-expression...
as in
 )lisp (trace (onep :entry (break))

OK. And where can I find the source code implementing the ')lisp' token? That would be of great help.

-3- Where is the source code of the /usr/lib/axiom-20100701/bin/AXIOMsys file (as installed by Debian)?
http://axiom-developer.org/axiom-website/downloads/axiom-july2010-src.tgz

AXIOMsys is the whole interpreter/compiler/system. It consists of hundreds of files.
You can see the source from any release (they happen every 2 months) at:
http://axiom-developer.org/axiom-website/download.html

I think I better rephrase my question: I'm looking for the main() function for AXIOMsys. Could it be possible to pinpoint it in the source code?

All the best,

Guillaume Yziquel.



reply via email to

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