-
Notifications
You must be signed in to change notification settings - Fork 62
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
SAW inexplicably prints blank lines when type annotation is omitted #1407
Comments
Here's a slightly more minimal example that doesn't require C code:
|
This is probably due to the transition to |
Indeed, I suspect that |
I happened upon this issue today and realized I encountered it, and fixed it, earlier this year. The problem is in I fixed this in 5475383 by filtering out empty |
Ah - given that this change stops several newlines from being printed upon launching the REPL and that these newlines mean that typechecking warnings were produced and suppressed, it seems that simply launching the REPL yields warnings. I eliminated all warning suppression in
They seem to refer to files in the Cryptol "standard library". I can't say whether these warnings represent actual problems, but I thought I'd record my findings here for posterity. |
Excellent sleuthing, @samcowger! I agree with your proposed fix, and as it turns out, Cryptol itself uses similar code here. Would you be willing to submit a PR with this fix? The Cryptol standard library warnings that you observe when enabling all warnings are interesting. Ultimately, it doesn't seem like that serious of an issue, as even Cryptol appears to suppress those warnings when loading the standard library in the REPL. Why Cryptol chooses to suppress those warnings is a bit mysterious to me, as all of those warnings look quite fixable. Perhaps worth filing an issue about this, but I wouldn't lose much sleep over it. |
Before, SAW would filter out type-default warnings when processing Cryptol, but would always pretty-print the warnings' container (`TypeDefaultWarnings`), even if filtering rendered it empty. Printing an empty `TypeDefaultWarnings` amounts to displaying a newline. See #1407.
Done! See #2001. |
Given the following C and SAWScript program:
If I run this program, SAW will print a wall of blank lines before verifying the spec:
On the other hand, if I change
(`(128 * col + row))
to(`(128 * col + row) : [8])
, then SAW does not print a wall of blank lines:The text was updated successfully, but these errors were encountered: