Debugging Parallel DEVS. (April 2017) - Van Mierlo, Simon; Van Tendeloo, Yentl; Vangheluwe, Hans
To this day, debugging support for the DEVS formalism has been provided, at best, in an ad-hoc way. The intricacies of dealing with the interplay of different notions of (simulated) time, formalism semantics, and user input have not been thoroughly investigated. This paper presents a visual modeling, simulation, and debugging environment for Parallel DEVS, which builds on a theoretical foundation for debugging DEVS models. We take inspiration from both code debugging and the simulation world to model our environment; we transpose a set of useful code debugging concepts onto Parallel DEVS, and combine those with simulation-specific operations, such as as-fast-as-possible simulation and (scaled) real-time execution. Apart from these common debugging operations, we introduce new features to the debugging of Parallel DEVS models, such as "god events, " which can alter the model state during simulation, and reversible debugging, which allows one to go back in time. To achieve this, the PythonPDEVS simulator is deconstructed and reconstructed: the modal part of the simulator–debugger, as well as the debugging operations, are modeled using the Statecharts formalism. These models are combined, resulting in a model of the timed, reactive behavior of a debuggable simulator for Parallel DEVS. The code for the simulator is automatically synthesized from this model. To improve usability, we combine the simulator with a visual modeling environment, allowing for visual and interactive live debugging.