Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not produce trace links for UNKNOWN status #175

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/cbmc_viewer/resultt.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ def parse_cbmc_xml_results(xml_file):

JSON_STATUS_MESSAGE = 'STATUS-MESSAGE'
JSON_SUCCESS = 'SUCCESS'
JSON_UNKNOWN = 'UNKNOWN'
JSON_WARNING = 'WARNING'

JSON_PROVER_STATUS_SUCCESS = 'success'
Expand All @@ -313,6 +314,7 @@ def parse_cbmc_xml_results(xml_file):

XML_STATUS_MESSAGE = 'STATUS-MESSAGE'
XML_SUCCESS_STATUS = 'SUCCESS'
XML_UNKNOWN_STATUS = 'UNKNOWN'
XML_WARNING_MESSAGE = 'WARNING'

################################################################
Expand Down Expand Up @@ -421,8 +423,8 @@ def cbmc_text_results(results_section):
results = EMPTY_RESULT_RESULTS
for line in results_section:
# Lines given property checking results have the form
# [name] srcloc description: SUCCESS|FAILURE
match = re.match(r'\[([^ ]*)\].*: ((FAILURE)|(SUCCESS))', line)
# [name] srcloc description: SUCCESS|FAILURE|UNKNOWN
match = re.match(r'\[([^ ]*)\].*: ((FAILURE)|(SUCCESS)|(UNKNOWN))', line)
if match:
name, status = match.groups()[:2]
results[status == 'SUCCESS'].append(name)
Expand All @@ -435,7 +437,7 @@ def cbmc_json_results(blobs):
for blob in blobs:
for result in blob.get(JSON_RESULT_KEY) or []:
name, status = result[JSON_PROPERTY_KEY], result[JSON_STATUS_KEY]
results[status == JSON_SUCCESS].append(name)
results[status in [JSON_SUCCESS, JSON_UNKNOWN]].append(name)
return results

def cbmc_xml_results(blob):
Expand All @@ -447,7 +449,7 @@ def cbmc_xml_results(blob):
for result in blob.iter(XML_RESULT_TAG):
name = result.get(XML_RESULT_PROPERTY_ATTR)
status = result.get(XML_RESULT_STATUS_ATTR)
results[status == XML_SUCCESS_STATUS].append(name)
results[status in [XML_SUCCESS_STATUS, XML_UNKNOWN_STATUS]].append(name)

# cbmc --stop-on-fail output produces one trace with one failure
if not (results[True] or results[False]):
Expand Down
Loading