-
Notifications
You must be signed in to change notification settings - Fork 76
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
Generalize global constraint variables to module V: Printable.S
in each analysis
#473
Conversation
Looks good thus far! I have to say I am thoroughly impressed that this did not require a major overhaul of everything! |
Before (x-axis) and after (y-axis) on SoftwareSystems and ConcurrencySafety: Disappointingly, the performance only improves in a handful of cases. Also there's no precision improvement (at least on a super high level in the form of better verdicts) on these benchmarks. I suppose for the single-threaded programs, there shouldn't be a difference anyway because global constraint variables are not used. For multi-threaded programs, I suspect the difference is maybe small because whereever you read a global (from the base analysis variable) the privatization forces the reading of another global (from the mutex analysis variable), so the dependencies we have are still quite tightly coupled between the analyses. EDIT: I forgot that we now have our benchmarking server publically accessible, so the Benchexec tables are here: https://goblint.cs.ut.ee/results/49-all-fast-gen-glob-after/results/. |
What would be interesting is if the number of globals that are widening points changed, the hypothesis being that less widening might be applied. But then this is super hard to measure because we now have a lot more globals than we did before. Also, it would be interesting to see what happens with runtime and the number of variables and evaluations if one runs one of the larger multi-threaded programs (e.g. the traces or more traces bechmarks), or some of the other larger projects from our test repo with |
I ran the traces benchmarks before and after, didn't notice much of a difference there either (and the bigger programs were from sv-benchmarks anyway). I don't know about the single-threaded benchmarks in bench though. It's also the case that the base analysis and privatizations still use |
I have now also refactored all the privatizations at the top level at least. So no more Moreover, I replaced the global product domains for those things with EDIT: I now went even further and also made the base analysis globals a variant of the privatization's globals or thread returns. This allowed getting rid of all the thread return handling that previously had to be in all the privatizations because they were completely in charge of base's globals. Also it allowed to get rid of |
Previously this happened via CPA and sync `Return.
I ran sv-benchmarks again after my futher refactorings and there is now a 3% improvement in the regression line compared to I'm not sure where this improvement exactly came from though because the changes were to privatizations, which only matter for concurrent benchmarks and even then we don't use any of the more expensive privatizations. |
Closes #469.
Changes
module V: Printable.S
to each analysis spec, which will be the module used for global constraint variables for that analysis. Since it's abstractV.t
can be anything, not necessarilyvarinfo
.'v
type parameter toctx
. This is necessary to makectx.global
andctx.sideg
correctly typed for thatV.t
.MCP
's globals handling to use "variants" instead of lists for both global variables and their values. Each variant is just a pair of the analysis ID (int
) and the corresponding variable/value asObj.t
.varinfo
globals: thread, threadJoins, arinc and extract_arinc.V
if they want to use any globals (includingvarinfo
).DefaultSpec
just uses an empty (variant) type, which means no globals can be used at all.TODO
varinfo
. Also to see if immediately any performance or precision improvement arises from the separation of globals for different analyses.