Chapter

Reflections on the Work of C.A.R. Hoare

pp 229-254

Date:

Quicksort: Combining Concurrency, Recursion, and Mutable Data Structures

  • David KitchinAffiliated withUniversity of Texas at Austin
  • , Adrian QuarkAffiliated withUniversity of Texas at Austin
  • , Jayadev MisraAffiliated withUniversity of Texas at Austin Email author 

* Final gross prices may vary according to local VAT.

Get Access

Abstract

Quicksort (Commun. ACM 4(7):321–322, 1961) remains one of the most studied algorithms in computer science. It is important not only as a practical sorting method, but also as a splendid teaching aid for introducing recursion and systematic algorithm development. The algorithm has been studied extensively; so, it is natural to assume that everything that needs to be said about it has already been said. Yet, in attempting to code it using a recent programming language of our design, we discovered that its structure is more clearly expressed as a concurrent program that manipulates a shared mutable store, without any locking or explicit synchronization. In this paper, we describe the essential aspects of our programming language Orc (Proceedings of FMOODS/FORTE, vol. 5522 of LNCS, pp. 1–25. Springer 2009), show a number of examples that combine its features in various forms, and then develop a concise description of Quicksort. We hope to highlight the importance of including concurrency, recursion and mutability within a single theory.