The Design of Maple's Sum-of-Products and POLY Data Structures for Representing Mathematical Objects

Michael Monagan, Roman Pearce · ACM communications in computer algebra · 2015

The principal data structure Maple uses to represent polynomials and general mathematical expressions involving functions like sin x, e 2x , y'(x),(n/k) etc., is known to the Maple developers as the sum-of-products data structure. Gaston Gonnet, as the primary author of the Maple kernel, designed and implemented this data structure in the early 1980s. As part of the process of simplifying a mathematical formula, he represented every Maple object and every sub-object uniquely in memory. This makes testing for equality of expressions very fast. In this article, on occasion of Gonnet's retirement, we present details of his design, its pros and cons, and changes we and others have made to it over the years. One of the cons of the sum-of-products data structure is it is not as efficient at multiplying multivariate polynomials as other special purpose computer algebra systems. We describe a new data structure called POLY that we added to Maple 17 (released in 2013) to improve performance for polynomials in Maple, and recent work done for Maple 18 (released in 2014).

Read the paper · More papers on PaperTik