Abstract: Debugging non-deterministic programs is inherently difficult, certainly in microcontroller environments where execution paths can diverge unpredictably due to external sensor inputs. Traditional debugging techniques often fail to capture or reproduce this non-deterministic behavior effectively. Multiverse debugging has emerged as a compelling technique to debug non-deterministic programs, allowing developers to systematically explore all possible execution paths.
Unfortunately, current multiverse debugging tools are snapshot-based and only run over an abstract model, which limits their use for debugging resource-constrained microcontrollers. Additionally, they suffer from state explosion making the state space overwhelming during debugging.
To address these challenges, we developed the first remote multiverse debugger that operates directly on the concrete programming language. During debugging, our debugger dynamically analyses program behavior and strategically identifies critical sensor values that lead to unique execution paths. By integrating concolic analysis with concrete execution, we efficiently minimize redundant paths while ensuring code coverage. Finally, unlike traditional snapshot-based methods, which cause excessive state duplication and resource consumption, our solution employs an efficient trace-based representation to capture program execution.
We implemented a prototype using the WARDuino WebAssembly virtual machine on an STM32 microcontroller, demonstrating the feasibility and efficiency of our approach in real-world scenarios.
Our results highlight substantial reductions in the state space, thereby enhancing the practicality and effectiveness of multiverse debugging for microcontroller applications. This advancement makes multiverse debugging more accessible and efficient for developers working with complex, non-deterministic systems running on microcontrollers.
Short bio: Prof. Dr. Christophe Scholliers heads the theory and practice of programming research lab (TOPL) at the Faculty of Sciences at Ghent University, Belgium. TOPL is dedicated to research in programming languages, partially driven by hardware innovations, investigating programming language abstractions and tools that might ease software development for new devices.