Support for General Loop Structures

Develop support in Trivet for translation validation of LLVM transformations involving general loop structures beyond the restricted canonical-loop topology currently handled by the framework.

Background

Trivet currently supports a restricted class of loop-containing LLVM transformations: a source function in canonical loop form with an entry preheader, one self-looping body block, one back edge, and a dedicated exit block, transformed into a loop-free single-block target. The proof scaffold for more general control-flow graphs would need to account for CFG-specific inductive invariants and cutpoints through which every cycle passes.

The paper identifies support for general loop structures as future work because the inductive proof obligations and required invariants vary with the source CFG. Extending this capability would broaden Trivet beyond the preliminary loop-validation setting evaluated in the paper.

References

Accordingly, we leave support for general loop structures to future work.

— LLVM Translation Validation Automated with Large Language Models and Lean  (2609.19583 - Liao et al., 17 Sep 2026) in Section 3.3, “Loop-Containing Transformations” (label: sec:loops)