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.

55<br />

How the database is used. For each method <strong>and</strong> specification we build the unique key <strong>and</strong><br />

retrieve its content. For making persistent the information, we insert it in the database, where the<br />

tables for callables <strong>and</strong> specifications have the structure from the tables 4.1 <strong>and</strong> 4.2.<br />

CREATE TABLE IF NOT EXISTS callables (<br />

key INTEGER PRIMARY KEY,<br />

hit def key TEXT NOT NULL,<br />

specification id INTEGER)<br />

Table 4.1: Callables Table<br />

CREATE TABLE IF NOT EXISTS specifications (<br />

key INTEGER PRIMARY KEY,<br />

hit def key TEXT NOT NULL)<br />

Table 4.2: Specification Table<br />

In the callables table there must exist a column where the id <strong>of</strong> the corresponding specification<br />

has to be inserted, if the specification exists.<br />

With the query:<br />

SELECT callables.hit def key, specifications.hit def key FROM callables,<br />

specifications WHERE callables.specification id = specifications.key,<br />

one can obtain the name <strong>of</strong> the method <strong>and</strong> the corresponding specification that are further transformed<br />

into Theorema syntax, syntax recognized by our verification conditions generator.<br />

For full integration <strong>of</strong> the methods, the Java methods have to be transformed such that the<br />

Return statement occurs on every branch. On the other side, we must add support for the while<br />

statement in the program analysis with FwdVCG.

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

Saved successfully!

Ooh no, something went wrong!