ACM Home Page
Please provide us with feedback. Feedback
Minimal and optimal computations of recursive programs
Full text PdfPdf (1.03 MB)
Source Annual Symposium on Principles of Programming Languages archive
Proceedings of the 4th ACM SIGACT-SIGPLAN symposium on Principles of programming languages table of contents
Los Angeles, California
Pages: 215 - 226  
Year of Publication: 1977
Authors
Gérard Berry  Ecole des Mines de Paris and IRIA-LABORIA, 78150-Le Chesnay, France
Jean-Jacques Lévy  IRIA-LABORIA, 78150-Le Chesnay, France
Sponsors
SIGACT: ACM Special Interest Group on Algorithms and Computation Theory
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 2,   Downloads (12 Months): 21,   Citation Count: 5
Additional Information:

abstract   references   cited by   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/512950.512971
What is a DOI?

ABSTRACT

Procedure call mechanisms have mainly been studied in the framework of recursive programs without assignments, for the simplicity of their operational and denotational semantics (See Scott [16], Nivat [14], Vuillemin [17]).

According to operational semantics, procedure calls act as textual rewritings ; "computation rules" select at each computation step the occurrences of unknown functions to be rewritten. A computation rule is called correct if the value it computes is the one given by the denotational semantics. Correctness and efficiency of computation rules have been studied in Vuillemin [17,18], Montangero-Pacini-Turini [13], Downey-Sethi [7]. The main results are well-known: innermost evaluation (call by value) is not correct, parallel outermost or full substitution are correct. Vuillemin [17,18] gives a sufficient condition for a rule to be correct, (safety), later extended by Downey-Sethi [7] into a necessary and sufficient one (security). Vuillemin also studies particular implementation of call-by-name, the delay rule ; he shows its optimality with respect to a reasonable implementation cost, provided interpretations satisfy a sequentiality condition. This result is in fact twofold : sequentiality allows elimination of useless steps, and optimality follows by using sharing mechanisms in term implementation.

The basis of all these studies is the following theorem (Vuillemin [17,18]) : provided some restrictive conditions on programs are satisfied, the set of terms derivable from a given term is a lattice under the derivation ordering.

Our aim is to extend these results, for the three following reasons : first, though every program can be transformed to match Vuillemin's conditions, the transformations may affect the costs of computations : a more direct proof can be investigated. Second, a direct generalization to the ë-calculus is not straightforward, since ë-terms definitely do not form lattices. Third, the symbolic (or Herbrand) interpretation [5] is not sequential in the sense of Vuillemin, and no optimality result is known for it.

Our point of view will be purely syntactic : we reconstruct the lattice property in derivations. We study minimal computations (i.e. finite or infinite derivations)in the symbolic interpretation, and transform them into optimal ones. Eventually, we characterize interpretations to which similar results apply. Extension towards the ë-calculus is done in [10].

The lattice property of terms breaks down in general : two very different derivations may lead to the same term by syntactical accidents, which collapse two a priori different terms. In section I, we take care of this fact by introducing an equivalence and a preorder on derivations. We give three characterizations of these relations. For the main one, we extend the classical notion of residuals [4] by defining residuals of derivations by derivations. We show that derivation classes form a lattice.

In section II, we study the "simple derivations" defined by Vuillemin with use of labels (named here complete derivations). We give two characterizations of them in the usual formalism.

Section III, is devoted to minimality and optimality results. Ordering infinite derivations as well as finite one, we construct least computations of every syntactic approximation of the infinite tree determined by the program. The associated complete derivation are optimal with respect to Vuillemin's cost. Extension to interpretations is then straightforward, as soon as they satisfy a syntactic condition. All classes of sequential interpretations considered in [2,6,11,17] do satisfy this condition. The "computation rule" we use for constructing the optimal computations is very inefficient in general, but reduces to the usual delay rules in sequential interpretations.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
G. Berry, Bottom-up Computations of Recursive Programs. R.A.I.R.O. Informatique Théorique, Vol 10, no3, Mars 1976, pp.47-82.
 
2
G. Berry and B. Courcelle, Program Equivalence and Canonical Forms in Stable Discrete Interpretations. Automata Languages and Programming, 3rd Coll, 1976, Edinburgh University Press, U.K. p.168-188.
 
3
G. Berry, Calculs Minimaux et Optimaux des Programmes Récursifs, to appear.
 
4
 
5
B. Courcelle and M. Nivat, Algebraic Families of Interpretations, 17th FOCS, Houston, 1976.
 
6
H. B. Curry and R. Feys,Combinatory logic,Vol 1, North-Holland, 1958
 
7
P. J. Downey and R. Sethi,Correct Computation Rules for Recursive Languages, 16th Annual Symposium on Foundations of Computer Sc, Berkeley,Oct. 1975.
 
8
G. Kahn and G. Plotkin,Concrete Data Types,To appear,University of Edinburgh,A.I.Dept.
 
9
G. Kahn and D. Mc Queen,Coroutines and Networks of Parallel Processes,To appear as IRIA-LABORIA report.
 
10
J-J. Lévy,An algebraic interpretation of the λβK-calculus and a labelled λ-calculus, Proc. of the Symposium on -calculus and Computer Sc Theory,Roma,Italy,March 1975.
 
11
J-J. Lévy,Réductions sûres et optimales dans le λ-calcul, To appear.
 
12
R. Milner, Fully Abstract Models of Typed λ-calculi, To appear in Theoritical Computer Sc.
 
13
G. Mitschke, The Standardisation Theorem for λ-calculus, Swansea 1975.
 
14
 
15
M. Nivat, On the Interpretation of Recursive Program Schemes,Symposia Mathematica, Vol XV, Instituto Nazionale di Alta Matematica,Italy,1975,P. 255-281.
16
 
17
D. Scott,Outline of a Mathematical Theory of Computation,P.R.G.mono. N2, Oxford 1970.
 
18
 
19
J. Vuillemin, Syntaxe,Sémantique et Axiomatique d'un langage de Programmation Simple,Thèse d'état,Univ.Paris VII,1974

Collaborative Colleagues:
Gérard Berry: colleagues
Jean-Jacques Lévy: colleagues