Skip to content
Open access

HMCFA: A Precise and Practical Big-Step Control Flow Analysis for Effect Handlers

Aug 2026 · Proc. ACM Program. Lang. · Vol 10, pp. 892 - 920 · 0 citations · 29 references
Computer Science

TL;DR

HMCFA presents HMCFA, the first practical control flow analysis for effect handlers based on big-step semantics, and proves the concrete semantics equivalent to Bauer and Pretnar’s and establishes soundness of the abstraction via address freshness.

Abstract

Effect handlers enable powerful control flow patterns by capturing and resuming continuations, but no control flow analysis exists for programs using them. Applying existing approaches for other delimited control operators would either lose precision through CPS translation or be computationally intractable. We present HMCFA, the first practical control flow analysis for effect handlers based on big-step semantics. Our key technical contributions are: (1) a big-step semantics for effect handlers that allocates denotables and continuations in an explicit store to avoid unbounded syntactic growth, enabling systematic abstraction in the style of Abstracting Definitional Interpreters (ADI); we prove this semantics equivalent to Bauer and Pretnar’s substitution-based big-step semantics. (2) A two-component timestamp that tracks both the current call context and the context in which each handler was installed, so that when an operation is dispatched to a handler, its analysis reflects the invocation context that installed it. We prove our concrete semantics equivalent to Bauer and Pretnar’s and establish soundness of our abstraction via address freshness. An evaluation on Koka benchmarks shows that our address space has good precision even without context sensitivity, but that our timestamp can close most of the remaining gap in precision while still being tractable on our benchmark suite.

Read PDF

Similar papers

Book Open access Oct 2026

ReSEDA: Automatic and Precise Program-Level ReDoS Triage via Interprocedural Taint Analysis and Agentic Exploit Generation

Regular expressions (regexes) are widely used in computer science, particularly in web services. However, Regular Expression Denial-of-Service (ReDoS) has become a growing security threat. ReDoS is an asymmetric Denial-of-Service attack that exploits the super-linear runtime behavior of regex engines. However, existing...

Rong-Chen Li, Wei-Hao Su, Cheng-Yao Peng et al. · 0 citations
Book Open access Sep 2026

Lion: Modular Verification of Async Runtime Liveness

This work introduces an append-only logical event log that abstracts implementation details and enables a Kamp-style translation of Linear Temporal Logic into First-Order Logic, which enables deductive program verifiers to reason about progress via monotonic timestamps without needing native temporal logic support.

Ti Zhou, Zi-Hao Zhang, Omar Chowdhury et al. · 1 citation
Preprint Aug 2026

Cambria: Resource Abstraction for Parametrized Algebraic Effects and Handlers

The algebraic effects and handlers paradigm separates the concerns of the interface and implementation of computational effects in programming languages. We present Cambria, a language that extends this framework to the parametrized setting. Effect signatures may use abstract parameter types that are instantiated by th...

Jack Liell-Cock, Sam Staton · 0 citations
Preprint Sep 2026

CaMeLoT: CaMeL orchestrated with Temporal logic for static verification and liveness

LLM-based agents generate and execute multi-step plans that invoke external tools which can access private data or execute commands. In this setting, security is a property of the entire execution that a plan creates, not just any single step. The plan itself is a critical artefact that captures the tool calls, control...

Elia Nikolaou, M. Eckhoff, Robert Flood et al. · 1 citation
Preprint Sep 2026

CPyGraph: A Version-Aware Static Analysis Framework for Native CPython Bytecode

CPyGraph, a C++ framework for package-level analysis of native CPython bytecode, is presented, a C++ framework for package-level analysis of native CPython bytecode that matches PyCG on its 112-program call-graph benchmark.

Bai-Hong Chen, Wen Li · 0 citations
Conference Open access Sep 2026

The Death of Unnecessary Thread Hopping: Inside Swift 6.2 Approachable Concurrency

When Swift Concurrency was introduced, marking an async method as nonisolated on an actor often caused an immediate and unexpected context switch to the global cooperative pool on reaching an await. In Swift 6.2, NonisolatedNonsendingByDefault reverses that default, allowing async functions to inherit and preserve thei...

Nikita Vasilev · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.