Project Description

Sikraken is a research tool that aims to generate test inputs to achieve a high level of branch coverage against a broad, well-established C code benchmark. It was developed by Christophe Meudec. The yearly tool competition TestComp is the leading benchmark for such tools. My Pre Analysis tool aids Sikraken to analyse the C code in a better way by simplifying the code.

Current functionalities

Representing Hexadecimal Floating Point numbers

In the previous version of the preprocessor, hexadecimal floating point numbers were not parsed and transformed into Sikraken compatible format. In the previous version, a hexadecimal input was transformed from 0x1.FFFFFEp+127 to double(0x1.FFFFFEp+127), which was later transformed to hex_float(float, "1.FFFFFE", 127) in Prolog format.

Restricting Integer variables to a valid subset

C is a permissive language, and in some aspects, there are no strictly defined rules. One of the examples is signed long int. This statement can also be written simply as long. The problem gets worse when we use unconventional ways of writing C code, such as: int long signed long a. This statement is valid but does not look very good. This becomes more complicated when structures or unions are encountered due to nested declarations. The goal of this requirement was to restrict these declarations to a restricted valid subset, like signed long long int to simply long.

Generating Control Flow Graph

Control Flow Graphs are one of the important aspects of testing tools in order to understand the flow of an application and identify isolated nodes. A graph visualization tool called GraphViz helps us to visualize the graphs in PNG format using generated dot format code from the preprocessor.

Technologies




Documents

Below are the important documents related to this project: