An approach to improving the recall of static analysis of .NET applications using frameworks, such as WPF and Entity Framework Core, is proposed. It is based on generating an equivalent C# code that models user interaction scenarios. These frameworks rely on declarative markup files (XAML, Razor) processed at runtime thus creating semantic gaps invisible to traditional static analyzers that work only with C# source code. The method reconstructs implicit connections between user interface elements and event handlers by parsing markup, extracting semantic relationships, and generating an equivalent C# code that models user interaction scenarios. The technique was implemented in the SharpChecker static analyzer with the focus on WPF applications. It includes XAML parsing, ViewModel extraction for MVVM patterns, and CodeDOM-based code generation simulating button clicks and command invocations. Experiments on five open-source WPF projects revealed 84 new true positive warnings, including division by zero errors and null reference dereferences previously missed. The approach adds minimal analysis overhead and integrates seamlessly with existing analyzers. The results demonstrate that equivalent code generation significantly improves the recall of static analysis of framework-based applications.
No takes yet. Share an insight, caveat, or question.
Бородавко et al. (2026) studied this question.
Synapse has enriched 5 related papers. Consider them for comparative context: