It is possible to use the Aldor compiler WebSite:www.aldor.org to compile functions which you then can use Axiom. For details see: Support for domains and packages is now in the testing stage. The Axiom/Aldor interface works with the open source version of Axiom (as of Patch-44) by Peter Broadbery. Thanks Peter! But note that the Aldor interface itself is not part of the current Axiom source distribution. There is currently (August 2008) a branch in the FriCAS repository aldor-interface which builds an Aldor interface if at configure time the aldor binaries and some library (libfoam.al) are available. It works by: ./configure && make && make install There is just one issue left that is connected to either the Aldor compiler or FriCAS. See Issues and links therein for more details. A new version of Axiom based on axiom--main--1--Patch-44 and Peter's interface has been installed on MathAction including AxiomWiki. So you can use Aldor on this website. For details about how to install the Axiom/Aldor interface, see
below. Note: As of Patch-46, the Aldor on MathActionThis is a simple example of how to use Aldor on MathAction. To compile an Aldor function, for example this non-recursive method to compute a factorial, in MathAction the Aldor code appears between \begin{aldor}[fact] ... \end{aldor} tags on the edit page. aldor #include "axiom.as" aldor Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/fact.as using AXIOM-XL compiler and
options
-O -Fasy -Fao -Flsp -laxiom -Mno-ALDOR_W_WillObsolete -DAxiom -Y $AXIOM/algebra -I $AXIOM/algebra
Use the system command )set compiler args to change these
options.
Compiling Lisp source code from file ./fact.lsp
Issuing )library command for fact
Reading /var/zope2/var/LatexWiki/fact.asyThe optional [name] parameter is used to name the compiled library
file which can be used later on another page in a Now call the function in Axiom as you would any other. First get the library axiom )lib fact axiom Reading /var/zope2/var/LatexWiki/fact.asy Now we test it: axiom fact(11)
Type: PositiveInteger
axiom sqrt(fact(13))
Type: AlgebraicNumber
If you care to, you can also look at the Aldor source generated lisp code and the final compiled result Here is an example from WebSite:www.aldor.org/docs/HTML/chap18.html aldor #include "axiom.as" #pile aldor Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/2504912445765138530-25px004.as using
AXIOM-XL compiler and options
-O -Fasy -Fao -Flsp -laxiom -Mno-ALDOR_W_WillObsolete -DAxiom -Y $AXIOM/algebra -I $AXIOM/algebra
Use the system command )set compiler args to change these
options.
Compiling Lisp source code from file
./2504912445765138530-25px004.lsp
Issuing )library command for 2504912445765138530-25px004
Reading /var/zope2/var/LatexWiki/2504912445765138530-25px004.asy
MatrixSymmetry is now explicitly exposed in frame initial
MatrixSymmetry will be automatically loaded when needed from
/var/zope2/var/LatexWiki/2504912445765138530-25px004axiom m := matrix[[1/2,1/3],[1/4,1/5]]
Type: Matrix Fraction Integer
axiom s := symmetricPart m
Type: Matrix Fraction Integer
axiom a := antisymmetricPart m
Type: Matrix Fraction Integer
See also the more complex examples: Building Axiom with Aldor(preliminary instructions) We plan to (re-)integrate the linkage of Axiom with the Aldor as an optional part of the Axiom build in the next release of Axiom 3 beta. Until then to build Axiom with Aldor support you must do the following:
More Examples Having put the following simple domain in a file aldor #include "axiom.as" aldor Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/4005392542604933580-25px006.as using
AXIOM-XL compiler and options
-O -Fasy -Fao -Flsp -laxiom -Mno-ALDOR_W_WillObsolete -DAxiom -Y $AXIOM/algebra -I $AXIOM/algebra
Use the system command )set compiler args to change these
options.
Compiling Lisp source code from file
./4005392542604933580-25px006.lsp
Issuing )library command for 4005392542604933580-25px006
Reading /var/zope2/var/LatexWiki/4005392542604933580-25px006.asy
Test is now explicitly exposed in frame initial
Test will be automatically loaded when needed from
/var/zope2/var/LatexWiki/4005392542604933580-25px006I compiled it with Aldor as above. In Axiom you should do: )co test.as axiom )sh Test axiom fact(5)$Test
Type: PositiveInteger
Known Problems see Issue #219 Here is a precomputed libaxiom.al that has been produced with src_aldor2.tgz and FriCAS (rev 286). |