Abstract
Several related notions of the productivity are presented for functional languages with lazy evaluation. The notion of productivity captures the idea of computability, of progress of infinite-list programs. If an infinite-list program is productive, then every element of the list can be computed in finite “time.” These notions are used to study recursive list definitions, that is, lists defined by l where l = fl. Sufficient conditions are given in terms of the function f that either guarantee the productivity of the list or its unproductivity. Furthermore, a calculus is developed that can be used in verifying that lists defined by l where l = f I are productive. The power and the usefulness of our theory are demonstrated by several nontrivial examples. Several observations are given in conclusion.
- 2 CARTWRIGHT, R., AND DONAHUE, J. The semantics ~f Lazy (and industrious) evaluation. In Conference Record of the 1982 A CM Symposium on Lisp a qd Functional Programming (Pittsburgh, Pa., 1982). ACM, New York, 1982, pp. 253-264. Google Scholar
- 3 DIJKSTRA, E.W. Hammings's exercise in SASL. Perscnal note EWD 792, University of Texas at Austin, 1981.Google Scholar
- 4 DIJKSTRA, E.W. On the productivity of recursive definitions. Personal note EWD 749, University of Texas at Austin, 1980.Google Scholar
- 5 GRIES, D. The Science of Programming. Springer-Verl~.g, New York, 1981. Google Scholar
- 6 HANKIN, C. L., BURN, G., AND PEYTON JONES, S. L. ~ safe approach to parallel combinator reduction (extended abstract). ESOP 86 (LNCS 213), B. Robinet, and R. Wilhelm, Eds. Springer- Verlag, New York, 1986, pp. 99-110. Google Scholar
- 7 HOARE, C. A.R. Communicating Sequential Processes. Prentice-Hall International, Englewood Cliffs, N. J., 1985. Google Scholar
- 8 HOOGERWOORD, R.g. Technical University Eindhov,~n, The Netherlands, private communication, 1986.Google Scholar
- 9 KAHN, G., AND MAcQUEEN, D.B. Coroutines and netw)rks of parallel processes. In Information Processing 77, IFIP, North-Holland Publishing Company, New York, 1977, 993-998.Google Scholar
- 10 MANNA, Z., NESS, S., AND VUILLEMIN, J. Inductive me';hods for proving properties of programs. Commun. ACM 16, 8 (1973), 491-502. Google Scholar
- 11 SCOTT, D. Lectures on a Mathematical Theory of Ccmputation. Tech. Monograph PRG-19, Programming Research Group, Oxford University Comr uting Lab., 1981.Google Scholar
- 12 STOY, J. E. Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory. MIT Press, Cambridge, Mass., 1977. Google Scholar
- 13 TURlWER, D.A. Miranda: A non-strict functional language with polymorphic types. In Functional Programming Languages and Computer Architecture (LI~ CS 201), J. P. Jouannaud, Ed. Springer- Verlag, New York, 1985, pp. 1-16. Google Scholar
- 14 TURNER, D. A. Functional programming and proofs of program correctness. In Tools and Notions for Program Construction, D. Neel, Ed., Cambridge Univ. Press, Cambridge, 1983, pp. 187-204.Google Scholar
- 15 TURNER, D.A. Functional programs as executable specifications. In Mathematical Logic and Programming Languages, C. A. R. Hoare, and J. C. Shepherdson, Prentice-Hall International, Englewood Cliffs, N. J., 1985, pp. 29-54. Google Scholar
- 16 VAN DE SNEPSCHEUT, J. L. A. An exercise of programming in SASL. Personal note JAN 106-3, California Institute of Technology, Pasadena, 1983.Google Scholar
- 17 WADGE, W.W. An extensional treatment of datafiow deadlock. Theoret. Comput. Sci. 13 (1981), 3-15.Google Scholar
Index Terms
- On the productivity of recursive list definitions
Recommendations
Recursive Definitions and Fixed-Points
An expression such as @?x(P(x)@?@f(P)), where P occurs in @f(P), does not always define P. When such expression implicitly defines P, in the sense of Beth [Beth, E. W., On Padoa's method in the theory of definitions., Indagationes Mathematicae 15 (1953),...
Recursive definitions of partial functions and their computations
Proceedings of ACM conference on Proving assertions about programsThe object of this paper is to present a syntactic and semantic model for recursive definitions, and to study the relation between their computed functions and their fixpoints. The recursive definitions that we consider are syntactic generalizations of ...
Testing list H-homomorphisms
In the List H- Homomorphism Problem, for a graph H that is a parameter of the problem, an instance consists of an undirected graph G with a list constraint $${L(v) \subseteq V(H)}$$L(v)⊆V(H) for each variable $${v \in V(G)}$$vźV(G), and the objective is ...
Comments