Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

Data Structures and Dynamic Memory Management in Reversible Languages

  • Conference paper
  • First Online:
Reversible Computation (RC 2018)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 11106))

Included in the following conference series:

Abstract

We present a method for reversible dynamic memory management based on a reversible version of the Buddy Memory system. This method supports decoupled allocation and deallocation of variable-sized records and can be applied to any reversible language with heap storage. We demonstrate how these new capabilities allow for the direct realization of commonplace data structures such as trees, heaps and queues which until now has not been practical in a reversible language. Finally, we provide a definition of our method in the high-level reversible language Janus as well as a description of its fragmentation and garbage-generation characteristics. The reversible memory management system has been fully implemented and tested in a compiler for a reversible object-oriented programming language targeting the reversible assembly language PISA.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    Source code available at: https://github.com/cservenka/ROOPLPPC.

  2. 2.

    https://github.com/cservenka/ROOPLPPC.

  3. 3.

    We have rehosted PendVM at https://github.com/TueHaulund/PendVM.

References

  1. 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

    Chapter  MATH  Google Scholar 

  2. Brodal, G.S., Demaine, E.D., Munro, J.I.: Fast allocation and deallocation with an improved buddy system. Acta Informatica 41(4–5), 273–291 (2005)

    Article  MathSciNet  Google Scholar 

  3. Cservenka, M.H.: Design and Implementation of Dynamic Memory Management in a Reversible Object-Oriented Programming Language. Master’s thesis, University of Copenhagen, DIKU (2018). http://arxiv.org/abs/1804.05097

  4. Dahl, O.J., Nygaard, K.: SIMULA: an ALGOL-based simulation language. Commun. ACM 9(9), 671–678 (1966)

    Article  Google Scholar 

  5. Evans, J.: A scalable concurrent malloc(3) implementation for FreeBSD. In: BSDCan Conference, University of Ottawa (2006)

    Google Scholar 

  6. Frank, M.P.: Reversibility for Efficient Computing. Ph.D. thesis, Massachusetts Institute of Technology (1999)

    Google Scholar 

  7. Glück, R., Yokoyama, T.: A minimalist’s reversible while language. IEICE Trans. 100-D(5), 1026–1034 (2017)

    Google Scholar 

  8. Glück, R., Yokoyama, T.: A linear-time self-interpreter of a reversible imperative language. Comput. Softw. 33(3), 108–128 (2016)

    Google Scholar 

  9. Haulund, T.: Design and Implementation of a Reversible Object-Oriented Programming Language. Master’s thesis, University of Copenhagen, DIKU (2016). http://arxiv.org/abs/1707.07845

  10. 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

    Chapter  MATH  Google Scholar 

  11. Knowlton, K.C.: A fast storage allocator. Commun. ACM 8(10), 623–625 (1965)

    Article  Google Scholar 

  12. Knuth, D.E.: The Art of Computer Programming: Fundamental Algorithms, vol. 1. Addison-Wesley, Boston (1998)

    Google Scholar 

  13. Mogensen, T.Æ.: Reference counting for reversible languages. In: Yamashita, S., Minato, S. (eds.) RC 2014. LNCS, vol. 8507, pp. 82–94. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-08494-7_7

    Chapter  MATH  Google Scholar 

  14. 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). https://doi.org/10.1007/978-3-319-20860-2_5

    Chapter  MATH  Google Scholar 

  15. 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

    Chapter  MATH  Google Scholar 

  16. Vieri, C.J.: Pendulum: A Reversible Computer Architecture. Master’s thesis, University of California at Berkeley (1993)

    Google Scholar 

  17. Yokoyama, T., Axelsen, H.B., Glück, R.: Principles of a reversible programming language. In: Ramírez, A., Bilardi, G., Gschwind, M. (eds.) Computing Frontiers. Proceedings, pp. 43–54. ACM (2008)

    Google Scholar 

  18. 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). https://doi.org/10.1007/978-3-642-29517-1_2

    Chapter  MATH  Google Scholar 

  19. Yokoyama, T., Glück, R.: A reversible programming language and its invertible self-interpreter. In: Ramalingam, G., Visser, E. (eds.) Partial Evaluation and Semantics-based Program Manipulation, pp. 144–153. ACM (2007)

    Google Scholar 

Download references

Acknowledgments

The authors would like to thank the European COST Action IC 1405 “Reversible Computation” for its valuable support, Ulrik Pagh Schultz and the anonymous reviewers for their insightful comments.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Martin Holm Cservenka .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Cservenka, M.H., Glück, R., Haulund, T., Mogensen, T.Æ. (2018). Data Structures and Dynamic Memory Management in Reversible Languages. 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_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-99498-7_19

  • 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)

Publish with us

Policies and ethics