Skip to content

♻️ Separate Simulation, Debugging and Diagnostics concerns further #6

@DRovara

Description

@DRovara

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 DDSimulationState and only the actual methods and functionalities are located in DDDiagnostics. 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 trace
  • simulation.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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    c++Anything related to C++ codeenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions