The design of Maple: A compact, portable, and powerful computer algebra system
The Maple system has been under development at the University of Waterloo since December 1980. The kernel of the system is written in a BCPL-like language. A macroprocessor is used to generate code for several implementation languages in the BCPL family (in particular, C). Maple provides interactive usage through an interpreter for the user-oriented, higher-level, Maple programming language.
This paper discusses Maple's current solution to several design issues. Maple attempts to provide a natural syntax and semantics for symbolic mathematical computation in a calculator mode. The syntax of the Maple programming language borrows heavily from the Algol family. Full “recursive evaluation” is uniformly applied to all expressions and to all parameters in function calls (with exceptions for only four basic system functions).
Internally, Maple supports many types of objects: integers, lists, sets, procedures, equations, and power series, among others. Each internal type has its own tagged data structure. “Dynamic vectors” are used as the fundamental memory allocation scheme. Maple maintains a unique copy of every expression and subexpression computed, employing hashing for efficient access. Another feature relying upon hashing is the “remembering” facility, which allows system and user-defined functions to store results in internal tables to be quickly accessed in later retrieval, thus avoiding expensive re-computation of functions.
The compiled kernel of the Maple system is relatively compact (about 100K bytes on a VAX under Berkeley Unix). This kernel includes the interpreter for the Maple language, basic arithmetic (including polynomial arithmetic), facilities for tables and arrays, print routines (including two-dimensional display), basic simplification, and basic functions (such as coeff, degree, map, and divide). Some functions (such as expand, diff (differentiation), and taylor) have a “core” in the kernel, and automatically load external user-language library routines for extensions. The higher-level mathematical operations (such as gcd, int (integrate), and solve, are entirely in the user-language library and are loaded only when called.
KeywordsImplementation Language Dynamic Array Dynamic Vector Maple System Invalid Argument
Unable to display preview. Download preview PDF.
- Bos80a.F. David Boswell, A Secure Implementation of the Programming Language Pascal, Dept. of Computer Science, University of Waterloo (1980). (M.Math thesis)Google Scholar
- Fod81a.John Foderaro and Richard Fateman, “Characterization of VAX Macsyma,” Proceedings of the 1981 ACM Symposium on Symbolic and Algebraic Computation, pp. 14–19 Association for Computing Machinery, (1981).Google Scholar
- Gos81a.James Gosling, Unix Emacs Reference Manual. 1981.Google Scholar
- Gri82a.Martin Griss, Eric Benson, and Gerald Maguire, Jr, “PSL: A Portable LISP System,” Proceedings of the 1982 ACM Symposium on Lisp and Functional Programming, pp. 88–97 (1982).Google Scholar
- Hal71a.Andrew D. Hall, Jr., “The ALTRAN System for Rational Function Manipulation — A Survey,” in Proceedings of the Second Symposium on Symbolic and Algebraic Manipulation, ed. S.R. Petrick, Special Interest Group on Symbolic and Algebraic Manipulation, Association for Computing Machinery (1971).Google Scholar
- Hof79a.Carl Hoffman and Richard Zippel, “An Interactive Display Editor for MACSYMA,” Proceedings of the 1979 MACSYMA User's Conference, p. 344 (1979).Google Scholar
- Mal82a.Michael Malcolm, Bert Bonkowski, Gary Stafford, and Phyllis Didur, The Waterloo Port Programming System, Dept. of Computer Science, University of Waterloo (1982).Google Scholar
- Mos74a.Joel Moses, “MACSYMA — The Fifth Year,” in Proceedings of the Eurosam 74 Conference, Stockholm (August 1974).Google Scholar
- Nor82a.Arthur Norman, “The Development of a Vector-based Algebra System,” Proceedings EUROCAM '82, pp. 237–248 Springer-Verlag, (1982). Lecture Notes in Computer Science #144.Google Scholar
- Ric79a.Art Rich and David Stoutemyer, “Capabilities of the muMATH-79 Computer Algebra System for the INTEL-8080 Microprocessor,” EUROSAM 1979, pp. 241–248 Springer-Verlag, (1979).Google Scholar
- Sto79a.David Stoutemyer, “Computer Symbolic Math and Education: a Radical Proposal,” Proceedings of the 1979 Macsyma User's Conference, pp. 142–158 MIT Laboratory for Computer Science, (1979).Google Scholar
- Sto80a.David Stoutemyer, “PICOMATH-80, an Even Smaller Computer Algebra Package,” SIGSAM Bulletin 14(3) pp. 5–7 (1980).Google Scholar