o1-labs / snarky

OCaml DSL for verifiable computation
MIT License
496 stars 74 forks source link

Extract the AST interpreter from the rest of the checked runner #657

Closed mrmr1993 closed 2 years ago

mrmr1993 commented 2 years ago

This PR extracts the logic for the AST interpreter from the rest of the Checked_runner module. Most notably, this also restructures the runner so that it will function correctly over any Checked.t implementation.

As a side-effect, the Runtime_error type can no longer access the full stack of labels, so we have to build them incrementally and generate the error message at the end. This also tweaks the backtrace printing so that we don't elide intermediate backtraces any more (which has long been an ask!)