Abstract Interpretation
Definition
Abstract interpretation is a framework for static program analysis in which the concrete semantics of a program is mapped to an abstract domain. Computations on the abstract domain produce sound over-approximations of the program's runtime behavior, enabling automated reasoning about properties such as resource usage, control flow, and safety invariants without executing the program.
Application to Machine-Code and Embedded-Systems Analysis
The ISA-specification literature records several applications of abstract interpretation to machine code and embedded software:
- Static analyzers for embedded systems. The HOIST system derives static analyzers from instruction-set descriptions by applying abstract interpretation to embedded code, enabling automatic generation of analyzers without hand-written transfer functions for every instruction.
- Stack-overflow elimination. Abstract interpretation has been applied to embedded software to statically bound stack usage and eliminate stack-overflow vulnerabilities, with results published in the embedded-systems and embedded-computing venues.
- Deriving abstract transfer functions. The technique of deriving abstract transfer functions from machine descriptions is used to construct analyzers for machine code, where transfer functions encode the effect of each instruction in the chosen abstract domain.
- TSL: generating abstract interpreters. The TSL system uses transfer-specification languages to systematically generate abstract interpreters and applies the approach to machine-code analysis.
Related Concepts, Tools, and Techniques
- TSL (Transfer Specification Language) — a tool/language system for generating abstract interpreters, applied to machine-code analysis.
- HOIST Static Analyzer Derivation System — a tool that automatically derives static analyzers for embedded systems using abstract interpretation.
- Abstract Transfer Function Derivation — the technique of computing transfer functions in an abstract domain from a specification of instruction semantics.
Key References (from the ISA-specification notes)
- Lim and Reps, TSL: A system for generating abstract interpreters and its application to machine-code analysis (TOPLAS 2013).
- Regehr and Reid, HOIST: a system for automatically deriving static analyzers for embedded systems (ASPLOS 2004).
- Regehr and Reid, Eliminating stack overflow by abstract interpretation (EMSOFT 2003 / TECS 2005).
- Regehr and Reid, Deriving abstract transfer functions for analyzing embedded software (LCTES 2006).