stgem: A software library to develop falsification and test generation tools for cyber-physical systems using generative models
Iván Porres, Jarkko Peltomäki, Valentin Soloviev, Erik Wihlman, Jesper Winsten · Science of Computer Programming · 2025
We present stgem , a Python library for the development of black-box falsification and test generation tools for cyber-physical systems. stgem supports systems under test whose inputs and outputs can be modeled as signals over time and whose correctness requirements are expressed using signal temporal logic or any other method supporting a robustness runtime monitor. stgem has been designed specifically to develop and evaluate test generation methods based on generative machine learning models. We expect that stgem modular architecture facilitates the development of new test generation methods and their evaluation in many different benchmark problems. Until now, it has been used to develop three novel test generation algorithms based on generative adversarial networks, Wasserstein adversarial networks, and diffusion models. stgem has also been used to evaluate these methods in five research competitions.