SEQUENCE_OPTIMIZE(exp or eqns) is a function that optimizes a code sequence
(list of equations at MACSYMA level) much the same way OPTIMIZE handles
a single expression. However, only lists are treated specially. All other
input will return MACSYMA BLOCK forms, just as OPTIMIZE does. Besides
allowing the user to deal with code sequences, SEQUENCE_OPTIMIZE differs
from OPTIMIZE in principally two ways:
1) It performs "exponent gathering" of terms in a product. Exponents
which are not integers are processed first. After differences are
collapsed, a search is done for any remaining non-unity GCDs of
the exponents, and the appropriate power within power structure
generated. The strategy is then repeated for integer exponents.
It is important to note that the gathering of these terms within
a new power occurs only if it reduces the operations count in a
CRAY FORTRAN environment(For detailed usage in other environments,
send mail to GCOOK@MIT-MC).
2) It allows the user to save the list of optimized temporaries found
by SEQUENCE_OPTIMIZE in the list OPTIM_EQUIVS. This is accomplished
by setting SAVE_OPTIM_INFO[FALSE] to TRUE.
WARNING : do not allow the value of OPTIM_EQUIVS to be resimplified
by doing an EV or similar operation on it. This could render it
useless to SEQUENCE_OPTIMIZE.
Globals besides OPTIM_EQUIVS and SAVE_OPTIM_INFO which affect the
operation of SEQUENCE_OPTIMIZE are:
SEQUENCE_OPTIM_PREFIX['opt] is the character string used to prefix
all symbols generated by SEQUENCE_OPTIMIZE to represent common subexpressions.
SEQUENCE_OPTIM_COUNTER is the integer index used to identify by
unique symbols the common subexpressions found by SEQUENCE_OPTIMIZE.
SEQUENCE_OPTIM_SUFFIX[?'s] is the string used to suffix all optimized
temporaries arising from a call to SEQUENCE_OPTIMIZE(The "?" removes the
SEQUENCE_OPTIMIZE is accessed by doing LOAD(SEQOPT)$ . A demonstration
is available in SHARE1;SEQOPT DEMO . Bugs to GCOOK@MIT-MC .