axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] Re: libaxiom.a


From: root
Subject: Re: [Axiom-developer] Re: libaxiom.a
Date: Tue, 21 Mar 2006 10:59:48 -0500

> Why would someone want libaxiom.a in the first place?
> 
> Well, that is needed to produce stand alone programs. And I was and I am 
> still not sure how library code is executed internally inside Axiom. Is 
> it always interpreted LISP or does AXIOMsys contain object code from the 
>   ALGEBRA libraries? (More below.)
> 
>    At present, code from the AXIOM library will only run inside an
>    AXIOM  workspace. Consequentely Aldor programs extending the
>    AXIOM library will only run inside AXIOM. For a later version,
>    it is planned that the entire AXIOM library will be translated
>    into Aldor, at which point it should be possible to call it
>    from C, Fortran, or any other environment in which Aldor operates.

Ralf,

In standard GCL when you compile a lisp program GCL outputs C code,
compiles it with GCC and dynamically links it with the GCL system.
Thus,

   GCL lisp code -> C code (gazonk.c) -> GCC -> dynamic link to lisp

In AXIOMsys, which is just lisp code running in GCL, the spad compiler
generates lisp code (see any .NRLIB/code.lsp file) and asks GCL to compile it.

  spad -> GCL lisp code -> C code -> GCC -> dynamic link to lisp

When you use aldor inside AXIOMsys the process is:

  aldor -> GCL lisp code -> C code -> GCC -> (libaldor + dynamic link to lisp)

thus all compiled GCL code actually executes machine code.



AXIOMsys has a large set of libraries. These libraries can't be compiled
and executed standalone because they assume the underlying lisp
(grep for $Lisp in the algebra sources).

There have been numerous attempts by many people to create a standalone
version of the AXIOMsys library. All have failed because the libraries
assume lisp. I suppose you could figure out a way to link GUILE into
the aldor libraries and succeed thru that path. 

You should notice that making the axiom library run standalone is not
as useful a goal as it seems. There are about 100 computer algebra
systems I've collected and about 90 of them are of the compiler + library
form. The key flaw is that they are very difficult to use. The interpreter
knows certain things, like which libraries to dynamically load, how
to parse input, and how to simplify output that make it much more user
affectionate.

The dream was to have a standalone version of the axiom compiler rather
than an embedded version. I didn't believe this was useful then and I
still don't believe it is useful now. A more effective path would be
to load and compile your computation in lisp and then generate a 
standalone image to do that computation, sort of a special version
of AXIOMsys. This IS standalone, machine-language code with an embedded
lisp that can use all of the axiom library. CLISP will actually let you
generate a .exe file if you need it.

Tim







reply via email to

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