Toward a complete transformational toolkit for compilers
- 1 September 1997
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 19 (5) , 639-684
- https://doi.org/10.1145/265943.265944
Abstract
PIM is an equational logic designed to function as a “transformational toolkit” for compilers and other programming tools that analyze and manipulate imperative languages. It has been applied to such problems as program slicing, symbolic evaluation, conditional constant propagation, and dependence analysis. PIM consists of the untyped lambda calculus extended with an algebraic data type that characterizes the behavior of lazy stores and generalized conditionals. A graph form of PIM terms is by design closely related to several intermediate representations commonly used in optimizing compilers. In this article, we show that PIM's core algebraic component, PIM t , possesses a complete equational axiomatization (under the assumption of certain reasonable restrictions on term formation). This has the practical consequence of guaranteeing that every semantics-preserving transformation on a program representable in PIM t can be derived by application of PIM t rules. We systematically derive the complete PIM t logic as the culmination of a sequence of increasingly powerful equational systems starting from a straightforward “interpreter” for closed PIM t terms. This work is an intermediate step in a larger program to develop a set of well-founded tools for manipulation of imperative programs by compilers and other systems that perform program analysis.Keywords
This publication has 19 references indexed in Scilit:
- The data type variety of stack algebrasAnnals of Pure and Applied Logic, 1995
- On the adequacy of graph rewriting for simulating term rewritingACM Transactions on Programming Languages and Systems, 1994
- The revised report on the syntactic theories of sequential control and stateTheoretical Computer Science, 1992
- Confluence of the lambda calculus with left-linear algebraic rewritingInformation Processing Letters, 1992
- A control-flow normalization algorithm and its complexityIEEE Transactions on Software Engineering, 1992
- Efficiently computing static single assignment form and the control dependence graphACM Transactions on Programming Languages and Systems, 1991
- Laws of programmingCommunications of the ACM, 1987
- The program dependence graph and its use in optimizationACM Transactions on Programming Languages and Systems, 1987
- Side effects and aliasing can have simple axiomatic descriptionsACM Transactions on Programming Languages and Systems, 1985
- The λ-calculus is ω-incompleteThe Journal of Symbolic Logic, 1974