Programming, Transforming, and Providing with Function Abstractions and Memories

1. Overview Notions of program equivalence are fundamental to the process of program speci-cation and transformation. Recent work of Talcott, Mason, and Felleisen establishes a basis for studying notions of program equivalence for programming languages with function and control abstractions operating on objects with memory. This work extends work of Landin, Reynolds, Morris and Plotkin. Landin 1964] and Reynolds 1972] describe high level abstract machines for deening language semantics. Morris 1968] deenes an extensional equivalence relation for the classical lambda calculus. Plotkin 1975] extends these ideas to the call-by-value lambda calculus and deenes the operational equivalence relation. Operational equivalence is the equivalence naturally associated with the operational approximation pre-ordering. One expression operationally approximates another if for all closing program contexts either the rst expression is undeened or both expressions are deened and their values are indistinguishable (with respect to some primitive means of testing equality). Talcott 1985], Mason 1986], and Talcott 1987] study operational approximation and equivalence for subsets of a language with function and control abstractions and objects with memory. Felleisen 1987] deenes reduction calculi extending the call-by-value lambda calculus to languages with control and assignment abstractions. Talcott, Mason, and Felleisen all apply their theories to expressing and proving properties of program constructs and of particular programs. Reduction calculi and operational approximation both provide a sound basis for purely equational reasoning about programs. Calculi have the advantage that the reduction relations are inductively generated from primitive reductions (such as beta-conversion) by closure operations (such as transitive closure or congruence closure). Equations proved in a calculus continue to hold when the language is extended to treat additional language constructs. Operational approximation is, by deenition, sensitive to the set of language constructs and basic data available. Using operational approximation we can express and prove properties such as non-termination, computation induction and existence of least xed points which cannot even be expressed in reduction calculi. Studying the laws of operational approximation and discovering natural extensions to reduction calculi provide useful insight into the nature of program equivalence. This paper presents a study of operational approximation and equivalence in the presence of function abstractions and objects with memory. In the remainder of this section we give an informal summary of our results illustrating properties of operational ICALP 89