updated jbmc TI to BaseTool2
# SPDX-License-Identifier: Apache-2.0
import benchexec.result as result
-import benchexec.util as util
from . import cbmc
@@ -21,28 +20,28 @@ class Tool(cbmc.Tool):
REQUIRED_PATHS = ["jbmc", "jbmc-binary", "core-models.jar"]
- def executable(self):
- return util.find_executable("jbmc")
+ def executable(self, tool_locator):
+ return tool_locator.find_executable("jbmc")
def name(self):
return "JBMC"
- def determine_result(self, returncode, returnsignal, output, isTimeout):
+ def determine_result(self, run):
status = result.RESULT_ERROR
- if returnsignal == 0 and ((returncode == 0) or (returncode == 10)) and output:
- result_str = output[-1].strip()
+ if run.exit_code.value in [0, 10]:
+ result_str = run.output[-1].strip()
if result_str == "TRUE":
status = result.RESULT_TRUE_PROP
elif result_str == "FALSE":
status = result.RESULT_FALSE_PROP
- elif "UNKNOWN\n" in output:
+ elif "UNKNOWN\n" in run.output:
status = result.RESULT_UNKNOWN
- elif returncode == 64 and "Usage error!\n" in output:
+ elif run.exit_code.value == 64 and "Usage error!" in run.output:
status = "INVALID ARGUMENTS"
- elif returncode == 6 and "Out of memory\n" in output:
+ elif run.exit_code.value == 6 and "Out of memory" in run.output:
status = "OUT OF MEMORY"
return status
