Download Maple Advanced Programming Guide

Transcript
A.1 Internal Organization •
397
with a true result), the statement evaluator is invoked again to do the
assignment, for which the name-forming evaluator is invoked with the
left side of the assignment, and the expression evaluator with the right
side. Since the right side involves floating-point values, the expression
evaluator calls the arbitrary precision floating-point evaluator.
Normally, the user does not specifically invoke any of the evaluators,
but in some circumstances, when a non-default type of evaluation
is needed, the user can directly call evalb (the Boolean evaluator),
evaln (the name-forming evaluator), evalf (the arbitrary precision
floating-point evaluator), or evalhf (the hardware floating-point evaluator).
2. Algebraic Functions These are commonly called basic functions.
Some examples are: taking derivatives (diff), dividing polynomials (divide), finding coefficients of polynomials (coeff), computing series (series), mapping a function (map), expanding expressions
(expand), and finding indeterminates (indets).
3. Algebraic Service Functions These functions are algebraic in
nature, but serve as subordinates of the functions in the previous
group. In most cases, these functions cannot be explicitly called by the
user. Examples of such functions are the internal arithmetic packages,
the basic simplifier, and retrieval of library functions.
4. Data Structure Manipulation Functions These are like the algebraic functions, but instead of working on mathematical objects, such
as polynomials or sets, they work on data structures, such as expression sequences, sums, products, or lists. Examples of such functions
are operand selection (op), operand substitution (subsop), searching
(has), and length determination (length),
5. General Service Functions Functions in this group are at the
lowest hierarchical level. That is, they may be called by any other
function in the system. They are general purpose, and not necessarily specific to symbolic or numeric computation. Some examples are:
storage allocation and garbage collection, table manipulation, internal
I/O, and exception handling.
Flow of Control
The flow of control need not remain internal to the Maple kernel. In many
cases, where appropriate, a decision is made to call functions written in
Maple and residing in the library. For example, many uses of the expand