Download PDFOpen PDF in browserUtilizing Hoare Logic to Strengthen Testing for Error Detection in Programs10 pages•Published: June 22, 2012AbstractHoare logic (also known as Floyd-Hoare logic) can be used to formally verify the correctness of programs while testing provides a practical way to detect errors in programs. Unfortunately, the former is rarely applied in practice and the later is difficult to detect all existing errors. In this paper, we propose a novel technique that makes good use of Hoare logic to strengthen testing. The essential idea is first to use specification-based testing to discover all traversed program paths and then to use Hoare logic to prove their correctness. During the proof process, all errors on the paths can be detected. A case study is conducted to show its feasibility; an example taken from the case study is used to illustrate how the proposed method is applied; and discussion on the potential challenges to the method is presented.Keyphrases: hoare logic, program analysis, software testing, specification based testing In: Andrei Voronkov (editor). Turing-100. The Alan Turing Centenary, vol 10, pages 229-238.
|