Developing a Framework for Extensible Static Analysis
This paper explores the beginning of a design of an abstract interpreter framework aiming for extensibility along both language features (e.g., operations, variables) and abstract domains (e.g. intervals, parity), with the goal of minimizing code revision during extension. Static analysis research is often stymied by the need to build new interpreters from scratch, leading to a fragmented ecosystem where reusing or extending existing tools across different languages and abstract domains is difficult. We hope that a unified framework could encourage reuse of preexisting work and support future research. We leverage a combination of monadic effect handlers, inspired by Oleg Kiselyov’s Having an Effect, and typeclass polymorphism in Scala. This approach decouples feature implementation from domain-specific logic, facilitating modular addition of new features and domains while maintaining type safety. We present snippets of a design for select language constructs and discuss potential benefits and limitations. While the framework is in early development, this approach shows potential for creating more reusable and adaptable static analysis tools. Further research and implementation are needed to evaluate its ability to handle more complicated analyses and practical use.
Developing a Framework for Extensible Static Analysis (pldi25src-fox.pdf) | 417KiB |