Coping with a Variable Number of Arguments when Transforming MATLAB Programs.




The programming language MATLAB supports default values for arguments as well as argument lists of variable length. This work analyzes the effects of these two language concepts on the design of source transformation tools for automatic differentiation. The term automatic differentiation refers to a collection of techniques to augment a given computer code with statements for the computation of user-specified derivatives. The focus here is on the source transformation tool ADiMat implementing automatic differentiation for programs written in MATLAB. The approach taken by ADiMat to cope with default arguments and argument lists of variable length is described. Implementation techniques and remaining open questions are discussed.