-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.py
45 lines (40 loc) · 1.78 KB
/
test.py
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
37
38
39
40
41
42
43
44
45
import asyncio
from pathlib import Path
import gobexec.main
from gobexec.asyncio.child_watcher import RusageThreadedChildWatcher
from gobexec.executor import Progress
from gobexec.goblint.bench import txtindex, tools
from gobexec.goblint.bench.tools import DuetTool
from gobexec.goblint.extractor import AssertSummaryExtractor
from gobexec.goblint.result import Rusage, RaceSummary
from gobexec.goblint.tool import GoblintTool
from gobexec.model import tool
from gobexec.model.context import RootExecutionContext
from gobexec.model.result import TimeResult
from gobexec.model.tools import ExtractTool
from gobexec.output.renderer import FileRenderer, ConsoleRenderer, MultiRenderer
assert_counter = tools.AssertCounter()
def index_tool_factory(name, args):
goblint = GoblintTool(
name=name,
program=str(Path("../analyzer/goblint").absolute()),
args=["--conf", "../analyzer/conf/traces-rel-toy.json", "--enable", "warn.debug"] + args,
# args=["--conf", "/home/simmo/dev/goblint/sv-comp/goblint/conf/traces-rel.json", "--enable", "warn.debug"],
)
assert_summary_extractor = AssertSummaryExtractor(assert_counter)
return ExtractTool(
goblint,
TimeResult,
assert_summary_extractor,
#AssertSummaryExtractor(),
#RaceSummary,
primary=assert_summary_extractor
)
matrix = txtindex.load(Path("../bench/index/traces-rel-toy.txt"), index_tool_factory)
# matrix = txtindex.load(Path("/home/simmo/dev/goblint/sv-comp/goblint-bench/index/traces-relational-watts.txt"), goblint)
# matrix.tools.append(assert_counter)
matrix.tools.insert(0, assert_counter)
html_renderer = FileRenderer(Path("out.html"))
console_renderer = ConsoleRenderer()
renderer = MultiRenderer([html_renderer, console_renderer])
gobexec.main.run(matrix, renderer)