-
Notifications
You must be signed in to change notification settings - Fork 85
Add a more consistent and sophisticated warning system #466
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
Conversation
Are you always printing warnings as comments into bpl file? |
No, they are printed only when the warning level is greater than or equal to unsound. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
I don't think we handled the color warning as elegantly as we could have, but I can't think of a better way. I suppose it could be reworked if more coloring were done later.
Currently we print out some thing like:
unsoundly ignoring ... try adding flag(s) (bit-precise)
would it be better if we said:
unsoundly ignoring ... try adding flag(s) (--bit-precise)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
We need to do some refactoring after the bv intrinsic handling PR is merged. |
I have a more high-level concern about this pull request. I know we already discussed this to some extent, but it is still not completely clear to me how come we could not simply use LLVM's What is Also, we use |
First of all, the existing Second, when I first implemented this PR, I used LLVM's |
This commit changes SMACK's warning system as follows, 1. Added a class (SmackWarnings) to provide APIs that print warning messages to both the Boogie program and the console. 2. The warning messages are layered: there are three levels, silent (no messages), unsound (messages about unsoundness such as using uninterpreted functions to model bitwise operations), and info (messages about unsoundness as well as translation information such as collapsing DSA nodes). Their relation is silent ⊂ unsound ⊂ info. 3. The warning messages can be colored, which is controlled by the llvm2bpl option, `-colored-warnings`. Co-authored-by: Mark Stanislaw Baranowski <mark.s.baranowski@gmail.com> Co-authored-by: Shaobo He <polarishehn@gmail.com>
3bc61fd
to
96785f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
No description provided.