Submitted
|
We address the tension between software generality and performance in the
domain of scientific and financial simulations based on Monte-Carlo methods.
To this end, we present a novel software architecture, centred around the
concept of a specialising simulator generator, that combines and
extends methods from generative programming, partial evaluation, runtime
code generation, and dynamic code loading. The core tenet is that, given a
fixed simulator configuration, a generator in a functional language can
produce low-level code that is more highly optimised than a manually
implemented generic simulator. We also introduce a skeleton, or template,
capturing a wide range of Monte-Carlo methods and use it to explain how to
design specialising simulator generators and how to generate parallelised
simulators for multi-core and distributed-memory multiprocessors.
|
The full text of the paper can be downloaded: (ps.gz ,pdf)
The source code for the polymer simulators described in this paper, and examples, can be downloaded from the project website.