|
|
last edited 4 years ago by hemmecke |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ||
Editor: page
Time: 2013/04/28 17:40:20 GMT+0 |
||
Note: |
changed: -As mentioned on AxiomProgramming, there are a number of languages connected to PanAxiom. As mentioned on FriCASProgramming, there are a number of languages connected to PanAxiom.
As mentioned on FriCASProgramming?, there are a number of languages connected to PanAxiom?. Since for actual users only 3 of them are relevant, namely, Spad, the Axiom interpreter language, and Aldor, we are going to list here a number of differences.
The main difference between Aldor/Spad and the interpreter language is that the interpreter language is more relaxed with respect to types. As a first iteration one could say that the interpreter language is identical with Spad plus a mechanism that throws in coercion functions in places where they make sense. This mechanism is, however, a heuristics. It sometimes does a coercion at the wrong moment so that eventually the computation will not succeed for seemingly non-obvious reasons.
In fact, these coercions are helpful for people that come from typeless computer algebra systems. Neither Spad nor Aldor do such automated coercions. For serious library it is a good thing to be explicit about type coercions. The flow of computation should be predictable.
There are other small differences. For example, you can use the keyword rule
in the
interpreter like:
rule log(x) + log(y) == log(x * y)
but that form is not available in Spad or Aldor. You would have to call the corresponding library functions more explicitly.
See also http://groups.google.com/group/fricas-devel/browse_thread/thread/bdb450b522c2faf9 for a list of differences that still exist and are about to be remove between the interpreter language and Spad.
Generator
, Spad has not.delay
is a (unused and reserved) keyword in Aldor but not in Spad.
Rather it is a function name in the Axiom library.#pile
)
Spad is written exclusively in pile mode. in Aldor and with
)' in Spad.import Integer
. In Aldor one writes import from Integer
.Rep
is defined as a constant, i.e., one writes something like:
Rep == Record(re: Integer, im: Integer) whereas in Spad one has to write:: Rep := Record(re: Integer, im: Integer) i.e., like a variable assignment.
==
in Aldor is: "assignment of a constant". In Spad ==
means "delayed assignment".rep
and per
to convert between the types %
and Rep
.
In Spad, this is not always necessary. This is one of the places where Spad throws in some mild form of
automated coercion.op := operator 'X In Aldor, the apostroph is reserved, but not used.
extend D: C == add {...}
apply
, Spad use elt
.bracket
whereas Spad uses construct
, i.e., '[a,b,c]?' is translated to
bracket(a,b,c)
and construct(a,b,c)
, respectively.C: Category == with { ... default { ... } whereas in Spad they are written with the 'add' keyword:: C: Category == with ... add ....
Cross
, TrailingArray
, Literal
, which are not in Spad.