Skip to content

Commit d026615

Browse files
incl. docs for runner
1 parent ea9c3cd commit d026615

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

goblint_runner.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,30 @@ def __init__(self, logger):
2424
exit(1)
2525

2626
parser = argparse.ArgumentParser(
27-
description="""A facade in front of goblint enabling multishot runs for SV-COMP.
28-
All args apart from --multishot/-m are passed on to the actual goblint calls.
29-
The Multishotlist file is a plaintext file whose lines each consist of a path to a
27+
description="""A facade in front of goblint to enable running a portfolio of configurations for SV-COMP.
28+
All args apart from --portfolio-conf/-p are passed on to the actual goblint calls.
29+
The portfolio config file is a plaintext file whose lines each consist of a path to a
3030
goblint config file (relative to the goblint conf dir).
3131
Goblint is run with each config in order until one produces a verdict true or reaches the end of the list.
32-
You may add comments to the multishotlist file by starting a line with #.
32+
You may add comments to the portfolio config file by starting a line with #.
3333
"""
3434
)
35-
parser.add_argument("-m","--multishotlist", type=str, metavar="FILE",dest="multishot",
36-
help="a path to a multishotlist (relative to goblint_multishot.py)")
35+
parser.add_argument("-p","--portfolio-conf", type=str, metavar="FILE",dest="portfolio",
36+
help="a path to a portfolio configuration file (relative to goblint_multishot.py)")
3737
conf_args, self.other_args = parser.parse_known_args()
38-
logger.debug(f"Multishot conf file: {conf_args.multishot}")
38+
logger.debug(f"Portfolio-conf file: {conf_args.portfolio}")
3939
logger.debug(f"Arguments passed on to goblint: {" ".join(self.other_args)}")
4040

4141
self.configs = []
42-
if not conf_args.multishot:
43-
logger.warn("Multishot goblint called without multishotlist")
44-
if conf_args.multishot:
45-
if not path.exists(conf_args.multishot):
46-
logger.error(f" Could not find conf file at {conf_args.multishot}")
42+
if conf_args.portfolio:
43+
if not path.exists(conf_args.portfolio):
44+
logger.error(f" Could not find portfolio conf file at {conf_args.portfolio}")
4745
exit(1)
48-
with open(conf_args.multishot, "r") as conflist_file:
46+
with open(conf_args.portfolio, "r") as conflist_file:
4947
self.configs = [path.join(self.current_path, "conf", c.strip())
5048
for c in conflist_file.readlines() if not c.strip().startswith("#")]
51-
logger.info(f"Loaded configs: {", ".join(self.configs)}")
49+
logger.info(f"Loaded goblint configs: {", ".join(self.configs)}")
50+
5251
def run_with_config(self, config_path):
5352
args = ["--conf", config_path] + self.other_args
5453
self.logger.info(f"Running next shot: ./goblint {" ".join(args)}")

0 commit comments

Comments
 (0)