Term Graphs for Computing Derivatives in Imperative Languages

  • Authors:
  • Paul D. Hovland;Boyana Norris;Michelle Mills Strout;Jean Utke

  • Affiliations:
  • Mathematics and Computer Science Division, Argonne National Laboratory, 9700 S Cass Ave, Argonne, IL 60439, USA;Mathematics and Computer Science Division, Argonne National Laboratory, 9700 S Cass Ave, Argonne, IL 60439, USA;Department of Computer Science, Colorado State University, Fort Collins, CO 80523, USA;Department of Computer Science, University of Chicago, Chicago, IL 60637, USA

  • Venue:
  • Electronic Notes in Theoretical Computer Science (ENTCS)
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

Automatic differentiation is a technique for the rule-based transformation of a subprogram that computes some mathematical function into a subprogram that computes the derivatives of that function. Automatic differentiation algorithms are typically expressed as operating on a weighted term graph called a linearized computational graph. Constructing this weighted term graph for imperative programming languages such as C/C++ and Fortran introduces several challenges. Alias and definition-use information is needed to construct term graphs for individual statements and then combine them into one graph for a collection of statements. Furthermore, the resulting weighted term graph must be represented in a language-independent fashion to enable the use of AD algorithms in tools for various languages. We describe the construction and representation of weighted term graphs for C/C++ and Fortran, as implemented in the ADIC 2.0 and OpenAD/F tools for automatic differentiation.