Skip to content

Add Linter Checks to Gobra#954

Closed
herzamos wants to merge 18 commits intoviperproject:masterfrom
herzamos:pwfs25
Closed

Add Linter Checks to Gobra#954
herzamos wants to merge 18 commits intoviperproject:masterfrom
herzamos:pwfs25

Conversation

@herzamos
Copy link
Copy Markdown

@herzamos herzamos commented Aug 7, 2025

TODO

herzamos added 18 commits May 19, 2025 12:15
@herzamos herzamos changed the title Add Litner Checks to Gobra Add Linter Checks to Gobra Aug 7, 2025
@jcp19 jcp19 marked this pull request as draft August 9, 2025 18:50
@jcp19
Copy link
Copy Markdown
Contributor

jcp19 commented Apr 23, 2026

The conclusion of this work is that we should strengthen Gobra with stronger checks already to prevent common specification errors. That are things that we can easily do in the context of Gobra itself, like:

  • reject non-heap dependent expressions occurring in old expressions
  • reject permission amounts in places where they are not consequential, like specs and bodies of pure functions
  • reject some form of redundant pre/postconditions
  • reject preconditions that trivially evaluate to false but are not the expression false. in these cases, it is likely the dev meant sth else

@jcp19 jcp19 closed this Apr 23, 2026
@jcp19
Copy link
Copy Markdown
Contributor

jcp19 commented May 2, 2026

Other useful checks include rejecting abstract functions and methods without marking them as trusted (which makes it easy to textually enumerate all the places where assumptions are introduced) and to reject unused variables (especially in ghost code), which the go compiler does by default

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.

2 participants