On syntax-directed adjoint fortran code

Gradients of high-dimensional functions can be computed efficiently and with machine accuracy by so-called adjoint codes. We present an L-attributed grammar for the single-pass generation of intraprocedural adjoint code for a subset of Fortran. Our aim is to integrate the syntax directed approach into the front-end of the NAGWare Fortran compiler. Research prototypes of this compiler that build adjoint code based on an abstract intermediate representation have been developed for several years. We consider the syntax-directed generation of adjoint code as a low development cost alternative to more sophisticated algorithms. The price to pay comes in form of a very limited set of code optimizations that can be performed in a single-pass setting.

[1]  Görel Hedin,et al.  JastAdd--an aspect-oriented compiler construction system , 2003, Sci. Comput. Program..

[2]  R. Giering,et al.  Construction of the adjoint MIT ocean general circulation model and application to Atlantic heat transport sensitivity , 1999 .

[3]  Martin Berz,et al.  Computational differentiation : techniques, applications, and tools , 1996 .

[4]  Fortran Codes,et al.  OpenAD/F: A Modular, Open-Source Tool for Automatic Differentiation of , 2007 .

[5]  Uwe Naumann,et al.  "To be recorded" analysis in reverse-mode automatic differentiation , 2005, Future Gener. Comput. Syst..

[6]  Jean Utke,et al.  OpenAD/F: A Modular Open-Source Tool for Automatic Differentiation of Fortran Codes , 2008, TOMS.

[7]  Viljem Zumer,et al.  Implementation of multiple attribute grammar inheritance in the tool LISA , 1999, SIGP.

[8]  Trond Steihaug,et al.  Truncated-newtono algorithms for large-scale unconstrained optimization , 1983, Math. Program..

[9]  Andreas Griewank,et al.  Automatic Differentiation of Algorithms: From Simulation to Optimization , 2000, Springer New York.

[10]  U. Naumann,et al.  Intraprocedural Adjoint Code Generated by the Differentiation-Enabled NAGWare Fortran Compiler , 2006 .

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

[12]  Andreas Griewank,et al.  Algorithm 799: revolve: an implementation of checkpointing for the reverse or adjoint mode of computational differentiation , 2000, TOMS.

[13]  Donald E. Knuth,et al.  Semantics of context-free languages , 1968, Mathematical systems theory.

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

[15]  Andreas Griewank,et al.  Evaluating derivatives - principles and techniques of algorithmic differentiation, Second Edition , 2000, Frontiers in applied mathematics.

[16]  Uwe Naumann,et al.  A differentiation-enabled Fortran 95 compiler , 2005, TOMS.

[17]  Bruce Christianson,et al.  Automatic first- and second-order adjoints for truncated Newton , 2007 .