Abstract
This new algorithm deals correctly and automatically with the kind of cyclic (i.e. self-referencing) structures which arise in a combinator graph reduction machine. By extending the standard reference count algorithm, cycles can be handled safely at little extra cost. Cyclic reference counting uses one extra bit per pointer and per object and one extra reference count per object. Extra computation amounts to inspection of the objects in a cyclic structure from time to time before the structure becomes free. In the absence of cycles, no computation overhead is incurred. When executing some typical recursive programs, the number of objects inspected is approximately equal to the number of new objects used during execution.
(Mail ...!mcvax!ukc!hlh!dave)
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
A.L. Davis, "The Architecture and System Method of DDM1: A Recursively Structured Data Driven Machine", Proc. 5th Int. Symp. Computer Architecture, pp. 210–215 (April 1978). (In ACM SIGARCH Newsletter 6(7) 1978).
Arvind, V. Kathail, and K. Pingali, "A Processing Element for a Large Multiprocessor Dataflow Machine", Proc. Int. Conf. Circuits and Computers, New York, IEEE, (October 1980).
J. Backus, "Can Programming be Liberated from the von Neumann Style? A Functional Style and Its Algebra of Programs", Comm. ACM, Vol. 21(8) pp. 613–641 (August 1978).
J. Darlington and M. Reeve, "ALICE: A Multiprocessor Reduction Machine for Parallel Evaluation of Applicative Languages", Proc. Int. Symp. Functional Programming and Computer Architecture, Goteborg, Sweden, pp. 32–62 (June 1981).
J.B. Dennis, "The Varieties of Data Flow Computers", Proc. 1st Int. Conf. Distributed Computer Systems, Huntsville, Alabama, pp. 430–439 IEEE, (1979).
M.R. Sleep, "Towards a Zero Assignment Parallel Processor", Proc. 2nd Int. Conf. Distributed Computing, (April 1981).
I. Watson and J. Gurd, "A Prototype Dataflow Machine with Token Labelling", Proc. Nat. Computer Conf., pp. 623–628 AFIPS Press. Arlington Virginia, (June 1979).
J. Cohen, "Garbage Collection of Linked Data Structures", ACM Computing Surveys, Vol. 13(3) pp. 341–367 (September 1981).
D.E. Knuth, The Art of Computer Programming, Vol. 1: Fundamental Algorithms, Addison-Wesley, Reading, Massachusetts (1972).
D. M. Ritchie and K. Thompson, "The UNIX Time-Sharing System", Bell Sys. Tech. J., Vol. 57(6) pp. 1905–1929 (1978). (Also in Comm. ACM 26(1) 'special Anniversary Issue', January 1983, pp. 84–89).
P. Hudak and R.M. Keller, "Garbage Collection and Task Deletion in Distributed Applicative Processing Systems", Proc. Symp. LISP and Functional Programming, pp. 168–178 (1982).
H. Lieberman and C. Hewitt, "A Real-Time Garbage Collector Based on the Lifetimes of Objects", Comm. ACM, Vol. 26(6) pp. 419–429 (June 1983).
H.T. Kung and S.W. Song, "An Efficient Parallel garbage Collection System", Dept. of Computer Science Report, Carnegie-Mellon University (August 1977).
I.A. Newman, R.P. Stallard, and M.C. Woodward, "Improved Multiprocessor Garbage Collection", Proc. Int. Conf. Parallel Processing, pp. 367–368 IEEE, (August 1983).
E.W. Dijkstra, L. Lamport, A.J. Martin, C.S. Scholten, and E.F.M. Steffens, "On The Fly Garbage Collection", Comm. ACM, Vol. 21(11) pp. 966–975 (November 1978).
D.G. Bobrow, "Managing Reentrant Structures Using Reference Counts", ACM Trans. on Programming Languages and Systems, Vol. 2(3) pp. 269–273 (July 1980).
T.W. Christopher, "Reference Counting Garbage Collection", Software Practice and Experience, Vol. 14(6) pp. 503–507 (June 1984).
D.P. Friedman and D.S. Wise, "Reference Counting can Manage the Circular Environments of Mutual Recursion", Information Processing Letters, Vol. 8(1) (January 1979).
R.J.M. Hughes, "Reference Counting with Circular Structures in Virtual Memory Applicative Systems", Oxford University Programming Research Group (1983).
D. Spector, "Minimal Overhead Garbage Collection of Complex List Structure", ACM SIGPLAN Notices, Vol. 17(3) pp. 80–82 (March 1982).
D.A. Turner, "A New Implementation Technique for Applicative Languages", Software Practice and Experience, Vol. 9 pp. 31–49 (1979).
K. Berkling, "Reduction Languages for Reduction Machines", Proc. 2nd Int. Symp. Computer Architecture, Houston, Texas, pp. 133–140 (January 1975).
R.M. Keller et al., "A Loosely Coupled Applicative Multiprocessing System", Proc. National Computer Conf., pp. 861–870 AFIPS Press, Arlington Virginia, (1978).
G.A. Mago, "A Cellular Computer Architecture to Execute Reduction Languages", Int. J. Computer and Information Science, Vol. 8(5) pp. 349–385 (1979).
P.C. Treleaven, D.R. Brownbridge, and R.P. Hopkins, "Data Driven and Demand Driven Computer Architecture", ACM Computing Surveys, Vol. 14(1) pp. 93–143 (February 1982). (Also in Japanese translation in BIT 12 (1983); and in part in Supercomputers: Design and Applications K. Hwang and R. Khun (eds.) IEEE Computer Society Press 1984).
W.H. Burge, Recursive Programming Techniques, Addison-Wesley, Reading Massachusetts (1975).
J.R. Hindley, B. Lercher, and J.P. Seldin, Introduction to Combinatory Logic, Cambridge University Press, Cambridge, England (1972).
M. Griffiths, "Run-Time Storage Management", in Compiler Construction — An Advanced Course, ed. F.L. Bauer and J. Eickel, Springer-Verlag (1976).
D.R. Brownbridge, "Recursive Structures in Computer Systems", Ph.D. Thesis, University of Newcastle upon Tyne (September 1984).
R. Tarjan, "Depth-First Search and Linear Graph Algorithms", SIAM J. Computing, Vol. 1(2) pp. 146–160 (June 1972).
D.T. Ross, "The AED Free Storage Package", Comm. ACM, Vol. 10(8) pp. 481–492 (August 1967).
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1985 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Brownbridge, D.R. (1985). Cyclic reference counting for combinator machines. In: Jouannaud, JP. (eds) Functional Programming Languages and Computer Architecture. FPCA 1985. Lecture Notes in Computer Science, vol 201. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-15975-4_42
Download citation
DOI: https://doi.org/10.1007/3-540-15975-4_42
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-15975-9
Online ISBN: 978-3-540-39677-2
eBook Packages: Springer Book Archive