Combining source transformation and operator overloading techniques to compute derivatives for MATLAB programs

Derivatives of mathematical functions play a key role in various areas of numerical and technical computing. Many of these computations are done in MATLAB, a popular environment for technical computing providing engineers and scientists with capabilities for mathematical computing, analysis, visualization, and algorithmic development. For functions written in the MATLAB language, a novel software tool is proposed to automatically transform a given MATLAB program into another MATLAB program capable of computing not only the original function but also user-specified derivatives of that function. That is, a program transformation known as automatic differentiation is performed to change the semantics of the program in a fashion based on the chain rule of differential calculus. The crucial ingredient of the tool is a combination of source-to-source transformation and operator overloading. The overall design of the tool is described and numerical experiments are reported demonstrating the efficiency of the resulting code for a sample problem.

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

[2]  C. Bendtsen FADBAD, a flexible C++ package for automatic differentiation - using the forward and backward method , 1996 .

[3]  Charles Van Loan,et al.  Introduction to Scientific Computing: A Matrix-Vector Approach Using MATLAB , 1996 .

[4]  Mohammad R. Haghighat,et al.  Hierarchical approaches to automatic differentiation , 1996 .

[5]  Georg Sander,et al.  Graph Layout through the VCG Tool , 1994, GD.

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

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

[8]  Keshav Pingali,et al.  A case for source-level transformations in MATLAB , 1999, DSL '99.

[9]  Christian H. Bischof,et al.  ADIC: an extensible automatic differentiation tool for ANSI‐C , 1997, Softw. Pract. Exp..

[10]  H. Martin Bücker,et al.  Automatic differentiation for computational finance , 2002 .

[11]  Denise Chen,et al.  Symbolic math toolbox for use with Matlab , 1995 .

[12]  Nicole Rostaing,et al.  Automatic differentiation in Odyssée , 1993 .

[13]  Thomas Kaminski,et al.  Recipes for adjoint code construction , 1998, TOMS.

[14]  Thomas F. Coleman,et al.  ADMIT-1: automatic differentiation and MATLAB interface toolbox , 2000, TOMS.

[15]  David A. Padua,et al.  FALCON: A MATLAB Interactive Restructuring Compiler , 1995, LCPC.

[16]  Lawrence C. Rich,et al.  Automatic differentiation in MATLAB , 1992 .

[17]  Andreas Griewank,et al.  Algorithm 755: ADOL-C: a package for the automatic differentiation of algorithms written in C/C++ , 1996, TOMS.

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

[19]  Christian Bischof,et al.  Adifor 2.0: automatic differentiation of Fortran 77 programs , 1996 .