Wolfram Library Archive


Courseware Demos MathSource Technical Notes
All Collections Articles Books Conference Proceedings
Title

Static and strong typing for extended Mathematica
Author

Peter Fritzson
Organization: MathCore Engineering AB
Journal / Anthology

Innovation in Mathematics: Proceedings of the Second International Mathematica Symposium
Year: 1997
Page range: 153-160
Description

There are at least three reasons why a static type system is a useful extension to Mathematica: A type checker can find errors during software development in Mathematica; Object oriented typing is useful for handling complexity when building large applications or equation-based simulation models; Precise static type information is needed for efficient internal compilation of Mathematica as well as for automatic translation to efficient code in languages such as C++ or Fortran. This paper presents a short overview of the syntax and semantics as well as rationale for a static type system designed to be well integrated into Mathematica. A static type system makes it possible to find type errors in the whole program before execution starts, in contrast to the standard dynamic type checking of Mathematica which only finds type errors in parts of the program during execution. The type system includes basic types, array types, record types, typed variables, typed functions and object oriented constructs. The syntax of the type extensions is standard Mathematica, and the implementation is entirely within Mathematica.
Subjects

*Applied Mathematics > Computer Science
*Wolfram Technology > Programming > Testing