gernst / legion-symcc

Fresh implementation of the Legion algorithm on top of SyMCC
Other
0 stars 1 forks source link

Legion/SymCC

Fresh implementation of the Legion algorithm [1] on top of SyMCC.

  1. Dongge Liu, Gidon Ernst, Toby Murray, Ben Rubinstein: Legion: Best-First Concolic Testing. ASE 2020, https://doi.org/10.1145/3324884.3416629

License

This repository contains a copy of SymCC source code in runtime and compiler, which is licensed under GPL (see LICENSE.symcc), with the addition of a new simple backend in runtime/Runtime.{cpp,h} by the authors of Legion/SymCC.

Legion.py is licensed under MIT (see LICENSE). Please add your name if you contribute.

Usage

Compile SymCC compiler pass and runtime libraries

make

Get help (note: a bunch of paths are hardcoded)

./Legion.py -h

Simple example

./Legion.py examples/simple.c

Dependencies & Installation

Interpreting the Output

Here is an example output, split into two parts.

During exploration, each line represents one piece of information, encoding choices of the algorithm, feedback from the execution, and information about exploration.

Paths to nodes are encoded in terms of their branches (0 means not taken, 1 means taken).

Example trace:

?                                  input:
< 1
+ 1
? 0                                input: 00
< 0
+ 0
explored
done

The final output will be a compressed tree, where each node is represented by one line:

The statistics show how often we have sampled at this node in particular ("local"), and aggregated over the entire subtree. The path of the node is shown on the right.

final tree
    local      subtree
   win  try     win  try    path
*    1    1       2    2
$    1    1       1    1    0
$    0    0       0    0    1