In this paper we present our use of functional programming (FP), specifically Haskell, to provide an operational semantics for a domain-specific language, CellML, that describes mathematical models of biological processes. We analyse the benefits and shortcomings of this approach, in comparison with other semantic definitions for CellML.
It is our claim that using FP for our semantics results in a more concise and useful artifact for describing what such a model means. The use of lazy evaluation removes the need to explicitly determine an evaluation order for the model, resulting in a more elegant interpreter. Crucially, using FP enables us to prove the correctness of optimisation techniques for such models. This gives us more confidence in scientific deductions from simulation results. We compare the Python implementation of these optimisation techniques with our use of Haskell in proving their correctness.
[1]
C. Luo,et al.
A dynamic model of the cardiac ventricular action potential. I. Simulations of ionic currents and concentration changes.
,
1994,
Circulation research.
[2]
Steve McKeever,et al.
On the application of partial evaluation to the optimisation of cardiac electrophysiological simulations
,
2006,
PEPM '06.
[3]
Catherine M Lloyd,et al.
CellML: its future, present and past.
,
2004,
Progress in biophysics and molecular biology.
[4]
Steve McKeever,et al.
A model‐driven approach to automatic conversion of physical units
,
2008,
Softw. Pract. Exp..