Specifying and Automatically Generating a Specialization Tool for Fortran 90

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. We have implemented a tool that analyzes Fortran 90 application programs and performs an interprocedural pointer analysis. This paper presents a dynamic semantics of Fortran 90 and manually derives a partial evaluator from this semantics. The tool implementing the specifications is also detailed. The partial evaluator 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.).

[1]  Jacek Chrzaszcz Modules in type theory with generative definitions , 2004 .

[2]  Gilles Kahn,et al.  Natural Semantics , 1987, STACS.

[3]  Sandrine Blazy,et al.  Partial evaluation for program comprehension , 1998, CSUR.

[4]  Nikolaos Papaspyrou,et al.  A Formal Semantics for the C Programming Language , 2000 .

[5]  Chris Verhoef,et al.  Scaffolding for software renovation , 2000, Proceedings of the Fourth European Conference on Software Maintenance and Reengineering.

[6]  Peter W. O'Hearn,et al.  Local Reasoning about Programs that Alter Data Structures , 2001, CSL.

[7]  Michael Hind,et al.  Flow-sensitive interprocedural constant propagation , 1995, PLDI '95.

[8]  Sandrine Blazy,et al.  SFAC, a tool for program comprehension by specialization , 1994, Proceedings 1994 IEEE 3rd Workshop on Program Comprehension- WPC '94.

[9]  Egon Börger,et al.  A high-level modular definition of the semantics of C# , 2005, Theor. Comput. Sci..

[10]  Xavier Leroy,et al.  Formal Verification of a Memory Model for C-Like Imperative Languages , 2005, ICFEM.

[11]  Sandrine Blazy,et al.  An Automatic Interprocedural Analysis for the Understanding of Scientific Application Programs , 1996, Dagstuhl Seminar on Partial Evaluation.

[12]  Wolfgang J. Paul,et al.  Towards the Formal Verification of a C0 Compiler: Code Generation and Implementation Correctnes , 2005, SEFM.

[13]  David Detlefs,et al.  Simplify: a theorem prover for program checking , 2005, JACM.

[14]  Igor S. Anureev,et al.  Verification-Oriented Language C-Light and Its Structural Operational Semantics , 2003, Ershov Memorial Conference.

[15]  Xavier Leroy,et al.  Formal Verification of a C Compiler Front-End , 2006, FM.

[16]  Peter W. O'Hearn,et al.  Permission accounting in separation logic , 2005, POPL '05.

[17]  Maulik A. Dave,et al.  Compiler verification: a bibliography , 2003, SOEN.

[18]  Zhong Shao,et al.  Certified assembly programming with embedded code pointers , 2006, POPL '06.

[19]  Robert Glück,et al.  Partial Evaluation of Numerical Programs in Fortran , 1994, PEPM.

[20]  Yue Yang,et al.  UMM: an operational memory model specification framework with integrated model checking capability , 2005, Concurr. Pract. Exp..

[21]  John C. Reynolds,et al.  Separation logic: a logic for shared mutable data structures , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[22]  Peter W. O'Hearn,et al.  BI as an assertion language for mutable data structures , 2001, POPL '01.

[23]  Bjarne Steensgaard,et al.  Points-to analysis in almost linear time , 1996, POPL '96.

[24]  Lars Ole Andersen,et al.  Program Analysis and Specialization for the C Programming Language , 2005 .

[25]  P. Klint,et al.  Reverse engineering and system renovation—an annotated bibliography , 1997, SOEN.

[26]  Barbara G. Ryder,et al.  A safe approximate algorithm for interprocedural aliasing , 1992, PLDI '92.

[27]  Reinhard Wilhelm,et al.  Solving shape-analysis problems in languages with destructive updating , 1998, TOPL.

[28]  Larry Rudolph,et al.  Commit-reconcile & fences (CRF): a new memory model for architects and compiler writers , 1999, ISCA.

[29]  Claude Marché,et al.  Multi-prover Verification of C Programs , 2004, ICFEM.

[30]  Jan A. Bergstra,et al.  Toward a complete transformational toolkit for compilers , 1997, TOPL.

[31]  Donglin Liang,et al.  Efficient points-to analysis for whole-program analysis , 1999, ESEC/FSE-7.

[32]  Sandrine Blazy,et al.  Formal Specification and Prototyping of a Program Specializer , 1995, TAPSOFT.

[33]  Peter Sestoft,et al.  Partial evaluation and automatic program generation , 1993, Prentice Hall international series in computer science.

[34]  Flemming Nielson,et al.  Semantics with applications - a formal introduction , 1992, Wiley professional computing.

[35]  Dan R. Ghica,et al.  Abstract Models of Storage , 2000, High. Order Symb. Comput..

[36]  Joëlle Despeyroux,et al.  Proof of Translation in Natural Semantics , 1986, LICS.

[37]  Jean-Raymond Abrial,et al.  The B-book - assigning programs to meanings , 1996 .

[38]  Tobias Nipkow,et al.  Proving Pointer Programs in Higher-Order Logic , 2003, CADE.

[39]  Laurie J. Hendren,et al.  Context-sensitive interprocedural points-to analysis in the presence of function pointers , 1994, PLDI '94.

[40]  Xavier Leroy,et al.  Formal certification of a compiler back-end or: programming a compiler with a proof assistant , 2006, POPL '06.

[41]  Jeremy Manson,et al.  The Java memory model , 2005, POPL '05.

[42]  Frank Tip,et al.  Parametric program slicing , 1995, POPL '95.

[43]  Matthew J. Parkinson,et al.  Local reasoning for Java , 2005 .

[44]  William C. Chu,et al.  Code understanding through program transformation for reusable component identification , 1997, Proceedings Fifth International Workshop on Program Comprehension. IWPC'97.

[45]  Akinori Yonezawa,et al.  Formal Verification of the Heap Manager of an Operating System Using Separation Logic , 2006, ICFEM.

[46]  Michael Norrish C formalised in HOL , 1998 .

[47]  Charles Consel,et al.  Mapping software architectures to efficient implementations via partial evaluation , 1997, Proceedings 12th IEEE International Conference Automated Software Engineering.

[48]  International standard ISO / IEC 9899:1999 Programming languages C - technical corrigendum 1: rectificatif technique 1 , 2001 .

[49]  Norbert Schirmer,et al.  Verification of sequential imperative programs in Isabelle-HOL , 2006 .

[50]  Susan Horwitz,et al.  Using static single assignment form to improve flow-insensitive pointer analysis , 1998, PLDI '98.

[51]  David Walker,et al.  ILC: A Foundation for Automated Reasoning About Pointer Programs , 2006, ESOP.

[52]  Monica S. Lam,et al.  Efficient context-sensitive pointer analysis for C programs , 1995, PLDI '95.

[53]  Tobias Nipkow,et al.  A machine-checked model for a Java-like language, virtual machine, and compiler , 2006, TOPL.

[54]  John Hannan,et al.  Extended natural semantics , 1993, Journal of Functional Programming.

[55]  Yuri Gurevich,et al.  The Semantics of the C Programming Language , 1992, CSL.

[56]  Mark N. Wegman,et al.  Analysis of pointers and structures , 1990, SIGP.

[57]  J. Strother Moore,et al.  A mechanically verified language implementation , 1989, Journal of Automated Reasoning.

[58]  C Ansi,et al.  Draft proposed american national standard for information systems---programming language c , 1988 .

[59]  Steven S. Muchnick,et al.  Advanced Compiler Design and Implementation , 1997 .

[60]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[61]  Richard Bornat,et al.  Proving Pointer Programs in Hoare Logic , 2000, MPC.