[论文解读] Migrating Esope to Fortran 2008 using model transformations
该论文提出了一种自动迁移方法,将 Esope 扩展的 FORTRAN 77 代码迁移到 Fortran 2008,采用模型驱动工程;在解决语言与工具限制的同时,保留抽象度、可读性和可维护性。
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.
研究动机与目标
- Explain the industrial motivation for migrating Esope to Fortran 2008.
- Propose a model-driven engineering approach that transforms Esope ASTs into a Fortran 2008 target model.
- Preserve readability and the abstraction level of Esope in the generated code.
- Address memory management, segment handling, and legacy constructs within Fortran 2008.
提出的方法
- Hybrid model-to-text transformation combining visitors and string templates for model-to-model migration.
- Define a target Fortran 2008 derived-type based representation of Esope segments.
- Implement a common abstract segment type with abstract procedures to model segment operations.
- Translate Esope field and segment access notations to Fortran 2008 syntax (%, deferred shapes, etc.).
- Remove preprocessor includes and migrate to module-based imports with traceability comments.
- Enforce explicit typing and intent semantics in Fortran 2008 migrated code.
实验结果
研究问题
- RQ1How can Esope segments and dynamic memory management be faithfully represented in Fortran 2008?
- RQ2What migration strategy preserves readability and the developer’s abstraction level while ensuring maintainability?
- RQ3How to handle graph-like structures of segments and their operations in Fortran 2008?
- RQ4What are the necessary adaptations to Fortran 2008 features (derived types, deferred shapes, intents) to support Esope semantics?
- RQ5How to manage legacy constructs (includes, GOTO, COMMON blocks) in the migrated code?
主要发现
- A Fortran 2008-based derived-type approach can represent Esope segments and their dynamic sizing.
- Abstract segment type enables uniform handling of segment operations across derived types.
- Deferred-shape arrays are used to model run-time sized fields with explicit memory management.
- Pointers are handled via derived-type pointers and explicit procedures to mirror Esope behavior.
- Includes are removed and replaced with module-based declarations to improve traceability and readability.
- The migration framework provides mechanisms to preserve formatting, comments, and traceability of changes.
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。