forked from sosy-lab/benchexec
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request sosy-lab#1090 from vesalvojdani/main
Add toolinfo module for meta-verifier CoOpeRace
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# This file is part of BenchExec, a framework for reliable benchmarking: | ||
# https://github.com/sosy-lab/benchexec | ||
# | ||
# SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
import benchexec.tools.template | ||
import benchexec.result as result | ||
|
||
|
||
class Tool(benchexec.tools.template.BaseTool2): | ||
""" | ||
Tool info for CoOpeRace. | ||
""" | ||
|
||
def executable(self, tool_locator): | ||
return tool_locator.find_executable("cooperace") | ||
|
||
def name(self): | ||
return "CoOpeRace" | ||
|
||
def project_url(self): | ||
return "https://github.com/sws-lab/cooperace" | ||
|
||
def version(self, executable): | ||
return self._version_from_tool(executable, line_prefix="CoOpeRace") | ||
|
||
def cmdline(self, executable, options, task, rlimits): | ||
if task.property_file: | ||
options += ["--prop", task.property_file] | ||
if task.options is not None and "data_model" in task.options: | ||
options += ["--arch", task.options.get("data_model")] | ||
return [executable, *options, *task.input_files] | ||
|
||
def determine_result(self, run): | ||
if run.output: | ||
result_str = run.output[-1].strip() | ||
if result_str == "CoOpeRace verdict: true": | ||
return result.RESULT_TRUE_PROP | ||
if result_str == "CoOpeRace verdict: false": | ||
return result.RESULT_FALSE_PROP | ||
if result_str == "CoOpeRace verdict: unknown": | ||
return result.RESULT_UNKNOWN | ||
|
||
return result.RESULT_ERROR |