Generating Fast Specialized Simulators for Stochastic Reaction Networks via Partial Evaluation

Köster, Till and Warnke, Tom and Uhrmacher, Adelinde M. (2022) Generating Fast Specialized Simulators for Stochastic Reaction Networks via Partial Evaluation. ACM Transactions on Modeling and Computer Simulation (TOMACS), 32 (2), pp. 1-25. ISSN 1049-3301 (print) 1558-1195 (online).

Full text not available from this repository.
Official URL:


Domain-specific modeling languages allow a clear separation between simulation model and simulator and, thus, facilitate the development of simulation models and add to the credibility of simulation results. Partial evaluation provides an effective means for efficiently executing models defined in such languages. However, it also implies some challenges of its own. We illustrate this and solutions based on a simple domain-specific language for biochemical reaction networks as well as on the network representation of the established BioNetGen language. We implement different approaches adopting the same simulation algorithms: one generic simulator that parses models at runtime and one generator that produces a simulator specialized to a given model based on partial evaluation and code generation. For the purpose of better understanding, we additionally generate intermediate variants, where only some parts are partially evaluated. Akin to profile-guided optimization, we use dynamic execution of the model to further optimize the simulators. The performance of the approaches is carefully benchmarked using representative models of small to large biochemical reaction networks. The generic simulator achieves a performance similar to state-of-the-art simulators in the domain, whereas the specialized simulator outperforms established simulation tools with a speedup of more than an order of magnitude. Technical limitations in regard to the size of the generated code are discussed and overcome using a combination of link-time optimization and code separation. A detailed performance study is undertaken, investigating how and where partial evaluation has the largest effect.

Item Type: Article
Additional Information: Special Issue on PADS 2020, Article No.10
Projects: ESCeMMo