EventManager — a tool to help students analyse concurrent programs
Resumo
Students learning concurrent programming often struggle with tests due to the non-deterministic nature of thread scheduling. It is in general hard to test specific scenarios and harder yet to repeat a given scenario for further tests after changes to the code. In this paper, we describe EventManager, a tool that allows the developer to instrument their program, marking events in the code and specifying valid event sequences using a domain-specific language that restricts thread scheduling to obey allowed sequences for these events. This language is based on regular expressions and set operations. We describe the implementation of EventManager for applications based on POSIX threads and discuss the expressiveness of the resulting environment.