Fix exp.volatiles_are_top and exp.globs_are_top being ignored by relational (Apron) analysis#1988
Draft
Fix exp.volatiles_are_top and exp.globs_are_top being ignored by relational (Apron) analysis#1988
exp.volatiles_are_top and exp.globs_are_top being ignored by relational (Apron) analysis#1988Conversation
2 tasks
… analysis Agent-Logs-Url: https://github.com/goblint/analyzer/sessions/e5bf9b12-a6d7-4775-9602-3b87bd4442d0 Co-authored-by: michael-schwarz <13812333+michael-schwarz@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix analysis recognition for exp.volatiles_are_top and exp.globs_are_top
Fix Apr 12, 2026
exp.volatiles_are_top and exp.globs_are_top being ignored by relational (Apron) analysis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
exp.volatiles_are_top(volatile/extern vars → top) andexp.globs_are_top(all globals → top) were only enforced in the base analysis (base.ml,basePriv.ml). The relational (Apron-based) analysis silently ignored these options, potentially producing unsound results when reading from volatile or extern globals.Changes
src/analyses/apron/relationAnalysis.apron.ml: Extendedread_globalto check both options after copying a global's value into a local temporary. If the global should be top,RD.forget_varsis called on the local, making it unconstrained in the relational domain. This applies to both single-threaded and multi-threaded (privatization) paths.tests/regression/36-apron/100-volatiles-are-top.c: Regression test verifying the Apron interval analysis correctly treats volatile/extern globals as top whenexp.volatiles_are_topis enabled.Note:
GobConfig.get_boolis already memoized viaBatCache, so the per-call overhead is a single hashtable lookup — consistent with how these options are checked elsewhere in the codebase.