Combining Small-Step and Big-Step Semantics to Verify Loop Optimizations

📅 2026-02-23
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the challenge of efficiently verifying structural optimizations—such as loop unswitching and full loop unrolling—in verified compilers using small-step semantics, which struggles to precisely capture divergence and global control flow. The authors propose a novel hybrid approach that combines small-step and big-step semantics: small-step semantics is employed for local transformations, while coinductive big-step semantics accurately models divergent behaviors and handles structural transformations. An abstract behavioral semantics unifies the interfaces of both styles. This method enables, for the first time, the seamless integration of big-step semantics into CompCert’s predominantly small-step verification framework, achieving end-to-end formal verification of complex loop optimizations without altering the top-level semantic preservation theorem.

Technology Category

Application Category

📝 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 all top-level semantic preservation theorems. This approach is practically demonstrated in CompCert by implementing and verifying a few new loop optimizations in big-step Cminor, including loop unswitching and, notably, full loop unrolling.
Problem

Research questions and friction points this paper is trying to address.

verified compilers
loop optimizations
small-step semantics
big-step semantics
semantic preservation
Innovation

Methods, ideas, or system contributions that make the work stand out.

small-step semantics
big-step semantics
loop optimizations
coinductive semantics
verified compilers
🔎 Similar Papers
No similar papers found.