A Transformational Approach to Code Generation for Numerical Simulation: the SimGen System

Jean-Luc Dormoy, Sébastien Furic · 2000

In the last decade, researchers in numerical simulation have worked on defining standards for specifying physical models at the mathematical level of abstraction of Differential Algebraic Equations, or DAEs - one can in particular mention the Modelica initiative. Today, tools for performing simulation, i.e. checking, interpreting or compiling mathematical models into simulation programs, are being proposed. It turns out that, despite some peculiarities, general methods from advanced software engineering are applicable to this field. In particular, code generation can be done using frameworks such as the transformational approach. We describe in this paper such a system, called SimGen, that generates simulation code using a set of small freely applicable transformations. Indeed, transformations start from an initial set of differential algebraic equations - DAEs - and yield another set that is suitable for being used by a solver. Solvers are numerical programs that embed generic methods for solving DAEs, provided they satisfy some syntactic as well as semantic constraints. Moreover, in the course of code generation - i.e. equation transformation - some semantic checking can be done, and errors reported, e.g. equation set singularity. SimGen is being used on real-world large-scale physical models, having more than one thousand equations, and we give experimental results. We also compare SimGen to other similar systems.

Read the paper · More papers on PaperTik