Towards Cumulative Abstract Semantics via Handlers

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Lueker, Cade, Fox, Andrew, Chang, Bor-Yuh Evan
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866914335947751424
author Lueker, Cade
Fox, Andrew
Chang, Bor-Yuh Evan
author_facet Lueker, Cade
Fox, Andrew
Chang, Bor-Yuh Evan
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2512_10861
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Towards Cumulative Abstract Semantics via Handlers
Lueker, Cade
Fox, Andrew
Chang, Bor-Yuh Evan
Programming Languages
D.3.1 Formal Definitions and Theory
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.
title Towards Cumulative Abstract Semantics via Handlers
topic Programming Languages
D.3.1 Formal Definitions and Theory
url https://arxiv.org/abs/2512.10861