This chapter provides further examples of the software correctness by construction method. The examples are fairly diverse. They range from sorting in a specialised context (the Dutch National Flag problem), discovering segmental properties of an array (the longest segment and the longest palindrome problems), raster drawing algorithms, the majority voting problem and an example from computational geometry. It will be clear that conventional “hack into correctness” approaches to software development would be hard-pressed to come up with correct versions of these algorithms.
KeywordsConvex Polygon Axial Line Select Statement Assignment Rule Loop Body
- 1.A. Aho, M. Lam, R. Sethi, J. Ullman, Compilers: Principles, Techniques and Tools, 2nd edn. (Pearson Education, 2007), ISBN-10: 0321491696, ISBN-13: 9780321491695Google Scholar
- 14.J.D. Foley, A. van Dam, S.K. Feiner, J.F. Hughes, Computer Graphics: Principles and Practice in C, 2nd edn. (Pearson, New York, 1995)Google Scholar
- 23.J. Gutknecht, Pulling rabbits out of a hat. South African Comput. J. 3, 1–4 (1990)Google Scholar