Towards Cumulative Abstract Semantics via Handlers
By: Cade Lueker, Andrew Fox, Bor-Yuh Evan Chang
Potential Business Impact:
Lets computer programs check themselves better.
We consider the problem of modularizing control flow in a generic abstract interpretation framework. A generic abstract interpretation framework is not truly flexible if it does not allow interpreting with different path- and flow-sensitivities, by going forwards or backwards, and over- or under-approximately. Most interpreters inherently intertwine syntax and semantics, making the implementation antagonistic to modularity. Current approaches to modular designs require the use of complex data structures (e.g., monad transformers), providing modularity but often proving unwieldy (e.g., lifts). We observe that leveraging scoped effects within an interpreter facilitates the accumulation of semantic fragments against a fixed syntax. In this paper, we define cumulative abstract semantics, illustrating the potential for creating multiple dynamic evaluators and static analyses from one interpreter. This modularity is achieved by grouping effects into two categories: syntax elimination and domain-semantic introduction handlers. Our contribution shows the benefits of using effects as an instrument for designing a clean, elegant, and modular abstract interpretation framework.
Similar Papers
Handling Higher-Order Effectful Operations with Judgemental Monadic Laws
Programming Languages
Makes computer programs more flexible and powerful.
Cost-Driven Synthesis of Sound Abstract Interpreters
Programming Languages
AI helps check if computer programs are safe.
Type, Ability, and Effect Systems: Perspectives on Purity, Semantics, and Expressiveness
Programming Languages
Makes computer programs safer and easier to write.