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 1<br />
Introduction<br />
From the h<strong>and</strong>-pro<strong>of</strong> from the 1950’s until the nowadays sophisticated automated tools, the main<br />
goal was the same: proving program (algorithm, s<strong>of</strong>tware) correctness.<br />
Program testing <strong>and</strong> debugging lost from the very beginning the war in being the suitable<br />
techniques for proving the program correctness. The only hope remained in the program verification.<br />
But because ,,Everything interesting about the behavior <strong>of</strong> programs is undecidable.”<br />
[paraphrase <strong>of</strong> H.G. Rice, 1953] (from A. Mœller slides on An Introduction to <strong>Analysis</strong> <strong>and</strong> Verification<br />
<strong>of</strong> S<strong>of</strong>tware), the task that had to be solved by the program verification techniques is a<br />
very challenging one.<br />
We are interested in the imperative program verification using a formal static analysis method<br />
which uses an axiomatic approach in the Hoare triple style; we are given the input (I P ) <strong>and</strong> the<br />
output (O P ) specification for an imperative program P <strong>and</strong> we want to show that the program<br />
fulfils its specification. We approach this problem using automated theorem proving, namely we<br />
automatically generate the verification conditions which arise from the program analysis <strong>and</strong> try<br />
to prove them automatically.<br />
Following the ideas <strong>of</strong> the axiomatic approach used for the generation <strong>of</strong> the verification conditions<br />
(symbolic execution <strong>and</strong> forward reasoning techniques) <strong>and</strong> for computing the program<br />
function (functional semantics method), we developed, in a logical manner, the syntax, the semantics,<br />
the partial correctness <strong>and</strong> the termination for the imperative programs which contain<br />
Return statements, assignments (including recursive calls) <strong>and</strong> conditionals (If with one <strong>and</strong><br />
two branches).<br />
For expressing these notions we use, besides the underlying theory <strong>of</strong> the programs – object<br />
theory, the environment <strong>of</strong> a meta–theory, in which the notions about reasoning about programs<br />
are expressed. In this way, one could reason also about the system which would automatize these<br />
theoretical notions.<br />
The program termination problem is known to be undecidable, but some gains were achieved<br />
in the last years in [CS02], [B. 06a], were the main goal was to find termination pro<strong>of</strong>s for programs<br />
(liveness property) <strong>and</strong> in [HJMS], [B. 06b], were the emphasis is to prove that a program<br />
is not error prone (safety property).<br />
We approach the termination property in a purely logical manner, in the underlying theory <strong>of</strong><br />
programs, without requiring any model <strong>of</strong> computations <strong>of</strong> programs. For example, in the case <strong>of</strong><br />
1