Skip to content
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

Relational Mutex-Meet-Privatization making use of Thread IDs #379

Merged
merged 136 commits into from
Nov 24, 2021

Conversation

michael-schwarz
Copy link
Member

@michael-schwarz michael-schwarz commented Oct 8, 2021

This is the progress towards realizing the ideas from https://versioncontrolseidl.in.tum.de/schwarz/more-traces.

The implementation deviates from the description in the manuscript in the following way:

  • We do not know all initial mutexes and protecting sets a priori, thus we cannot init the local state to set all variables protected by them to their initial values:
    • We always read from an unknown that contains the initial values, unless we know that the corresponding mutex must have been already published to. (amounting to a local write, making that reading superfluous). (LMust set)
  • The join of values into local L at thread-join only happens if the thread is unique and must joined. This is a small optimization that preserves soundness but is potentially more precise.
  • The handling of single-threaded mode:
    • No publishing of single-threaded values of main thread until we go multithreaded (improving precision)

This subsumes #385, not sure how we want to proceed there?

@sim642
Copy link
Member

sim642 commented Nov 9, 2021

They do. Not sure why though.

Just had a quick look. They have global variables which are completely unused (OVERFLOW, arr1, arr2). Just removing those makes them more than twice as fast to analyze. Not surprising, since you then have just 6 clusters instead of 21.

@michael-schwarz
Copy link
Member Author

michael-schwarz commented Nov 22, 2021

I'd propose we merge this into master now. Any cleanup that I should do before we do?

.github/workflows/locked.yml Outdated Show resolved Hide resolved
conf/traces-rel.json Show resolved Hide resolved
src/analyses/threadJoins.ml Outdated Show resolved Hide resolved
src/cdomains/threadIdDomain.ml Show resolved Hide resolved
src/util/defaults.ml Outdated Show resolved Hide resolved
src/util/defaults.ml Outdated Show resolved Hide resolved
src/util/defaults.ml Outdated Show resolved Hide resolved
@michael-schwarz
Copy link
Member Author

The failing indentation seems to be unrelated, as this file was not touched in the PR.
If the changes sufficiently addresses your comments @sim642, I suggest we merge this now.

@sim642
Copy link
Member

sim642 commented Nov 24, 2021

The failing indentation seems to be unrelated, as this file was not touched in the PR.

I fixed it directly on master, because a change there caused to be already misindented code to appear in unrelated diffs now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add debug output of how many thread IDs were generated during analysis
3 participants