<commit_before>"""
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.

Copyright (C) 2007-2015  <NAME>
All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    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.util as util
import benchexec.tools.template
import benchexec.result as result

REQUIRED_PATHS = [
                  "bin",
                  "cpac",
                  "jars",
                  "prism",
                  "scripts",
                  "suportFiles",
                  "VeriAbs",
                  ]

class Tool(benchexec.tools.template.BaseTool):
    """
    VeriAbs
    """

    def executable(self):
        return util.find_executable('scripts/veriabs')
    
    def name(self):
        return 'VeriAbs'
    
    def cmdline(self, executable, options, tasks, propertyfile, rlimits):
        if propertyfile:
            options += ['--property-file', propertyfile]
        return [executable] + options + tasks
    
    def determine_result(self, returncode, returnsignal, output, isTimeout):
        lines = " ".join(output[-10:])
        if isTimeout:
            return 'TIMEOUT'
        if "INVALID-POINTER" in lines or "DYNAMIC_OBJECT" in lines or "dereference failure" in lines:
            return result.RESULT_FALSE_DEREF
        elif "SUCCESS" in lines:
            return result.RESULT_TRUE_PROP
        elif "FAILED" in lines:
            return result.RESULT_FALSE_REACH
        elif "OUTOFMEMORY" in lines:
            return 'OUT OF MEMORY'
        elif "TIMEOUT" in lines:
            return "TIMEOUT"
        elif "NOT SUPPORTED" in lines or "UNKNOWN" in lines:<commit_msg>Fix bug in tool-info module for Veriabs, it must not change the passed list options.<commit_after>"""
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.

Copyright (C) 2007-2015  <NAME>
All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    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.util as util
import benchexec.tools.template
import benchexec.result as result

REQUIRED_PATHS = [
                  "bin",
                  "cpac",
                  "jars",
                  "prism",
                  "scripts",
                  "suportFiles",
                  "VeriAbs",
                  ]

class Tool(benchexec.tools.template.BaseTool):
    """
    VeriAbs
    """

    def executable(self):
        return util.find_executable('scripts/veriabs')

    def name(self):
        return 'VeriAbs'

    def cmdline(self, executable, options, tasks, propertyfile, rlimits):
        if propertyfile:
            options = options + ['--property-file', propertyfile]
        return [executable] + options + tasks

    def determine_result(self, returncode, returnsignal, output, isTimeout):
        lines = " ".join(output[-10:])
        if isTimeout:
            return 'TIMEOUT'
        if "INVALID-POINTER" in lines or "DYNAMIC_OBJECT" in lines or "dereference failure" in lines:
            return result.RESULT_FALSE_DEREF
        elif "SUCCESS" in lines:
            return result.RESULT_TRUE_PROP
        elif "FAILED" in lines:
            return result.RESULT_FALSE_REACH
        elif "OUTOFMEMORY" in lines:
            return 'OUT OF MEMORY'
        elif "TIMEOUT" in lines:
            return "TIMEOUT"
        elif "NOT SUPPORTED" in lines or "UNKNOWN" in lines:
{'fraction_non_alphanumeric': 0.07999067164179105, 'fraction_numerical': 0.0065298507462686565, 'mean_word_length': 2.390513833992095, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6313191', 'n_tokens_mistral': 1195, 'n_tokens_neox': 1143, 'n_words': 426}