A Reinforcement-Learning-based loop invariant inference tool.
-
git clone https://neurosymbolic.coding.net/p/lipus/d/LIPuS/git
, could take a long time. -
prepare a python environment with python version=3.7.10
-
prepare
make
andg++
. If you are using Windows, you need prepare the above two in git bash. -
cd /LIPuS/; pip install -r requirements.txt
-
cd /LIPuS/code2inv/graph_encoder/
- if you are using Windows, delete the "Makefile" , and rename the "Makefile_win" as "Makefile" and run
make clean ; make
on git bash. - if you are using Linux, just run
make clean ;make
- if you are using Windows, delete the "Makefile" , and rename the "Makefile_win" as "Makefile" and run
cd /LIPuS/
python RunAllLinear.py
if you want to run all linear benchmarkspython RunAllNonLinear.py
if you want to run all nonlinear benchmarks- The results can be checked in
Results
directory. - check out "main.py" if you want to run specific one benchmark.
- All benchmarks are put in "Benchmarks/", each instance has three files: c source file, CFG json file, and SMT file.
- If you want to add new instance, you only need to prepare the three files, and LIPuS will automatically do the rest.
- As for how to prepare the CFG json file and SMT file, please refer to Code2Inv, which use Clang to do it automatically. Also, you can manually do it just like us.