-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_benchmarks.py
More file actions
36 lines (27 loc) · 1.22 KB
/
run_benchmarks.py
File metadata and controls
36 lines (27 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import argparse
import sys
import os
from property_synthesizer import PropertySynthesizer
def main():
parser = argparse.ArgumentParser()
parser.add_argument('outfile', nargs='?', type=argparse.FileType('w'), default=sys.stdout)
parser.add_argument('--verbose', '-v', dest='verbose', action='store_true', default=False)
parser.add_argument('--disable-min', dest='disable_min', action='store_true', default=False)
parser.add_argument('--keep-neg-may', dest='keep_neg_may', action='store_true', default=False)
parser.add_argument('--slv-seed', dest='slv_seed', type=int, nargs='?', default=0)
args = parser.parse_args(sys.argv[1:])
outfile = args.outfile
v = args.verbose
disable_min = args.disable_min
keep_neg_may = args.keep_neg_may
slv_seed = args.slv_seed
files = [os.path.join(dp, f) for dp, dn, fn in os.walk("./examples") for f in fn if ('.sp' in f)]
for path in files:
with open(path, 'r') as infile:
# if not (('max4' in path) or ('max5' in path) or ('branch.prop' in path)):
# continue
print(path)
PropertySynthesizer(infile, outfile, v, slv_seed, keep_neg_may).run()
outfile.close()
if __name__=="__main__":
main()