History of Mathemagix

199*

During the late ninetees, our wish for a new general purpose computer algebra language was motivated by two main reasons: the quasi-absense of free computer algebra systems and the non-existence of sufficiently general compiled computer algebra languages.

A first draft for the type system was developed during this period, largely inspired by Axiom and Aldor. This draft has slightly evolved over time, but not that much, the main difficulty being to design an efficient compiler for the language. Three major changes which did occur were the following:

  1. In 2001, Dan Grayson convinced me that the Axiom/Aldor way to import modules is suboptimal. This lead to the introduction of the forall construct.

  2. During 2011, it turned out that implicit conversions were a major obstacle to providing a clean semantics and designing an efficient compiler. Inspired by Aldor, we decided to drop all implicit conversions. Nevertheless, using the forall primitive, an acceptable substitute was found, which essentially obliges the programmer which arguments to functions accept implicit conversions. This is cleaner anyway, in our model where all declarations should be typed very precisely.

1999–2006

Some progress has been made: on the one hand side the old computer algebra systems Maxima and Axiom have become free and several special purpose C/C++ libraries have become increasingly powerful. In parallel, the progress on Mathemagix has been quite slow, mainly due to the fact that we started by writing a compiler.

Taking into account the above developements, the original design goals of Mathemagix have changed a bit in the direction of making something more directly useful. On the one hand side, greater priority is given to the incorporation of existing libraries. On the other hand, the language had to be adjusted so as to make it possible to rapidly write an interpreter for prototyping, without losing the perspective of writing a compiler one day.

The above design objectives lead to the development of the mmx-shell interpreter to which C/C++ functionality could be glued using a uniform typed extension facility mmx-extend. In parallel, we developed a standard C++ library Mmxlib.

2006–2012

We have reorganized Mathemagix so as to become a collection of packages with dag-like dependencies. On the one hand, the new system provides a C++ interface for gluing new functionality to Mathemagix.

On the other hand, we provide the concept of an “abstract evaluator”. This allows users to implement different concrete languages which may take advantage out of the functionality provided by libraries. The new interpreter mmx-light replaces mmx-shell.

2007–*

We progressively returned to our original design goal to develop a compiled and strongly typed language for computer algebra and computer analysis. This has converged towards the release of a new compiler mmc together with a new interpreter mmi (which is really another backend for mmc). The underlying language requires a stricter typing of declarations. For instance, a declaration such as f(x) == x*x, which was formerly accepted by mmx-light, will be rejected by the compiler. On the other hand, the compiler remains compatable with existing C++ template libraries, and the generated code is two orders of magnitude faster than mmx-light.

2012-*

We started the development of a new library caas, entirely written in Mathemagix, with a twofold objective: (1) a uniform and extensible implementation of symbolic expressions, (2) a future replacement for mmx-light. Indeed, inside typical computer algebra sessions, it remains useful to support untyped declarations such as f(x) == x*x.

Plans

A partial rewrite of the compiler will be necessary in order to increase its robustness. As a part of this, we intend to provide well defined APIs for the manipulation of all intermediate typed expressions which are manipulated by the compiler. After this reorganization, it should also become possible to further improve the compiler so as to generate heavily optimized code.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License. If you don't have this file, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.