{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,3,11]],"date-time":"2026-03-11T07:27:15Z","timestamp":1773214035097,"version":"3.50.1"},"reference-count":43,"publisher":"MDPI AG","issue":"3","license":[{"start":{"date-parts":[[2022,8,13]],"date-time":"2022-08-13T00:00:00Z","timestamp":1660348800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Software"],"abstract":"<jats:p>With archaic coding techniques, there will be a time when it will be necessary to modernize vulnerable software. However, redeveloping out-of-date code can be a time-consuming task when dealing with a multitude of files. To reduce the amount of reassembly for Fortran-based projects, in this paper, we develop a prototype for automating the manual labor of refactoring individual files. ForDADT (Fortran Dynamic Autonomous Diagnostic Tool) project is a Python program designed to reduce the amount of refactoring necessary when compiling Fortran files. In this paper, we demonstrate how ForDADT is used to automate the process of upgrading Fortran codes, process the files, and automate the cleaning of compilation errors. The developed tool automatically updates thousands of files and builds the software to find and fix the errors using pattern matching and data masking algorithms. These modifications address the concerns of code readability, type safety, portability, and adherence to modern programming practices.<\/jats:p>","DOI":"10.3390\/software1030014","type":"journal-article","created":{"date-parts":[[2022,8,14]],"date-time":"2022-08-14T21:09:06Z","timestamp":1660511346000},"page":"299-315","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":2,"title":["An Automated Tool for Upgrading Fortran Codes"],"prefix":"10.3390","volume":"1","author":[{"given":"Lesley","family":"Mak","sequence":"first","affiliation":[{"name":"Computing Science & Information Systems Department, Langara College, Vancouver, BC V5Y 2Z6, Canada"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-4018-8015","authenticated-orcid":false,"given":"Pooya","family":"Taheri","sequence":"additional","affiliation":[{"name":"Mechatronic Systems Engineering Department, Simon Fraser University, Surrey, BC V3T 0A3, Canada"},{"name":"School of Energy, British Columbia Institute of Technology, Burnaby, BC V5G 3H2, Canada"}]}],"member":"1968","published-online":{"date-parts":[[2022,8,13]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","first-page":"1012","DOI":"10.3844\/jcssp.2008.1012.1019","article-title":"A complete automation of unit testing for JavaScript programs","volume":"4","author":"Alshraideh","year":"2008","journal-title":"J. Comput. Sci."},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"8","DOI":"10.1016\/j.procs.2016.03.003","article-title":"The impacts of test automation on software\u2019s cost, quality and time to market","volume":"79","author":"Kumar","year":"2016","journal-title":"Procedia Comput. Sci."},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"267","DOI":"10.1016\/0164-1212(85)90026-3","article-title":"Software project development cost estimation","volume":"5","author":"Kitchenham","year":"1985","journal-title":"J. Syst. Softw."},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"378","DOI":"10.1109\/TSMCC.2011.2118751","article-title":"Towards better fault localization: A crosstab-based statistical approach","volume":"42","author":"Wong","year":"2012","journal-title":"IEEE Trans. Syst. Man Cybern. Syst."},{"key":"ref_5","doi-asserted-by":"crossref","first-page":"16","DOI":"10.1016\/j.jss.2011.05.021","article-title":"Test coverage optimization for large code problems","volume":"85","author":"Lin","year":"2012","journal-title":"J. Syst. Softw."},{"key":"ref_6","first-page":"439","article-title":"Categorization refactoring techniques based on their effect of software quality attributes","volume":"8","author":"Almogahed","year":"2019","journal-title":"Int. J. Innov. Technol. Explor. Eng. (IJITEE)"},{"key":"ref_7","doi-asserted-by":"crossref","first-page":"1354","DOI":"10.1016\/j.jss.2012.12.051","article-title":"A survey of software testing practices in Canada","volume":"86","author":"Garousi","year":"2013","journal-title":"J. Syst. Softw."},{"key":"ref_8","unstructured":"Moniot, R. (2022, August 04). FTNCHEK. Available online: https:\/\/www.dsm.fordham.edu\/~ftnchek\/."},{"key":"ref_9","unstructured":"(2022, August 04). Silverfrost Fortran. Available online: https:\/\/www.silverfrost.com\/1\/default.aspx."},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Gupta, N., Mathur, A.P., and Soffa, M.L. (2000, January 11\u201315). Generating test data for branch coverage. Proceedings of the Fifteenth IEEE International Conference on Automated Software Engineering (ASE 2000), Grenoble, France.","DOI":"10.1109\/ASE.2000.873666"},{"key":"ref_11","unstructured":"Swartz, A., and Savand, A. (2022, August 04). html2text. Available online: https:\/\/pypi.org\/project\/html2text\/."},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"5","DOI":"10.1145\/2179280.2179281","article-title":"Fortran Legacy software: Source code update and possible parallelisation issues","volume":"31","author":"Tinetti","year":"2012","journal-title":"ACM SIGPLAN Fortran Forum"},{"key":"ref_13","unstructured":"Tinetti, F.G., M\u00e9ndez, M., Lopez, M.A., Labraga, J.C., and Cajaraville, P.G. (2011, January 18\u201321). Update and restructure legacy code for (or before) parallel processing. Proceedings of the 2011 International Conference on Parallel and Distributed Processing Techniques and Applications, Las Vegas, NV, USA."},{"key":"ref_14","unstructured":"Chapman, S.J. (2017). Fortran for Scientists and Engineers, McGraw-Hill Education. [4th ed.]."},{"key":"ref_15","doi-asserted-by":"crossref","unstructured":"Shires, D., Mohan, R., and Mark, A. (2001). Strategies and Experiences Using High Performance Fortran, Army Research Laboratory. Army Research Laboratory Technical Report ARL-TR-2437.","DOI":"10.21236\/ADA393153"},{"key":"ref_16","doi-asserted-by":"crossref","unstructured":"Orchard, D., and Rice, A. (2013, January 27). Upgrading Fortran source code using automatic refactoring. Proceedings of the 2013 ACM Workshop on Refactoring Tools, Indianapolis, IN, USA.","DOI":"10.1145\/2541348.2541356"},{"key":"ref_17","doi-asserted-by":"crossref","first-page":"2988","DOI":"10.1007\/s11227-021-03839-9","article-title":"Making legacy Fortran code type safe through automated program transformation","volume":"78","author":"Vanderbauwhede","year":"2022","journal-title":"J. Supercomput."},{"key":"ref_18","doi-asserted-by":"crossref","unstructured":"Kedward, L., Aradi, B., Certik, O., Curcic, M., Ehlert, S., Engel, P., Goswami, R., Hirsch, M., Lozada-Blanco, A., and Magnin, V. (2022). The State of Fortran. arXiv.","DOI":"10.1109\/MCSE.2022.3159862"},{"key":"ref_19","doi-asserted-by":"crossref","first-page":"1432","DOI":"10.1109\/TSE.2020.3021736","article-title":"The effectiveness of supervised machine learning algorithms in predicting software refactoring","volume":"48","author":"Aniche","year":"2022","journal-title":"IEEE Trans. Softw. Eng."},{"key":"ref_20","doi-asserted-by":"crossref","unstructured":"Sagar, P.S., AlOmar, E.A., Mkaouer, M.W., Ouni, A., and Newman, C.D. (2021). Comparing commit messages and source code metrics for the prediction refactoring activities. Algorithms, 14.","DOI":"10.3390\/a14100289"},{"key":"ref_21","first-page":"98","article-title":"A set of refactorings for the evolution of Fortran programs","volume":"6","author":"Rissetti","year":"2016","journal-title":"Int. J. High Perform. Syst. Archit."},{"key":"ref_22","doi-asserted-by":"crossref","unstructured":"Overbey, J.L., and Johnson, R.E. (2009, January 25\u201329). Regrowing a Language. Proceedings of the 24th ACM SIGPLAN Conference on Object Oriented Programming Systems Languages and Applications, Orlando, FL, USA.","DOI":"10.1145\/1640089.1640127"},{"key":"ref_23","doi-asserted-by":"crossref","unstructured":"Radhakrishnan, H., Rouson, D.W.I., Morris, K., Shende, S., and Kassinos, S.C. (2013, January 16\u201322). Test-driven coarray parallelization of a legacy Fortran application. Proceedings of the 1st International Workshop on Software Engineering for High Performance Computing in Computational Science and Engineering, Denver, CO, USA.","DOI":"10.1145\/2532352.2532356"},{"key":"ref_24","doi-asserted-by":"crossref","unstructured":"Zhang, Y., Shao, S., Ji, M., Qiu, J., Tian, Z., Du, X., and Guizani, M. (2020). An automated refactoring approach to improve IoT software quality. Appl. Sci., 10.","DOI":"10.3390\/app10010413"},{"key":"ref_25","doi-asserted-by":"crossref","unstructured":"Overbey, J.L., and Johnson, R.E. (2011, January 6\u201310). Differential precondition checking: A lightweight, reusable analysis for refactoring tools. Proceedings of the 2011 26th IEEE\/ACM International Conference on Automated Software Engineering (ASE 2011), Lawrence, KS, USA.","DOI":"10.1109\/ASE.2011.6100067"},{"key":"ref_26","doi-asserted-by":"crossref","first-page":"11","DOI":"10.1145\/1883575.1883577","article-title":"A collection of refactoring specifications for Fortran 95","volume":"29","author":"Overbey","year":"2010","journal-title":"ACM SIGPLAN Fortran Forum"},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Rajaseharan, C., Tan, W.J., Tang, W.T., Turner, S.J., Kuo, S.-H., Goh, R.S.M., and Wong, W.-F. (2012, January 17\u201319). Automatic refactoring of legacy Fortran code to the array slicing notation. Proceedings of the 2012 IEEE 18th International Conference on Parallel and Distributed Systems, Singapore.","DOI":"10.1109\/ICPADS.2012.101"},{"key":"ref_28","unstructured":"(2022, August 04). Fortran Wiki, Modernizing old Fortran. Available online: https:\/\/fortranwiki.org\/fortran\/show\/Modernizing+Old+Fortran."},{"key":"ref_29","unstructured":"Maclaren, N. (2022, August 04). Converting Old to Modern Fortran. Available online: https:\/\/www-uxsup.csx.cam.ac.uk\/courses\/moved.OldFortran\/paper_2.pdf."},{"key":"ref_30","unstructured":"Blevins, J. (2022, August 04). to_90.f90. Available online: https:\/\/jblevins.org\/mirror\/amiller\/to_f90.f90."},{"key":"ref_31","unstructured":"Lemon, C. (2022, August 04). FORTRAN to Fortran. Available online: http:\/\/lemonlab.net\/fortran\/."},{"key":"ref_32","unstructured":"Goppert, J. (2022, August 04). Fortran Tools. Available online: https:\/\/github.com\/arktools\/fortran_tools."},{"key":"ref_33","doi-asserted-by":"crossref","unstructured":"Gardner, T.R. (2004). Upgrading the ATB Model Code from FORTRAN 77 to FORTRAN 90, Black Rock Dynamics. US Air Force Research Laboratory Report AFRL-HE-WP-TR-2004-0113.","DOI":"10.21236\/ADA427739"},{"key":"ref_34","unstructured":"Rodr\u00edguez, M.G., Iglesias, J.R., and A\u00f1el Cabanelas, J.A. (2018, January 8\u201313). FortranAnalyser: A software tool to access Fortran code quality. Proceedings of the Europeans Geoscience Union General Assembly, Vienna, Austria."},{"key":"ref_35","doi-asserted-by":"crossref","unstructured":"Colarullo, S.J., and Miller, L.D. (2019). Upgrades to a Fortran Program for Estimating Stream Transit Losses of Reusable Water, El Paso and Pueblo Counties, Colorado.","DOI":"10.3133\/sir20185163"},{"key":"ref_36","unstructured":"M\u00e9ndez, M., Overbey, J., Garrido, A., Tinetti, F., and Johnson, R. (2010, January 2\u20133). A catalog and classification of Fortran refactorings. Proceedings of the 11th Argentine Symposium on Software Engineering, Buenos Aires, Argentina."},{"key":"ref_37","doi-asserted-by":"crossref","first-page":"305901","DOI":"10.1088\/1361-648X\/ab82d2","article-title":"f90wrap: An automated tool for constructing deep Python interfaces to modern Fortran codes","volume":"32","author":"Kermode","year":"2020","journal-title":"J. Phys. Condens. Matter"},{"key":"ref_38","first-page":"296","article-title":"F2PY: A tool for connecting Fortran and Python programs","volume":"4","author":"Peterson","year":"2009","journal-title":"Int. J. Comput. Sci. Eng."},{"key":"ref_39","doi-asserted-by":"crossref","unstructured":"Hunt, J. (2019). Regular expressions in Python. Advanced Guide to Python 3 Programming, Springer.","DOI":"10.1007\/978-3-030-25943-3"},{"key":"ref_40","doi-asserted-by":"crossref","unstructured":"Jain, R.B., and Puri, M. (2020). An approach towards the development of scalable data masking for preserving privacy of sensitive business data. Artificial Intelligence and Evolutionary Computations in Engineering Systems, Springer.","DOI":"10.1007\/978-981-15-0199-9_63"},{"key":"ref_41","unstructured":"Hansen, C. (2022, August 04). Fortran Language Server. Available online: https:\/\/github.com\/hansec\/fortran-language-server."},{"key":"ref_42","unstructured":"(2022, August 04). Phortran. Available online: https:\/\/www.eclipse.org\/photran\/."},{"key":"ref_43","unstructured":"(2022, August 04). Fprettify. Available online: https:\/\/github.com\/pseewald\/fprettify."}],"container-title":["Software"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2674-113X\/1\/3\/14\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,11]],"date-time":"2025-10-11T00:08:25Z","timestamp":1760141305000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2674-113X\/1\/3\/14"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022,8,13]]},"references-count":43,"journal-issue":{"issue":"3","published-online":{"date-parts":[[2022,9]]}},"alternative-id":["software1030014"],"URL":"https:\/\/doi.org\/10.3390\/software1030014","relation":{},"ISSN":["2674-113X"],"issn-type":[{"value":"2674-113X","type":"electronic"}],"subject":[],"published":{"date-parts":[[2022,8,13]]}}}