-
Notifications
You must be signed in to change notification settings - Fork 75
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
Generate flow-insensitive YAML witness invariants with ghosts for privatized variables #1394
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This also means that the global variable is (lazily) not accessed when the condition isn't met.
Happened on 13-privatized/01-priv_nr
…utexes Happened on 13-privatized/02-priv_rc.
…utexes Happened on 13-privatized/02-priv_rc.
sim642
added
the
pr-dependency
Depends or builds on another PR, which should be merged before
label
Mar 18, 2024
1 task
sim642
force-pushed
the
yaml-witness-ghost
branch
from
April 2, 2024 08:53
5694838
to
7951588
Compare
jerhard
reviewed
Nov 20, 2024
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 mostly good! I left some comments with questions and remarks.
Co-authored-by: Julian Erhard <julian.erhard@tum.de>
…ow-sensitive invariant
sim642
force-pushed
the
yaml-witness-ghost
branch
from
November 21, 2024 14:33
5d01898
to
b4734c3
Compare
jerhard
reviewed
Nov 22, 2024
sim642
force-pushed
the
yaml-witness-ghost
branch
from
November 29, 2024 11:46
3c75f15
to
4c8dd28
Compare
sim642
force-pushed
the
yaml-witness-ghost
branch
from
November 29, 2024 12:12
4c8dd28
to
ffe255b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a quick implementation of the idea we had a long time ago for exporting our protected invariants into YAML witnesses with ghosts.
protection privatization
For the Freiburg
mutex.c
example, we essentially generate the same witness with ghosts as the example:m_locked
is declared and updated to match lock and unlock operations of the mutexm
.used == 0 || m_locked
is generated using the ghost variable.This is still our special
flow_insensitive_invariant
because there's the question where one would place thelocation_invariant
when our result in fact holds at every point.Currently tested only manually with:
./goblint ~/Documents/concurrency-witnesses/examples/VEWIT2023/mutex.c --enable ana.sv-comp.functions --set pre.cppflags[+] "-DGOBLINT_NO_PTHREAD_ONCE" --html --set ana.activated[+] mutexGhosts --enable witness.yaml.enabled --set witness.yaml.entry-types[+] flow_insensitive_invariant
mutex-meet privatization
For this example, the result is the same, but one invariant is generated per-mutex with a conjunction for all the protected variables. Also for the relational privatization.
TODO
(alloc@...)
locks.earlyglobs
.e235ba7 broke OSX onlyghost_variable
andghost_update
entry types.__VERIFIER_atomic
invariants unconditionally: they should not be observable anyway, but those ghost updates can be technically tricky to work with.