Table of Contents
Fetching ...

Migrating Esope to Fortran 2008 using model transformations

Younoussa Sow, Nicolas Anquetil, Léandre Brault, Stéphane Ducasse

TL;DR

This work tackles the challenge of migrating legacy FORTRAN 77 code augmented with the Esope extension to Fortran 2008 to ensure longevity and maintainability of industrial applications. It presents a model-driven migration pipeline that converts Esope ASTs into a Fortran 2008 target, leveraging a hybrid Model-to-Text/Model-to-Model strategy to generate readable yet faithful code. Key contributions include a derived-type–based representation for Esope segments, explicit handling of dimensioning variables/expressions, and a principled approach to preserving behavior while enabling modern features like dynamic memory and explicit parameter intents. Empirical results from a Bookstore use case show the migrated code compiles and runs with the same outputs, and overall performance improves relative to Esope, highlighting the approach’s practical value for industrial legacy migration.

Abstract

Legacy programming languages such as FORTRAN 77 still play a vital role in many industrial applications. Maintaining and modernizing these languages is challenging, especially when migrating to newer standards such as Fortran 2008. This is exacerbated in the presence of legacy proprietary extensions on such legacy languages, because their semantics are often based on old context (limits of legacy language, domain logic,...). This paper presents an approach for automatically migrating FORTRAN 77 with a proprietary extension, named Esope, to Fortran 2008. We introduce a tool that converts Esope source code to Fortran 2008. While supporting readability of the generated code, we want to maintain the level of abstraction provided by Esope. Our method uses model-driven engineering techniques, with transformations to generate a target model from which we export easy-to-read Fortran 2008 source code. We discuss the advantages, limitations, and maintainability considerations of our approach and provide insights into its scalability and adaptability to evolving requirements.

Migrating Esope to Fortran 2008 using model transformations

TL;DR

This work tackles the challenge of migrating legacy FORTRAN 77 code augmented with the Esope extension to Fortran 2008 to ensure longevity and maintainability of industrial applications. It presents a model-driven migration pipeline that converts Esope ASTs into a Fortran 2008 target, leveraging a hybrid Model-to-Text/Model-to-Model strategy to generate readable yet faithful code. Key contributions include a derived-type–based representation for Esope segments, explicit handling of dimensioning variables/expressions, and a principled approach to preserving behavior while enabling modern features like dynamic memory and explicit parameter intents. Empirical results from a Bookstore use case show the migrated code compiles and runs with the same outputs, and overall performance improves relative to Esope, highlighting the approach’s practical value for industrial legacy migration.

Abstract

Legacy programming languages such as FORTRAN 77 still play a vital role in many industrial applications. Maintaining and modernizing these languages is challenging, especially when migrating to newer standards such as Fortran 2008. This is exacerbated in the presence of legacy proprietary extensions on such legacy languages, because their semantics are often based on old context (limits of legacy language, domain logic,...). This paper presents an approach for automatically migrating FORTRAN 77 with a proprietary extension, named Esope, to Fortran 2008. We introduce a tool that converts Esope source code to Fortran 2008. While supporting readability of the generated code, we want to maintain the level of abstraction provided by Esope. Our method uses model-driven engineering techniques, with transformations to generate a target model from which we export easy-to-read Fortran 2008 source code. We discuss the advantages, limitations, and maintainability considerations of our approach and provide insights into its scalability and adaptability to evolving requirements.
Paper Structure (40 sections, 1 table)