Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a tool-info module for rIC3 #1141

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions benchexec/tools/ric3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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.result as result
import benchexec.tools.template


class Tool(benchexec.tools.template.BaseTool2):
"""
Tool info for rIC3
"""

def executable(self, tool_locator):
return tool_locator.find_executable("rIC3")

def name(self):
return "rIC3"

def version(self, executable):
version_string = self._version_from_tool(executable, line_prefix="rIC3 ")
commit_hash = self._version_from_tool(executable, line_prefix="commit_hash:")
if commit_hash:
# Different commits of rIC3 could have the same version number.
# Therefore, the commit hash is appended to get a more precise version information.
version_string += f" ({commit_hash})"
return version_string

def project_url(self):
return "https://github.com/gipsyh/rIC3"

def cmdline(self, executable, options, task, rlimits):
return [executable] + options + [task.single_input_file]

def determine_result(self, run):
for line in run.output[::-1]:
# skip the lines that do not contain verification result
if not line.startswith("result:"):
continue
if "true" in line:
return result.RESULT_TRUE_PROP
elif "false" in line:
return result.RESULT_FALSE_PROP
return result.RESULT_ERROR
Loading