Skip to content

Conversation

@michael-schwarz
Copy link
Member

This now uses the MHP information we compute to exclude more races.
To this end, at each access, we record a tuple of MHP information along with the access.

It also refactors some of our more-traces code by moving MHP to a separate module.

The code around race warnings should probably be looked over carefully, the PR contains a first step towards moving back to pair-wise race warnings.

@sim642 sim642 self-requested a review January 6, 2022 10:49
Copy link
Member

@sim642 sim642 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's something I've wondered before: could there be any way to entirely get rid of the (labeled) string stuff from the accesses and replace them with something more type-safe (allowing for additional operations in pairwise race checking)?
Because this now adds a history-thread-IDs-specific component to the entire access structure in addition to the strings. It's not very flexible if this has to be done for every other analysis-specific race check we might have.

Co-authored-by: Simmo Saan <simmo.saan@gmail.com>
@michael-schwarz
Copy link
Member Author

michael-schwarz commented Jan 8, 2022

Here's something I've wondered before: could there be any way to entirely get rid of the (labeled) string stuff from the accesses and replace them with something more type-safe (allowing for additional operations in pairwise race checking)?

I have also given this some thought, but I did not find any immediately obvious solution: What one would want is some RaceInformation module.

module type RaceInformation = sig
  type t = MHP of MHP.t | Lockset of Lvalset | ...
  val may_race: t -> t -> bool
end

One would then collect sets of such things and the check for two such sets if there exists a and b such that may_race a b is false.

However, we do not really win much there as this RaceInformation thing would still have to explicitly have all possible values that could be the cause for such an exclusion....

So that doesn't seem to be it either.

@michael-schwarz michael-schwarz mentioned this pull request Jan 8, 2022
4 tasks
@sim642 sim642 self-requested a review January 9, 2022 08:38
@sim642 sim642 mentioned this pull request Jan 12, 2022
3 tasks
@sim642 sim642 requested a review from vesalvojdani January 16, 2022 16:17
Copy link
Member

@vesalvojdani vesalvojdani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These code changes look good. We have quite many thread analyses now.... thread, threadflag and threadJoins.

@sim642 sim642 merged commit 87117f3 into master Jan 18, 2022
@sim642 sim642 deleted the use_tids_for_races branch January 18, 2022 13:08
@sim642 sim642 added this to the v2.0.0 milestone Aug 12, 2022
sim642 added a commit to sim642/opam-repository that referenced this pull request Aug 18, 2022
CHANGES:

Goblint "lean" release after a lot of cleanup.

* Remove unmaintained analyses: OSEK, ARINC, shapes, containment, deadlocksByRaces (goblint/analyzer#460, goblint/analyzer#736, goblint/analyzer#812, goblint/analyzer#474).
* Add interactive analysis (goblint/analyzer#391).
* Add server mode (goblint/analyzer#522).
* Add Compilation Database support (goblint/analyzer#406, goblint/analyzer#448).
* Add floating point domain, unrolled array domain and improved struct domains (goblint/analyzer#734, goblint/analyzer#761, goblint/analyzer#577, goblint/analyzer#419).
* Add static loop unrolling and heap variable unrolling (goblint/analyzer#563, goblint/analyzer#722).
* Improve race detection with may-happen-in-parallel analysis (goblint/analyzer#529, goblint/analyzer#518, goblint/analyzer#595).
* Reimplement lockset and deadlock analyses (goblint/analyzer#659, goblint/analyzer#662, goblint/analyzer#650, goblint/analyzer#655).
* Add pthread extraction to Promela (goblint/analyzer#220).
* Add location spans to output (goblint/analyzer#428, goblint/analyzer#449).
* Improve race reporting (goblint/analyzer#550, goblint/analyzer#551).
* Improve dead code reporting (goblint/analyzer#94, goblint/analyzer#353, goblint/analyzer#785).
* Refactor warnings (goblint/analyzer#55, goblint/analyzer#783).
* Add JSON schema for configuration (goblint/analyzer#476, goblint/analyzer#499).
* Refactor option names (goblint/analyzer#28, goblint/analyzer#192, goblint/analyzer#516, goblint/analyzer#675).
* Add bash completion (goblint/analyzer#669).
* Add OCaml 4.13 and 4.14 support, remove OCaml 4.09 support (goblint/analyzer#503, goblint/analyzer#672).
sim642 added a commit to sim642/opam-repository that referenced this pull request Aug 18, 2022
CHANGES:

Goblint "lean" release after a lot of cleanup.

* Remove unmaintained analyses: OSEK, ARINC, shapes, containment, deadlocksByRaces (goblint/analyzer#460, goblint/analyzer#736, goblint/analyzer#812, goblint/analyzer#474).
* Add interactive analysis (goblint/analyzer#391).
* Add server mode (goblint/analyzer#522).
* Add Compilation Database support (goblint/analyzer#406, goblint/analyzer#448).
* Add floating point domain, unrolled array domain and improved struct domains (goblint/analyzer#734, goblint/analyzer#761, goblint/analyzer#577, goblint/analyzer#419).
* Add static loop unrolling and heap variable unrolling (goblint/analyzer#563, goblint/analyzer#722).
* Improve race detection with may-happen-in-parallel analysis (goblint/analyzer#529, goblint/analyzer#518, goblint/analyzer#595).
* Reimplement lockset and deadlock analyses (goblint/analyzer#659, goblint/analyzer#662, goblint/analyzer#650, goblint/analyzer#655).
* Add pthread extraction to Promela (goblint/analyzer#220).
* Add location spans to output (goblint/analyzer#428, goblint/analyzer#449).
* Improve race reporting (goblint/analyzer#550, goblint/analyzer#551).
* Improve dead code reporting (goblint/analyzer#94, goblint/analyzer#353, goblint/analyzer#785).
* Refactor warnings (goblint/analyzer#55, goblint/analyzer#783).
* Add JSON schema for configuration (goblint/analyzer#476, goblint/analyzer#499).
* Refactor option names (goblint/analyzer#28, goblint/analyzer#192, goblint/analyzer#516, goblint/analyzer#675).
* Add bash completion (goblint/analyzer#669).
* Add OCaml 4.13 and 4.14 support, remove OCaml 4.09 support (goblint/analyzer#503, goblint/analyzer#672).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Refactoring, clean-up feature precision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants