|
|
To build this container, from the directory containing the docker file do:
|
|
|
|
|
|
docker build -t framac .
|
|
|
docker build -t slicer .
|
|
|
|
|
|
Then run it with:
|
|
|
|
|
|
docker run -ti framac /bin/bash
|
|
|
docker run -ti slicer /bin/bash
|
|
|
|
|
|
Now from inside the container, test the analyzer by first downloading the following sample program:
|
|
|
|
|
|
wget http://www.dcc.ufmg.br/~brunors/flowtracker/monty.c
|
|
|
|
|
|
Then make a file called in.xml containing the following:
|
|
|
|
|
|
<sources>
|
|
|
<function>
|
|
|
<name>fp_rdcn_var</name>
|
|
|
<parameter>1</parameter>
|
|
|
<parameter>2</parameter>
|
|
|
</function>
|
|
|
</sources>
|
|
|
</functions>
|
|
|
|
|
|
|
|
|
Finally, run the analyzer:
|
|
|
|
|
|
clang -emit-llvm -c -g monty.c -o monty.bc
|
|
|
opt -instnamer -mem2reg monty.bc > monty.rbc
|
|
|
opt -basicaa -load AliasSets.so -load DepGraph.so -load bSSA2.so -bssa2 -xmlfile in.xml monty.rbc |
|
|
For instructions on how to use the slicer, please see: https://github.com/zhangyz/llvm-slicing |