Automated Formal Static Analysis and Retrieval of Source Code - JKU
Automated Formal Static Analysis and Retrieval of Source Code - JKU
Automated Formal Static Analysis and Retrieval of Source Code - JKU
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Chapter 2<br />
Program Verification by Symbolic<br />
Execution in Theorema<br />
2.1 Background<br />
2.1.1 Program Verification<br />
The desire <strong>of</strong> the s<strong>of</strong>tware developers was, is <strong>and</strong> will be to write programs without bugs. For the<br />
achievement <strong>of</strong> this goal they try to combine the following techniques: programming language<br />
design, debugging, testing.<br />
Programming language design represents the main step in writing a correct s<strong>of</strong>tware. The<br />
facilities <strong>of</strong> the nowadays programming languages (type systems, abstract data types, inheritance<br />
<strong>and</strong> encapsulation for object oriented programming, etc.) provide writing s<strong>of</strong>tware at high level<br />
<strong>of</strong> abstraction <strong>and</strong> implicitly reduce the number <strong>of</strong> possible errors.<br />
By debugging, one can reduce the number <strong>of</strong> bugs in a s<strong>of</strong>tware program in a systematic way<br />
such that it behaves as expected.<br />
Testing is an empirical step towards the s<strong>of</strong>tware verification. It is performed with the intention<br />
<strong>of</strong> finding s<strong>of</strong>tware bugs but it can not provide the certainty <strong>of</strong> s<strong>of</strong>tware correctness.<br />
Nighter <strong>of</strong> these techniques, nor their combination give a s<strong>of</strong>tware correctness pro<strong>of</strong>.<br />
Program verification is, instead, the technique which insures or disproves the correctness <strong>of</strong> a<br />
computer program with respect to a specification.<br />
We are interested in verifying programs using theorem proving, more specifically automated<br />
theorem proving.<br />
2.1.1.1 Theorem Proving in Program Verification<br />
We approach the problem <strong>of</strong> program (algorithm) verification from the formal static point <strong>of</strong> view,<br />
that is, we analyze the program without executing it. More precisely, we use an approach in the<br />
Hoare ([Hoa69]) like style.<br />
In this formal system, the program correctness problem is formulated as follows: using a<br />
calculus involving the program statements, the verification conditions which arise from program<br />
analysis are generated <strong>and</strong> proven to be theorems. They are logical formulae <strong>and</strong> state the fact that<br />
7