Automatisches Differenzieren für MATLAB

  • Automatic differentiation of MATLAB

Vehreschild, Andre; Bischof, Christian (Thesis advisor)

Aachen : Publikationsserver der RWTH Aachen University (2009)
Dissertation / PhD Thesis

Aachen, Techn. Hochsch., Diss., 2009


The interactive programming environment MATLAB is increasingly gaining popularity by enabling the user to tackle complicated mathematical problems easily. Implicit dynamic typing and a huge set of predefined functions allow rapid development of - not necessarily prototypical - programs. Under a variety of circumstances, many MATLAB programs need a way to efficiently compute accurate derivatives. The term automatic differentiation (AD) comprises a huge set of techniques to compute derivatives. Up to now AD-tools for MATLAB were only implemented using operator overloading. The local scopes of the operators constrain the analysis of the program, which therefore suffers from lesser performance and unnecessary computations. Alternatively, source transformation utilises compiler construction techniques to augment a program with statements to compute derivatives, potentially improving the performance of the AD-generated programs. This thesis introduces the first source transformation AD-tool for MATLAB, entitled ADiMat. Intensive analysis of interprocedural variable dependencies reduces the number of emitted derivative statements. The derivative statements emitted are type unspecific allowing for two approaches to compute derivatives. During the execution of the differentiated code a single derivative in one direction may be computed as well as, employing a runtime system, multiple directional derivatives may be calculated at once. The AD-tool implements a powerful specification language to efficiently specify the derivative expressions of predefined functions. Results are presented confirming the need of source code optimisation techniques while automatically generating programs for implicitly dynamically typed programming languages. Furthermore, evidence is given that programs differentiated by ADiMat need substantially fewer resources than derivatives computed by object-oriented AD-tools.