aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/smt2-bmc/async.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/smt2-bmc/async.py')
-rw-r--r--scripts/smt2-bmc/async.py41
1 files changed, 40 insertions, 1 deletions
diff --git a/scripts/smt2-bmc/async.py b/scripts/smt2-bmc/async.py
index 0d13ba6..7606440 100644
--- a/scripts/smt2-bmc/async.py
+++ b/scripts/smt2-bmc/async.py
@@ -13,7 +13,46 @@ initzero = False
check_mem = True
check_regs = True
debug_print = False
-debug_file = open("debug.smt2", "w")
+debug_file = None
+
+def usage():
+ print("""
+python3 async.py [options]
+
+ -s <solver>
+ set SMT solver: yices, z3, cvc4, mathsat
+ default: yices
+
+ -t <steps>
+ default: 12
+
+ -v
+ enable debug output
+
+ -d
+ write smt2 statements to debug.smt2
+""")
+ sys.exit(1)
+
+try:
+ opts, args = getopt.getopt(sys.argv[1:], "s:t:vd")
+except:
+ usage()
+
+for o, a in opts:
+ if o == "-s":
+ solver = a
+ elif o == "-t":
+ steps = int(a)
+ elif o == "-v":
+ debug_print = True
+ elif o == "-d":
+ debug_file = open("debug.smt2", "w")
+ else:
+ usage()
+
+if len(args) > 0:
+ usage()
start_time = time()
smt = smtio(solver=solver, debug_print=debug_print, debug_file=debug_file)