[enhancement] add structured traceback for fn and test failures
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 283
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 135
Description
### What's hard to do? (limit 100 words)
When a dslx function or test fails it can be difficult to traceback why it did so: the interpreter doesn't print stacktrace or contextual value about the state that led to that particular failure.
### Current best alternative workaround (limit 100 words)
Currently the best alternative is to scatter `trace_fmt` statement along the code paths that led to the failure.
### Your view of the "best case XLS enhancement" (limit 100 words)
Ideally we would have a structured representation of the execution trace of the call graph that led to the failure w/ input and output bit vectors of each function (similar to what is proposed in #1438 for channels) and possibly values of intermediate `let` bindings.
An interesting take on this could be to annotate the IR presentation itself w/ recording of the input/output signals of each node across a given execution; which could lend itself to being nicely displayed in https://google.github.io/xls/ir_visualization/.
Contributor guide
Assessment
This issue has not been assessed yet.