Context-Sensitive Demand-Driven Control-Flow Analysis Article Swipe
YOU?
·
· 2025
· Open Access
·
· DOI: https://doi.org/10.1007/978-3-031-91121-7_15
· OA: W4410041355
By decoupling and decomposing control flows, demand control-flow analysis (CFA) resolves only the flow segments determined necessary to produce a specified control-flow fact. It therefore presents a more flexible interface and pricing model than typical CFA, making many useful applications practical. At present, the only realization of demand CFA is the context-insensitive Demand 0CFA. Typical mechanisms for adding context sensitivity are not compatible with the demand setting because the analyzer is dispatched at arbitrary program points in indeterminate contexts. We overcome this challenge by identifying a context suitable for a demand analysis and designing a representation thereof that allows it to model incomplete knowledge of the context. On top of this design, we construct Demand m -CFA, a context-sensitive demand CFA hierarchy. With the attractive pricing model of demand analysis and the precision offered by context sensitivity, we show that Demand m -CFA can replace its exhaustive counterpart in compiler backends and integrate into interactive tools such as language servers.