Sciweavers

ESOP
1994
Springer

Dimension Types

13 years 8 months ago
Dimension Types
Scientists and engineers must ensure that physical equations are dimensionally consistent, but existing programming languages treat all numeric values as dimensionless. This paper extends a strongly-typed programming language with a notion of dimension type. Our approach improves on previous proposals in that dimension types may be polymorphic. Furthermore, any expression which is typable in the system has a most general type, and we describe an algorithm which infers this type automatically. The algorithm exploits equational unification over Abelian groups in addition to ordinary term unification. An implementation of the type system is described, extending the ML Kit compiler. Finally, we discuss the problem of obtaining a canonical form for principal types and sketch some more powerful systems which use dependent and higher-order polymorphic types.
Andrew Kennedy
Added 09 Aug 2010
Updated 09 Aug 2010
Type Conference
Year 1994
Where ESOP
Authors Andrew Kennedy
Comments (0)