Abstract
We extend the reversible language Janus with support for class-based object-oriented programming, class inheritance and subtype-polymorphism. We describe how to implement these features on reversible hardware - with emphasis on the implementation of reversible dynamic dispatch using virtual method tables. Our translation is effective (i.e. garbage-free) and we demonstrate its practicality by implementation of a fully-featured compiler targeting the reversible assembly language PISA.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Axelsen, H.B.: Clean translation of an imperative reversible programming language. In: Knoop, J. (ed.) CC 2011. LNCS, vol. 6601, pp. 144–163. Springer, Heidelberg (2011). doi:10.1007/978-3-642-19861-8_9
Axelsen, H.B., Glück, R.: Reversible representation and manipulation of constructor terms in the heap. In: Dueck, G.W., Miller, D.M. (eds.) RC 2013. LNCS, vol. 7948, pp. 96–109. Springer, Heidelberg (2013). doi:10.1007/978-3-642-38986-3_9
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). doi:10.1007/978-3-540-74510-5_9
Frank, M.P.: The R programming language and compiler, MIT Reversible Computing Project Memo #M8 (1997)
Frank, M.P.: Reversibility for efficient computing. Ph.D. thesis, Massachusetts Institute of Technology (1999)
Haulund, T.: Design and Implementation of a Reversible Object-Oriented Programming Language. Master’s thesis, University of Copenhagen, DIKU (2016)
Lutz, C.: Janus: a time-reversible language, Letter to R. Landauer (1986)
Mogensen, T.Æ.: Reference counting for reversible languages. In: Yamashita, S., Minato, S. (eds.) RC 2014. LNCS, vol. 8507, pp. 82–94. Springer, Cham (2014). doi:10.1007/978-3-319-08494-7_7
Mogensen, T.Æ.: Garbage collection for reversible functional languages. In: Krivine, J., Stefani, J.-B. (eds.) RC 2015. LNCS, vol. 9138, pp. 79–94. Springer, Cham (2015). doi:10.1007/978-3-319-20860-2_5
Schultz, U.P., Axelsen, H.B.: Elements of a reversible object-oriented language. In: Devitt, S., Lanese, I. (eds.) RC 2016. LNCS, vol. 9720, pp. 153–159. Springer, Cham (2016). doi:10.1007/978-3-319-40578-0_10
Yokoyama, T., Axelsen, H.B., Glück, R.: Principles of a reversible programming language. In: Computing Frontiers, pp. 43–54. ACM (2008)
Yokoyama, T., Glück, R.: A reversible programming language and its invertible self-interpreter. In: Partial Evaluation and Semantics-based Program Manipulation, pp. 144–153. ACM (2007)
Acknowledgments
The authors would like to thank the European COST Action IC 1405 “Reversible Computation” for its valuable support and Ulrik Pagh Schultz for his insightful comments.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this paper
Cite this paper
Haulund, T., Mogensen, T.Æ., Glück, R. (2017). Implementing Reversible Object-Oriented Language Features on Reversible Machines. In: Phillips, I., Rahaman, H. (eds) Reversible Computation. RC 2017. Lecture Notes in Computer Science(), vol 10301. Springer, Cham. https://doi.org/10.1007/978-3-319-59936-6_5
Download citation
DOI: https://doi.org/10.1007/978-3-319-59936-6_5
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-59935-9
Online ISBN: 978-3-319-59936-6
eBook Packages: Computer ScienceComputer Science (R0)