In scientific computing, we often require the derivatives partial deri
vative f/partial derivative x of a function f expressed as a program w
ith respect to some input parameter(s) x, say, Automatic Differentiati
on (AD) techniques augment the program with derivative computation by
applying the chain rule of calculus to elementary operations in an aut
omated fashion, This article introduces ADIC (Automatic Differentiatio
n of C), a new AD tool for ANSI-C programs, ADIC is currently the only
tool for ANSI-C that employs a source-to-source program transformatio
n approach; that is, it takes a C code and produces a new C code that
computes the original results as well as the derivatives, We first pre
sent ADIC 'by example' to illustrate the functionality and ease of use
of ADIC and then describe in detail the architecture of ADIC. ADIC in
corporates a modular design that provides a foundation for both rapid
prototyping of better AD algorithms and their sharing across AD tools
for different languages, A component architecture called AIF (Automati
c Differentiation Intermediate Form) separates core AD concepts from t
heir language-specific implementation and allows the development of ge
neric AD modules that can be reused directly in other AIF-based AD too
ls, The language-specific ADIC front-end and back-end canonicalize C:
programs to make them fit for semantic augmentation and manage, for ex
ample, the association of a program variable with its derivative objec
t, We also report on applications of ADIC to a semiconductor device si
mulator, 3-D CFD grid generator, vehicle simulator, and neural network
code. (C) 1997 by John Wiley & Sons, Ltd.