Key ideas from these two areas provide the basis for a gen- eral scheme for the specication and representation of mathematical structures. The philosophy underlying the design of Magma is based on concepts from Universal Algebra and Category Theory. The design is intended to provide a mathematically rigorous environment for computing with algebraic struc- tures (groups, rings, elds, modules and algebras), geometric structures (varieties, special curves) and combinatorial structures (graphs, designs and codes). c 1997 Academic Press Limited Magma is a new software system for computational algebra, the design of which is based on the twin concepts of algebraic structure and morphism. Particular attention is given to the constructors for structures, maps, and sets. In the rst of two papers on Magma, a new system for computational algebra, we present the Magma language, outline the design principles and theoretical background, and indicate its scope and use. 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. 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. 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). The compiled kernel of the Maple system is relatively compact (about 100K bytes on a VAX under Berkeley Unix). 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. Maple maintains a unique copy of every expression and subexpression computed, employing hashing for efficient access. “Dynamic vectors” are used as the fundamental memory allocation scheme. Each internal type has its own tagged data structure. Internally, Maple supports many types of objects: integers, lists, sets, procedures, equations, and power series, among others. Full “recursive evaluation” is uniformly applied to all expressions and to all parameters in function calls (with exceptions for only four basic system functions). The syntax of the Maple programming language borrows heavily from the Algol family. Maple attempts to provide a natural syntax and semantics for symbolic mathematical computation in a calculator mode. This paper discusses Maple's current solution to several design issues. Maple provides interactive usage through an interpreter for the user-oriented, higher-level, Maple programming language. A macroprocessor is used to generate code for several implementation languages in the BCPL family (in particular, C). The kernel of the system is written in a BCPL-like language. The Maple system has been under development at the University of Waterloo since December 1980. We describe the new data structure called POLY which we added to Maple 17 (released 2013) to improve performance for polynomials in Maple, and recent work done for Maple 18 (released 2014). One of the cons is the sum-of-products data structure is not nearly as efficient for multiplying multivariate polynomials as other special purpose computer algebra systems. In this article, on occasion of Gaston's retirement, we present details of his design, its pros and cons, and changes we have made to it over the years. This makes testing for equality, which is used in many operations, very fast. As part of the process of simplifying a mathematical formula, he represented every Maple object and every sub-object uniquely in memory. Gaston Gonnet, as the primary author of the Maple kernel, designed and implemented this data structure in the early 80s. The principal data structure in Maple used to represent polynomials and general mathematical expressions involving functions like sqrt(x), sin x, exp(2x), y'(x) etc., is known to the Maple developers as the sum-of-products data structure.
0 Comments
Leave a Reply. |