University of Vlora - Conference Center, ACA'10, Applications of Computer Algebra

Font Size:  Small  Medium  Large

Embedding C-XSC Automatic Differentiation in Mathematica

Evgenija Dimitrova Popova, Walter Kraemer, Milan Russev

Last modified: 2010-03-31

Abstract


Providing interoperability between the general-purpose
environments for technical computing (like Mathematica, Maple,
etc.), which possess several features (dynamics and interactivity
of the environment, symbolic and algebraic computations, powerful
graphics programming, etc.) not attributable to the compiled
languages, and the interval software, developed in some compiled
language for efficiency reasons, is highly desirable due to the
many positive consequences for both environments. Due to the
necessity of avoiding decimal-to-binary/binary-to-decimal
input/output conversions of floating-point data, the most suitable
approach when providing interoperability between interval software
is that based on communication protocols.

A recent project aims at  establishing a general framework for
delivering external specific arithmetic tools and implementations
of interval algorithms, provided by the C++ class library C-XSC,
in the environment of Mathematica via the communication protocol
MathLink. Some preliminary research showed that the communication
of numerical interval data between Mathematica and C-XSC is
transparent and requires a minor effort in providing compatibility
between the fundamental C data types and the specific C-XSC data
types. However, the communication and the representation
compatibility of functional expressions in the considered
environments is not that straightforward. We will discuss some
issues related to communication of functional expressions from
Mathematica to C-XSC and will present the software tools developed
for this purpose. Since all of C-XSC problem solvers for nonlinear
functions are built on top of the automatic differentiation
arithmetic supported by three C-XSC modules, the particular goal
of the present work is to provide compatibility between the
representation of nonlinear functions specified as Mathematica
expressions  and the specific data type objects used by the C-XSC
modules for automatic differentiation. The application of the
developed basic communication software is demonstrated by several
MathLink compatible programs which embed in Mathematica the C-XSC
modules for automatic differentiation and the nonlinear problem
solver as packages. The design methodology, some implementation
issues and the use of both the basic software communicating
functional expressions and the interfacing MathLink software
embedding C-XSC modules in Mathematica will be presented.