Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
121 tokens/sec
GPT-4o
9 tokens/sec
Gemini 2.5 Pro Pro
47 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Circular Programs and Self-Referential Structures (2403.01866v1)

Published 4 Mar 2024 in cs.PL

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

We haven't generated a summary for this paper yet.