{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,3,29]],"date-time":"2026-03-29T08:00:34Z","timestamp":1774771234981,"version":"3.50.1"},"reference-count":20,"publisher":"Springer Science and Business Media LLC","issue":"2","license":[{"start":{"date-parts":[[2021,7,14]],"date-time":"2021-07-14T00:00:00Z","timestamp":1626220800000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"},{"start":{"date-parts":[[2021,7,14]],"date-time":"2021-07-14T00:00:00Z","timestamp":1626220800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"}],"funder":[{"DOI":"10.13039\/501100000266","name":"Engineering and Physical Sciences Research Council","doi-asserted-by":"publisher","award":["EP\/L00058X\/1"],"award-info":[{"award-number":["EP\/L00058X\/1"]}],"id":[{"id":"10.13039\/501100000266","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":["link.springer.com"],"crossmark-restriction":false},"short-container-title":["J Supercomput"],"published-print":{"date-parts":[[2022,2]]},"abstract":"<jats:title>Abstract<\/jats:title><jats:p>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.<\/jats:p>","DOI":"10.1007\/s11227-021-03839-9","type":"journal-article","created":{"date-parts":[[2021,7,14]],"date-time":"2021-07-14T11:03:17Z","timestamp":1626260597000},"page":"2988-3028","update-policy":"https:\/\/doi.org\/10.1007\/springer_crossmark_policy","source":"Crossref","is-referenced-by-count":9,"title":["Making legacy Fortran code type safe through automated program transformation"],"prefix":"10.1007","volume":"78","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-6768-0037","authenticated-orcid":false,"given":"Wim","family":"Vanderbauwhede","sequence":"first","affiliation":[]}],"member":"297","published-online":{"date-parts":[[2021,7,14]]},"reference":[{"key":"3839_CR1","doi-asserted-by":"crossref","unstructured":"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\u2013585","DOI":"10.1016\/j.procs.2014.05.052"},{"key":"3839_CR2","unstructured":"ANSI A (1978) Standard x3. 9-1978, programming language Fortran (revision of ansi x2. 9-1966). American National Standards Institute. Inc., NY, 197(8)"},{"issue":"3","key":"3839_CR3","doi-asserted-by":"publisher","first-page":"151","DOI":"10.1049\/sej.1990.0017","volume":"5","author":"A Colbrook","year":"1990","unstructured":"Colbrook A, Smythe C (1990) Formal specification of data abstraction in Fortran 77: abstract arrays. Softw Eng J 5(3):151\u2013159. https:\/\/doi.org\/10.1049\/sej.1990.0017","journal-title":"Softw Eng J"},{"issue":"1","key":"3839_CR4","doi-asserted-by":"publisher","first-page":"102","DOI":"10.1109\/MCSE.2016.17","volume":"18","author":"M Contrastin","year":"2016","unstructured":"Contrastin M, Rice A, Danish M, Orchard D (2016) Units-of-measure correctness in Fortran programs. Comput Sci Eng 18(1):102\u2013107","journal-title":"Comput Sci Eng"},{"key":"3839_CR5","unstructured":"Gordon S, McBride BJ (1994) Computer program for calculation of complex chemical equilibrium. NASA reference publication 1311"},{"key":"3839_CR6","doi-asserted-by":"crossref","unstructured":"Hudak P, Hughes J, Peyton Jones S, Wadler P (2007) A history of Haskell: being lazy with class. In: Proceedings of the third ACM SIGPLAN conference on history of programming languages, pp 12\u20131\u201312\u201355","DOI":"10.1145\/1238844.1238856"},{"key":"3839_CR7","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-00820-7","volume-title":"Ocean modelling for beginners: using open-source software","author":"J K\u00e4mpf","year":"2009","unstructured":"K\u00e4mpf J (2009) Ocean modelling for beginners: using open-source software. Springer, Berlin"},{"key":"3839_CR8","doi-asserted-by":"crossref","unstructured":"Liao C, Quinlan DJ, Panas T, De Supinski BR (2010) A rose-based openmp 3.0 research compiler supporting multiple runtime libraries. In: International workshop on OpenMP. Springer, Berlin, pp 15\u201328","DOI":"10.1007\/978-3-642-13217-9_2"},{"issue":"1","key":"3839_CR9","doi-asserted-by":"publisher","first-page":"167","DOI":"10.1016\/0010-4655(96)00093-8","volume":"98","author":"D Maley","year":"1996","unstructured":"Maley D, Kilpatrick P, Schreiner E, Scott N, Diercksen G (1996) The formal specification of abstract data types and their implementation in Fortran 90: implementation issues concerning the use of pointers. Comput Phys Commun 98(1):167\u2013180. https:\/\/doi.org\/10.1016\/0010-4655(96)00093-8","journal-title":"Comput Phys Commun"},{"issue":"3","key":"3839_CR10","doi-asserted-by":"publisher","first-page":"348","DOI":"10.1016\/0022-0000(78)90014-4","volume":"17","author":"R Milner","year":"1978","unstructured":"Milner R (1978) A theory of type polymorphism in programming. J Comput Syst Sci 17(3):348\u2013375","journal-title":"J Comput Syst Sci"},{"key":"3839_CR11","doi-asserted-by":"publisher","unstructured":"Orchard D, Rice A (2013) Upgrading Fortran source code using automatic refactoring. In: Proceedings of the 2013 ACM workshop on refactoring tools, WRT\u201913. ACM, New York, NY, USA, pp 29\u201332. https:\/\/doi.org\/10.1145\/2541348.2541356","DOI":"10.1145\/2541348.2541356"},{"key":"3839_CR12","doi-asserted-by":"crossref","unstructured":"Overbey J, Xanthos S, Johnson R, Foote B (2005) Refactorings for fortran and high-performance computing. In: Proceedings of the second international workshop on Software engineering for high performance computing system applications. ACM, pp 37\u201339","DOI":"10.1145\/1145319.1145331"},{"key":"3839_CR13","volume-title":"Types and programming languages","author":"BC Pierce","year":"2002","unstructured":"Pierce BC, Benjamin C (2002) Types and programming languages. MIT Press, Cambridge"},{"key":"3839_CR14","doi-asserted-by":"crossref","unstructured":"Reid J (2018) The new features of Fortran 2018. In: ACM SIGPLAN fortran forum, vol\u00a037. ACM New York, NY, USA, pp 5\u201343","DOI":"10.1145\/3206214.3206215"},{"key":"3839_CR15","doi-asserted-by":"crossref","unstructured":"Reid N, Wray J (1999) A prescriptive semantics of fortran 95. In: ACM SIGPLAN fortran forum, vol 18. ACM New York, NY, USA, pp 2\u20133","DOI":"10.1145\/328239.333386"},{"issue":"1","key":"3839_CR16","doi-asserted-by":"publisher","first-page":"201","DOI":"10.1016\/0010-4655(94)90212-7","volume":"84","author":"N Scott","year":"1994","unstructured":"Scott N, Kilpatrick P, Maley D (1994) The formal specification of abstract data types and their implementation in Fortran 90. Comput Phys Commun 84(1):201\u2013225. https:\/\/doi.org\/10.1016\/0010-4655(94)90212-7","journal-title":"Comput Phys Commun"},{"key":"3839_CR17","doi-asserted-by":"publisher","first-page":"100625","DOI":"10.1016\/j.uclim.2020.100625","volume":"32","author":"T Takemi","year":"2020","unstructured":"Takemi T, Yoshida T, Horiguchi M, Vanderbauwhede W (2020) Large-eddy-simulation analysis of airflows and strong wind hazards in urban areas. Urban Clim 32:100625","journal-title":"Urban Clim"},{"key":"3839_CR18","doi-asserted-by":"crossref","unstructured":"Tinetti FG, M\u00e9ndez M (2012) Fortran legacy software: source code update and possible parallelisation issues. In: ACM SIGPLAN fortran forum, vol 31. ACM, pp 5\u201322","DOI":"10.1145\/2179280.2179281"},{"issue":"32","key":"3839_CR19","doi-asserted-by":"publisher","first-page":"865","DOI":"10.21105\/joss.00865","volume":"3","author":"W Vanderbauwhede","year":"2018","unstructured":"Vanderbauwhede W (2018) The glasgow Fortran source-to-source compiler. J Open Source Softw 3(32):865","journal-title":"J Open Source Softw"},{"key":"3839_CR20","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1016\/j.compfluid.2018.06.005","volume":"173","author":"W Vanderbauwhede","year":"2018","unstructured":"Vanderbauwhede W, Davidson G (2018) Domain-specific acceleration and auto-parallelization of legacy scientific code in Fortran 77 using source-to-source compilation. Comput Fluids 173:1\u20135","journal-title":"Comput Fluids"}],"container-title":["The Journal of Supercomputing"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1007\/s11227-021-03839-9.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/link.springer.com\/article\/10.1007\/s11227-021-03839-9\/fulltext.html","content-type":"text\/html","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1007\/s11227-021-03839-9.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2022,1,24]],"date-time":"2022-01-24T11:36:18Z","timestamp":1643024178000},"score":1,"resource":{"primary":{"URL":"https:\/\/link.springer.com\/10.1007\/s11227-021-03839-9"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2021,7,14]]},"references-count":20,"journal-issue":{"issue":"2","published-print":{"date-parts":[[2022,2]]}},"alternative-id":["3839"],"URL":"https:\/\/doi.org\/10.1007\/s11227-021-03839-9","relation":{},"ISSN":["0920-8542","1573-0484"],"issn-type":[{"value":"0920-8542","type":"print"},{"value":"1573-0484","type":"electronic"}],"subject":[],"published":{"date-parts":[[2021,7,14]]},"assertion":[{"value":"21 April 2021","order":1,"name":"accepted","label":"Accepted","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"14 July 2021","order":2,"name":"first_online","label":"First Online","group":{"name":"ArticleHistory","label":"Article History"}}]}}