How to use the benchexec.result.RESULT_UNKNOWN function in BenchExec

To help you get started, we’ve selected a few BenchExec examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sosy-lab / benchexec / benchexec / tools / esbmc.py View on Github external
elif self.allInText(["FALSE_FREE"], output):
            status = result.RESULT_FALSE_FREE
        elif self.allInText(["FALSE_MEMTRACK"], output):
            status = result.RESULT_FALSE_MEMTRACK
        elif self.allInText(["FALSE_OVERFLOW"], output):
            status = result.RESULT_FALSE_OVERFLOW
        elif self.allInText(["FALSE_TERMINATION"], output):
            status = result.RESULT_FALSE_TERMINATION
        elif self.allInText(["FALSE"], output):
            status = result.RESULT_FALSE_REACH
        elif "TRUE" in output:
            status = result.RESULT_TRUE_PROP
        elif "DONE" in output:
            status = result.RESULT_DONE

        if status == result.RESULT_UNKNOWN:
            if isTimeout:
                status = "TIMEOUT"
            elif output.endswith(("error", "error\n")):
                status = "ERROR"

        return status
github sosy-lab / benchexec / benchexec / tools / map2check.py View on Github external
status = result.RESULT_TRUE_PROP
            elif "FALSE" in output:
                if "FALSE_MEMTRACK" in output:
                    status = result.RESULT_FALSE_MEMTRACK
                elif "FALSE_MEMCLEANUP" in output:
                    status = result.RESULT_FALSE_MEMCLEANUP
                elif "FALSE_DEREF" in output:
                    status = result.RESULT_FALSE_DEREF
                elif "FALSE_FREE" in output:
                    status = result.RESULT_FALSE_FREE
                elif "FALSE_OVERFLOW" in output:
                    status = result.RESULT_FALSE_OVERFLOW
                else:
                    status = result.RESULT_FALSE_REACH
            elif output.endswith("UNKNOWN"):
                status = result.RESULT_UNKNOWN
            elif isTimeout:
                status = "TIMEOUT"
            else:
                status = "ERROR"

        elif self._get_version() == 6:
            if output.endswith("TRUE"):
                status = result.RESULT_TRUE_PROP
            elif "FALSE" in output:
                if "FALSE(valid-memtrack)" in output:
                    status = result.RESULT_FALSE_MEMTRACK
                elif "FALSE(valid-deref)" in output:
                    status = result.RESULT_FALSE_DEREF
                elif "FALSE(valid-free)" in output:
                    status = result.RESULT_FALSE_FREE
            elif output.endswith("UNKNOWN"):
github sosy-lab / benchexec / benchexec / tools / esbmc.py View on Github external
def determine_result(self, returncode, returnsignal, output, isTimeout):
        output = "\n".join(output)
        status = result.RESULT_UNKNOWN

        if self.allInText(["FALSE_DEREF"], output):
            status = result.RESULT_FALSE_DEREF
        elif self.allInText(["FALSE_FREE"], output):
            status = result.RESULT_FALSE_FREE
        elif self.allInText(["FALSE_MEMTRACK"], output):
            status = result.RESULT_FALSE_MEMTRACK
        elif self.allInText(["FALSE_OVERFLOW"], output):
            status = result.RESULT_FALSE_OVERFLOW
        elif self.allInText(["FALSE_TERMINATION"], output):
            status = result.RESULT_FALSE_TERMINATION
        elif self.allInText(["FALSE"], output):
            status = result.RESULT_FALSE_REACH
        elif "TRUE" in output:
            status = result.RESULT_TRUE_PROP
        elif "DONE" in output:
