<s> """<STR_LIT>""" <EOL> import os <EOL> import benchexec . util as util <EOL> import benchexec . tools . template <EOL> import benchexec . result as result <EOL> class Tool ( benchexec . tools . template . BaseTool ) : <EOL> """<STR_LIT>""" <EOL> REQUIRED_PATHS = [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ] <EOL> def executable ( self ) : <EOL> return util . find_executable ( '<STR_LIT>' ) <EOL> def working_directory ( self , executable ) : <EOL> executableDir = os . path . dirname ( executable ) <EOL> return executableDir <EOL> def environment ( self , executable ) : <EOL> return { "<STR_LIT>" : { '<STR_LIT>' : '<STR_LIT>' } } <EOL> def version ( self , executable ) : <EOL> return self . _version_from_tool ( executable , '<STR_LIT>' ) <EOL> def name ( self ) : <EOL> return '<STR_LIT>' <EOL> def cmdline ( self , executable , options , tasks , propertyfile , rlimits ) : <EOL> assert len ( tasks ) == <NUM_LIT:1> , "<STR_LIT>" <EOL> inputfile = tasks [ <NUM_LIT:0> ] <EOL> return [ executable ] + [ '<STR_LIT:-c>' , propertyfile ] + options + [ inputfile ] <EOL> def determine_result ( self , returncode , returnsignal , output , isTimeout ) : <EOL> output = '<STR_LIT:\n>' . join ( output ) <EOL> status = result . RESULT_UNKNOWN <EOL> if self . allInText ( [ '<STR_LIT>' ] , output ) : <EOL> status = result . RESULT_FALSE_DEREF <EOL> elif self . allInText ( [ '<STR_LIT>' ] , output ) : <EOL> status = result . RESULT_FALSE_FREE <EOL> elif self . allInText ( [ '<STR_LIT>' ] , output ) : <EOL> status = result . RESULT_FALSE_MEMTRACK <EOL> elif self . allInText ( [ '<STR_LIT>' ] , output ) : <EOL> status = result . RESULT_FALSE_OVERFLOW <EOL> elif self . allInText ( [ '<STR_LIT>' ] , output ) : <EOL> status = result . RESULT_FALSE_REACH <EOL> elif '<STR_LIT>' in output : <EOL> status = result . RESULT_TRUE_PROP <EOL> if status == result . RESULT_UNKNOWN : <EOL> if isTimeout : <EOL> status = '<STR_LIT>' <EOL> elif output . endswith ( ( '<STR_LIT>' , '<STR_LIT>' ) ) : <EOL> status = '<STR_LIT>' <EOL> elif output . endswith ( ( '<STR_LIT:error>' , '<STR_LIT>' ) ) : <EOL> status = '<STR_LIT>' <EOL> elif '<STR_LIT>' in output : <EOL> status = '<STR_LIT>' <EOL> return status <EOL> """<STR_LIT>""" <EOL> def allInText ( self , words , text ) : <EOL> """<STR_LIT>""" <EOL> index = <NUM_LIT:0> <EOL> for word in words : <EOL> index = text [ index : ] . find ( word ) <EOL> if index == - <NUM_LIT:1> : <EOL> return False <EOL> return True </s>
