An Omniscient debugger for PetitParser

Debugging PetitParser

PetitParser is a framework that makes it possible to model grammars and parsers as objects that can be reconfigured dynamically. Furthermore, it makes it easy to dynamically reuse, compose, transform and extend grammars.

Debugging PetitParser using a generic debugger is not a straightforward activity. One one hand, a generic debugger only provides low-level operations, like stepping over instructions or into function calls. The debugging operations actually needed when working with PetitParser do not map well onto them. On the other hand, when working with PetitParser we need to see contextual information like the source code of grammar productions and the input being parsed. Given the contextual nature of these information it is highly unlikely that generic debuggers will contain them by default.

To address these concerns we developers a domain-specific debugger aware of PetitParser that provides debugging operations at a higher level of abstraction and relevant contextual information. Apart from this debugger, PetitParser also comes with a dedicated browser for developing parsers.

Problem

The domain-specific debugger we developed greatly improves the debugging of parsers, however, it still has some limitations, as developers can only go through the execution forward. When working with parsers it is useful to go back through the execution to see what parsers didn’t match a certain input and understand why.

Goal

The goal of this project is to create an omniscient, back-in-time debugger for PetitParser. It’s omniscient as it should record all information relevant when working with PetitParser. It’s back-in-time as it should be able to go back through the execution, one parser at a time.

Benefits/Requirements/Challenges

This project will give you the chance to learn about parsing and about the construction of debuggers. The project will be done in Pharo, an open-source Smalltalk-inspired environment. You will see a language quite different from Java and C#. The new debugger will be implemented using the "Moldable Debugger"[2][3], a framework for creating domain-specific debuggers. Extracting the required information will require the usage of code instrumentation.

You should apply for this project if you have good programming skills in any object-oriented language. Knowing anything about Pharo or parsing is not required.

Available as a master project. (Different parts of the project can be extracted into bachelor projects.)