Abstract
AbstractFortran 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.
Funder
Engineering and Physical Sciences Research Council
Publisher
Springer Science and Business Media LLC
Subject
Hardware and Architecture,Information Systems,Theoretical Computer Science,Software
Reference20 articles.
1. Abramson D, Lees M, Krzhizhanovskaya V, Dongarra J, Sloot PM, Yamamoto K, Uno A, Murai H, Tsukamoto T, Shoji F, Matsui S, Sekizawa R, Sueyasu F, Uchiyama H, Okamoto M, Ohgushi N, Takashina K, Wakabayashi D, Taguchi Y, Yokokawa M (2014) In: 2014 International conference on computational science the k computer operations: experiences and statistics. Procedia Computer Science, vol 29, pp 76–585
2. ANSI A (1978) Standard x3. 9-1978, programming language Fortran (revision of ansi x2. 9-1966). American National Standards Institute. Inc., NY, 197(8)
3. Colbrook A, Smythe C (1990) Formal specification of data abstraction in Fortran 77: abstract arrays. Softw Eng J 5(3):151–159. https://doi.org/10.1049/sej.1990.0017
4. Contrastin M, Rice A, Danish M, Orchard D (2016) Units-of-measure correctness in Fortran programs. Comput Sci Eng 18(1):102–107
5. Gordon S, McBride BJ (1994) Computer program for calculation of complex chemical equilibrium. NASA reference publication 1311
Cited by
5 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献