github sosy-lab / benchexec / benchexec / tools / depthk.py View on Github external
status = ""

        if "TRUE" in output:
            status = result.RESULT_TRUE_PROP
        elif "no-overflow" in output:
            status = result.RESULT_FALSE_OVERFLOW
        elif "valid-deref" in output:
            status = result.RESULT_FALSE_DEREF
        elif "valid-memtrack" in output:
            status = result.RESULT_FALSE_MEMTRACK
        elif "FALSE(TERMINATION)" in output:
            status = result.RESULT_FALSE_TERMINATION
        elif "FALSE" in output:
            status = result.RESULT_FALSE_REACH
        elif "UNKNOWN" in output:
            status = result.RESULT_UNKNOWN
        else:
            status = result.RESULT_ERROR

        return status
github sosy-lab / benchexec / benchexec / tools / cpachecker.py View on Github external
status = "TIMEOUT"

            elif line.startswith("Verification result: "):
                line = line[21:].strip()
                if line.startswith("TRUE"):
                    newStatus = result.RESULT_TRUE_PROP
                elif line.startswith("FALSE"):
                    newStatus = result.RESULT_FALSE_PROP
                    match = re.match(
                        r".* Property violation \(([a-zA-Z0-9_-]+)(:.*)?\) found by chosen configuration.*",
                        line,
                    )
                    if match:
                        newStatus += "(" + match.group(1) + ")"
                else:
                    newStatus = result.RESULT_UNKNOWN

                if not status:
                    status = newStatus
                elif newStatus != result.RESULT_UNKNOWN:
                    status = "{0} ({1})".format(status, newStatus)
            elif line == "Finished." and not status:
                status = result.RESULT_DONE

        if (
            (not status or status == result.RESULT_UNKNOWN)
            and isTimeout
            and returncode in [15, 143]
        ):
            # The JVM sets such an returncode if it receives signal 15 (143 is 15+128)
            status = "TIMEOUT"
github sosy-lab / benchexec / benchexec / tools / threader.py View on Github external
def determine_result(self, returncode, returnsignal, output, isTimeout):
        output = "\n".join(output)
        if "SSSAFE" in output:
            status = result.RESULT_TRUE_PROP
        elif "UNSAFE" in output:
            status = result.RESULT_FALSE_REACH
        else:
            status = result.RESULT_UNKNOWN

        if status == result.RESULT_UNKNOWN and isTimeout:
            status = "TIMEOUT"

        return status
github smackers / smack / svcomp / bench / src / benchexec / benchexec / tools / smack_benchexec_driver.py View on Github external
def determine_result(self, returncode, returnsignal, output, isTimeout):
        """
        Returns a BenchExec result status based on the output of SMACK
        """
        splitout = "\n".join(output)
        if re.search(r'SMACK found no errors.', splitout):
            return result.RESULT_TRUE_PROP
        elif re.search(r'SMACK found an error.*', splitout):
            return result.RESULT_FALSE_REACH
        else:
            return result.RESULT_UNKNOWN
github sosy-lab / benchexec / benchexec / tools / vvt.py View on Github external
def determine_result(self, returncode, returnsignal, output, isTimeOut):
        try:
            for line in output:
                if line.startswith("No bug found"):
                    return result.RESULT_TRUE_PROP
                elif line.startswith("Bug found:"):
                    return result.RESULT_FALSE_REACH
            return result.RESULT_UNKNOWN
        except Exception:
            return result.RESULT_UNKNOWN
github sosy-lab / benchexec / benchexec / tools / skink.py View on Github external
def determine_result(self, returncode, returnsignal, output, isTimeout):
        output = "\n".join(output)
        if "TRUE" in output:
            status = result.RESULT_TRUE_PROP
        elif "FALSE" in output:
            status = result.RESULT_FALSE_REACH
        else:
            status = result.RESULT_UNKNOWN
        return status
github sosy-lab / benchexec / benchexec / tools / acsar.py View on Github external
status = "SEGFAULT"

        elif "received signal 15" in output:
            status = "KILLED"

        elif "Error Location <> is not reachable" in output:
            status = result.RESULT_TRUE_PROP

        elif (
            "Error Location <> is reachable via the following path"
            in output
        ):
            status = result.RESULT_FALSE_REACH

        else:
            status = result.RESULT_UNKNOWN

        return status