Specifying and automatically generating a specialization tool for Fortran 90
Abstract
Partial evaluation is an optimization technique traditionally used in compilation. We have adapted this technique to the understanding of scientific application programs during their maintenance and we have implemented a tool. This tool analyzes Fortran~90 application programs and performs an interprocedural pointer analysis. This paper presents how we have specified a dynamic semantics of Fortran~90 and a partial evaluation process, both with various formalisms (inference rules with global definitions and set and relational operators) and how the partial evaluation has been manually derived from the dynamic semantics. The guidelines for proving the correctness of the partial evaluation with respect to the dynamic semantics are introduced in this paper. The tool implementing the specifications is also detailed. It has been implemented in a generic programming environment and a graphical interface has been developed to visualize the information computed during the partial evaluation (values of variables, already analyzed procedures, scope of variables, removed statements, etc.).