Repository logo
 

Evolving Fortran types with inferred units-of-measure


Change log

Authors

Orchard, Dominic 
Oshmyan, Oleg 

Abstract

Dimensional analysis is a well known technique for checking the consistency of equations involv- ing physical quantities, constituting a kind of type system. Various type systems for dimensional analysis, and its re nement to units-of-measure, have been proposed. In this paper, we detail the design and implementation of a units-of-measure system for Fortran, provided as a pre- processor. Our system is designed to aid adding units to existing code base: units may be polymorphic and can be inferred. Furthermore, we introduce a technique for reporting to the user a set of critical variables which should be explicitly annotated with units to get the maxi- mum amount of unit information with the minimal number of explicit declarations. This aids adoption of our type system to existing code bases, of which there are many in computational science projects.

Description

Keywords

units-of-measure, dimension typing, type systems, verification, code base evolution, Fortran, language design

Journal Title

Journal of Computational Science

Conference Name

Journal ISSN

1877-7503

Volume Title

9

Publisher

Elsevier BV
Sponsorship
Engineering and Physical Sciences Research Council (EP/M026124/1)
This work was supported in part by a Google Focussed Research Award and by EPSRC grant EP/K011715/1.