oldk1331 wrote:
>
> I wonder how other CASs choose expression's representation, I'll investigate
> when I have more time.
As first approximation almost everbody uses something like
Lisp S-expressions. Devil is in detalis. Already machine
implementations of Lisp S-expressions may differ. One
can use binary nodes like Lisp and form lists from them.
Or one can use n-ary nodes (vectors). There are various
levels of sharing. AFAIK Maple puts all nodes in a global
hash table and when creating new node it first check if
node is in the table, if yes it returns reference to node
in the table, if not it creates new node and puts it in
the tables. IFAIK MockMMA by Richard Fateman (which
emulates some Mathematica behaviour) also uses such table.
FriCAS has 'minimalise' function in 'compress.boot', but
it is used only if some cases, while in Maple this is
universal behaviour. IIUC Maxima just repeats nodes.
Reduce in general repeats nodes, but has notion of
kernel and keeps global table of kernels.
Another aspect is properties: one frequently need to
associate extra data with symbols (and possibly other
expression nodes). One can use hash tables to find
such associated data but it has nontrivial cost.
Lisp invented property lists so that one can cheaply
associate extra data with symbols. Maxima uses Lisp
property lists, but also explictely reserves parts
of S-expression to represent properties of given
node. FriCAS uses Lisp property lists in the interpreter,
but at algebra level makes no use of them. Instead,
operator (elements of type BasicOperator) have
property list, so one can store extra data in operators.
AFAIK both Maple and Mupad at logical level use properties,
but I do not know how they are implemented.
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.