# An FP domain with infinite objects

## Abstract

We describe a basis for extending Backus's FP languages to apply to infinite data objects, including streams, using data objects called prefixes, which can be viewed as approximations of either finite or infinite sequences. The resulting set of data objects, together with its limit points, admits not only an infinite number of entries in a sequence, but also infinitely nested expressions. Elements in this domain include arbitrarily good finite approximations to any of the infinite objects of the domain.

We also describe a mechanism for extending the primitive functions of an FP language over its domain to a corresponding stream FP language (or SFP language) capable of handling both finite and infinite elements over the extended domain. Extensions of the common functional forms are described. The algebra of FP programs is preserved nearly unchanged. Example programs are given.

## Keywords

Equivalence Class Partial Order Monotonic Function Nonempty Subset Complete Lattice## Preview

Unable to display preview. Download preview PDF.

## Bibliography

- [Backus 1978]Backus, J. Can programming be liberated from the von Neumann style? A functional style and its algebra of programs.
*Communications of the ACM*,**21**, No. 8, Aug 1978, pp. 613–641.Google Scholar - [Broy 1982]Broy, M. A fixed point approach to applicative multiprogramming, in
*Theoretical Foundations of Programming Methodology*. D. Reidel, 1982. pp. 565–622. Ed. by M. Broy & G. Schmidt.Google Scholar - [Burge 1975]Burge, W.H.
*Recursive programming techniques*. Reading, Mass: Addison-Wesley, 1975.Google Scholar - [Dosch & Moller 1982]Dosch, W. & Moller, B. Busy and lazy FP with infinite objects. In
*Conference Record of the 1984 ACM Symposium on LISP and Functional Programming*, 1984. pp. 282–292.Google Scholar - [Feldman 1982]Feldman, G. Functional Specifications of a Text Editor. In
*Conference Record of the 1982 ACM Symposium on LISP and Functional Programming*, 1982. pp. 37–46.Google Scholar - [Halpern et al. 1985]Halpern, J., J. Williams, E. Wimmers & T. Winkler. In
*Conference Record of the Twelfth Annual ACM Symposium on Principles of Programming Languages*, 1985. pp. 108–120.Google Scholar - [Henderson 1982]Henderson, P.
*Purely Functional Operating Systems in Functional Programming and its Applications*. Cambridge University Press, 1982. pp. 177–192.Google Scholar - [Ida & Tanaka 1983]Ida, T. & Tanaka, J. Functional programming with streams, in
*Information Processing*. North-Holland, 1983. pp. 265–270.Google Scholar - [Jacobson 1974]Jacobson, N.
*Basic Algebra I*. San Francisco: W.H.Freeman & Co., 1974.Google Scholar - [Kahn 1974]Kahn, G. The semantics of a simple language for parallel programming. In Proceedings, IFIP Congress 74, 1974 pp. 471–475.Google Scholar
- [Kahn & Macqueen 1977]Kahn, G. & Macqueen, D.B. Coroutines and networks of parallel processes. In Proceedings, IFIP Congress 77, North-Holland, Jan 1977.Google Scholar
- [Keller 1977]Keller, R.M. Semantics of parallel program graphs. Technical Report UUCS-77-110, University of Utah, July 22, 1977.Google Scholar
- [Keller 1978]Keller, R.M. Denotational models for parallel programs with indeterminate operators, in
*Formal Description of Programming Concepts*. North-Holland, 1978. pp. 337–366.Google Scholar - [Nakata & Sassa 1983]Nakata, I. & Sassa, M. Programming with streams. Technical Report RJ3751(43317). IBM. Jan 1983.Google Scholar
- [Scott 1982]Scott, D.S. Lectures on a mathematical theory of computation, in
*Theoretical Foundations of Programming Methodology*. D. Reidel, 1982. pp. 146–292. Ed. by M. Broy & G. Schmidt.Google Scholar - [Stoy 1982]Stoy, J.E. Some Mathematical Aspects of Functional Programming, in
*Functional Programming and its Applications*. Cambridge University Press, 1982. pp. 217–252.Google Scholar - [Tanaka & Ida 1981]Tanaka, J. & Ida, T. Stream extension for fp-like language. 1981. (Unpublished paper.)Google Scholar
- [Thomas 1983]Thomas, T.A. An fp domain with infinite objects. Technical Report TR 83-009. University of North Carolina at Chapel Hill. 1983.Google Scholar
- [Turner 1982]Turner, D.A. Recursion Equations as a Programming Language, in
*Functional Programming and its Applications*. Cambridge University Press, 1982. pp. 1–28.Google Scholar - [Wadler 1981]Wadler, P. Applicative style of programming, program transformation and list operators. In
*ACM-MIT Proceedings of the 1981 Conference on Functional Programming Languages and Computer Architecture.*, Oct 1981. pp. 25–32.Google Scholar