Parse the output of the tool and extract the verification result.
        This method always needs to be overridden.
        If the tool gave a result, this method needs to return one of the
        benchexec.result.RESULT_* strings.
        Otherwise an arbitrary string can be returned that will be shown to the user
        and should give some indication of the failure reason
        (e.g., "CRASH", "OUT_OF_MEMORY", etc.).

def determine_result(self, returncode, returnsignal, output, isTimeout):
        """
        Parse the output of the tool and extract the verification result.
        This method always needs to be overridden.
        If the tool gave a result, this method needs to return one of the
        benchexec.result.RESULT_* strings.
        Otherwise an arbitrary string can be returned that will be shown to the user
        and should give some indication of the failure reason
        (e.g., "CRASH", "OUT_OF_MEMORY", etc.).
        """
        for line in output:
            if line.startswith('KLEE: ERROR: '):
                if line.find('ASSERTION FAIL:')!=-1:
                    return result.RESULT_FALSE_REACH
                elif line.find('memory error: out of bound pointer')!=-1:
                    return result.RESULT_FALSE_DEREF
                elif line.find('overflow')!=-1:
                    return result.RESULT_FALSE_OVERFLOW
                else:
                    return "ERROR ({0})".format(returncode)
            if line.startswith('KLEE: done'):
                return result.RESULT_DONE
        return result.RESULT_UNKNOWN