BlockstreamResearch / simfony

Rust-like high-level language that compiles down to Simplicity bytecode. Work in progress.
26 stars 9 forks source link

Add debug symbols #87

Closed uncomputable closed 1 month ago

uncomputable commented 1 month ago

Track fallible Simfony expressions via debug symbols that are included in the Simplicity target code (more details are in the commit message).

Add public methods to convert debug symbols into helpful error messages by providing the values that the Bit Machine sees at runtime. Debug symbols cover all failure cases, so the Bit Machine should always be able to display a helpful Simfony error.

Add dbg! expressions that can be used print their input value at runtime.

apoelstra commented 1 month ago

code review ack 88d15d3af847741aa08b107ebcfdc263d5c2ad18

CI failure looks real (I'll wait til it's green to run my local CI).

Super cool concept!

uncomputable commented 1 month ago

Fixed CI.

Also made sure that dbg! expressions capture the span of their input, in order to produce output of the following kind:

jet::le_32(min_height, oracle_height) = false