期刊
JOURNAL OF SUPERCOMPUTING
卷 78, 期 2, 页码 2988-3028出版社
SPRINGER
DOI: 10.1007/s11227-021-03839-9
关键词
Fortran; Type safety; Type system; Program transformation; Acceleration
类别
资金
- UK EPSRC [EP/L00058X/1]
- EPSRC [EP/L00058X/1] Funding Source: UKRI
Fortran is still widely used in scientific computing, particularly with legacy code written in FORTRAN 77 which lacks type safety. This paper presents a formal approach to ensure type safety through automated program transformation, reducing programming errors. The study includes rigorous analysis and practical implementation of algorithms to convert FORTRAN 77 legacy code into type safe, side-effect free subroutines and functions in Fortran 90.
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.
作者
我是这篇论文的作者
点击您的名字以认领此论文并将其添加到您的个人资料中。
推荐
暂无数据