updated TI for 2ls
@@ -10,15 +10,15 @@ import benchexec.tools.template
import benchexec.result as result
-class Tool(benchexec.tools.template.BaseTool):
+class Tool(benchexec.tools.template.BaseTool2):
"""
Wrapper for 2LS (http://www.cprover.org/2LS).
"""
REQUIRED_PATHS = ["2ls", "2ls-binary", "goto-cc"]
- def executable(self):
- return util.find_executable("2ls")
+ def executable(self, tool_locator):
+ return tool_locator.find_executable("2ls")
def name(self):
return "2LS"
@@ -26,14 +26,22 @@ class Tool(benchexec.tools.template.BaseTool):
def version(self, executable):
return self._version_from_tool(executable)
- def cmdline(self, executable, options, tasks, propertyfile, rlimits):
- if propertyfile:
- options = options + ["--propertyfile", propertyfile]
+ def cmdline(self, executable, options, task, rlimits):
+ if task.property_file:
+ options = options + ["--propertyfile", task.property_file]
- return [executable] + options + tasks
+ data_model_param = util.get_data_model_from_task(
+ task, {"ILP32": "--32", "LP64": "--64"}
+ )
+ if data_model_param and data_model_param not in options:
+ options += [data_model_param]
- def determine_result(self, returncode, returnsignal, output, isTimeout):
- if ((returnsignal == 9) or (returnsignal == 15)) and isTimeout:
+ return [executable] + options + list(task.input_files_or_identifier)
+
+ def determine_result(self, run):
+ returnsignal = run.exit_code.signal or 0
+ returncode = run.exit_code.value or 0
+ if ((returnsignal == 9) or (returnsignal == 15)) and run.was_timeout:
status = "TIMEOUT"
elif returnsignal == 9:
status = "OUT OF MEMORY"
@@ -42,8 +50,8 @@ class Tool(benchexec.tools.template.BaseTool):
elif returncode == 0:
status = result.RESULT_TRUE_PROP
elif returncode == 10:
- if len(output) > 0:
- result_str = output[-1].strip()
+ if len(run.output) > 0:
+ result_str = run.output[-1].strip()
if result_str == "FALSE(valid-memtrack)":
status = result.RESULT_FALSE_MEMTRACK
elif result_str == "FALSE(valid-deref)":
