Support executable dyn nodes in `MastForest` generation via a `MASM-level` generator
- Dominant language
- Rust
- Stars
- 772
- Forks
- 352
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 93
Description
### Feature description
Follow-up to #3158.
The MastForest `Arbitrary` impl (`GenerationMode::Executable`) intentionally never emits dyn/dyncall nodes: each one reads its callee digest off the operand stack at runtime, and the MAST-level generator cannot synthesise a stack state that holds a valid digest at that point. Callers who need dyn coverage today must use hand written fixtures or `StructureOnly` mode (not executable).
The intended extension is an assembly level (MASM) generator that emits an instruction sequence pushing a valid callee digest before each dyn/dyncall, then assembles the result. That would let `Executable` mode include dyn nodes while keeping the run-to-completion guarantees.
### Why is this feature needed?
Related: the same stack synthesis machinery would also allow reintroducing fallible operations (u32, memory ops, ...) into executable basic blocks behind generated stack preconditions, as discussed in [this review comment](https://github.com/0xMiden/miden-vm/pull/3158#discussion_r3261812436).
Contributor guide
Assessment
This issue has not been assessed yet.