Static analysis and transformation of Fortran programs