-
-
Notifications
You must be signed in to change notification settings - Fork 3
Description
What's the problem this feature will solve?
Currently, the debugging backend is separated into two interfaces:
debug.h and diagnostics.h. However, this separation is not perfect.
- For the DD implementation in particular, many diagnostics concerns are still stored in the
DDSimulationStateand only the actual methods and functionalities are located inDDDiagnostics. These fields should be moved
Furthermore, a third simulation interface would make sense. Currently, if we want to change to a new simulation backend, a large number of different functions have to be re-implemented, even though they can be expressed through different functions. For instance, all the "step over", "step out", "run simulation" functions can be expressed using just the "step forward" method and "getCurrentInstruction". It would be nice to separate these so that changing the simulation backend only requires a few functions to be changed.
Describe the solution you'd like
Three interfaces:
debug.h: Contains debugging-related functions, like checking assertions, running up to specific points in the code, or getting the stack tracesimulation.h: Only contains low-level simulation features, like stepping forward, backward, etc.diagnostics.h: Contains all functions related to analysing the program.
Their DD-based implementations should also be separated more clearly, and, if possibly, with only minimal coupling to the actual language used (such as OpenQASM)