Skip to content

Commit

Permalink
Update theta.py
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi authored Nov 14, 2024
1 parent 2d84ade commit c06049f
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions benchexec/tools/theta.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,24 @@ def project_url(self):
def version(self, executable):
return self._version_from_tool(executable)

def min_version(self, current, limit):
for i in range(len(current)):
if int(current[i]) < int(limit[i]):
return False
return True

def cmdline(self, executable, options, task, rlimits):
# Theta supports data race and unreach call
current_version = self.version(executable).split(".")
if task.property_file:
options += ["--property", task.property_file]
if isinstance(task.options, dict) and task.options.get("language") == "C":
data_model = task.options.get("data_model")
if data_model:
options += ["--architecture", data_model]
if self.min_version(current_version, [6, 0, 0]):
if isinstance(task.options, dict) and task.options.get("language") == "C":
data_model = task.options.get("data_model")
if data_model:
options += ["--architecture", data_model]
if self.min_version(current_version, [6, 8, 6]):
if rlimits.memory:
options += ["--memlimit", str(rlimits.memory)] # memory in Bytes

return [executable, task.single_input_file] + options

Expand Down

0 comments on commit c06049f

Please sign in to comment.