Partial Evaluation and Symbolic Computation for the Understanding of Fortran Programs

We describe a technique and a tool supporting partial evaluation of Fortran programs, i.e. their specialization for specific values of their input variables. We aim at understanding old programs, which have become very complex due to numerous extensions. From a given Fortran program and these values of its input variables, the tool provides a simplified program, which behaves like the initial one for the specific values. This tool uses mainly constant propagation and simplification of alternatives to one of their branches. The tool is specified in inference rules and operates by induction on the Fortran abstract syntax. These rules are compiled into Prolog by the Centaur/Fortran environment.