`location_invariant` should not be at `switch` `case` label
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 252
- Forks
- 90
- Avg merge
- 4d 1m
- Merged PRs (30d)
- 19
Description
As discovered by @jprotopopov-ut, Goblint can output location_invariant at a switch case label.
This is not allowed by the YAML witness format: it's not be first character of a statement.
Also, inserting an assertion there would not mean the right thing: the assertion would be the last thing in the previous case.
Internally, these probably come from internal if branching nodes from a CIL-converted switch.
Not sure if we have enough information available in Goblint to distinguish the original source of the branchings.
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 Goblint emits location_invariant for internal if-branching nodes created by CIL-converted switch statements. Check whether the available information distinguishes the original switch source and prevents output at case labels. Done means the YAML witness is valid and any inserted assertion refers to the correct statement rather than the previous case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, ocaml, yaml
- Domain
- compilers, devtools
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100