Skip to content

Commit

Permalink
Fixed minor errors in update_bench_incremental.py and yamlindex.py
Browse files Browse the repository at this point in the history
  • Loading branch information
healthypunk committed May 6, 2024
1 parent d92d246 commit 531a711
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
22 changes: 14 additions & 8 deletions gobexec/goblint/bench/yamlindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,32 @@ def __call__(self, name: str, args: List[str]) -> Tool[Incremental, R]:
def load(def_path: Path, set_path: List[Path], tool_factory: ToolFactory) -> Matrix[Incremental, R]:
defsets_ = DefSets.from_paths(def_path, set_path)
groups: List[Group[Incremental]] = []
tool: Tool[Incremental,R] = tool_factory(name= "",args=defsets_.def_.confs)
tools: [Tool[Incremental, R]] = []
for set_ in defsets_.sets:
groups.append(Group(name=set_.name, benchmarks=[]))
for bench in set_.benchmarks:
patch_path = Path("../bench")/bench.path.with_suffix("."+"patch")
patch_path = Path("../bench") / bench.path.with_suffix("." + "patch")
parts = list(patch_path.parts)
temp = parts[3].split(".")
parts[3] = temp[0]+"01."+temp[1]
parts[3] = temp[0] + "01." + temp[1]
patch_path = Path(*parts)
groups[-1].benchmarks.append(Incremental(
name=bench.name,
description=bench.info,
files=Path("../bench")/bench.path,
patch= patch_path,
files=Path("../bench") / bench.path,
patch=patch_path,
tool_data={
ARGS_TOOL_KEY: shlex.split(bench.param) if bench.param else []
}))
ARGS_TOOL_KEY: shlex.split(bench.param) if bench.param else []
}))
for conf in defsets_.def_.confs[1:]:
if conf.param is not None:
tools.append(tool_factory(name=conf.name,args= ["--conf", (Path("../bench") / Path(defsets_.def_.baseconf)).absolute()] + shlex.split(conf.param) ))
else:
tools.append(tool_factory(name=conf.name, args=["--conf", (Path("../bench") / Path(defsets_.def_.baseconf)).absolute()]))

return Matrix(
name=def_path.stem,
tools=[tool],
tools=tools,
groups=groups,
)

Expand Down
5 changes: 4 additions & 1 deletion update_bench_incremental.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from_scratch = GoblintToolFromScratch(
name="from_scratch",
program=str(Path("../analyzer/goblint").absolute()),
args=["--conf", Path("../bench/index/conf/td3.json").absolute()]

)

Expand All @@ -24,7 +25,9 @@ def index_tool_factory(name, args):
incremental = GoblintToolIncremental(
name=name,
program=str(Path("../analyzer/goblint").absolute()),
from_scratch=from_scratch
from_scratch=from_scratch,
args=args

)
return ExtractTool(
incremental,
Expand Down

0 comments on commit 531a711

Please sign in to comment.