Abstract
As in other applications of mathematical induction (see Example 4.1), the main challenge in applying the inductive assertion method is discovering extra information to make the inductive argument succeed. Consider a typical partial correctness property that asserts that a function’s output satisfies some relation with its input. Assuming this property as the inductive hypothesis does not provide any information about how the function behaves between entry and exit. It is a weak hypothesis. Therefore, one must provide more information about the function in the form of additional program annotations. Section 6.1 discusses strategies for discovering this additional information. Section 6.2 applies the strategies to prove that QuickSort always returns a sorted array.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
Bibliographic Remarks
C. A. R. Hoare. An axiomatic basis for computer programming. Communications of the ACM, 12(10):576–580, October 1969.
Rights and permissions
Copyright information
© 2007 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
(2007). Program Correctness: Strategies. In: The Calculus of Computation. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-74113-8_6
Download citation
DOI: https://doi.org/10.1007/978-3-540-74113-8_6
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-74112-1
Online ISBN: 978-3-540-74113-8
eBook Packages: Computer ScienceComputer Science (R0)