skip to main content
article
Open Access

On the productivity of recursive list definitions

Published:01 October 1989Publication History
Skip Abstract Section

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.

References

  1. 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 ScholarGoogle Scholar
  2. 3 DIJKSTRA, E.W. Hammings's exercise in SASL. Perscnal note EWD 792, University of Texas at Austin, 1981.Google ScholarGoogle Scholar
  3. 4 DIJKSTRA, E.W. On the productivity of recursive definitions. Personal note EWD 749, University of Texas at Austin, 1980.Google ScholarGoogle Scholar
  4. 5 GRIES, D. The Science of Programming. Springer-Verl~.g, New York, 1981. Google ScholarGoogle Scholar
  5. 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 ScholarGoogle Scholar
  6. 7 HOARE, C. A.R. Communicating Sequential Processes. Prentice-Hall International, Englewood Cliffs, N. J., 1985. Google ScholarGoogle Scholar
  7. 8 HOOGERWOORD, R.g. Technical University Eindhov,~n, The Netherlands, private communication, 1986.Google ScholarGoogle Scholar
  8. 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 ScholarGoogle Scholar
  9. 10 MANNA, Z., NESS, S., AND VUILLEMIN, J. Inductive me';hods for proving properties of programs. Commun. ACM 16, 8 (1973), 491-502. Google ScholarGoogle Scholar
  10. 11 SCOTT, D. Lectures on a Mathematical Theory of Ccmputation. Tech. Monograph PRG-19, Programming Research Group, Oxford University Comr uting Lab., 1981.Google ScholarGoogle Scholar
  11. 12 STOY, J. E. Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory. MIT Press, Cambridge, Mass., 1977. Google ScholarGoogle Scholar
  12. 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 ScholarGoogle Scholar
  13. 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 ScholarGoogle Scholar
  14. 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 ScholarGoogle Scholar
  15. 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 ScholarGoogle Scholar
  16. 17 WADGE, W.W. An extensional treatment of datafiow deadlock. Theoret. Comput. Sci. 13 (1981), 3-15.Google ScholarGoogle Scholar

Index Terms

  1. On the productivity of recursive list definitions

            Recommendations

            Reviews

            Francois Aribaud

            The paper deals with computation on infinite lists, more precisely on infinite lists in which each element can be evaluated in finite time: the most direct example is given by the list of the integers f n , where f:N?N is a recursive function. Of course, a list viewpoint is useful only if one can operate on infinite lists by natural extension of the finite case. Thus the paper focuses on fixed points. The main theorem gives a sufficient condition, in terms of the function <__?__Pub Fmt italic>f<__?__Pub Fmt /italic>, for the resolution of the equation <__?__Pub Caret> f l =l . Roughly speaking, in the reference frame of the theory of Scott domains and partial orderings, one has to exhibit a strictly increasing function v:N?N such that, if <__?__Pub Fmt italic>x<__?__Pub Fmt /italic> is a list with maximal elements up to <__?__Pub Fmt italic>k<__?__Pub Fmt /italic>, then f x is a list with maximal elements up to <__?__Pub Fmt italic>v<__?__Pub Fmt /italic>(<__?__Pub Fmt italic>k<__?__Pub Fmt /italic>).

            Access critical reviews of Computing literature here

            Become a reviewer for Computing Reviews.

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in

            Full Access

            • Published in

              cover image ACM Transactions on Programming Languages and Systems
              ACM Transactions on Programming Languages and Systems  Volume 11, Issue 4
              Oct. 1989
              178 pages
              ISSN:0164-0925
              EISSN:1558-4593
              DOI:10.1145/69558
              Issue’s Table of Contents

              Copyright © 1989 ACM

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 1 October 1989
              Published in toplas Volume 11, Issue 4

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • article

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader