tweag / pirouette

Language-generic workbench for building static analysis
MIT License
47 stars 2 forks source link

Rewrite the symbolic evaluation engine denotationally #139

Closed VictorCMiraldo closed 2 years ago

VictorCMiraldo commented 2 years ago

This PR aims to split the symbolic evaluation engine in its core parts:

  1. One anamorphism that gives semantics to Term lang as an infinite tree of possibilities
  2. Multiple catamorphisms that consume these trees according to some language parameters that will be provided by the user, things like:
    1. Do we run in call-by-name or call-by-value fashion?
    2. When to stop
    3. How to evaluate builtins
    4. etc...

This is in a very drafty state still, but for those interested, the discussion in #137 and #138 is what is driving the design.

VictorCMiraldo commented 2 years ago

As discussed with different people, this PR should be closed. The challenges surrounding the handling of builtins are still unclear. I do believe the juggling spectacle of writing the evaluator as a hylomorphism is possible, but it would require much more effort and time and initially predicted. I'm closing this PR as a result, please revive it for inspiration later, if needed!