-
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
Add ana.base.strings.domain
option and unit string domain
#1208
Conversation
I would strategically propose to delay this until @nathanschmidt can integrate his PR #1076 and potentially also #1118, as these will significantly extend the string domains, and the interface that is needed will hopefully be more clear after this (though I am not sure how significant the overlap is between these two issues here anyway). @nathanschmidt could you comment with an estimated timeline for addressing the comments on the PRs? Iirc you said no earlier than this week? |
Neither of those has to do with the Right now, the big problem for us analyzing real-world programs is performance, not imprecision. Already given #1126, it's beneficial to have the ability turn off all these new things. We're shooting ourselves in the foot on real-world programs if the analyses keep getting more expensive without a choice. |
@michael-schwarz I currently have quite some time constraints, but I plan to have a look next week. |
In goblint/bench#62 (comment) I noted:
One possible reason for so many contexts with
ana.base.context.non-ptr
disabled could be string literals (StrPtr
) in address sets, which would be preserved in contexts.ana.base.limit-string-addresses
(true by default) doesn't do enough limitation. When true, string literals are handled like a flat lattice (a la constant propagation), which still yields separate contexts for all different calls with string literal arguments. When false, string literals are handled as a set.It would be possible to do even more limiting: not track any string literals, i.e. use a unit domain for them. I hacked it by making
of_string
always returnStrPtr None
. This at least got rid of many contexts for some functions, but not all.This PR implements that hack more cleanly by extracting a
StringDomain
module and introducing the optionana.base.strings.domain
with three possible values:disjoint
corresponds toana.base.limit-string-addresses
false.flat
corresponds toana.base.limit-string-addresses
true.unit
corresponds to the new even more imprecise domain with no information at all.