Skip to content

Conversation

@sim642
Copy link
Member

@sim642 sim642 commented May 20, 2025

This is a rebase of (the relevant parts of) #1743 on top of #1746.
It was easier to cherry-pick the necessary commits from #1743 to avoid conflicts with #1746. Also #1743 includes changes to unrelated solvers which would've needed reverting anyway. So this way we get a cleaner history.

TODO

  • Fix incremental tests.
  • Allow option to disable weak dependencies altogether.
  • Redo comparison on sv-benchmarks.
  • Clean up implementation.

@sim642 sim642 self-assigned this May 20, 2025
@sim642 sim642 added feature student-job performance Analysis time, memory usage labels May 20, 2025
@sim642
Copy link
Member Author

sim642 commented May 26, 2025

I redid the comparison on ConcurrencySafety from sv-benchmarks, but with full SV-COMP resource limits. The output is currently here, but the important plots are screenshotted below: https://goblint.cs.ut.ee/results/259-concurrency-weak-deps-before/table-generator-cmp.table.html#/.
Since demand is only used for concurrency, non-concurrent programs are irrelevant.

Quantile plots

Evals

image

CPU time

image

Scatter plots (before vs after-lazy)

Evals

image

CPU time

image

Differences

Going from before to after-lazy also has an impact on 6 verdicts:

  1. pthread-complex/workstealqueue_mutex-1.yml (no-data-race): TIMEOUT (900s) → unknown (2-3s)
  2. pthread-complex/workstealqueue_mutex-2.yml (no-data-race): TIMEOUT (900s) → unknown (2-3s)
  3. pthread-complex/workstealqueue_mutex-2.yml (no-overflow): TIMEOUT (900s) → unknown (2-3s)
  4. pthread-complex/workstealqueue_mutex-2.yml (unreach-call): TIMEOUT (900s) → unknown (2-3s)
  5. pthread-complex/workstealqueue_mutex-2.yml (valid-memsafety): TIMEOUT (900s) → unknown (2-3s)
  6. ldv-linux-3.14-races/linux-3.14--drivers--net--irda--w83977af_ir.ko.cil.yml (valid-memsafety): TIMEOUT (900s) → ERROR (verify) (608s)

Although this doesn't give is more points in SV-COMP, these speedups are insane: at least 300×!


Given all of this evidence, I'm proposing to make lazy weak dependencies the default in TD3.

@sim642 sim642 marked this pull request as ready for review May 26, 2025 09:06
@sim642 sim642 requested review from arkocal and michael-schwarz May 26, 2025 09:18
@arkocal
Copy link
Contributor

arkocal commented May 27, 2025

This looks good to me. Reminder that I cannot accepts PRs, hence the comment.

Copy link
Member Author

@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.

I've now made no weak dependencies the default.

@sim642 sim642 requested a review from michael-schwarz May 28, 2025 09:04
@sim642 sim642 merged commit 199e001 into master May 28, 2025
16 of 19 checks passed
@sim642 sim642 deleted the weak-deps branch May 28, 2025 14:54
@sim642 sim642 added this to the v2.6.0 milestone May 28, 2025
sim642 added a commit to sim642/opam-repository that referenced this pull request Sep 5, 2025
CHANGES:

* Add division by zero analysis (goblint/analyzer#1764).
* Add bitfield domain (goblint/analyzer#1623).
* Add weakly-relational C-2PO pointer analysis (goblint/analyzer#1485).
* Add widening delay (goblint/analyzer#1358, goblint/analyzer#1442, goblint/analyzer#1483).
* Add narrowing of globals to top-down solver (goblint/analyzer#1636).
* Add weak dependencies to top-down solver (goblint/analyzer#1746, goblint/analyzer#1747).
* Add YAML ghost witness generation (goblint/analyzer#1394).
* Remove GraphML witness generation (goblint/analyzer#1732, goblint/analyzer#1733, goblint/analyzer#1738).
* Use C standard option for preprocessing (goblint/analyzer#1807).
* Add bash completion for array options (goblint/analyzer#1670, goblint/analyzer#1705, goblint/analyzer#1750).
* Make `malloc(0)` semantics configurable (goblint/analyzer#1418, goblint/analyzer#1777).
* Update path-sensitive analyses (goblint/analyzer#1785, goblint/analyzer#1791, goblint/analyzer#1792).
* Fix evaluation of library function arguments (goblint/analyzer#1758, goblint/analyzer#1761).
* Optimize affine equalities analysis using sparse matrices (goblint/analyzer#1459, goblint/analyzer#1625).
* Prepare for parallelism (goblint/analyzer#1708, goblint/analyzer#1744, goblint/analyzer#1748, goblint/analyzer#1781, goblint/analyzer#1790).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature performance Analysis time, memory usage student-job

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants