Combining Small-Step and Big-Step Semantics to Verify Loop Optimizations
David Knothe, Oliver Bringmann

TL;DR
This paper introduces a hybrid semantics approach combining small-step and big-step semantics to verify loop optimizations, enabling more effective structural transformations while preserving program behavior.
Contribution
It proposes a novel framework that integrates both semantics types with an abstract interface, extending big-step semantics to handle divergence and enabling verified loop optimizations in CompCert.
Findings
Successfully verified loop optimizations including unrolling in CompCert
Extended big-step semantics to handle divergence with infinite traces
Demonstrated practical integration of semantics in compiler transformations
Abstract
Verified compilers aim to guarantee that compilation preserves the observable behavior of source programs. While small-step semantics are widely used in such compilers, they are not always the most convenient framework for structural transformations such as loop optimizations. This paper proposes an approach that leverages both small-step and big-step semantics: small-step semantics are used for local transformations, while big-step semantics are employed for structural transformations. An abstract behavioral semantics is introduced as a common interface between the two styles. Coinductive big-step semantics is extended to correctly handle divergence with both finite and infinite traces, bringing it on par with the expressiveness of small-step semantics. This enables the insertion of big-step transformations into the middle of an existing small-step pipeline, thereby fully preserving…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Parallel Computing and Optimization Techniques · Embedded Systems Design Techniques
