Hi Bill,

let me CC this to axiom-developer since there might be some more people who know how Axiom works internally.

A sort summary. Last night I tried to compile libaxiom.al -> libaxiom.a. That did not work because the Aldor compiler told me.

[...]
ar x libaxiom.al basecliq.ao;
/home/hemmecke/software/Aldor/aldor/linux/latest/bin/aldor -Y . -fo -csmax=0 -laxiom *.ao;
Compiler bug...Bug: Bad case 3 (line 4588 in file ../src/genc.c).
make: *** [libaxiom.a(basecliq.o)] Error 1

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.)

...

You mean stand alone Aldor programs that use Axiom domains?

Right.

This is possible now in Aldor isn't it?  I haven't tried to
do this, but there is a small section in the Aldor users guide
about it.

Oh, which one? I've just searched through the .pdf and there does not appear the string

  "axiom"

(including quotes) and found nothing. :-(

But, hey, what is this?
http://www.aldor.org/docs/HTML/chap18.html#12

That simply means that the online version and the up-to-date cvs-repository-version of the userguide at aldor.org are not identical. The online version is older.

Under 18.13 it says...
  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.

The reason is that currently there is no libaxiom.a. And I have no idea whether the .o files under mnt/linux/algebra/ can simply be packaged to libaxiom.a. I rather believe that they cannot, since the names differ from the names in libaxiom.al.

It means currently, there is no way to get a standalone program that uses libaxiom. So there is also no way to call Axiom routines from a C program. (That is possible if you just take libaldor and libalgebra.)

and I also guess, that they are a bit faster, since all this
is binary format and not interpreted by the LISP machine.

I had assumed that when compiled in stand alone mode, the
necessary Axom domains would be compiled to binary if
specified by the compiler options.

But maybe, you tell me that inside Axiom the domains living
in libaxiom are executed in a binary fashion anyway and only
the domains etc. that are entered into the interpreter are
interpreted.

Even these are compiled and run as machine code if you use

)set functions compile on

however these are not saved permanently.

I have to trust you that this would be machine code and not some intermediate code which is approximately at the level of Java byte code.

Axiom is quite different from Maple because it is based on
Lisp. Whether the Lisp code is interpreted or compiled is
(mostly) transparent to Axiom. In Axiom, both SPAD and Aldor
generate Lisp code that is then (usually) compiled to machine
object code and effectively become a dynamic extension of Axiom
itself. There is no "Axiom kernel" as such except of course
there is a lot of special purpose code that implements the
Axiom interpreter and the SPAD compiler all of which is written
in Lisp (plus Boot, which is a kind of high-level Lisp).
Very few mathematical primitives are "built-in" at the Lisp/Boot
level - almost all of the mathematics is compiled from SPAD
code.

OK, I should have been more precise. By "Axiom kernel", of course, I meant the current Algebra stuff (basically everything that goes into libaxiom.al). I know that Axiom actually has NO kernel in the sense of Maple (except a very tiny little bit of built-in knowledge). But what you are saying sounds like: If I call a function from a domain that currently exists in Axiom (say, UnivariatePolynomial Integer), then that code is executed in object form (.o). So the .o files of all the Axiom domains should already be compiled into AXIOMsys, right?

Now if I compile a new function via

)set functions compile on

next time I use that function, the spad compiler and gcl should be invoked to get a (temporary) .o file. And more, that file should be loaded dynamically. Is that really the case?

Ralf


_______________________________________________
Axiom-developer mailing list
Axiom-developer@nongnu.org
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to