goblint / analyzer

Static analysis framework for C
https://goblint.in.tum.de
MIT License
160 stars 72 forks source link

Clean up `destabilize_vs` #1434

Closed Red-Panda64 closed 1 month ago

Red-Panda64 commented 2 months ago

Problem

See #1433

Proposed Fix

Remove destabilize_vs. To replace its functionality, add an optional callback to all destabilize functions, allowing the caller to perform the check whether the global destabilized a stable start variable or a called variable when needed without a dedicated destabilize implementation. This way, the additional overhead of going through the start variables check only occurs in side with the "cycle" strategy, just as before.

michael-schwarz commented 1 month ago

We should add the hook & simplify the control flow and then we can merge it. The other change we do not want to merge for now.

Red-Panda64 commented 1 month ago

Apologies, I had forgotten this was still open. It is now reduced to unwrapping the obscured control flow around || and the hook call.