Docker image for https://github.com/SunghoLee/c-summary
10K+
This image is built for c-summary, a C Semantic Summary Extractor for JNI program analysis.
Thank to Sungho Lee for providing help for building this image!
To start the container, run
docker run --rm -it yhuai/c-summary-image
To capture C/C++ code via Infer, run
infer capture -- clang --include-directory /usr/lib/jvm/java-8-openjdk-amd64/include/ --include-directory /usr/lib/jvm/java-8-openjdk-amd64/include/linux/ -c #FILE_NAME_HERE
Please remember to substitute
#FILE_NAME_HEREwith actual file, for example,sample.c
Features provided by c-summary
Pre-analysis to calculate alias relations
infer analyze -P --pp-only
Pre-analysis to construct a global environment
infer analyze -P --ssp-only
$INFER_HOME/src/_build/opt/GlobalCollector.exe
Main-analysis to extract semantic summaries
infer analyze -P --ss-only
Post-analysis for global variables
$INFER_HOME/src/_build/opt/PostGlobal.exe
Transform sematic summary to Java methods
$INFER_HOME/src/_build/default/JavaGenerator.exe
You can find a simple example at /home/sample, which includes a simple JNI program sample.c, and a bash script run.sh.
You can test c-summary by using the commands above, or you can use
sh run.sh
which executes these commands.
After execution, you should be able to find generated Java files at /home/sample/java-gen-out
Content type
Image
Digest
Size
3.1 GB
Last updated
over 5 years ago
docker pull yhuai/c-summary-image