Abstract
The abstract interpretation of programs relates the exact semantics of a programming language to a finite approximation of those semantics. In this article, we describe an approach to abstract interpretation that is based in logic and logic programming.Our approach consists of faithfully representing a transition system within logic and then manipulating this initial specification to create a logical approximation of the original specification. The objective is to derive a logical approximation that can be interpreted as a terminating forward-chaining logic program; this ensures that the approximation is finite and that, furthermore, an appropriate logic programming interpreter can implement the derived approximation.We are particularly interested in the specification of the operational semantics of programming languages in ordered logic, a technique we call substructural operational semantics (SSOS). We show that manifestly sound control flow and alias analyses can be derived as logical approximations of the substructural operational semantics of relevant languages.
Highlights
A central goal of logical frameworks is to specify the operational semantics of evolving systems in a framework that is logically motivated and that allows specifications to be as simple as possible
We show that manifestly sound control flow and alias analyses can be derived as logical approximations of the substructural operational semantics of relevant languages
Our particular interest is in the representation and static analysis of programming languages; we illustrate our approach by deriving control flow and alias analyses by logical approximation
Summary
A central goal of logical frameworks is to specify the operational semantics of evolving systems (in particular, the operational semantics of programming languages) in a framework that is logically motivated and that allows specifications to be as simple as possible. We apply logically justified techniques for manipulating and approximating the specification to yield approximations that are correct by construction These approximations have the form of forwardchaining (or “bottom-up”) logic programs which can be run to saturation, generalizing proposals by McAllester and Ganzinger [14, 21] with certain higher-order features. Our particular interest is in the representation and static analysis of programming languages; we illustrate our approach by deriving control flow and alias analyses by logical approximation. Defining these specific approximations requires insight, but the correctness proofs do not, because they follow from a general metatheorem justifying the kinds of approximations we make, together with straightforward termination arguments
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have