-
Notifications
You must be signed in to change notification settings - Fork 72
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
Improve HoarePO.equal and leq performance #803
Comments
@michael-schwarz suggested adding a short circuiting physical equality check to the
and that already increases the number of |
There's quite an extensive description of all our Hoare-(like) domains in #101, so maybe I'll have to think about this Hoare and partitioning stuff again.
This is a nasty hack used by
I don't think that's true. It's how Actually, now I'm confused: which of the two did you time? Because one's exclusively for addresses and the other is for paths (and some privatizations). The normal |
And another thing to look at (depending on which of the two is the culprit): how many elements do the Hoare sets in question actually have? It could be that for some reason they collect a massive number of unjoinable elements and that's the reason for slowdown. |
|
Here's another reason that it could easily work: |
Spoken aside, We are also locally experimenting with not tracking strings (or in this case as debugging hack, fixing all strings to be equal. That has kind of promising results on sqlite (after #802). Every unknown seems to have been uncovered now, and the majority of things are stable:
|
I suspect there's a reason why these operations have been implemented so inefficiently, address offsets don't actually have well-defined partitioning structure: #101 (comment). |
Completed by #809. |
CHANGES: Functionally equivalent to Goblint in SV-COMP 2023. * Add automatic configuration tuning (goblint/analyzer#772). * Add many library function specifications (goblint/analyzer#865, goblint/analyzer#868, goblint/analyzer#878, goblint/analyzer#884, goblint/analyzer#886). * Reorganize library stubs (goblint/analyzer#814, goblint/analyzer#845). * Add Trace Event Format output to timing (goblint/analyzer#844). * Optimize domains for address and path sets (goblint/analyzer#803, goblint/analyzer#809).
Findings
@michael-schwarz and I did some runs of Goblint (
master
) on the SQLite amalgamation, and investigated performance usingperf
and the firefox-profiler. We looked at the high run time of (on my system)BaseDomain.fun_6129
, which we conjectured to beBaseDomain.equal_basecomponents_t
.Further investigation with
Stats.time
on a ~1 minute run of SQLite showed that a significant amount of time is used inHoarePO.equal
:Command line used for running Goblint on sqlite
Problems With Current Implementation
The current implementation of
HoarePO.equal
relies on checkingHoarePO.leq
in both directions.The implementation of
leq
in turn usesfor_all
, which transforms the argument Hoare-map to a list,mem
, which also transforms its Hoare-map argument to a list. The functionmem
may be called for each element in a Hoare-map.It thus seems like the current implementation could be optimized considerably.
Goals
The implementation of
HoarePO.equal
andHoarePO.leq
should perform a bucket-wise comparison, as all comparable elements have the same hash and are contained in the same bucket. One may also consider implementingequal
directly, instead of relying onleq
Edit: Changed
HoareDomain
toHoarePO
, as that's what I was talking about.The text was updated successfully, but these errors were encountered: