## Semantic Augmentation of MATLAB Programs to Compute Derivatives

Diploma thesis of **Andre Vehreschild**, November 2001.
MATLAB developed and
distributed by The Math Works, Inc. is
an interpreted language for technical computing. The language supports
high-level objects, like matrices and vectors, and offers efficiently
implemented operators for these objects. MATLAB is used by scientists and
engineers interested in computation and
visualization of large problems.
The semantic augmentation of programs to compute derivatives is known as
automatic differentiation. Here, a program
is extended with additional computations to compute the derivatives
along with the original computations. One approach to get the derivatives of a
program is to add the corresponding derivative statements to the source code of
the original program. This approach is called source transformation.

In this diploma thesis, a source
transformation tool for MATLAB is designed and implemented.
The tool is called ADiMat and includes a
parser, some additional compiler infrastructure, and an extendible system to specify
the functions built into MATLAB. The user may
specify built-in functions and derivatives using a simple language. Many
built-in functions are already specified. The tool is able to apply the
forward mode of automatic differentiation to MATLAB programs.