WG211/M17Marr
Stefan Marr
Kómpos: A Concurrency-Agnostic Debugger An Example for Domain-Specific Live Debugging
Today's complex software systems combine high-level concurrency models, where each model is used to solve a specific set of problems. Unfortunately, debuggers support only the low-level notions of threads and shared memory, forcing developers to reason about these notions instead of the high-level concurrency models they chose.
A solution for debuggers is a concurrency-agnostic debugger protocol that decouples the debugger from the concurrency models employed by the target application. As a result, the underlying language runtime can define custom breakpoints, stepping operations, and execution events for each concurrency model it supports, and a debugger can expose them without having to be specifically adapted.
Our implementation is based on SOMns, a Newspeak implementation on top of Truffle/Graal. We demonstrate custom breakpoints and stepping operations for communicating sequential processes, communicating event loops, threads and locks, fork/join parallelism, and software transactional memory. Furthermore, we visualize all concurrent interactions independently of a specific concurrency model, while the Kómpos debugger remains blissfully unaware of any notion of concurrency. We hope such an approach of a generalized debugger protocol could also be applied to DSLs, libraries, and frameworks to facilitate high-level domain-specific debugging.