viperproject / viperproject/silver
Invariants on labels should be disallowed unless they form loop heads and while loops that are not loop heads should be rejected
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 100
- Forks
- 53
- Avg merge
- 8h 10m
- Merged PRs (30d)
- 2
Description
Created by @alexanderjsummers on 2019-10-30 08:47
Because of how loops are verified, the current meaning of an “invariant” on a label varies significantly depending on whether the label represents the head of a loop or not. Since there is no motivation for “invariant”s on non-loop-head labels, we should make this an error.
It might become frustrating that one cannot manually choose a label to be a loop head, and also cannot see which labels were chosen as loop heads. We could consider providing extra feedback in the corresponding error message, and potentially (in cases for which the choice of loop head is ambiguous) allowing a user to declare that a label is supposed to be a loop head (in fact, once this issue is fixed, an invariant annotation would do just that).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how loop verification determines loop heads and how invariants on labels and while loops are currently validated. Inspect the relevant verification and error-reporting paths, then confirm the behavior rejects invariants on non-loop-head labels and while loops that are not loop heads, with appropriate feedback for the user.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100