updated spf.py script
@@ -16,9 +16,10 @@ limitations under the License.
import logging
import benchexec.util as util
-import benchexec.tools.jpf
+import benchexec.tools.template
+import benchexec.result as result
-class Tool(benchexec.tools.jpf.Tool):
+class Tool(benchexec.tools.template.BaseTool):
"""
Tool info for JPF with symbolic extension (SPF)
(https://github.com/symbolicpathfinder).
@@ -37,3 +38,27 @@ class Tool(benchexec.tools.jpf.Tool):
def name(self):
return 'SPF'
+
+ def version(self, executable):
+ version = '1'
+ with open(".version", 'r') as f:
+ version = f.read().strip()
+ return version
+
+
+ def cmdline(self, executable, options, tasks, propertyfile, rlimits):
+ options = options + ['--propertyfile', propertyfile]
+ return [executable] + options + tasks
+
+
+ def determine_result(self, returncode, returnsignal, output, isTimeout):
+ # parse output
+ status = result.RESULT_UNKNOWN
+
+ for line in output:
+ if 'UNSAFE' in line:
+ status = result.RESULT_FALSE_PROP
+ elif 'SAFE' in line:
+ status = result.RESULT_TRUE_PROP
+
+ return status
