<commit_before># This file is part of BenchExec, a framework for reliable benchmarking:
# https://github.com/sosy-lab/benchexec
#
# SPDX-FileCopyrightText: 2007-2020 <NAME> <https://www.sosy-lab.org>
#
# SPDX-License-Identifier: Apache-2.0

import benchexec.util as util
import benchexec.tools.template


class Tool(benchexec.tools.template.BaseTool2):
    """
    Tool info for Frama-C with a wrapper for usage in the SVCOMP.
    URL: https://gitlab.com/sosy-lab/software/frama-c-sv
    """

    REQUIRED_PATHS = ["."]
    _TOOL_NAME = "frama-c-sv"
    _SCRIPT_NAME = _TOOL_NAME + ".py"

    def executable(self, tool_locator):
        return tool_locator.find_executable(Tool._SCRIPT_NAME)

    def version(self, executable):
        return self._version_from_tool(executable)

    def name(self):
        return Tool._TOOL_NAME

    def cmdline(self, executable, options, task, rlimits):
        cmd = [executable, "--program"] + list(task.input_files_or_identifier)
        if task.property_file:
            cmd += ["--property", task.property_file]
        return cmd

    def determine_result(self, run):
        return run.output[-1].split(":", maxsplit=2)[-1]<commit_msg>Final fixups for frama-c-sv tool-info module<commit_after># This file is part of BenchExec, a framework for reliable benchmarking:
# https://github.com/sosy-lab/benchexec
#
# SPDX-FileCopyrightText: 2007-2020 <NAME> <https://www.sosy-lab.org>
#
# SPDX-License-Identifier: Apache-2.0

import benchexec.tools.template


class Tool(benchexec.tools.template.BaseTool2):
    """
    Tool info for Frama-C with a wrapper for usage in the SVCOMP.
    URL: https://gitlab.com/sosy-lab/software/frama-c-sv
    """

    REQUIRED_PATHS = ["."]
    _TOOL_NAME = "frama-c-sv"
    _SCRIPT_NAME = _TOOL_NAME + ".py"

    def executable(self, tool_locator):
        return tool_locator.find_executable(Tool._SCRIPT_NAME)

    def version(self, executable):
        return self._version_from_tool(executable)

    def name(self):
        return Tool._TOOL_NAME

    def cmdline(self, executable, options, task, rlimits):
        cmd = [executable, "--program"] + list(task.input_files)
        if task.property_file:
            cmd += ["--property", task.property_file]
        return cmd

    def determine_result(self, run):
        return run.output[-1].split(":", maxsplit=2)[-1]
{'fraction_non_alphanumeric': 0.1278227524499361, 'fraction_numerical': 0.011930123561994035, 'mean_word_length': 3.223021582733813, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 6, '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': '2462773', 'n_tokens_mistral': 827, 'n_tokens_neox': 778, 'n_words': 168}