Toward a complete transformational toolkit for compilers

  • Authors:
  • J. A. Bergstra;T. B. Dinesh;J. Field;J. Heering

  • Affiliations:
  • Univ. of Amsterdam, Amsterdam, The Netherlands/ and Utrecht Univ., Utrecht, The Netherlands;CWI, Amsterdam, The Netherlands;IBM T. J. Watson Research Center, Yorktown Heights, NY;CWI, Amsterdam, The Netherlands

  • Venue:
  • ACM Transactions on Programming Languages and Systems (TOPLAS)
  • Year:
  • 1997

Quantified Score

Hi-index 0.00

Visualization

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, PIMt, 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 PIMt can be derived by application of PIMt rules. We systematically derive the complete PIMt logic as the culmination of a sequence of increasingly powerful equational systems starting from a straightforward “interpreter” for closed PIMt 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.