Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import os
import subprocess
import benchexec.util as util
import benchexec.tools.template
import benchexec.result as result
class Tool(benchexec.tools.template.BaseTool):
def executable(self):
return util.find_executable('acsar')
def name(self):
return 'Acsar'
def cmdline(self, executable, options, sourcefiles, propertyfile, rlimits):
assert len(sourcefiles) == 1, "only one sourcefile supported"
sourcefile = sourcefiles[0]
# create tmp-files for acsar, acsar needs special error-labels
self.prepSourcefile = self._prepareSourcefile(sourcefile)
# This file is part of BenchExec, a framework for reliable benchmarking:
# https://github.com/sosy-lab/benchexec
#
# SPDX-FileCopyrightText: 2007-2020 Dirk Beyer
#
# SPDX-License-Identifier: Apache-2.0
import benchexec.util as util
import benchexec.tools.template
import benchexec.result as result
class Tool(benchexec.tools.template.BaseTool):
REQUIRED_PATHS = [
"fixcalc",
"hip",
"hiptnt",
"hiptnt.sh",
"oc",
"prelude.ss",
"run_hiptnt",
"stdlib.h",
"z3-4.3.2",
]
def executable(self):
return util.find_executable("hiptnt.sh")
import subprocess
import os
import benchexec.util as util
import benchexec.tools.template
import benchexec.result as result
class Tool(benchexec.tools.template.BaseTool):
def executable(self):
return util.find_executable('pblast.opt')
def program_files(self, executable):
executableDir = os.path.dirname(executable)
return [executableDir]
def working_directory(self, executable):
return os.curdir
def environment(self, executable):
executableDir = os.path.dirname(executable)
#
# SPDX-FileCopyrightText: 2007-2020 Dirk Beyer
#
# SPDX-License-Identifier: Apache-2.0
import benchexec.util as util
import benchexec.tools.template
import benchexec.result as result
import tempfile
import re
import subprocess
import logging
class Tool(benchexec.tools.template.BaseTool):
"""
Tool info for AProVE.
URL: http://aprove.informatik.rwth-aachen.de/
Only the binary (jar) distribution of AProVE is supported.
"""
REQUIRED_PATHS = ["aprove.jar", "AProVE.sh", "bin", "newstrategy.strategy"]
def executable(self):
return util.find_executable("AProVE.sh")
def name(self):
return "AProVE"
def version(self, executable):
with tempfile.NamedTemporaryFile(suffix=".c") as trivial_example:
# This file is part of BenchExec, a framework for reliable benchmarking:
# https://github.com/sosy-lab/benchexec
#
# SPDX-FileCopyrightText: 2007-2020 Dirk Beyer
#
# SPDX-License-Identifier: Apache-2.0
import benchexec.util as util
import benchexec.tools.template
class Tool(benchexec.tools.template.BaseTool):
"""
Tool info for LibKluzzer (http://unihb.eu/kluzzer).
"""
REQUIRED_PATHS = ["bin", "lib", "kluzzer"]
def program_files(self, executable):
return self._program_files_from_executable(
executable, self.REQUIRED_PATHS, parent_dir=True
)
def executable(self):
return util.find_executable("LibKluzzer", "bin/LibKluzzer")
def version(self, executable):
return self._version_from_tool(executable)
# This file is part of BenchExec, a framework for reliable benchmarking:
# https://github.com/sosy-lab/benchexec
#
# SPDX-FileCopyrightText: 2007-2020 Dirk Beyer
#
# SPDX-License-Identifier: Apache-2.0
import benchexec.util as util
import benchexec.tools.template
import benchexec.result as result
class Tool(benchexec.tools.template.BaseTool):
"""
Tool info for Forest
"""
REQUIRED_PATHS = ["bin", "lib", "tools"]
def executable(self):
return util.find_executable("forest.sh")
def name(self):
return "Forest"
def version(self, executable):
return self._version_from_tool(executable)
def cmdline(self, executable, options, tasks, propertyfile, rlimits):
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import benchexec.result as result
import benchexec.util as util
import benchexec.tools.template
import benchexec.model
class Tool(benchexec.tools.template.BaseTool):
"""
Tool info for KLEE (https://klee.github.io).
"""
REQUIRED_PATHS = ["bin", "include", "klee_build", "libraries"]
def executable(self):
return util.find_executable("bin/klee")
def program_files(self, executable):
return self._program_files_from_executable(
executable, self.REQUIRED_PATHS, parent_dir=True
)
def version(self, executable):
"""
# This file is part of BenchExec, a framework for reliable benchmarking:
# https://github.com/sosy-lab/benchexec
#
# SPDX-FileCopyrightText: 2007-2020 Dirk Beyer
#
# SPDX-License-Identifier: Apache-2.0
import benchexec.util as util
import benchexec.tools.template
import benchexec.result as result
class Tool(benchexec.tools.template.BaseTool):
def executable(self):
return util.find_executable("ecaverifier")
def name(self):
return "EcaVerifier"
def determine_result(self, returncode, returnsignal, output, isTimeout):
status = result.RESULT_UNKNOWN
for line in output:
if line.startswith("0 safe, 1 unsafe"):
status = result.RESULT_FALSE_REACH
elif line.startswith("1 safe, 0 unsafe"):
status = result.RESULT_TRUE_PROP
elif ((returnsignal == 9) or (returnsignal == 15)) and isTimeout:
status = "TIMEOUT"
elif returnsignal == 9: