Skip to content

Commit ca91da5

Browse files
committed
Renamed and refactored portfolio solving
1 parent 0af502a commit ca91da5

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

share/smack/top.py

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ def verification_result(verifier_output, verifier):
913913
return VResult.UNKNOWN
914914

915915

916-
def invoke_boogie(args):
916+
def boogie_command(args):
917917
command = ["boogie"]
918918
command += [args.bpl_file]
919919
command += ["/doModSetAnalysis"]
@@ -929,7 +929,7 @@ def invoke_boogie(args):
929929
return command
930930

931931

932-
def invoke_corral(args):
932+
def corral_command(args):
933933
command = ["corral"]
934934
command += [args.bpl_file]
935935
command += ["/tryCTrace", "/noTraceOnDisk", "/printDataValues:1"]
@@ -946,7 +946,7 @@ def invoke_corral(args):
946946
return command
947947

948948

949-
def invoke_symbooglix(args):
949+
def symbooglix_command(args):
950950
command = ['symbooglix']
951951
command += [args.bpl_file]
952952
command += ["--file-logging=0"]
@@ -983,24 +983,20 @@ def process_verifier_output(args, verifier_output):
983983
def verify_bpl(args):
984984
"""Verify the Boogie source file with a back-end verifier."""
985985

986-
if args.verifier == 'svcomp':
987-
verify_bpl_svcomp(args)
988-
return
989-
990-
elif args.verifier == 'boogie' or args.modular:
991-
command = invoke_boogie(args)
986+
if args.verifier == 'boogie' or args.modular:
987+
command = boogie_command(args)
992988
command += ["/proverOpt:O:smt.array.extensional=false"]
993989
command += ["/proverOpt:O:smt.qi.eager_threshold=100"]
994990
command += ["/proverOpt:O:smt.arith.solver=2"]
995991

996992
elif args.verifier == 'corral':
997-
command = invoke_corral(args)
993+
command = corral_command(args)
998994
args.verifier_options += (
999995
" /bopt:proverOpt:O:smt.qi.eager_threshold=100"
1000996
" /bopt:proverOpt:O:smt.arith.solver=2")
1001997

1002998
elif args.verifier == 'symbooglix':
1003-
command = invoke_symbooglix(args)
999+
command = symbooglix_command(args)
10041000

10051001
if args.verifier_options:
10061002
command += args.verifier_options.split()
@@ -1065,13 +1061,13 @@ def thread_verify_bpl(args, args_to_add):
10651061
args.solver = args_to_add['solver']
10661062

10671063
if args.verifier == 'boogie' or args.modular:
1068-
command = invoke_boogie(args)
1064+
command = boogie_command(args)
10691065

10701066
elif args.verifier == 'corral':
1071-
command = invoke_corral(args)
1067+
command = corral_command(args)
10721068

10731069
elif args.verifier == 'symbooglix':
1074-
command = invoke_symbooglix(args)
1070+
command = symbooglix_command(args)
10751071

10761072
if args.verifier_options:
10771073
command += args.verifier_options.split()
@@ -1135,7 +1131,10 @@ def main():
11351131
if not args.quiet:
11361132
print("SMACK generated %s" % args.bpl_file)
11371133
else:
1138-
if args.verifier == 'portfolio':
1134+
if args.verifier == 'svcomp':
1135+
verify_bpl_svcomp(args)
1136+
return
1137+
elif args.verifier == 'portfolio':
11391138
return_code = verify_bpl_portfolio(args)
11401139
else:
11411140
return_code = verify_bpl(args)

0 commit comments

Comments
 (0)