Vanderbauwhede, W. (2022) Making legacy Fortran code type safe through automated program transformation. Journal of Supercomputing, 78(2), pp. 2988-3028. (doi: 10.1007/s11227-021-03839-9)
Text
243180.pdf - Published Version Available under License Creative Commons Attribution. 2MB |
Abstract
Fortran is still widely used in scientific computing, and a very large corpus of legacy as well as new code is written in FORTRAN 77. In general this code is not type safe, so that incorrect programs can compile without errors. In this paper, we present a formal approach to ensure type safety of legacy Fortran code through automated program transformation. The objective of this work is to reduce programming errors by guaranteeing type safety. We present the first rigorous analysis of the type safety of FORTRAN 77 and the novel program transformation and type checking algorithms required to convert FORTRAN 77 subroutines and functions into pure, side-effect free subroutines and functions in Fortran 90. We have implemented these algorithms in a source-to-source compiler which type checks and automatically transforms the legacy code. We show that the resulting code is type safe and that the pure, side-effect free and referentially transparent subroutines can readily be offloaded to accelerators.
Item Type: | Articles |
---|---|
Status: | Published |
Refereed: | Yes |
Glasgow Author(s) Enlighten ID: | Vanderbauwhede, Professor Wim |
Authors: | Vanderbauwhede, W. |
College/School: | College of Science and Engineering > School of Computing Science |
Journal Name: | Journal of Supercomputing |
Publisher: | Springer |
ISSN: | 0920-8542 |
ISSN (Online): | 1573-0484 |
Published Online: | 14 July 2021 |
Copyright Holders: | Copyright © 2021 The Author |
First Published: | First published in Journal of Supercomputing 78(2): 2988-3028 |
Publisher Policy: | Reproduced under a Creative Commons License |
University Staff: Request a correction | Enlighten Editors: Update this record