13.06.2014 Views

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

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

12CHAPTER 2. PROGRAM VERIFICATION BY SYMBOLIC EXECUTION IN THEOREMA<br />

PREfix ([BPS00]) is also based essentially on symbolic execution. It is a tool used for detecting<br />

dynamic memory bugs <strong>of</strong> C/C++ commercial applications.<br />

2.1.3 Program Verification in the Theorema System<br />

Theorema ([BCJ + 06]) is a computer aided mathematical s<strong>of</strong>tware which is being developed at the<br />

Research Institute for Symbolic Computation (RISC) in Hagenberg, Austria.<br />

The system <strong>of</strong>fers support for computing, proving <strong>and</strong> solving mathematical expressions using<br />

specified knowledge bases, by applying several simplifiers, solvers <strong>and</strong> provers in natural style,<br />

which imitate the heuristics used by human provers<br />

Composing, structuring <strong>and</strong> manipulating mathematical texts is also possible in the Theorema<br />

system, using labeling (Definition, Theorem, Proposition).<br />

For our approach (imperative program verification), it is very important that the Theorema<br />

system provides a very expressive way to express algorithms: they are written in the language <strong>of</strong><br />

predicate logic with equality as rewrite rules.<br />

Theorema provides elegant pro<strong>of</strong>s (because <strong>of</strong> natural style inferences used) in the verification<br />

process <strong>of</strong> programs. Moreover, being built on top <strong>of</strong> the computer algebra system Mathematica<br />

([Wol03]), it has access to many computing <strong>and</strong> solving algorithms.<br />

Currently, Theorema system has support for imperative <strong>and</strong> functional program verification.<br />

Imperative program verification using Hoare logic <strong>and</strong> weakest precondition strategy was<br />

started in [Kir99] <strong>and</strong> continued with [Kov07].<br />

The verification environment built in [Kir99] aims at educational purposes, namely for formal<br />

program specification, annotations, correctness pro<strong>of</strong>s. It provides a Theorema language<br />

for writing imperative programs together with their specification, a tool for executing them <strong>and</strong><br />

also a tool for the generation <strong>of</strong> the verification conditions (VCG). The verification conditions are<br />

proved/disproved to be valid using the various Theorema simplifiers <strong>and</strong> provers.<br />

Insight to the problem <strong>of</strong> invariant generation is given by [Kov07], where logical, combinatorial<br />

<strong>and</strong> algebraic techniques work together for the automatic generation (using the Aligator<br />

package) <strong>of</strong> the invariants for loops containing assignments, sequences <strong>and</strong> conditionals.<br />

Functional program verification environment in the Theorema system ([PJ03]) considers a<br />

main function (with its specification) <strong>and</strong> a tail recursive auxiliary function (without specification).<br />

A method which generates automatically the specification <strong>of</strong> the auxiliary function using algebraic<br />

techniques is developed. The specification is then used for generating the verification conditions<br />

for both the auxiliary <strong>and</strong> the main functions using fixpoint theory technique.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!