uhmanoa-transpiler-project / shaka-scheme

The official repository for the UH Manoa Transpiler Project's Scheme interpreter, Shaka Scheme.
32 stars 24 forks source link

Design debugging API for Shaka Show #30

Open CinchBlue opened 6 years ago

CinchBlue commented 6 years ago

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:

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.