arrow
Return

Hoare-style logic for unstructured programs

delete2025-11-01
delete0
delete
OA
AI
D
Didrik Lundberg *
R
Roberto Guanciale
A
Andreas Lindner
M
Mads Dam
DOI:10.1016/j.jlamp.2025.101099delete
deleteOriginal
deleteShare
deleteSave
View PDF
Abstract

Abstract

En 中文
Enabling Hoare-style reasoning for low-level code is attractive since it opens the way to regain structure and modularity in a domain where structure is essentially absent. The field, however, has not yet arrived at a fully satisfactory solution, in the sense of avoiding restrictions on control flow (important for compiler optimization), controlling access to intermediate program points (important for modularity), and supporting total correctness. Proposals in the literature support some of these properties, but a solution that meets them all is yet to be found. We introduce the novel Hoare-style program logic GA, which interprets postconditions relative to program points when these are first encountered. The logic supports both partial and total correctness, derives contracts for arbitrary control flow, and allows one to freely choose decomposition strategy during verification while avoiding step-indexed approximations and global invariants. The logic can be instantiated for a variety of concrete instruction set architectures and intermediate languages. The rules of GA have been verified in the interactive theorem prover HOL4 and integrated with the toolbox HolBA for semi-automated program verification, which supports the ARMv6, ARMv8 and RISC-V instruction sets.
Keywords:
Program logics
Formal verification
Theorem proving
Binary analysis
Hoare logic
AI Summary

AI Summary

Key information extracted from the uploaded paper, including a brief overview, abstract, background, key highlights, visual analysis, and future outlook.

Journal

J
Journal of Logical and Algebraic Methods in Programming
IF:
1.2
Papers:
15
Citations:
0

Organization

R
royal institute of technology
Scholars:
1.1K
Papers: 549
Citations: 0