Skip to content

Add CBMC Response parsing and Display controlled output#665

Merged
jaisnan merged 30 commits intomodel-checking:mainfrom
jaisnan:main
Dec 10, 2021
Merged

Add CBMC Response parsing and Display controlled output#665
jaisnan merged 30 commits intomodel-checking:mainfrom
jaisnan:main

Conversation

@jaisnan
Copy link
Contributor

@jaisnan jaisnan commented Nov 23, 2021

Description of changes:

The Old Output from rmc had non user friendly elements including -

  1. Confusing output messages - See Can we remove "assertion failed" from successful assertions? #189
  2. Uncontrolled output from CBMC
  3. Visually unappealing

To solve all the above issues and to setup future features, the CBMC Parser can now -

  1. Process the response blob that is thrown out by CBMC
  2. Store it in temporary files for easy reading.
  3. Restructure the blob to make it easily parseable
  4. Display a controlled output depending on user inputted flags.

The flag --output-format provides the following options [old | terse| regular] and can be passed as following -

rmc test.rs --output-format regular

This is how the previous output from rmc looks like -

image

This is how the controlled output looks like -

image

This change also comes with a pipeline to easily add more styles of output in the future per user requirements and flag based inputs. One such option already provided is the '--terse' flag that displays a summarized output with error messages.

image

Since final output displays are subject to a lot of user experience feedback, the parser seperates out functionality from the result and can be easily changed to match customer tastes.

Call-outs:

  1. Integrating CBMC Viewer into the parser
  2. Introduce three new formats of output via optional flags including report, log format, machine readable format
  3. Handle non Json CBMC outputs with viewer
  4. Test suite for the parser and Data Classes for each output format.

Testing:

  • How is this change tested?
    Tested using regression tests, all but "Expected" suite passes tests with new output, but it still needs it's own testing suite which is in development.
  • Is this a refactor change?
    Refactor and UX/UI change

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • Methods or procedures are documented
  • Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

Copy link
Contributor

@celinval celinval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are a few comments.. I'll keep reviewing the other files.

jaisnan and others added 10 commits December 2, 2021 19:06
Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
…Ubuntu, Removing Explcit output-format flag passing for DynTrait Rust tests
…Ubuntu, Removing Explcit output-format flag passing for DynTrait Rust tests w/fixed formatting issues
Copy link
Contributor

@tedinski tedinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comments I have are about... comments. So I think this can be merged. Hopefully after those quick fixes. @celinval do you have any further comments?

@jaisnan jaisnan marked this pull request as ready for review December 9, 2021 22:05
@jaisnan jaisnan requested a review from a team as a code owner December 9, 2021 22:05
@jaisnan jaisnan requested a review from celinval December 9, 2021 22:26
@celinval
Copy link
Contributor

The comments I have are about... comments. So I think this can be merged. Hopefully after those quick fixes. @celinval do you have any further comments?

I haven't done a last pass, but I think your review should be enough and I don't want to delay this any longer. Thanks for checking!

@jaisnan jaisnan merged commit f045d43 into model-checking:main Dec 10, 2021
tedinski pushed a commit to tedinski/rmc that referenced this pull request Apr 26, 2022
…ng#665)

* Changing default output to Controlled Output after Parsing from CBMC output, providing flags "--terse" and "oldOutput" for
alternate output styles.

* Fix Magic Strings by Providing Enum; Provide Single flag Option and resolve autopep8 issues
tedinski pushed a commit that referenced this pull request Apr 27, 2022
* Changing default output to Controlled Output after Parsing from CBMC output, providing flags "--terse" and "oldOutput" for
alternate output styles.

* Fix Magic Strings by Providing Enum; Provide Single flag Option and resolve autopep8 issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants