Professional Documents
Culture Documents
00, Windows 7
%% Source Worksheet: AdvancedProgrammingGuide,Chapter07
%% Generated: Fri Sep 17 16:02:50 VET 2010
\documentclass{article}
\usepackage{maplestd2e}
\def\emptyline{\vspace{12pt}}
\begin{document}
\pagestyle{empty}
\DefineParaStyle{Maple Heading 1}
\DefineParaStyle{Maple Text Output}
\DefineParaStyle{Maple Dash Item}
\DefineParaStyle{Maple Bullet Item}
\DefineParaStyle{Maple Normal}
\DefineParaStyle{Maple Heading 4}
\DefineParaStyle{Maple Heading 3}
\DefineParaStyle{Maple Heading 2}
\DefineParaStyle{Maple Warning}
\DefineParaStyle{Maple Title}
\DefineParaStyle{Maple Error}
\DefineCharStyle{Maple Hyperlink}
\DefineCharStyle{Maple 2D Math}
\DefineCharStyle{Maple Maple Input}
\DefineCharStyle{Maple 2D Output}
\DefineCharStyle{Maple 2D Input}
\begin{maplelatex}\begin{Maple Normal}{
ContentsPreviousNextIndex}\end{Maple Normal}
\end{maplelatex}
\section{\textbf{7 Internal Representation and Manipulation}}
\begin{maplelatex}\begin{Maple Normal}{
Table A.1 lists the structures currently implemented in
Maple.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Each of structure, along with the constraints on its length and
contents, is described in the following sections.}\end{Maple
Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{Table A.1}Maple Structures}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
AND}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
ASSIGN}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
BINARY}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
BREAK}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
CATENATE}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
COMPLEX}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
CONTROL}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
DCOLON}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
DEBUG}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
EQUATION}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
ERROR}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
EXPSEQ}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
FLOAT}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
FOR}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
FOREIGN}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
FUNCTION}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
GARBAGE}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
HASH}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
HASHTAB}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
HFLOAT}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
IF}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
IMPLIES}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
INEQUAT}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
INTNEG}\end{Maple Normal}
\end{maplelatex}
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
\begin{maplelatex}\begin{Maple
INTPOS}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
LESSEQ}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
LESSTHAN}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
LEXICAL}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
LIST}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
LOCAL}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
MEMBER}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
MODDEF}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
MODULE}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
NAME}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
NEXT}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
NOT}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
OR}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
PARAM}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
POWER}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
PROC}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
PROD}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
RANGE}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple
RATIONAL}\end{Maple Normal}
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
Normal}{
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
READ}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
RETURN}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
RTABLE}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
SAVE}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
SERIES}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
SET}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
STATSEQ}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
STOP}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
STRING}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
SUM}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
TABLE}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
TABLEREF}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
TRY}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
UNEVAL}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
USE}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
XOR}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
ZPPOLY}\end{Maple Normal}
\end{maplelatex}
\subsection{\textbf{7.1 Internal Organization}}
\begin{maplelatex}\begin{Maple Normal}{
Maple appears to the user as an interactive calculator. The user
interface reads input, parses it, and then calls the math engine
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
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 (\textbf{op}) , operand substitution (\textbf{subsop})
, searching (\textbf{has}) , and length determination
(\textbf{length}) ,}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{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.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Flow of Control}}}
\begin{maplelatex}\begin{Maple Normal}{
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\textbf{expand}function are handled in
the kernel. However, if an expansion of a sum to a large power
is required, then the internal\textbf{expand}calls the external
Maple library function\textbf{`expand/bigpow`}to resolve it.
Functions such as\textbf{diff},\textbf{evalf},\textbf{series},
and\textbf{type}make extensive use of this feature.}\end{Maple
Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Thus, for example, the basic function\textbf{diff}cannot
differentiate any function. All of that functionality resides in
the Maple library in procedures
named\textbf{`diff/}\textbf{\textit{functionName}}\textbf{`}.
This is a fundamental feature of Maple since it
permits:}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Flexibility (changing the library)}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Personal tailoring (by defining your refined handling
functions)}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Readability (much of the Maple functionality is visible at the
user level) Maple allows the kernel to remain small by unloading
non-essential functions to the library.}\end{Maple Normal}
\end{maplelatex}
\subsection{\textbf{7.2 Internal Representations of Data Types}}
\begin{maplelatex}\begin{Maple Normal}{
The parser and some internal functions are responsible for
building all the data structures used internally by Maple. All
\textbf{AND}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{expr1}\textbf{and}\textbf{expr2}}\end{Maple
Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 3}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Assignment Statement}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{ASSIGN}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}name-seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr-seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{name1, name2, ... := expr1, expr2,
...}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 3}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The left-hand side\textit{name}entries must evaluate to
assignable objects:\textbf{NAME},\textbf{FUNCTION},
or\textbf{TABLEREF}structures. The right-hand side must be an
expression sequence of the same length as the left-hand
side.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Binary Object}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{BINARY}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
data}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
...}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax: none}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: arbitrary}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}re}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}im}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{COMPLEX}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}im}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{Complex(re,im)}or\textbf{re + im *
I}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 2 or 3}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textit{re}and\textit{im}fields must point
to\textbf{INTPOS},\textbf{INTNEG},\textbf{RATIONAL},
or\textbf{FLOAT}structures, one of
the\textbf{NAME}s\textbf{infinity}or\textbf{undefined}, or
a\textbf{SUM}structure representing -\textbf{infinity}. In the
length 3 case, if either\textit{re}or\textit{im}is
a\textbf{FLOAT}, the other must be a\textbf{FLOAT}as
well.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Communications Control
Structure}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{CONTROL}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}integer}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax: none}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 2}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This is an internal structure used in kernel to user-interface
communication. Such a structure never reaches the user level, or
even the mathematical parts of the kernel.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Type Specification or Test}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{DCOLON}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}type-expr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{expr :: typeExpr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 3}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This structure has three interpretations depending on the
context in which it is used. When it appears in the header of a
procedure definition, it is a typed parameter declaration. When
it appears in the\textbf{local}section of a procedure or on the
left side of an assignment, it is a type assertion. When it
appears elsewhere (specifically in a conditional expression), it
is a type test.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Debug}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{DEBUG}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
...}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax: none}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 2 or more}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This is another internal-only structure. It is used by the
kernel when printing error traceback information to transmit
that information up the call stack.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Equation or Test for Equality}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{EQUATION}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{expr1 = expr2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 3}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This structure has two interpretations depending on the context
in which it is used. It can be either a test for equality, or a
statement of equality (not to be confused with an
assignment).}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Error Statement}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{ERROR}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{error}\textbf{"msg"},\textbf{arg},
...\textbf{arg}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 2}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This represents the Maple\textbf{error}statement.
The\textit{expr}is either a single expression (if only a message
was specified in the\textbf{error}statement), or an expression
sequence (if arguments were also specified). The actual internal
tag used for the\textbf{ERROR}structure is\textbf{MERROR}, to
prevent collision with a macro defined by some C
compilers.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Expression Sequence}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{EXPSEQ}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
...}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{expr1},\textbf{expr2}, ...}\end{Maple
Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 1 or more}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Expression sequences are available to the user as a data
structure, and are also used to pass arguments to procedures.
Effectively, procedures take a single argument that is an
expression sequence. An expression sequence may be of length 1
(that is, an empty sequence), which is represented by the Maple
\textit{\symbol{94}by-expr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}to-expr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}cond-expr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}stat-seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{FOR}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}name}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}in-expr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}cond-expr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}stat-seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
for name from fromExpr by byExpr to toExpr}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
while condExpr do}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
statSeq}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
end do}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
for name in inExpr}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
while condExpr do}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
statSeq}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
end do}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 7 or 5}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textit{name}follows the same rules as in\textbf{ASSIGN},
except that it can also be the empty expression sequence
(\textbf{NULL}), indicating that there is no controlling
variable for the loop.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textit{from-expr},\textit{by-expr},\textit{to-expr},
and\textit{cond-expr}entries are general expressions. All are
optional in the syntax of\textbf{for}loops and can thus be
filled in with default values (1, 1,\textbf{NULL},
and\textbf{true}respectively) by the parser.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textit{stat-seq}entry can be a single Maple statement or
expression, a\textbf{STATSEQ}structure,
or\textbf{NULL}indicating an empty loop body. An additional bit
in the\textbf{FOR}structure's header is used to indicate whether
the\textit{stat-seq}contains
any\textbf{break}or\textbf{next}statements.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Foreign Data}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{FOREIGN}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
...}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax: none}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 1 or more}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This is similar to the\textbf{BINARY}structure, except that it
is for use by components of Maple outside the kernel, such as
the user interface. A\textbf{FOREIGN}structure is exempt from
garbage collection , and it is the responsibility of the
external component to free it when it is finished using
it.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{FOREIGN}data structures can be created and managed in
external code via the\textbf{MaplePointer}API functions. For
more information, refer to\textbf{?MaplePointer}.}\end{Maple
Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Function Call}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{FUNCTION}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}name}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr-seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}attrib-expr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{name( exprSeq )}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 2 (or 3 with attributes)}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This structure represents a function invocation (as distinct
from a procedure definition that is represented by
the\textbf{PROC}structure). The\textit{name}entry follows the
same rules as in\textbf{ASSIGN}, or it may be
a\textbf{PROC}structure. The\textit{expr-seq}entry gives the
list of actual parameters, and is always an expression sequence
(possibly of length 1, indicating no parameters).}\end{Maple
Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Garbage}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{GARBAGE}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
...}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax: none}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 1 or more}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This structure is used internally by the Maple garbage collector
as a temporary object type for free space.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Hardware Float}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{HFLOAT}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{floatword}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{HFLOAT}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{floatword}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{floatword}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax: none}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 2 on 64-bit architectures, 3 on 32-bit
architectures}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This structure is used to hold a hardware floating-point value.
The one or two words (always 8 bytes) after the header hold the
actual double-precision floating-point
value.\textbf{HFLOAT}objects are currently not available
directly to the user, but they are used internally to more
efficiently transfer hardware floating-point values
between\textbf{RTABLE}s of such values, and the Maple I/O
facilities (for example,
the\textbf{printf}and\textbf{scanf}families of
functions).}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{If Statement}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{IF}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}cond-expr1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}stat-seq1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}cond-expr2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}stat-seq2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{...}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{...}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}stat-seqN}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
if condExpr1 then}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
statSeq1}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
elif condExpr2 then}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
statSeq2}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
...}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
else statSeqN}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
end if}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 3 or more}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This structure represents
the\textbf{if}...\textbf{then}...\textbf{elif}...\textbf{else}..
.\textbf{end if}statement in Maple. If the length is even, the
last entry is the body of an\textbf{else}clause. The remaining
entries are interpreted in pairs, where each pair is a condition
of the\textbf{if}or\textbf{elif}clause, followed by the
associated body.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Logical IMPLIES}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{IMPLIES}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple
syntax:\textbf{expr1}\textbf{implies}\textbf{expr2}}\end{Maple
Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 3}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Not Equal or Test for
Inequality}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{INEQUAT}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{expr1 < > expr2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 3}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This structure has two interpretations, depending on the context
in which it is used. It can be either a test for inequality or
an inequality statement (not to be confused with an
assignment).}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Negative Integer}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{INTNEG}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{GMP-integer}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax: -123}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 2 or more}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This data structure represents a negative integer of arbitrary
precision. For a complete description of the integer
representation, including positive integers, see the following
section.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Positive Integer}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{INTPOS}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{GMP-integer}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax: 123}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 2 or more}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This data structure represents a positive integer of arbitrary
precision. Integers are represented internally in a base equal
to the full word size of the host machine. On 32-bit
architectures, this base is 2\symbol{94}\{32\}. On 64-bit
architectures, the base is 2\symbol{94}\{64\}. Integers in this
range use the GNU Multiple Precision Arithmetic (GMP) library
for integer arithmetic.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Small integers are not represented by data structures at all.
Instead of a pointer to
an\textbf{INTPOS}or\textbf{INTNEG}structure, a small integer is
represented by the bits of what would normally be a pointer. The
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}attrib-expr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{[ expr, expr, ... ]}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 2 (or 3 with attributes)}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The elements of the\textit{expr-seq}are the elements of the
list. The list can optionally have attributes.}\end{Maple
Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Local Variable within an
Expression}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{LOCAL}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{integer}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{name}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 2}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This indicates a local variable when it appears within an
expression in a procedure or module. The\textit{integer}is an
index into the procedure\textit{local-seq}. At procedure
execution time, it is also an index into the internal data
structure holding the active locals on the procedure activation
stack, and holds private copies of the\textbf{NAME}s of the
local variables (private copies in the sense that
these\textbf{NAME}s are not the same as the global\textbf{NAME}s
of the same name).}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Member}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{MEMBER}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}module}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}name}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{module :- name}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 3}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{option}optionSeq;}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
statSeq}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{end module}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 10}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textit{param-seq}points to an expression sequence describing
the formal parameters of the module. Currently, Maple does not
support parameterized modules, so this field always points to
the sequence containing just an instance of the
name\textbf{thismodule}.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textit{local-seq}points to an expression sequence listing
the explicitly and implicitly declared local variables. Each
entry is a\textbf{NAME}. The explicitly declared variables
appear first. Within the module, locals are referred to
by\textbf{LOCAL}structures, the local variable number being the
index into the\textit{local-seq}.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textit{export-seq}points to an expression sequence listing
the exported module members. Each entry is a\textbf{NAME}.
Within the module, exports are referred to
by\textbf{LOCAL}structures, the local variable number being the
number of elements in the\textit{local-seq}, plus the index into
the\textit{export-seq}.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textit{option-seq}points to an expression sequence of
options to the module (for modules, options are the same thing
as attributes). Each entry is
a\textbf{NAME}or\textbf{EQUATION}specifying an option. Typical
options are\textbf{load=...}and\textbf{unload=...}}\end{Maple
Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textit{stat-seq}field points to a single statement or a
statement sequence (\textbf{STATSEQ}). If the module has an
empty body, this is a pointer to\textbf{NULL}instead.}\end{Maple
Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textit{desc-seq}field points to an expression sequence
of\textbf{NAME}s or\textbf{STRING}s. These are meant to provide
a brief description of what the Module does, and are displayed
even when\textbf{interface(verboseproc)}is less than
2.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Executing a module definition (\textbf{MODDEF}) results in a
module instance. Each local or exported member of the module is
instantiated and belongs to that instance of the module.
The\textit{export-seq}field points to an expression sequence of
names of the instantiated exports (as opposed to the global
names, as stored in the module definition). The\textit{moddef}field points back to the original module definition.
The\textit{local-seq}field points to an expression sequence of
names of the instantiated local variables of the
module.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Identifier}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{NAME}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}assigned-expr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}attrib-expr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{characters}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{characters}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{...}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax: name}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 4 or more}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textit{assigned-expr}field points to the assigned value of
the name. If the name has no assigned value, this field is a
null pointer (not a pointer to NULL). The next field points to
an expression sequence of attributes of the name. If there are
no attributes, this field points to the empty expression
sequence (NULL). The remaining fields contain the characters
making up the name, stored 4 or 8 per machine word (for 32-bit
and 64-bit architectures respectively). The last character is
followed by a zero-byte. Any unused bytes in the last machine
word are also zero. The maximum length of a name is 268,435,447
characters on 32-bit architectures and 34,359,738,351 characters
on 64-bit architectures.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Next Statement}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{NEXT}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{next}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 1}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Logical NOT}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{NOT}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{not}\textbf{expr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 2}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Logical OR}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{OR}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{expr1}\textbf{or}\textbf{expr2}}\end{Maple
Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 3}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Procedure Parameter within an
Expression}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{PARAM}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{integer}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{name}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 2}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This indicates a parameter when it appears within a procedure.
The\textit{integer}is an index into the procedure\textit{paramseq}. Several special\textbf{PARAM}structures exist:}\end{Maple
Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{PARAM}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
0}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This represents the Maple symbol\textbf{nargs}, the number of
arguments passed when the procedure was called.}\end{Maple
Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{PARAM}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
-1}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This represents the Maple symbol\textbf{args}, the entire
sequence of arguments passed when the procedure was
called.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{PARAM}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
-2}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This represents the Maple symbol\textbf{procname}, referring to
the currently active procedure.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{PARAM}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
-3}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This represents the Maple symbol \_nresults, the number of
results expected to be returned from the procedure}\end{Maple
Normal}
\end{maplelatex}
\begin{maplelatex}\textbf{PARAM}\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
-4}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This represents the Maple symbol \_params, the sequence of
declared positional arguments passed when the procedure was
called.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\textbf{PARAM}\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
-5}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This represents the Maple symbol \_nparams, the number of
declared positional arguments passed when the procedure was
called.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\textbf{PARAM}\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
-6}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This represents the Maple symbol \_rest, the sequence of
undeclared arguments passed when the procedure was
called.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\textbf{PARAM}\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
-7}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This represents the Maple symbol \_nrest, the number of
undeclared passed when the procedure was called.}\end{Maple
Normal}
\end{maplelatex}
\begin{maplelatex}\textbf{PARAM}\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
-8}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This represents the Maple symbol \_options, the sequence of
options in the procedure}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\textbf{PARAM}\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
-9}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This represents the Maple symbol \_noptions, the number of
options in the procedure}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\textbf{PARAM}\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
-10}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This represents the Maple symbol thisproc, referring to the
instance of the currently active procedure}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
At procedure execution time, the\textit{integer}(if positive) is
used as an index into the internal data
structure\textbf{Actvparams}which is part of the Maple procedure
activation stack, and holds pointers to the values (which are
also Maple structures, of course) of the actual parameters
passed to the procedure.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Power}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{POWER}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax: expr1 \symbol{94}expr2}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 3}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This structure is used to represent a power when the exponent is
not an integer, rational, or floating-point value. When the
exponent is numeric, the\textbf{POWER}structure is converted to
a length 3\textbf{PROD}structure.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Procedure Definition}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{PROC}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}param-seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}local-seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}option-seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}rem-seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}stat-seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}desc-seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}global-seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}lexical-seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}eop}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}return-type}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\begin{maplelatex}\begin{Maple Normal}{
The\textit{eop}field is\textbf{BINARY}. The first entry
specifies the number of positional parameters of the procedure.
The remaining entries, if any, specify the evaluation order
permutation for the procedure, i.e. an evaluation order for the
arguments that is consistent with any dependencies among the
parameter specifications.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textit{return-type}field is present only if a return-type
has been specified for the procedure. A return-type is an
assertion about the type of the value returned by the procedure;
if\textbf{kernelopts(assertlevel)}is set to 2, then this type is
checked as the procedure returns.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Product, Quotient, Power}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{PROD}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expon1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expon2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
...}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
...}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{expr1 \symbol{94} expon1 * expr2
\symbol{94} expon2 ...}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 2n + 1}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This structure is interpreted as pairs of factors and their
numeric exponents. Rational or integer expressions to an integer
power are expanded. If there is a rational constant in the
product, this constant is moved to the first entry by the
simplifier. A simple power, such as\textbf{a\symbol{94}2}, is
represented as a\textbf{PROD}structure. More complex powers
involving non-numeric exponents are represented
as\textbf{POWER}structures.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Range}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{RANGE}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{expr1 .. expr2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 3}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Rational}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{RATIONAL}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}integer}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}pos-integer}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{1/2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 3}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This structure is one of the basic numeric objects in Maple.
Note that this is not a division operation, but only a
representation for rational numbers. Both fields must be
integers (\textbf{INTPOS},\textbf{INTNEG}, or an immediate
integer) and the second must be positive.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Read Statement}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{READ}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{read expr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 2}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The Maple\textbf{read}statement. The expression must evaluate to
either a string or symbol
(\textbf{STRING}or\textbf{NAME}structure), and specifies the
name of the file to read.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Return Statement}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{RETURN}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr-seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{return expr1, expr2, ...}}\end{Maple
Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 2}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The Maple\textbf{return}statement. The expression sequence is
evaluated, giving the value(s) to return.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Rectangular Table}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{RTABLE}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\symbol{94}data}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\symbol{94}maple-type}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\symbol{94}ind-fn}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\symbol{94}attrib}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{flags}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{num-elems}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\mapleinline{inert}{2d}{L[1]}{\[\displaystyle L_{{1}}\]}
}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\mapleinline{inert}{2d}{U[1]}{\[\displaystyle U_{{1}}\]}
}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
...}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
...}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\mapleinline{inert}{2d}{L[N]}{\[\displaystyle L_{{N}}\]}
}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\mapleinline{inert}{2d}{U[N]}{\[\displaystyle U_{{N}}\]}
}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\mapleinline{inert}{2d}{P[1]}{\[\displaystyle P_{{1}}\]}
}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\mapleinline{inert}{2d}{P[2]}{$\displaystyle P_{{2}}$}
}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{rtable(...)}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length:\textbf{2n + p}where\textbf{n}is the number of dimensions
(0 to 63), and\textbf{p}is 0, 1, or 2, depending on the number
of P[i] parameters.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textit{data}field points to either a block of memory (for
dense and NAG-sparse\textbf{RTABLE}s), or to
a\textbf{HASHTAB}structure (for Maple-sparse\textbf{RTABLE}s).
The data block is either an object of type\textbf{BINARY}, or
memory allocated directly from the operating system's storage
manager when the block would be too large to be allocated as a
Maple data structure. If the data block is
a\textbf{BINARY}object, the\textit{data}pointer points to the
first data word, not to the object header.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textit{maple-type}field points to a Maple structure
specifying the data type of the elements of an\textbf{RTABLE}of
Maple objects. If the\textbf{RTABLE}contains hardware objects,
the\textit{maple-type}field points to the
Maple\textbf{NAME}\textbf{anything}.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textit{ind-fn}pointer points to either an empty expression
sequence (\textbf{NULL}), or an expression sequence containing
at least one indexing function and a pointer to a copy of
the\textbf{RTABLE}structure. The copy of the\textbf{RTABLE}is
identical to the original, except that its\textit{ind-fn}field
refers to one less indexing function (either\textbf{NULL}, or
another expression sequence containing at least one indexing
function and a pointer to another copy of the\textbf{RTABLE}with
one less indexing function again).}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textit{attrib}pointer points to an expression sequence of
zero or more arbitrary attributes, which can be set by
the\textbf{setattribute}function, and queried
by\textbf{attributes}.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textit{flags}field is a bit field containing the following
subfields.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
data type - 5 bits - indicates one of several hardware datatypes
or that a Maple data type (as specified by\textit{maple-type})
is being used.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
subtype - 2 bits - indicates if the\textbf{RTABLE}is an Array,
Matrix, or Vector.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
storage - 4 bits - describes the storage layout (e.g. sparse,
upper triangular, etc.)}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
order - 1 bit - indicates C or Fortran ordering
of\textbf{RTABLE}elements.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
read only - 1 bit - indicates the\textbf{RTABLE}is to be readonly once created.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
foreign - 1 bit - indicates that the space pointed to by
the\textit{data}field does not belong to Maple, so Maple should
not garbage collect it.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
eval - 1 bit - indicates if full evaluation should occur on
lookup. For more information, refer
to\textbf{?rtable\_eval}.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
literal - 1 bit - optimization for internal type checking of
data contained in an\textbf{RTABLE}.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
number of dimensions - 6 bits - the number of dimensions of
the\textbf{RTABLE}, from 0 to 63.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textit{num-elems}field indicates the total number of
elements of storage allocated for the data. For a Maplesparse\textbf{RTABLE},\textit{num-elems}is not used. For a NAGsparse\textbf{RTABLE},\textit{num-elems}specifies the number of
elements currently allocated, some of which might not be in
use.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The remaining fields specify the upper and lower bounds of each
dimension, and are stored directly as signed machine integers.
The limits on bounds are -2,147,483,648 to 2,147,483,647 for 32-
\begin{maplelatex}\begin{Maple Normal}{
This is the internal representation of a series in Maple. There
is no input syntax for a series; one can only arise from a
computation. The first expression has the general form\textbf{xa}, where\textbf{x}denotes the variable of the series used to do
that expansion, and\textbf{a}denotes the point of expansion. The
remaining entries are interpreted as pairs of coefficients and
exponents. The exponents are integers,\textit{not}pointers to
integers or immediate integers. The exponents appear in
increasing order. A coefficient\textbf{O(1)}(a function call to
the function\textbf{O}, with parameter 1) is interpreted
specially by Maple as an order term.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Set}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{SET}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr-seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}attrib-expr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax: \{ expr, expr, ... \}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 2 (or 3 with attributes)}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The entries in the set's expression sequence are sorted in order
of increasing memory address. This is an arbitrary but
consistent order, necessary for efficiently working with
sets.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Statement Sequence}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{STATSEQ}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}stat1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}stat2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
...}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{stat1; stat2; ...}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 3 or more}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The maximum length of a string is 268,435,447 characters on 32bit architectures and 34,359,738,351 characters on 64-bit
architectures.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Sum, Difference}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{SUM}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}factor1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}factor2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
...}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
...}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{expr1 * factor1 + expr2 * factor2
...}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 2n + 1}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This structure is interpreted as pairs of expressions and their
numeric factors. Rational or integer expressions with an integer
factor are expanded and the factor replaced with 1. If there is
a rational constant in the sum, this constant is moved to the
first entry by the simplifier. Simple products, such
as\textbf{a*2}, are represented as\textbf{SUM}s. More complex
products involving non-numeric factors are represented
as\textbf{PROD}structures.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Table}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{TABLE}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}index-func}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}array-bounds}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}hash-tab}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax: N/A}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 4}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This is a general table type, as created by
the\textbf{table}and\textbf{array}functions in Maple.
The\textit{index-func}will point to either a\textbf{NAME}or
a\textbf{PROC}. For general tables, the\textit{arraybounds}field points to the empty expression sequence
(\textbf{NULL}). For\textbf{array}s (not to be confused
with\textbf{Array}s, which are implemented as\textbf{RTABLE}s),
the\textit{array-bounds}field refers to an expression sequence
of\textbf{RANGE}s of integers. The\textit{hash-tab}field points
to a\textbf{HASHTAB}structure containing the
elements.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Table Reference}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{TABLEREF}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}name}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr-seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}attrib-expr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{name [ expr ]}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 3 (or 4 with attributes)}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This data structure represents a table reference, or indexed
name. The\textit{name}entry follows the same rules as
for\textbf{ASSIGN}, or it may be
a\textbf{TABLE}or\textbf{MODULE}structure. (The parser will not
generate a\textbf{TABLEREF}with a\textbf{TABLE}structure for
the\textit{name}entry, but this can arise internally.) The
expression sequence contains the indices.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Try Statement}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{TRY}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}try-stat-seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}catch--str}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}catch-stat-seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
...}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
...}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}final-stat-seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{try}tryStat}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{catch}"catchStr": catchStat}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
...}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{finally}finalStat;}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{end try}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 3 or more}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This structure represents a\textbf{try}statement, and can have
an arbitrary length, depending on how many\textbf{catch}blocks
there are within it, and whether or not it has
a\textbf{finally}block. The\textit{catch-strs}point to the catch
string of the corresponding\textbf{catch}block. If no catch
string was specified, the\textit{catch-str}points
to\textbf{NULL}. Empty\textit{catch-stat-seqs}are also
represented by pointers to\textbf{NULL}, as is an empty (but
present)\textbf{finally}block.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The actual internal tag used for the\textbf{TRY}structure
is\textbf{MTRY}, to prevent collision with a macro defined by
some C exception handling libraries.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Unevaluated Expression}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{UNEVAL}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{' expr '}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 2}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Use Statement}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{USE}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}bindings}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}statseq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple Syntax:}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{use}bindings in}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
statseq}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{end use}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 3}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textit{bindings}component points to an expression sequence
of equations whose left sides are symbols, and
the\textit{statseq}component points to a sequence of statements
that form the body of the\textbf{use}statement. The right sides
of the binding equations can be arbitary expressions.}\end{Maple
Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The\textbf{use}statement introduces a new binding contour and
binds the names that appear on the left side of the equations in
bindings. For convenience, on input, a module\textbf{m}can
appear among the\textit{bindings}, and is treated as if it were
the sequence\textbf{e1 = m:-e1, e2 = m:-e2, ...}, where
the\textbf{ei}are the exports of\textbf{m}. Within the
sequence\textit{statseq}of statements, the symbols appearing on
the left side of the equations in\textit{bindings}are bound to
the corresponding right sides. The previous bindings of those
symbols are restored upon exit from the\textbf{use}statement.
Bindings are resolved during automatic
simplification.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Logical XOR}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{XOR}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}expr2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax:\textbf{expr1}\textbf{xor}\textbf{expr2}}\end{Maple
Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 3}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Polynomials with Integer
Coefficients modulo n}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{ZPPOLY}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}indet}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{mod}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{coef0}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{coef1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
...}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{ZPPOLY}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}indet\_seq}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{mod}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}zppoly0}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}zppoly1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
...}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\end{maplelatex}
\subsection{\textbf{7.3 The Use of Hashing in Maple}}
\begin{maplelatex}\begin{Maple Normal}{
An important factor in achieving the overall efficient
performance of Maple is the use of hash-table-based algorithms
for critical functions. Tables are used in both simplification
and evaluation, as well as for less critical functions. For
simplification, Maple keeps a single copy of each expression, or
subexpression, during a session. This is done by keeping all
objects in a table. In procedures, the\textbf{remember}option
specifies that the result of each computation of the procedure
is to be stored in a\textit{remember table}associated with the
procedure. Finally, tables are available to the user as one of
the Maple data types.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
All table searching is done by hashing. The are two types of
hash tables, basic and dynamic. Basic hash tables are used for
most Maple hashing. However, basic hash tables are inefficient
when a very large number of elements is stored. Dynamic hash
tables are designed to work with a large number of elements. The
two types of hash tables are not exposed. When a basic hash
table becomes full, it is automatically converted to a dynamic
hash table.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Basic Hash Tables}}}
\begin{maplelatex}\begin{Maple Normal}{
The algorithm used for the basic hash tables is direct chaining,
except that the chains are dynamic vectors instead of the
typical linked lists. The two data structures used to implement
hash tables are\textbf{HASHTAB}and\textbf{HASH}.}\end{Maple
Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Hash Table}}}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{HASHTAB}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}hash-chain1}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textit{\symbol{94}hash-chain2}}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
...}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Maple syntax: none}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Length: 2\symbol{94}n + 1}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
This is an internal data structure with no Maple syntax
equivalent. It is used in the representation of tables within
Maple. Each entry points to a hash chain
\begin{maplelatex}\begin{Maple Normal}{
Maple functions\textbf{anames}and\textbf{unames}which return all
assigned and unassigned global names, respectively}\end{Maple
Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Remember Tables}}}
\begin{maplelatex}\begin{Maple Normal}{
A remember table is a hash table in which the argument(s) to a
procedure call are stored as the table index, and the result of
the procedure call is stored as the table value. Because a
simplified expression in Maple has a unique instance in memory,
the address of the arguments can be used as the hash function.
Hence, searching a remember table is very fast.}\end{Maple
Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
There are several kernel functions which use remember tables
including,\textbf{evalf},\textbf{series},\textbf{divide},\textbf
{normal},\textbf{expand},\textbf{diff},\textbf{readlib},
and\textbf{frontend}. The
functions\textbf{evalf},\textbf{series}, and\textbf{divide}are
handled internally in a special way for the following
reasons:}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{evalf}and\textbf{series}need to store some additional
environment information (\textbf{'Digits'}for evalf
and\textbf{'Order'}for series). Consequently, the entries for
these are extended with the precision information. If a result
is requested with the same or less precision than what is stored
in the table, it is retrieved and rounded. If a result is
produced with more precision than what is stored, it is replaced
in the table.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{evalf}remembers only function calls (this includes named
constants); it does not remember the results of arithmetic
operations.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
If a division operation succeeds and the divisor is a nontrivial
polynomial, the divide function stores the quotient in its
remember table. Otherwise nothing is stored in the remember
table.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
If\textbf{option}\textbf{remember}is specified together
with\textbf{option}\textbf{system}, at garbage collection time
the remember table entries which refer to expressions no longer
in use elsewhere in the system are removed. This provides a
relatively efficient use of remembering that does not waste
storage for expressions that have disappeared from the
expression space.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Maple Language Arrays and
Tables}}}
\begin{maplelatex}\begin{Maple Normal}{
Tables and arrays are provided as data types in the Maple
language via the\textbf{table}and\textbf{array}functions. An
array is a table for which the component indices must be
integers lying within specified bounds. Tables and arrays are
implemented using the Maple internal hash tables. Because of
this, sparse arrays are equally as efficient as dense arrays. A
table object consists of the following.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Index bounds (for arrays only)}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
A hash table of components}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
An indexing function}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
\textbf{Note:}Unlike the\textbf{array}command,
the\textbf{Array}command creates a rectangular table, which is
described in the following subsection.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The components of a table\textbf{T}are accessed using a
subscript syntax (for example,\textbf{T[a,b*cos(x)]}). Since a
simplified expression is guaranteed to have a unique instance in
memory, the address of the simplified index is used as the hash
key for a component. If no component exists for a given index,
then the indexed expression is returned.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The semantics of indexing into a table are described by its
indexing function. Aside from the default, general indexing,
some indexing functions are provided by the Maple kernel. Other
indexing functions are loaded from the library or are supplied
by the user.}\end{Maple Normal}
\end{maplelatex}
\subsubsection{\textbf{\textit{Maple Language Rectangular
Tables}}}
\begin{maplelatex}\begin{Maple Normal}{
Rectangular tables}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
(as implemented by the\textbf{RTABLE}structure), can use a
variety of storage formats. One format, Maple-sparse, is
identical to that used in tables and arrays, namely a hash
table. There is another sparse format, NAG-sparse, which uses
one vector for each dimension to record indices, and a third
vector to record the values of the entries. The majority
of\textbf{RTABLE}storage formats are dense, the simplest being
the rectangular. Other dense formats include upper-triangular
and band, where storage is allocated only for the upper triangle
or a band of elements respectively. To the user, rectangular
tables manifest themselves as objects of
type\textbf{Array},\textbf{Matrix},\textbf{Vector[row]},
\begin{maplelatex}\begin{Maple Normal}{
IBM RS/6000}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
AIX}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
DEC Alpha}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
Digital UNIX/Compaq Tru64}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The majority of the source code comprising the kernel is the
same across all platforms. Extensive use of macros and
conditional compilation take care of platform dependencies, such
as word size, byte ordering, storage alignment requirements,
differences in hardware floating point support, and sometimes, C
compiler bugs.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The Maple library is interpreted by the Maple kernel. Therefore,
other than issues such as maximum object size, it is completely
independent of the underlying architecture.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
The Maple graphical user interface has two versions, the
Standard Worksheet and the Classic Worksheet (not available on
Macintosh). The Standard Worksheet is implemented in Java, which
is platform independent. The Classic Worksheet is implemented in
C and C++, and makes use of a platform independent user
interface class library to achieve portability. The Maplet User
Interface Customization System (available in both worksheet
versions) is written in Java with some native libraries. The
Java portion is identical on all platforms.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{
ContentsPreviousNextIndex}\end{Maple Normal}
\end{maplelatex}
\end{document}