Abstract
This paper presents initial ideas for the design and implementation of a reversible object-oriented language based on extending Janus with object-oriented concepts such as classes that encapsulate behavior and state, inheritance, virtual dispatching, as well as constructors. We show that virtual dispatching is a reversible decision mechanism easily translatable to a standard reversible programming model such as Janus, and we argue that reversible management of state can be accomplished using reversible constructors. The language is implemented in terms of translation to standard Janus programs.
The authors acknowledge partial support from COST Action IC1405 Reversible Computation. H.B. Axelsen was supported by the Danish Council for Independent Research \(\mid \) Natural Sciences under the Foundations of Reversible Computing project.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
We here follow the memory model of Janus, where variables can be dynamically allocated on the call stack using a local declaration that initializes the variable to a given value, but must symmetrically by deallocated using a delocal declaration that must provide the final value of the variable, resetting the memory and providing an initializer for the variable when running the program in reverse.
- 2.
Source code for compiler, examples, and generated Janus programs are available at https://github.com/joule-lang/joule/tree/master/doc/papers/rc16.
References
Chirila, C.B., Crescenzo, P., Lahire, P.: Reverse inheritance: improving class library reuse in Eiffel. In: Langages et Modeles a Objets (2007)
Hansen, J.S.K.: Translation of a reversible functional programming language. Master’s thesis, Department of Computer Science, University of Copenhagen (2014)
James, R.P., Sabry, A.: Theseus: a high level language for reversible computing, work-in-progress report at RC (2014). http://www.cs.indiana.edu/~sabry/papers/theseus.pdf
Kristensen, B.B., Madsen, O.L., Møller-Pedersen, B.: The when, why and why not of the beta programming language. In: Proceedings of the Third ACM SIGPLAN Conference on History of Programming Languages, pp. 10-1–10-57. HOPL III, NY, USA (2007). http://doi.acm.org/10.1145/1238844.1238854
Meyer, B.: Object-Oriented Software Construction, vol. 2. Prentice Hall, New York (1988)
Mogensen, T.: Garbage collection for reversible functional languages. In: Krivine, J., Stefani, J.B. (eds.) RC 2015. LNCS, vol. 9138, pp. 79–94. Springer, Heidelberg (2015)
Yokoyama, T., Axelsen, H.B., Glück, R.: Principles of a reversible programming language. In: Proceedings of Computing Frontiers, pp. 43–54. ACM (2008)
Yokoyama, T., Axelsen, H.B., Glück, R.: Towards a reversible functional language. In: De Vos, A., Wille, R. (eds.) RC 2011. LNCS, vol. 7165, pp. 14–29. Springer, Heidelberg (2012)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing Switzerland
About this paper
Cite this paper
Schultz, U.P., Axelsen, H.B. (2016). Elements of a Reversible Object-Oriented Language. In: Devitt, S., Lanese, I. (eds) Reversible Computation. RC 2016. Lecture Notes in Computer Science(), vol 9720. Springer, Cham. https://doi.org/10.1007/978-3-319-40578-0_10
Download citation
DOI: https://doi.org/10.1007/978-3-319-40578-0_10
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-40577-3
Online ISBN: 978-3-319-40578-0
eBook Packages: Computer ScienceComputer Science (R0)