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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
In previous publications, F <x< G was written as F where xG.
- 2.
An implementation can only approximate this guarantee.
- 3.
An implementation can only approximate this guarantee.
References
Armstrong, J., Virding, R., Wikström, C., Williams, M.: Concurrent Programming in ERLANG 2nd edn. Prentice Hall International (UK) Ltd., Hertfordshire, UK, (1996).
Courtois, P.J., Heymans, F., Parnas, D.L.: Concurrent control with “readers” and “writers”. Commun. ACM 14(10)667–668 (1971).
Fisher, R., Yates, F.: Statistical Tables for Biological, Agricultural and Medical Research. Oliver and Boyd, London, 3rd edn. (1948).
Hewitt, C., Bishop, P., Steiger, R.: A universal modular actor formalism for artificial intelligence. International Joint Conference on Artificial Intelligence (1973).
Hoare, C.A.R.: Partition: Algorithm 63, quicksort: Algorithm 64, and find: Algorithm 65. Commun. the ACM 4(7)321–322 (1961).
Hoare, C.A.R.: Communicating sequential processes. Commun. ACM 21(8)666–677 (1978).
Kitchin, D., Cook, W.R., Misra, J.: A language for task orchestration and its semantic properties. In: CONCUR, pp. 477–491 (2006).
Kitchin, D., Quark, A., Cook, W., Misra, J.: The Orc programming language. In Lee, D., Lopes, A., Poetzsch-Heffter, A: (eds.) Formal Techniques for Distributed Systems; Proceedings of FMOODS/FORTE, vol. 5522 of LNCS, pp. 1–25. Springer, Lisbon (2009).
Kitchin, D., Quark, A., Cook, W.R., Misra, J.: Orc user guide. http://orc.csres.utexas.edu/userguide/html/index.html.
Knuth, D.E.: Seminumerical Algorithms, vol. 2 of The Art of Computer Programming, 3rd edn. Addison-Wesley, Reading, (1997).
Knuth, D.E.: Sorting and Searching, vol. 2 of The Art of Computer Programming, 2nd edn. Addison-Wesley, Reading, MA (1998).
Milner, R.: A Calculus of Communicating Systems. Springer LNCS Vol. 12, Springer-Verlag (1980).
Milner, R.: Communicating and Mobile Systems: the π-Calculus. Cambridge University Press, Cambridge (May 1999).
Misra, J.: Computation orchestration: A basis for wide-area computing. In Broy, M: (ed.) Proc. of the NATO Advanced Study Institute, Engineering Theories of Software Intensive Systems, NATO ASI Series, Marktoberdorf, Germany, (2004).
Paulson, L.C.: ML for the Working Programmer. Cambridge University Press, Cambridge (1991).
Quark, A., Kitchin, D., Cook, W.R., Misra, J.: Orc language project website. http://orc.csres.utexas.edu.
Sedgewick, R.: Quicksort. PhD thesis, Stanford University (1975).
Wehrman, I., Kitchin, D., Cook, W., Misra, J.: A timed semantics of Orc. Theoret. Comput. Sci. 402(2–3)234–248 (August 2008).
Wehrman, I., Kitchin, D., Cook, W.R., Misra, J.: Properties of the timed operational and denotational semantics of Orc. Technical Report TR-07-65, The University of Texas at Austin, Department of Computer Sciences (December 2007).
Acknowledgements
Jayadev Misra is deeply grateful to Tony Hoare for research ideas, inspiration,and personal friendship spanning over 3 decades. It is no exaggeration that hewould not have pursued certain research directions, that have ultimately provedquite successful, had it not been for Tony’s encouragement. This paper is a smalltoken of appreciation.
The authors are indebted to Doug McIlroy and Manuel Serrano fortheir careful reading of this manuscript and many perceptive commentsand suggestions. Our long-time collaborators, Albert Benveniste, ClaudeJard, and Jose Meseguer have helped us refine the underlying ideas ofOrc.
This work is partially supported by National Science Foundation grant CCF-0811536.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer London
About this chapter
Cite this chapter
Kitchin, D., Quark, A., Misra, J. (2010). Quicksort: Combining Concurrency, Recursion, and Mutable Data Structures. In: Roscoe, A., Jones, C., Wood, K. (eds) Reflections on the Work of C.A.R. Hoare. Springer, London. https://doi.org/10.1007/978-1-84882-912-1_11
Download citation
DOI: https://doi.org/10.1007/978-1-84882-912-1_11
Published:
Publisher Name: Springer, London
Print ISBN: 978-1-84882-911-4
Online ISBN: 978-1-84882-912-1
eBook Packages: Computer ScienceComputer Science (R0)