Open sim642 opened 2 months ago
Could we maybe think of better names for these things? I think ctx
and query
are things we are overusing already.
Also, WarnGlobal
does not really fit into the category query
anyway, as it returns unit. Maybe for it, a separate transfer function that does not get a ctx
but only an ask
and is called per analysis at the end of the analysis would be the more principled thing?
Just ask
isn't enough for these kinds of things though, they also need global
. For example, the deadlock analysis needs to traverse the entire cycle starting from a global.
True, maybe give it ask
and getg
then?
Queries like
WarnGlobal
andInvariantGlobal
are only used globally in dummyctx
. Moreover, they haveObj.t
arguments which are unsafe. Every analysis lifter which adds its own global unknowns must have special cases for converting such arguments forWarnGlobal
andInvariantGlobal
. If that is forgotten, then Goblint simply segfaults.This PR introduces global queries using a separate
global_query
"transfer" function andgctx
global "context" for the queries, which doesn't require all the dummy data.TODO
InvariantGlobal
query.