Skip to content

Avoid collecting TD3 dep when non-incremental#1972

Merged
sim642 merged 1 commit intomasterfrom
issue-1566
Apr 6, 2026
Merged

Avoid collecting TD3 dep when non-incremental#1972
sim642 merged 1 commit intomasterfrom
issue-1566

Conversation

@sim642
Copy link
Copy Markdown
Member

@sim642 sim642 commented Mar 31, 2026

Closes #1566.

I'm wondering if this makes any difference for large programs like rsync.
The biggest hashtables in TD3 (and probably Goblint overall) are rho, infl and dep because they contain most encountered unknowns. So keeping one empty could make quite a difference.

Obviously we should have this anyway, but I'm interested in doing some benchmarking on sv-benchmarks and rsync to find out if this is one of the stupid significant bottlenecks.

TODO

  • sv-benchmarks
  • rsync

@sim642 sim642 added this to the v2.8.0 Clumsy Clurichaun milestone Mar 31, 2026
@sim642 sim642 self-assigned this Mar 31, 2026
Copilot AI review requested due to automatic review settings March 31, 2026 12:34
@sim642 sim642 added bug performance Analysis time, memory usage analyze-that labels Mar 31, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Reduces memory overhead in the TD3 solver by avoiding population of the (potentially large) dep dependency table when it isn’t needed for incremental functionality.

Changes:

  • Introduces a collect_dep flag to control whether dep is populated.
  • Guards dep updates in add_infl and dep resets on RHS re-evaluation behind collect_dep.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/solver/td3.ml
@sim642
Copy link
Copy Markdown
Member Author

sim642 commented Apr 1, 2026

On sv-benchmarks with level01, 60s and 1GB, it doesn't make a difference in time, but it does lower peak memory usage by ~5%:
image
(https://goblint.cs.ut.ee/results/322-all-level01-pr-1972-after/table-generator-cmp.table.html#/scatter?toolX=0&columnX=4&toolY=1&columnY=4&regression=Linear&results=All&filter=0(0*status*(status(notIn()),category(notIn(error)))),1(0*status*(status(notIn()),category(notIn(error))))&scaling=Linear&line=1.2)

I still want to try it on rsync to see what happens for significantly larger programs.

@sim642
Copy link
Copy Markdown
Member Author

sim642 commented Apr 6, 2026

This speeds up rsync analysis by ~6% (on top of #1974): goblint/bench@6e4ada7.

@sim642 sim642 merged commit 8cfeedb into master Apr 6, 2026
23 checks passed
@sim642 sim642 deleted the issue-1566 branch April 6, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

analyze-that bug performance Analysis time, memory usage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid populating dep table in TD3 when non-incremental

2 participants