Asian Symposium on Programming Languages and Systems

Programming Languages and Systems pp 407-426

Programming Techniques for Reversible Comparison Sorts

Conference paper

DOI: 10.1007/978-3-319-26529-2_22

Part of the Lecture Notes in Computer Science book series (LNCS, volume 9458)
Cite this paper as:
Axelsen H.B., Yokoyama T. (2015) Programming Techniques for Reversible Comparison Sorts. In: Feng X., Park S. (eds) Programming Languages and Systems. Lecture Notes in Computer Science, vol 9458. Springer, Cham


A common approach to reversible programming is to reversibly simulate an irreversible program with the desired functionality, which in general puts additional pressure on the computational resources (time, space.) If the same running time is required, ensuring a minimal space overhead is a significant programming challenge.

We introduce criteria for the optimality of reversible simulation: A reversible simulation is faithful if it incurs no asymptotic time overhead and bounds the space overhead (the garbage) by some function g(n), and hygienic if g is (asymptotically) optimal for faithful simulation.

We demonstrate the programming techniques used to develop faithful and hygienic reversible simulations of several well-known comparison sorts, e.g. insertion sort and quicksort, using representations of permutations in both the output and intermediate additional space required.

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  1. 1.DIKU, Department of Computer ScienceUniversity of CopenhagenCopenhagenDenmark
  2. 2.Department of Software EngineeringNanzan UniversityNagoyaJapan

Personalised recommendations