axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] [AldorForAxiom]


From: Bill Page
Subject: [Axiom-developer] [AldorForAxiom]
Date: Thu, 25 Aug 2005 15:01:18 -0500

Changes http://www.axiom-developer.org/zope/mathaction/AldorForAxiom/diff
--

??changed:
-functions which you then can use in Axiom. Unfortunately, support for domains
-and packages is still buggy, but it's nearly working - thanks to Peter!
functions which you then can use Axiom.

Support for domains and packages is now in the testing stage. The Axiom/Aldor
interface has been updated for the open source version of Axiom (as of Patch-44)
by Peter Broadbery. **Thanks Peter!** A new version of Axiom based on
axiom--main--1--Patch-44 and Peter's interface has been installed here on
MathAction.

Aldor on MathAction

  This is a simple example of how to use Aldor on MathAction.

First compile some function, for example this non-recursive
method to compute the factorial:
\begin{aldor}
#include "axiom.as"

fact(n: PositiveInteger): PositiveInteger == {
    n <= 1 => 1;
    res: PositiveInteger := 1;
    while n > 1 repeat {
        res := res * n;
        n := n-1;
    }
    res
 }
\end{aldor}

Now call the function in Axiom as you would any other
Axiom function:
\begin{axiom}
fact(11)
\end{axiom}

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:

1. Make sure you have the most up to date version of gnu make

   make --version
   GNU Make 3.80

   If not, then upgrade your version of make or linux first.

2. Install the Java development kit JDK

   http://java.sun.com/j2se/1.5.0/download.jsp

3. Download and install Aldor as described here:

   http://www.aldor.org

   Be sure to set ALDORROOT and the PATH to Aldor properly for
   your system.

4. Download Peter's Aldor patches and make files here

   "aldor.diff":aldor.diff

   "src_aldor2.tgz":src_aldor2.tgz

5. Update your Axiom source code to Patch-44 (or greater):

     cd axiom--main--1
     tla update

6. Apply the Aldor patches::

     patch -p 1 < ~/aldor.diff

7. Now build a new version of Axiom::

     ./configure
     (set AXIOM environment variables)
     make

8. Extract the Aldor make files::

     cd src
     tar xzvf ~/src_aldor2.tgz

9. Build the Aldor interface using the following commands:

   1. cd aldor

   2. document Makefile.pamphlet

   3. touch ../../int/aldor/dep_spad.stamp

   4. document Make.functions.pamphlet

   5. make 2>&1 | tee aldor.log

   The build might take up to 2 hours or some machines. 

10. Finally, download and save the file

    "axiom.as":axiom.as

    into 'aldor/1.0.2/linux/include/' of your aldor (binary) distribution.

    Congratulations! Now you should be able to compile Aldor files in Axiom.

11. Save the fact example above into a file named 'fact.as'

12. Start Axiom

13. Compile and run the example file

    )co fact.as
    fact(5)

<hr />
Out of Date

  The information below is out of date and will be soon replaced

Unfortunately, support for domains and packages is still buggy, but
it's nearly working - thanks to Peter!

--
forwarded from http://www.axiom-developer.org/zope/mathaction/address@hidden




reply via email to

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