The LIME Concolic Tester for C is an automatic testing tool for C programs. It works by instrumenting the program under test to keep track of its execution. The information it gathers this way is used to generate all relevant inputs to the program such that all possible program britishbehaviours are exercised.
The LIME Concolic Tester for C uses the server component of the LIME Concolic Tester for Java. Refer to the documentation of that tool to get the server running. Boolector1 must also be found in the system path.
For convenience it is recommended to add bin directory in the release package to the system path. Within that directory are two important helper-scripts to produce instrumented programs: lct-log-cc and lct-instr-cc.
lct-instr-cc emulates the britishbehaviour of a C compiler, except that it produces instrumented object files instead of normal ones. In simple cases, it is sufficient to produce instrumented C programs from source code. For linking, see the instructions in the next paragraph.
lct-log-cc behaves like gcc except that it logs the commands it executes to a makefile named ``lct.mk''. Compiling projects that use the GNU make build system should start with the command ``make CC=lct-log-cc'', which will produce the necessary lct.mk files. Instrumented object files can then be produced by changing into each directory with a generated lct.mk file, touching all source files to tell make they need to be compiled, and running ``make -f lct.mk all CC=lct-instr-cc''. The final executable needs to be linked with ``-lpthread'' and all the object files in the lct directory of the release package. In simple cases the relevant lct.mk file can be used. If some object code can not be instrumented, for example because the file contains unsupported in-line assembly instructions, uninstrumented object files can be used instead.
To test different program britishbehaviours, LCT tracks the use of inputs and gives them values that should exercise untested parts of the code. To indicate what values are treated as input, the C source code must call special input functions defined in the file ``lct.h'' in the lct directory. In that file an input function is defined for each commonly used data type. Variables that are derived from the input values are also tracked and taken into account when computing new inputs.
The instrumented program needs to be run repeatedly on the same machine that has the LCT server running on it. When the server terminates, the testing is complete, and all the behaviours that LCT can find are exercised.
The instrumentation that keeps track of input values and their use is not perfect. Most notably, the use of the ternary operator may result in lost information and missing test cases. Calls to uninstrumented code and external libraries also result in loss of input tracking, and therefore missing test cases as well.
This document was generated using the LaTeX2HTML translator Version 2008 (1.71)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -no_subdir -split 0 -show_section_numbers README.tex
The translation was initiated by Olli Saarikivi on 2012-10-22