StmtTree: An Easy-to-Use yet Versatile Fortran Transformation Toolkit
Jingbo Lin, Yi Yu, Zhang Yang, Yafan Zhao

TL;DR
StmtTree is a versatile Fortran transformation toolkit that simplifies processing legacy Fortran-77 codes by providing an abstracted statement tree representation and user-friendly APIs, enabling efficient customization and modernization efforts.
Contribution
The paper introduces StmtTree, a novel toolkit that abstracts Fortran grammar into a statement tree, facilitating easier code transformation and modernization of legacy Fortran codes.
Findings
Effective adaptation to legacy Fortran-77 codes
Complex transformations achievable with fewer than 100 lines of Python
Simplifies creation of customized Fortran transformation tools
Abstract
The Fortran programming language continues to dominate the scientific computing community, with many production codes written in the outdated Fortran-77 dialect, yet with many non-standard extensions such as Cray poiters. This creates significant maintenance burden within the community, with tremendous efforts devoted to modernization. However, despite the modern age of advanced compiler frameworks, processing and transforming old Fortran codes remains challenging. In this paper, we present StmtTree, a new Fortran code transformation toolkit to address this issue. StmtTree abstracts the Fortran grammar into statement tree, offering both a low-level representation manipulation API and a high-level, easy-to-use query and manipulation mini-language. StmtTree simplifies the creation of customized Fortran transformation tools. Experiments show that StmtTree adapts well to legacy Fortran-77…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNeural Networks and Applications · Model Reduction and Neural Networks
