Abstract
This paper presents the design and implementation Joule\(^R\), a reversible object-oriented language in the style of Janus, that supports common object-oriented programming patterns such as factories, iterators, and the definition of abstract datatypes. Memory management is performed using a simple notion of regions, enabling the full power of object-oriented programming to be used, while remaining completely garbage-free. The language is implemented by translation to Janus.
The author acknowledges partial support from COST Action IC1405 Reversible Computation.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
The techniques presented in this paper are independent of the translation approach, and also work when compiling to a low-level reversible architecture.
- 2.
This translation approach implies many runtime checks in the underlying Janus implementation, since array indices are computed at runtime and Janus disallows update statements that modify an array cell based on a computation that uses this same array cell on the right-hand side of the update statement.
References
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). https://doi.org/10.1007/978-3-642-38986-3_9
Cservenka, M.H.: Design and implementation of dynamic memory management in a reversible object-oriented programming language. Master’s thesis, DIKU, University of Copenhagen (2018). https://arxiv.org/abs/1804.05097
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-oriented Software. Addison-Wesley (1995)
Gay, D., Aiken, A.: Language support for regions. In: Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation, PLDI 2001, pp. 70–80. ACM, New York (2001)
Haulund, T., Mogensen, T.Æ., Glück, R.: Implementing reversible object-oriented language features on reversible machines. In: Phillips, I., Rahaman, H. (eds.) RC 2017. LNCS, vol. 10301, pp. 66–73. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-59936-6_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). https://doi.org/10.1007/978-3-319-40578-0_10
Tofte, M., Talpin, J.P.: Region-based memory management. Inf. Comput. 132(2), 109–176 (1997)
Yokoyama, T., Axelsen, H.B., Glück, R.: Principles of a reversible programming language. In: Computing Frontiers, Proceedings, pp. 43–54. ACM (2008)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer Nature Switzerland AG
About this paper
Cite this paper
Schultz, U.P. (2018). Reversible Object-Oriented Programming with Region-Based Memory Management. In: Kari, J., Ulidowski, I. (eds) Reversible Computation. RC 2018. Lecture Notes in Computer Science(), vol 11106. Springer, Cham. https://doi.org/10.1007/978-3-319-99498-7_22
Download citation
DOI: https://doi.org/10.1007/978-3-319-99498-7_22
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-99497-0
Online ISBN: 978-3-319-99498-7
eBook Packages: Computer ScienceComputer Science (R0)