Papers
Topics
Authors
Recent
Search
2000 character limit reached

Circular Programs and Self-Referential Structures

Published 4 Mar 2024 in cs.PL | (2403.01866v1)

Abstract: A circular program creates a data structure whose computation depends upon itself or refers to itself. The technique is used to implement the classic data structures circular and doubly-linked lists, threaded trees and queues, in a functional programming language. These structures are normally thought to require updatable variables found in imperative languages. For example, a functional program to perform the breadth-first traversal of a tree is given. Some of the examples result in circular data structures when evaluated. Some examples are particularly space-efficient by avoiding the creation of intermediate temporary structures which would otherwise later become garbage. Lastly, the technique can be applied in an imperative language to give an elegant program.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (9)
  1. L. Allison. Two functional programming techniques: continuations and circular programs. TR 87/91, Monash University, Deptartment of Computer Science, January 1987.
  2. R. S. Bird. Using circular programs to eliminate multiple traversals of data. Acta Informatica, 21(3):239–250, October 1984.
  3. J. Cohen. Garbage collection of linked data structures. Computing Surveys, 13(3):341–367, September 1981.
  4. Cons should not evaluate its arguments. In Automata, Languages and Programming, pages 257–284. Edinburgh University Press, 1976.
  5. P. Henderson. A lazy evaluator. In 3rd ACM Symposium in Principles of Programming Languages, pages 95–103, January 1976.
  6. P. Henderson. Functional Programming: Application and Implementation. Prentice Hall, 1980.
  7. J. Hughes. Lazy memo functions. In J.-P. Jouannaud, editor, Functional Programming Languages and Computer Architecture, volume 201 of LNCS, pages 129–146. Springer Verlag, 1985.
  8. E. S. Page and B. Wilson. Information Representation and Manipulation in a Computer, volume 2 of Cambridge Computer Science Texts. Cambridge University Press, 1973.
  9. S. L Peyton-Jones. An introduction to fully-lazy supercombinators. In Cousineau G., Curien P.-L., and Robinet B., editors, Combinators and Functional Programming Languages, volume 242 of LNCS, pages 176–208. Springer Verlag, 1985.
Citations (18)

Summary

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Continue Learning

We haven't generated follow-up questions for this paper yet.

Authors (1)

Collections

Sign up for free to add this paper to one or more collections.