Optimization of Reversible Control Flow Graphs

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

Abstract

Growing interest in reversible computation has led to an accelerated development of reversible programming languages and software, which reinforces the need for optimizing compilers. In this paper, we report on our recent progress on optimizing reversible intraprocedural control flow. Like previous work on the optimization of reversible programs, the techniques in this paper are based on the reversible intermediate language RSSA. A formalization of RSSA’s control flow as an extended directed multigraph is introduced. This serves as a basis for three analysis and optimization techniques for reversible control flow, which enable the identification and removal of a) unreachable code, b) branches between strictly consecutive code sequences, and c) immediately redirected branches. To our knowledge, this is the first work being done to investigate the optimization of reversible control flow.

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

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.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 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free ship** worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    T = conditional True, F = conditional False and U = Unconditional.

References

  1. Aho, A.V., Lam, M.S., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, & Tools. Pearson Education (2006)

    Google Scholar 

  2. Allen, F.E.: Control flow analysis. In: Proceedings of a Symposium on Compiler Optimization, pp. 1–19. Urbana-Champaign, Illinois (1970)

    Google Scholar 

  3. Axelsen, H.B., Glück, R., Yokoyama, T.: Reversible machine code and its abstract processor architecture. In: Computer Science – Theory and Applications, pp. 56–69. Ekaterinburg, Russia (2007)

    Google Scholar 

  4. Bennett, C.H.: Logical reversibility of computation. IBM J. Res. Dev. 17(6), 525–532 (1973)

    Article  MathSciNet  MATH  Google Scholar 

  5. Deworetzki, N., Kutrib, M., Meyer, U., Ritzke, P.D.: Optimizing reversible programs. In: Reversible Computation, pp. 224–238. Urbino, Italy (2022)

    Google Scholar 

  6. Deworetzki, N., Meyer, U.: Program analysis for reversible languages. In: Proceedings of the 10th ACM SIGPLAN International Workshop on the State Of the Art in Program Analysis, pp. 13–18. Virtual, Canada (2021)

    Google Scholar 

  7. Frank, M.P.: The future of computing depends on making it reversible. IEEE Spectrum (2017)

    Google Scholar 

  8. Glück, R., Yokoyama, T.: Reversible computing from a programming language perspective. Theoretical Comput. Sci. (2023)

    Google Scholar 

  9. Haulund, T.: Design and implementation of a reversible object-oriented programming language. ar**v preprint ar**v:1707.07845 (2017)

  10. Kaarsgaard, R., Axelsen, H.B., Glück, R.: Join Inverse categories and reversible recursion. J. Logical Algebraic Methods Program. 87, 33–50 (2017)

    Article  MathSciNet  MATH  Google Scholar 

  11. Landauer, R.: Irreversibility and heat generation in the computing process. IBM J. Res. Dev. 5(3), 183–191 (1961)

    Article  MathSciNet  MATH  Google Scholar 

  12. Mogensen, T.Æ.: RSSA: a reversible SSA form. In: Mazzara, M., Voronkov, A. (eds.) PSI 2015. LNCS, vol. 9609, pp. 203–217. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-41579-6_16

    Chapter  Google Scholar 

  13. Storrs Hall, J.: A reversible instruction set architecture and algorithms. In: Proceedings Workshop on Physics and Computation. PhysComp ’94, pp. 128–134 (1994)

    Google Scholar 

  14. Vieri, C.J.: Pendulum: a reversible computer architecture. Ph.D. thesis, Massachusetts Institute of Technology (1995)

    Google Scholar 

  15. Yokoyama, T., Axelsen, H.B., Glück, R.: Principles of a reversible programming language. In: Proceedings of the 5th Conference on Computing Frontiers, pp. 43–54 (2008)

    Google Scholar 

  16. Yokoyama, T., Axelsen, H.B., Glück, R.: Towards a reversible functional language. In: International Workshop on Reversible Computation, pp. 14–29 (2011)

    Google Scholar 

  17. Yokoyama, T., Axelsen, H.B., Glück, R.: Fundamentals of Reversible Flowchart Languages. Theoret. Comput. Sci. 611, 87–115 (2016)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Niklas Deworetzki or Lukas Gail .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Deworetzki, N., Gail, L. (2023). Optimization of Reversible Control Flow Graphs. In: Kutrib, M., Meyer, U. (eds) Reversible Computation. RC 2023. Lecture Notes in Computer Science, vol 13960. Springer, Cham. https://doi.org/10.1007/978-3-031-38100-3_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-38100-3_5

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-38099-0

  • Online ISBN: 978-3-031-38100-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics

Navigation