Skip to content

Commit 2f739d0

Browse files
add log explanation file, tune readme
1 parent 133bbe2 commit 2f739d0

7 files changed

Lines changed: 24 additions & 201 deletions

File tree

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Python (3.7.0 or higher recommended, and [Anaconda](https://www.anaconda.com/) r
4444

4545
- Adjust timeout using `-t TIMEOUT`, only effective in directory mode
4646

47-
- Specify the result summary log file using `-o FILE_NAME`; Export an additional result summary CSV `FILE_NAME_prefix.csv` (with success and timing statistics, and `is_correct` column shows the satisfiability of the CHC system *if successfully solved* (`is_successful=1`)) using `-a`; The summary is only available when running multiple instances (directory mode or file list mode)
47+
- Specify the result summary log file using `-o FILE_NAME`; Export an additional result summary CSV `FILE_NAME_prefix.csv` (with success and timing statistics, and `is_correct` column indicates the satisfiability of the CHC system *if successfully solved* (`is_successful=1`); if `is_successful=0`, `is_correct` field is not meaningful) using `-a`; The summary is only available when running multiple instances (directory mode or file list mode)
4848

4949
- Start solving from the file index `K` in the folder `-s K` (`K` is the index starting from zero)
5050

@@ -65,13 +65,17 @@ Please refer to the configuration in `./experiment/result_summary.log` and `./ex
6565

6666
# To run the baselines
6767
## Spacer and GSpacer
68-
- Configure [z3-gspacer-branch](https://github.com/hgvk94/z3/tree/ggbranch), `chmod +x z3`
68+
- Configure [z3-gspacer-branch](https://github.com/hgvk94/z3/tree/ggbranch), `chmod +x z3` ([pre-built binary](https://drive.google.com/file/d/1HjKCVuN7Csm_uxQh7paU3WMARXWJhhYY/view?usp=sharing) of z3 with Spacer and GSpacer for Ubuntu)
6969

70-
- Specify the path of z3 (with GSpacer) binary in `utils/run_spacer.py` and `utils/run_spacer_filtered.py`
70+
- Specify the path of pre-built z3 (with Spacer and GSpacer) binary in `utils/run_spacer.py` and `utils/run_spacer_filtered.py`, at line 5
7171

72-
- Specify a folder name and run `utils/run_spacer.py` or specify a file list name and run `utils/run_spacer_filtered.py`
72+
- Specify a target folder in `utils/run_spacer.py` or specify a file list in `utils/run_spacer_filtered.py`, at line 4
7373

74-
- Enable GSpacer: `enable_global_guidance = 1`
74+
- Use GSpacer as the solving engine: `enable_global_guidance = 1`; Use Spacer as the solving engine: `enable_global_guidance = 0`, at line 8
75+
76+
- Check `utils/run_spacer.py` and `utils/run_spacer_filtered.py` line 4-20 for other settings
77+
78+
- After configuration, run `python utils/run_spacer.py`
7579

7680
## LinearArbitrary and FreqHorn
7781
Refer to [LinearArbitrary](https://github.com/GaloisInc/LinearArbitrary-SeaHorn/tree/master/test) and [FreqHorn](https://github.com/freqhorn/freqhorn).
@@ -86,10 +90,6 @@ In `test.py` `guess_manually` function:
8690

8791
- Modify `db = load_horn_db_from_file(args.file_name, z3.main_ctx())` or pass the parameter in through command line to indicate SMTLIB2 file name
8892

89-
## Enumeration
90-
- A simple implementation of an enumeration-based invariant synthesizer
91-
92-
- Run `learner/enumerate.py` that enumerates through a context-free grammar
9393

9494
# Benchmarks
9595
[CHC-COMP](https://github.com/chc-comp)

experiment/log_explanation.png

44.8 KB
Loading

learner/enumerate.py

Lines changed: 0 additions & 160 deletions
This file was deleted.

learner/grammars/inv.cfg

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/filtered.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
tests/safe/abdu_01.smt2
2+
tests/safe/abdu_02.smt2
3+
tests/safe/abdu_03.smt2
4+
tests/safe/abdu_04.smt2
5+
tests/unsafe/samples_multiple_inv_03_cex.smt2

utils/run_spacer.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
import os
22
import time
33

4-
src = '/home/ssr/PyCHC/tests/freqhorn/bench_horn_multiple'
5-
if not src.endswith('/'):
6-
src += '/'
7-
z3_path = '/home/ssr/z3/build/z3'
8-
# z3_path = 'utils/z3'
9-
target = 'result/z3_gspacer_out_bench_horn_multiple_360.log'
4+
src = 'tests/safe'
5+
z3_path = 'utils/z3'
6+
target = 'result/z3_gspacer_out_safe_360.log'
107

118
enable_global_guidance = 1 # GSpacer: 1; Spacer: 0
129
timeout = 360
@@ -22,6 +19,9 @@
2219
enable_skip = 1
2320
print_proof = 1 # print invariant
2421

22+
if not src.endswith('/'):
23+
src += '/'
24+
2525

2626
if __name__ == "__main__":
2727
since = time.time()

utils/run_spacer_filtered.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import os
22
import time
33

4-
src = 'tests/filtered_22'
5-
z3_path = '/home/ssr/z3/build/z3'
6-
# z3_path = 'utils/z3'
7-
target = 'result/z3_gspacer_chc22_fil.log'
4+
src = 'tests/filtered.txt'
5+
z3_path = 'utils/z3'
6+
target = 'result/z3_gspacer_fil.log'
87

9-
enable_global_guidance = 1 # GSpacer version of Z3 required
8+
enable_global_guidance = 1 # GSpacer: 1; Spacer: 0
109
timeout = 360
1110

1211
enable_log = 1

0 commit comments

Comments
 (0)