Abstract

We present a program logic, $\mathcal{L}_{c}$, which modularly reasons about unstructured control flow in machine-language programs. Unlike previous program logics, the basic reasoning units in $\mathcal{L}_{c}$ are multiple-entry and multiple-exit program fragments. $\mathcal{L}_{c}$ provides fine-grained composition rules to compose program fragments. It is not only useful for reasoning about unstructured control flow in machine languages, but also useful for deriving rules for common control-flow structures such as while-loops, repeat-until-loops, and many others. We also present a semantics for $\mathcal{L}_{c}$ and prove that the logic is both sound and complete with respect to the semantics. As an application, $\mathcal{L}_{c}$ and its semantics have been implemented on top of the $\mathcal{L}_{c}$ machine language, and are embedded in the Foundational Proof-Carrying Code project to produce memory-safety proofs for machine-language programs.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call