Toward an Energy Efficient Language and Compiler for (Partially) Reversible Algorithms

  • Nirvan TyagiEmail author
  • Jayson LynchEmail author
  • Erik D. DemaineEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9720)


We introduce a new programming language for expressing reversibility, Energy-Efficient Language (Eel), geared toward algorithm design and implementation. Eel is the first language to take advantage of a partially reversible computation model, where programs can be composed of both reversible and irreversible operations. In this model, irreversible operations cost energy for every bit of information created or destroyed. To handle programs of varying degrees of reversibility, Eel supports a log stack to automatically trade energy costs for space costs, and introduces many powerful control logic operators including protected conditional, general conditional, protected loops, and general loops. In this paper, we present the design and compiler for the three language levels of Eel along with an interpreter to simulate and annotate incurred energy costs of a program.


Energy Cost Forward Direction Control Logic Conditional Statement Program Counter 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.



We thank Geronimo Mirano for useful discussion in differentiating and developing our language levels. We also thank Maria L. Messick and Licheng Rao for help in early programming of the Eel compiler.


  1. 1.
    Axelsen, H.B.: Clean translation of an imperative reversible programming language. In: Knoop, J. (ed.) CC 2011 and ETAPS 2011. LNCS, vol. 6601, pp. 144–163. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  2. 2.
    Axelsen, H.B., Glück, R., Yokoyama, T.: Reversible machine code and its abstract processor architecture. In: Diekert, V., Volkov, M.V., Voronkov, A. (eds.) CSR 2007. LNCS, vol. 4649, pp. 56–69. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  3. 3.
    Bennett, C.H.: Logical reversibility of computation. Maxwell Demon. Entropy Inf. Comput. 197–204 (1973).
  4. 4.
    Charles, H.: Bennett. time/space trade-offs for reversible computation. SIAM J. Comput. 18(4), 766–776 (1989)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Buhrman, H., Tromp, J., Vitányi, P.M.B.: Time and space bounds for reversible simulation. In: Orejas, F., Spirakis, P.G., van Leeuwen, J. (eds.) ICALP 2001. LNCS, vol. 2076, p. 1017. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  6. 6.
    Demaine, E.D., Lynch, J., Mirano, G.J., Tyagi, N.: Energy-efficient algorithms. In: Proceedings of 2016 ACM Conference on Innovations in Theoretical Computer Science, pp. 321–332. ACM (2016)Google Scholar
  7. 7.
    Frank, M.P., Knight, Jr. T.F.: Reversibility for efficient computing. Ph.D. thesis, Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology (1999)Google Scholar
  8. 8.
    Landauer, R.: Irreversibility and heat generation in the computing process. IBM J. Res. Dev. 5(3), 183–191 (1961)MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Lange, K.-J., McKenzie, P., Tapp, A.: Reversible space equals deterministic space. J. Comput. Syst. Sci. 60(2), 354–367 (2000)MathSciNetCrossRefzbMATHGoogle Scholar
  10. 10.
    Lecerf, Y.: Logique mathematique-machines de turing reversibles-recursive insolubilite en nsigman de lequation u= thetanu, ou theta est un isomorphisme de codes. Comptes rendus hebdomadaires des séances de l’Académie des sciences 257(18), 2597 (1963)MathSciNetGoogle Scholar
  11. 11.
    Li, M., Vitanyi, P.: Reversible simulation of irreversible computation. In: Proceedings of 11th Annual IEEE Conference on Computational Complexity, pp. 301–306. IEEE (1996)Google Scholar
  12. 12.
    Lutz, C., Derby, H.: Janus: a time-reversible language. Caltech Class Project (1982)Google Scholar
  13. 13.
    Mogensen, T.Æ.: Partial evaluation of Janus Part 2: assertions and procedures. In: Clarke, E., Virbitskaite, I., Voronkov, A. (eds.) PSI 2011. LNCS, vol. 7162, pp. 289–301. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  14. 14.
    Mogensen, T.Æ., Partial evaluation of the reversible language Janus. In: Proceedings of 20th ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, pp. 23–32. ACM (2011)Google Scholar
  15. 15.
    Perumalla, K., Fujimoto, R.: Source code transformations for efficient reversibility. Coll. Comput. Georgia Inst. Technol. (1999).
  16. 16.
    Somavat, P., Namboodiri, V., et al.: Energy consumption of personal computing including portable communication devices. J. Green Eng. 1(4), 447–475 (2011)Google Scholar
  17. 17.
    Stoddart, B., Lynas, R., Zeyda, F.: A virtual machine for supporting reversible probabilistic guarded command languages. Electron. Notes Theoret. Comput. Sci. 253(6), 33–56 (2010)CrossRefGoogle Scholar
  18. 18.
    Thomsen, M.K., Axelsen, H.B., Glück, R.: A reversible processor architecture and its reversible logic design. In: Vos, A., Wille, R. (eds.) RC 2011. LNCS, vol. 7165, pp. 30–42. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  19. 19.
    Vieri, C., Ammer, M.J., Frank, M., Margolus, N., Knight, T.: A fully reversible asymptotically zero energy microprocessor. In: Power Driven Microarchitecture Workshop, pp. 138–142. Citeseer (1998)Google Scholar
  20. 20.
    Vieri, C.J.: Reversible computer engineering and architecture. Ph.D. thesis, Massachusetts Institute of Technology (1999)Google Scholar
  21. 21.
    Yokoyama, T.: Reversible computation and reversible programming languages. Electron. Notes Theoret. Comput. Sci. 253(6), 71–81 (2010)CrossRefGoogle Scholar
  22. 22.
    Yokoyama, T., Axelsen, H.B., Glück, R.: Principles of a reversible programming language. In: Proceedings of 5th Conference on Computing Frontiers, pp. 43–54. ACM (2008)Google Scholar
  23. 23.
    Yokoyama, T., Glück, R.: A reversible programming language and its invertible self-interpreter. In: Proceedings of 2007 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-based Program Manipulation, pp. 144–153. ACM (2007)Google Scholar
  24. 24.
    Zuliani, P.: Logical reversibility. IBM J. Res. Dev. 45(6), 807–818 (2001)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  1. 1.MIT CSAILCambridgeUSA

Personalised recommendations