Skip to Main content Skip to Navigation
Reports

Type Inference For Linear Algebra With Units Of Measurement

Paul Griffioen 1
1 ATEAMS - Analysis and Transformation based on rEliAble tool coMpositionS
Inria Lille - Nord Europe, CWI - Centrum Wiskunde & Informatica
Abstract : Refining types of numerical data with units of measurement has the potential to increase safety of programming languages but is restricted to homogeneous units when checked statically with parametric polymorphism. We lift units to vectors and show how type inference of linear algebra expressions can statically determine safety for data with heterogeneous units. The typing is based on the dyadic product of units that is found in linear transformations and the corresponding vector spaces. Since it is a refinement of Kennedy's types for units we automatically obtain a unification algorithm, which gives principal types for linear algebra. The extension of unit-unification to numerical data with heterogeneous units makes the safety of statically checked numerical expressions available to a significantly larger set of use-cases.
Document type :
Reports
Complete list of metadata

https://hal.inria.fr/hal-00923380
Contributor : Tijs van der Storm Connect in order to contact the contributor
Submitted on : Thursday, January 2, 2014 - 5:05:34 PM
Last modification on : Tuesday, May 25, 2021 - 10:28:01 AM

Identifiers

  • HAL Id : hal-00923380, version 1

Collections

Citation

Paul Griffioen. Type Inference For Linear Algebra With Units Of Measurement. [Technical Report] SwAT-1302, 2013, pp.1 - 32. ⟨hal-00923380⟩

Share

Metrics

Les métriques sont temporairement indisponibles