Abstract
The need to reverse a computation arises in many contexts—debugging, editor undoing, optimistic concurrency undoing, speculative computation undoing, trace scheduling, exception handling undoing, database recovery, optimistic discrete event simulations, subjunctive computing, etc. The need to analyze a reversed computation arises in the context of static analysis—liveness analysis, strictness analysis, type inference, etc. Traditional means for restoring a computation to a previous state involve checkpoints; checkpoints require time to copy, as well as space to store, the copied material. Traditional reverse abstract interpretation produces relatively poor information due to its inability to guess the previous values of assigned-to variables.
We propose an abstract computer model and a programming language—Ψ-Lisp—whose primitive operations are injective and hence reversible, thus allowing arbitrary undoing without the overheads of checkpointing. Such a computer can be built from reversible conservative logic circuits, with the serendipitous advantage of dissipating far less heat than traditional Boolean AND/OR/NOT circuits. Unlike functional languages, which have one “state” for all times, Ψ-Lisp has at all times one “state”, with unique predecessor and successor states.
Compiling into a reversible pseudocode can have benefits even when targeting a traditional computer. Certain optimizations, e.g., update-in-place, and compile-time garbage collection may be more easily performed, because the information may be elicited without the difficult and time-consuming iterative abstract interpretation required for most non-reversible models.
In a reversible machine, garbage collection for recycling storage can always be performed by a reversed (sub)computation. While this “collection is reversed mutation” insight does not reduce space requirements when used for the computation as a whole, it does save space when used to recycle at finer scales. This insight also provides an explanation for the fundamental importance of the push-down stack both for recognizing palindromes and for managing storage.
Reversible computers are related to Prolog, linear logic and chemical abstract machines.
Apologies to Alan Dershowitz.
Preview
Unable to display preview. Download preview PDF.
References
Abadi, M. & Plotkin, G.D. “A Logical View of Composition and Refinement”. Proc. ACM POPL 18 (Jan. 1991),323–332.
Agrawal, H. et al. “An Execution-Backtracking Approach to Debugging”. IEEE Software 8,3 (May 1991),21–26.
Appel, A.W. “Simple Generational Garbage Collection and Fast Allocation”. Soft. Prac. & Exper. 19,2 (Feb. 1989), 171–183.
Appel, A.W. “A Runtime System”. Lisp & Symbolic Comput. 3,4 (Nov. 1990),343–380.
Archer, J.E., et al. “User recovery and reversal in interactive systems”. ACM TOPLAS 6,1 (Jan. 1984),1–19.
Bacon, David F., et al. “Optimistic Parallelization of Communicating Sequential Processes”. Proc. 3rd ACM Sigplan PPOPP, Williamsburg, VA, April, 1991,155–166.
Baker, H.G. “Shallow Binding in Lisp 1.5”. CACM 21,7 (July 1978),565–569.
Baker, H.G. “Unify and Conquer (Garbage, Updating, Aliasing, ...) in Functional Languages”. Proc. 1990 ACM Conf. on Lisp and Functional Progr., June 1990,218–226.
Baker, H.G. “The Nimble Type Inferencer for Common Lisp-84”. Submitted to ACM TOPLAS, 1990.
Baker, H.G. “CONS Should not CONS its Arguments, or, A Lazy Alloc is a Smart Alloc”. ACM Sigplan Not. 27,3 (March 1992),24–34.
Baker, H.G. “Equal Rights for Functional Objects”. ACM OOPS Messenger, 1992, to appear.
Baker, H.G. “Cache-Conscious Copying Collectors”. OOPSLA'91 GC Workshop, Oct. 1991.
Baker, H.G. “Lively Linear Lisp — ‘Look Ma, No Garbage!'”. ACM Sigplan Not., 1992, to appear.
Balzer, R.M. “EXDAMS: Extendable Debugging and Monitoring System”. Proc. AFIPS 1969 SJCC 34, AFIPS Press, Montvale, NJ,567–580.
Barghouti, N.S. & Kaiser, G.E. “Concurrency Control in Advanced Database Applications”. ACM Comput. Surv. 23,3 (Sept. 1991),269–317.
Barth, J. “Shifting garbage collection overhead to compile time”. CACM 20,7 (July 1977),513–518.
Barth, Paul S., et al. “M-Structures: Extending a Parallel, Non-strict, Functional Language with State”. Proc. Funct. Progr. Langs. & Computer Arch., LNCS 523, Springer-Verlag, Aug. 1991,538–568.
Barton, Ed. Conservative Logic. 6.895 Term Paper, MIT, May, 1978.
Bawden, Alan. “Connection Graphs”. Proc. ACM Conf. Lisp & Funct. Progr., Camb., MA, Aug. 1986.
Beeler, M., Gosper, R.W, and Schroeppel, R. “HAKMEM”. AI Memo 239, MIT AI Lab., Feb. 1972. Important items: 102, 103, 104, 149, 150, 161, 166, 172.
Benioff, Paul. “Quantum Mechanical Hamiltonian Models of Discrete Processes that Erase Their Own Histories: Application to Turing Machines”. Int'l. J. Theor. Phys. 21 (1982),177–201.
Bennett, Charles. “Logical Reversibility of Computation”. IBM J. Res. Develop. 6 (1973),525–532.
Bennett, Charles. “Thermodynamics of Computation”. Int'l. J. Theor. Phys. 21 (1982),905–940.
Bennett, Charles. “Notes on the History of Reversible Computation”. IBM J. Res. Develop. 32,1 (1988),16–23.
Bennett, Charles. “Time/Space Trade-offs for Reversible Computation”. SIAM J. Computing 18,4 (Aug. 1989).
Berry, G., and Boudol, G. “The Chemical Abstract Machine”. ACM POPL 17, San Francisco, CA, Jan. 1990.
Chase, David. “Garbage Collection and Other Optimizations”. PhD Thesis, Rice U., Nov. 1987.
Chen, W., and Udding, J.T. “Program Inversion: More than Fun!”. Sci. of Computer Progr. 15 (1990),1–13.
Chen, W. “A formal approach to program inversion”. Proc. ACM 18th Comp. Sci. Conf., Feb., 1990,398–403.
Cheney, C.J. “A Nonrecursive List Compacting Algorithm”. CACM 13,11 (Nov. 1970),677–678.
Clarke, E.M. “Synthesis of resource invariants for concurrent programs”. ACM TOPLAS 2,3 (July 1980).
Cohen, Jacques. “Non-Deterministic Algorithms”. Comput. Surveys 11,2 (June 1979),79–94.
Corman, T.H., et al. Introduction to Algorithms. MIT Press, Cambridge, MA, 1990.
Cousot, P., and Cousot, R. “Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints”. Proc. ACM POPL 4 (1977),238–252.
Coveney, P.V. & Marcer, P.J. “Irreversibility and computation”. Specs. in Sci. & Tech. 14,1 (1991?),51–55.
Deutsch, D. “Quantum Theory, the Church-Turing Hypothesis, and Universal Quantum Computers”. Proc. Roy. Soc. (1985).
Dijkstra, E.W. A Discipline of Programming. Prentice-Hall, Englewood Cliffs, NJ, 1976.
Dobkin, D.P., and Munro, J.I. “Efficient Uses of the Past”. Proc. ACM FOCS 21 (1980),200–206.
Drescher, G.L. “Demystifying Quantum Mechanics: A Simple Universe with Quantum Uncertainty”. Complex Sys. 5 (1991),207–237.
Feldman, S., and Brown, C. “IGOR: A System for Program Debugging via Reversible Execution”. Proc. Sigplan/Sigops WS on Parl & Distr. Debugging, May 1988,112–123.
Feynman, Richard P., et al. The Feynman Lectures on Physics, Vol. I. Addison-Wesley, Reading, MA, 1963.
Feynman, Richard P. “Quantum Mechanical Computers”. Founds. of Physics 16,6 (1986),507–531.
Fisher, J. “Trace scheduling: A technique for global microcode compaction”. IEEE Tr. Comps. C-30,7 (July 1981),478–490.
Floyd, R.W. “Nondeterministic Algorithms”. J. ACM 14,4 (Oct. 1967),636–644.
Fredkin, E., and Toffoli, T. “Conservative Logic”. Int'l. J. Theor. Physics 21,3/4 (1982),219–253.
Girard, J.-Y. “Linear Logic”. Theoretical Computer Sci. 50 (1987),1–102.
Grishman, R. “The debugging system AIDS”. AFIPS 1970 SJCC 41, AFIPS Press, Montvale, NJ 1193–1202.
Halpern, J.Y., et al. “The Semantics of Local Storage, or What Makes the Free-List Free?”. ACM POPL 11, 1984,245–257.
Harel, David. First Order Dynamic Logic. Springer-Verlag LNCS 68, 1979.
Harms, D.E., and Weide, B.W. “Copying and Swapping: Influences on the Design of Reusable Software Components”. IEEE Trans. SW Engrg. 17,5 (May 1991),424–435.
Harrison, P.G. “Function Inversion”. In Jones, N., et al, eds. Proc. Workshop on Partial Evaluation and Mixed Computation, Gammel Avernaes, Denmark, Oct. 1987, North-Holland, 1988.
Hederman, Lucy. “Compile Time Garbage Collection”. MS Thesis, Rice U. Comp. Sci. Dept., Sept. 1988.
Heering, J., and Klint, P. “Towards monolingual programming environments”. ACM TOPLAS 7,2 (April 1985),183–213.
Herlihy, Maurice. “Wait-Free Synchronization”. ACM TOPLAS 11,1 (Jan. 1991), 124–149.
Hofstadter, Douglas R. Gödel, Escher, Bach: an Eternal Golden Braia. Vintage Bks., Random House, NY, 1979.
Inoue, K., et al. “Analysis of functional programs to detect run-time garbage cells”. ACM TOPLAS 10,4 (Oct. 1988),555–578.
Johnsson, T. “Lambda lifting: transforming programs to recursive equations”. Proc. FPCA, Nancy, France, Springer LNCS 201, 1985,190–203.
Kay, A.C. “Microelectronics and the Personal Computer”. Sci. Amer. 237,3 (Sept. 1977),230–244.
Keller, Robert M., et al. “An Architecture for a Loosely-Coupled Parallel Processor”. Tech. Rep. UUCS-78-105, Oct. 1978,50p.
Kieburtz, Richard B. “Programming without pointer variables”. Proc. Conf. on Data: Abstraction, Definition and Structure, Sigplan Not. 11 (special issue 1976),95–107.
Kieburtz, R. B. “The G-machine: a fast, graph-reduction evaluator”. Proc. IFIP FPCA, Nancy, France, 1985.
Kieburtz, Richard B. “A RISC Architecture for Symbolic Computation”. Proc. ASPLOS II, Sigplan Not. 22,10 (Oct. 1987),146–155.
Korth, H.F., et al. “Formal approach to recovery by compensating transactions”. Proc. 16th Int'l. Conf. on Very Large Databases, 1990.
Kung, H.T. & Robinson, J.T. “On optimistic methods for concurrency control”. ACM Trans. on DB Sys. 6,2 (June 1981).
Jefferson, David R. “Virtual Time”. ACM TOPLAS 7,3 (July 1985),404–425.
Lafont, Yves. “The Linear Abstract Machine”. Theor. Computer Sci. 59 (1988),157–180.
Lafont, Yves. “Interaction Nets”. ACM POPL 17, San Franciso, CA, Jan. 1990,95–108.
Lafont, Yves. “The Paradigm of Interaction (Short Version)”. Unpubl. manuscript, July 12, 1991, 18p.
Lafora, F. & Soffa, M.L. “Reverse Execution in a Generalized Control Regime”. Comp. Lang. 9,3/4 (1984), 183–192.
Landauer, R. “Dissipation and Noise Immunity in Computation and Communication”. Nature 335 (Oct. 1988),779–784.
LeBlanc, T.J., and Mellor-Crummey, J.M. “Debugging parallel programs with Instant Replay”. IEEE Tr. Comp. 36,4 (April 1987),471–482.
Leeman, G.B. “Building undo/redo operations into the C language”. Proc. IEEE 15th Annual Int'l. Symp. on Fault-Tolerant Computing, 1985,410–415.
Leeman, G.B. “A Formal Approach to Undo Operations in Programming Languages”. ACM TOPLAS 8,1 (Jan. 1986),50–87.
Levy, E., et al. “An Optimistic Commit Protocol for Distributed Transaction Management”. Proc. ACM SIGMOD, Denver, CO, May 1991,88–97.
Lewis, H.R., & Papadimitriou, C.H. “Symmetric Space-bounded Computation”. Theor. Comp. Sci. 19 (1982),161–187.
Lieberman, H., & Hewitt, C. “A Real-Time Garbage Collector Based on the Lifetimes of Objects”. CACM 26,6 (June 1983),419–429.
Lindstrom, Gary. “Efficiency in Nondeterministic Control through Non-Forgetful Backtracking”. Tech. Rep. UUCS-77-114, Oct. 1977,18p.
MacLennan, B.J. “Values and Objects in Programming Languages”. Sigplan Not. 17,12 (Dec. 1982),70–79.
Manthey, M.J., & Moret, B.M.E. “The Computational Metaphor and Quantum Physics”. CACM 26,2 (Feb. 1983),137–145.
Margolus, Norman. “Physics-Like Models of Computation”. Elsevier North-Holland, Physica 10D (1984),81–95.
Margolus, Norman H. Physics and Computation. Ph.D. Thesis, MIT/LCS/TR-415, March 1988,188p.
Mattson, R.L., et al. “Evaluation Techniques for Storage Hierarchies”. IBM Sys. J. 9,2 (1970),78–117.
McCarthy, John. “The Inversion of Functions defined by Turing Machines”. In Shannon, CE., and McCarthy, J., eds. Automata Studies, Princeton, 1956,177–181.
McDowell, C.E. & Helmbold, D.P. “Debugging concurrent programs”. ACM Comput. Surv. 21,4 (Dec. 1989),593–622.
Miller, B.P. & Choi, J.-D. “A mechanism for efficient debugging of parallel programs”. Proc. ACM PLDI, 1988,135–144.
Morita, K. “A Simple Construction Method of a Reversible Finite Automaton out of Fredkin Gates, and its Related Problem”. Trans. IEICE E 73, 6 (1990),978–984.
Nylin, W.C.Jr., and Harvill, J.B. “Multiple Tense Computer Programming”. Sigplan Not. 11,12 (Dec. 1976),74–93.
Pan, D.Z., and Linton, M.A. “Supporting reverse execution of parallel programs”. Proc. ACM Sigplan/Sigops WS on Par. & Distr. Debugging, May 1988,112–123.
Penrose, R. The Emperor's New Mind: Concerning Computers, Minds, and the Laws of Physics. Penguin Bks, London, 1989.
Peyton-Jones, S.L. The Implementation of Functional Programming Languages. Prentice-Hall, NY, 1987.
Planck, Max. Treatise on Thermodynamics. Transl. Ogg, A., Dover Publ., NY, 1945.
Ressler, A.L. The Design of a Conservative Logic Computer and a Graphical Editor Simulator. M.S. Th., MIT, 1981, 128p.
de Roever, Willem P. “On Backtracking and Greatest Fixpoints”. In Neuhold, Erich J., Ed. Formal Description of Programming Concepts, North-Holland, Amsterdam, 1978.
Romanenko, Alexander. “Inversion and Metacomputation”. ACM PEPM'91, New Haven, CT, June 1991,12-22.
Rosenschein, Stanley J. “Plan Synthesis: A Logical Perspective”. Proc. IJCAI-81, Vancouver, Canada, Aug. 1981, 331–337.
Ruggieri, C. & Murtagh, T. P. “Lifetime analysis of dynamically allocated objects”. ACM POPL 88,285–293.
Schorr, H., & Waite, W.M. “An efficient machine-independent procedure for garbage collection in various list structures”. CACM 10,8 (Aug. 1967),501–506.
Shoman, Y., and McDermott, D.V. “Directed Relations and Inversion of Prolog Programs”. Proc. Conf. of 5th Gen. Comp. Sys., ICOT, 1984.
Sleator, D.D. & Tarjan, R.E. “Amortized Efficiency of List Update and Paging Rules”. CACM 28,2 (Feb. 1985),202–208.
Smith, J.M., and Maguire, G.Q., Jr. “Transparent concurrent execution of mutually exclusive alternatives”. Proc. 9th Int'l. Conf. on Distr. Computer Sys., Newport Bch., CA, June 1989.
Strom, R.E., et al. “A recoverable object store”. IBM Watson Research Ctr., 1988.
Strothotte, T.W., and Cormack, G.V. “Structured Program Lookahead”. Comput. Lang. 12,2 (1987),95–108.
Suzuki, N. “Analysis of Pointer ‘Rotation'”. CACM 25,5 (May 1982)330–335.
Toffoli, T. “Reversible Computing”. MIT/LCS/TM-151, Feb. 1980, 36p.
Toffoli, T. “Reversible Computing”. In De Bakker & van Leeuwen, eds. Automata, Languages and Programming. Springer-Verlag (1980),632–644.
Toffoli, T. “Bicontinuous Extensions of Invertible Combinatorial Functions”. Math. Sys. Theor. 14 (1981),13–23.
Toffoli, T. “Physics and Computation”. Int'l. J. Theor. Phys. 21, 3/4 (1982),165–175.
Tolmach, A.P., and Appel, A.W. “Debugging Standard ML without Reverse Engineering”. Proc. ACM Lisp & Funct. Progr. Conf., Nice, France, June 1990,1–12.
Turner, D. “A New Implementation Technique for Applicative Languages”. SW—Pract.&Exper. 9 (1979),31–49.
Vitter, J.S. “US&R: a new framework for redoing”. ACM Symp. on Pract. SW Dev. Envs., Pitts., PA, April 1984,168–176.
Wadler, P. “Views: A way for pattern matching to cohabit with data abstraction”. ACM POPL 14 (1987),307–313.
Wadler, P. “Is there a use for linear logic?”. Proc. ACM PEPM'91, New Haven, June, 1991,255–273.
Wakeling, D. & Runciman, C. “Linearity and Laziness”. Proc. Funct. Progr. & Comp. Arch., Springer LNCS 523, 1991,215–240.
Wilson, P.R. & Moher, T.G. “Demonic memory for process histories”. Proc. Sigplan PLDI, June 1989.
Zelkowitz, M.V. “Reversible Execution”. CACM 16,9 (Sept. 1973),566–566.
Zurek, W.H., ed. Complexity, Entropy and the Physics of Information. Addison-Wesley, Redwood City, 1990.
Author information
Authors and Affiliations
Editor information
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Baker, H.G. (1992). NREVERSAL of fortune — The thermodynamics of garbage collection. In: Bekkers, Y., Cohen, J. (eds) Memory Management. IWMM 1992. Lecture Notes in Computer Science, vol 637. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0017210
Download citation
DOI: https://doi.org/10.1007/BFb0017210
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-55940-5
Online ISBN: 978-3-540-47315-2
eBook Packages: Springer Book Archive