Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design debugging API for Shaka Show #30

Open
CinchBlue opened this issue Oct 10, 2017 · 0 comments
Open

Design debugging API for Shaka Show #30

CinchBlue opened this issue Oct 10, 2017 · 0 comments

Comments

@CinchBlue
Copy link
Contributor

Our sister project, Shaka Show, will be needing a low-level C++ API to support their functionality.

This will involve extending the HeapVirtualMachine and perhaps even the Compiler to prevent stripping of syntax information and propagate it down the evaluation pipeline until it reaches the virtual machine. Then, the current C++ API (also a work in progress) will be joined by another API to the entire pipeline in order to expose information like:

  • What current variables are defined for this scope?
  • What function was above me?
  • What line am I on for a given state of the program?
  • What binding does the identifier x refer to now?

One idea for doing this is implementing syntax objects, an approach taken by academic researchers in literature as well as Racket's current implementation as of the time of writing. This will also simultaneously make syntax-rules macros achievable (syntax-case macros are out of the question since they allow for too much computation at compile-time -- in fact, they trigger the need to support an arbitrary amount of levels of compile-time/run-time layers or steps in order to support modules. For more info, look at Chez Scheme's or Racket's concept of "phases"). I plan to achieve this by implementing a monad wrapper to go around our current Data class in order to preserve all of our other functions that go from Data -> Data in a clean, functional manner.

@paulolemus and I will be taking ownership for this part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant