P. A. Broadbery
The Numerical Algorithms Group, Ltd
Wilkinson House, Jordan Hill Road, Oxford, OX2 8DR, UK
peterb@nag.co.uk
T. Gómez-Díaz
Laboratoire d'arithmétique, calcul formel et
optimisation (URA 1586)
123, Av. Albert Thomas. University of Limoges, France
tgomez@marie.polytechnique.fr
S. M. Watt
IBM T.J. Watson Research Center
P.O. Box 218, Yorktown Heights, NY 10598 USA
smwatt@watson.ibm.com
Dynamic evaluation is a technique for producing multiple results according to a decision tree which evolves with program execution. Sometimes it is desired to produce results for all possible branches in the decision tree, while on other occasions it may be sufficient to compute a single result which satisfies certain properties. This technique finds use in computer algebra where computing the correct result depends on recognising and properly handling special cases of parameters. In previous work, programs using dynamic evaluation have explored all branches of decision trees by repeating the computations prior to decision points.
This paper presents two new implementations of dynamic evaluation which avoid recomputing intermediate results. The first approach uses Scheme ``continuations'' to record state for resuming program execution. The second implementation uses the Unix ``fork'' operation to form new processes to explore alternative branches in parallel.
These implementations are based on modifications to
Lisp- and C-based run-time systems for the
Axiom Version 2 extension language (previously known as ).
This allows the same high-level source code to be compared using the
``re-evaluation,'' the ``continuation,'' and the ``fork'' implementations.