axiom-mail
[Top][All Lists]
Advanced

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

[Axiom-mail] Re: Axiom information


From: root
Subject: [Axiom-mail] Re: Axiom information
Date: Thu, 13 Feb 2003 20:40:51 -0500

> Dear Tim 
> I am planning to give a talk in York on object oriented mechanisms in 
> computer algebra in the next couple of weeks. Main focus will be 
> (of course) my own Java project ring.perisic.com, but I have to mention
> Axiom as well. However I find the information on the "homepage" 
> http://www.nongnu.org/axiom/ rather confusing. Is there any other
> citable
> documentation or information available/accesible describing the 
> aims and objectives of Axiom etc. i.e. the things you would normally
> expect on the homepage of a computer algebra system.
> Best regards, 
> Marc Conrad

Well, the primary documentation on Axiom is the book by Richard Jenks
and Robert Sutor "Axiom, The Scientific Computation System" 
Springer-Verlag, 0-387-97855-0 1992

The language used in Axiom is called Spad (a contraction of Scratchpad,
the original name for Axiom). During the Scratchpad days we decided to
rewrite the compiler (for the nth time, as both Axiom and its language
have always been an ongoing, evolving research effort). The result was
both the current internal spad compiler, that lives in the interpreter,
and an external stand-alone compiler written in C. The external compiler
accepts the spad language (modulo some constraints based on the fact
that it (a) doesn't have the lisp runtime and (b) can link to non-lisp
code). The external compiler went thru its own name evolution, called
A-sharp (A#), AxiomXL, and now Aldor. Aldor programs will run in Axiom
(assuming you don't use various non-axiom libraries, etc). Look at the
site www.aldor.org for details. www.aldor.org/docs/HTML/chap21.html
will bring you to a tutorial I wrote which shows how to create a
simple stand-alone polynomial type in Aldor.

The appropriate words you might want are at
http://www.aldor.org/docs/HTML/chap1.html#1

The {spad,aldor} language supports parameterized types (e.g. 
Matrix(Polynomial(Fraction(Integer))) , that is, an object can
be a Matrix of Polynomials with coefficients which are Fractions
of Integers) which are most useful in mathematics. In fact, types
carry all of the meaning of expressions. The expression 

G82322 (1) -> x:=matrix([[2,2],[2,2]])

        +2  2+
   (1)  |    |
        +2  2+

                                                         Type: Matrix Integer
creates a matrix of integers. Computing (x-x) should give you
the zero matrix, not the integer 0, as you will get in some systems:

G82322 (2) -> x-x

        +0  0+
   (2)  |    |
        +0  0+
                                                         Type: Matrix Integer


Strictly speaking, Axiom is not really an object oriented system in 
the sense of Smalltalk. In Smalltalk computing 2+3 means that you send the
"object" 2 the message "+ 3". In Axiom, 2+3 is computed by deciding that
"2" is of type PositiveInteger, 
"3" is of type PositiveInteger
"+" is a function that computes 
"+(PositiveInteger, PositiveInteger) => PositiveInteger"
and so it applies the function. 

Axiom, unlike Java, matches not only the argument types but also the
result type so the matching is much more explicit (that is, painful).

I would tend to argue, although not with much religious fire,
that Axiom is not an object oriented programming system or language.
However, it is entirely possible to think of the spad programs as
"classes" (in the java sense) with "methods" and a private data
representation. The whole type hierarchy, including all of the
dozens of data structures, can be thought of as an object-oriented
type hierarchy. Whether you want to do this depends on your religion.
I'm a hardcore lisper for most of my career and could care less :-)

As to the homepage of Axiom, yes, it lacks everything at the moment.
It will all be there eventually. I got a box of "system parts" from
NAG with various things missing due to legal constraints. The build
procedures and a general system cleanup are in progress and nearing
completion. Soon....

Hope this helps. If you have further questions, feel free to ask.

Tim Daly
address@hidden





reply via email to

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