English
Related papers

Related papers: Handling Bidirectional Control Flow: Technical Rep…

200 papers

We explore asynchronous programming with algebraic effects. We complement their conventional synchronous treatment by showing how to naturally also accommodate asynchrony within them, namely, by decoupling the execution of operation calls…

Programming Languages · Computer Science 2020-11-17 Danel Ahman , Matija Pretnar

Algebraic effects and handlers are a mechanism to structure programs with computational effects in a modular way. They are recently gaining popularity and being adopted in practical languages, such as OCaml. Meanwhile, there has been…

Programming Languages · Computer Science 2023-11-20 Fuga Kawamata , Hiroshi Unno , Taro Sekiyama , Tachio Terauchi

Inference algorithms for probabilistic programming are complex imperative programs with many moving parts. Efficient inference often requires customising an algorithm to a particular probabilistic model or problem, sometimes called…

Programming Languages · Computer Science 2024-12-24 Minh Nguyen , Roly Perera , Meng Wang , Steven Ramsay

We compare the expressive power of three programming abstractions for user-defined computational effects: Bauer and Pretnar's effect handlers, Filinski's monadic reflection, and delimited control without answer-type-modification. This…

Logic in Computer Science · Computer Science 2017-03-01 Yannick Forster , Ohad Kammar , Sam Lindley , Matija Pretnar

We study the algebraic effects and handlers as a way to support decision-making abstractions in functional programs, whereas a user can ask a learning algorithm to resolve choices without implementing the underlying selection mechanism, and…

Programming Languages · Computer Science 2022-03-30 Ugo Dal Lago , Francesco Gavazzo , Alexis Ghyselen

Algebraic effects are computational effects that can be described with a set of basic operations and equations between them. As many interesting effect handlers do not respect these equations, most approaches assume a trivial theory,…

Logic in Computer Science · Computer Science 2020-05-29 Žiga Lukšič , Matija Pretnar

Our aim here is to illustrate how the benefits of structural corecursion can be found in a broader swath of the programming landscape than previously thought. Beginning from a tutorial on structural corecursion in the total, pure functional…

Programming Languages · Computer Science 2021-03-15 Paul Downen , Zena M. Ariola

Type systems designed for information-flow control commonly use a program-counter label to track the sensitivity of the context and rule out data leakage arising from effectful computation in a sensitive context. Currently, type-system…

Programming Languages · Computer Science 2021-01-14 Andrew K. Hirsch , Ethan Cecchetti

Modeling sequential and parallel composition of effectful computations has been investigated in a variety of languages for a long time. In particular, the popular do-notation provides a lightweight effect embedding for any instance of a…

Programming Languages · Computer Science 2024-07-11 David Richter , Timon Böhler , Pascal Weisenburger , Mira Mezini

Programming languages with algebraic effects often track the computations' effects using type-and-effect systems. In this paper, we propose to view an algebraic effect theory of a computation as a variable context; consequently, we propose…

Programming Languages · Computer Science 2021-08-24 Nikita Zyuzin , Aleksandar Nanevski

We propose a novel approach to soundly combining linear types with effect handlers. Linear type systems statically ensure that resources such as file handles are used exactly once. Effect handlers provide a modular programming abstraction…

Programming Languages · Computer Science 2024-01-03 Wenhao Tang , Daniel Hillerström , Sam Lindley , J. Garrett Morris

Implementing LLM-integrated scripts introduces challenges in modularity and performance, as scripts are often coupled to specific LLM implementations and fail to exploit parallelization opportunities. This paper proposes using composable…

Programming Languages · Computer Science 2025-07-30 Di Wang

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…

Programming Languages · Computer Science 2026-02-19 Cade Lueker , Andrew Fox , Bor-Yuh Evan Chang

We present a straightforward, sound Hindley-Milner polymorphic type system for algebraic effects and handlers in a call-by-value calculus, which allows type variable generalisation of arbitrary computations, not just values. This result is…

Programming Languages · Computer Science 2017-04-20 Ohad Kammar , Matija Pretnar

Enhancing mathematical reasoning in Large Language Models typically demands massive datasets, yet data efficiency remains a critical bottleneck. While Curriculum Learning attempts to structure this process, standard unidirectional…

Artificial Intelligence · Computer Science 2026-03-06 Boren Hu , Xiao Liu , Boci Peng , Xinping Zhao , Xiaoran Shang , Yun Zhu , Lijun Wu

The naive combination of polymorphic effects and polymorphic type assignment has been well known to break type safety. Existing approaches to this problem are classified into two groups: one for restricting how effects are triggered and the…

Programming Languages · Computer Science 2024-05-29 Taro Sekiyama , Takeshi Tsukada , Atsushi Igarashi

The development of programming languages can be quite complicated and costly. Hence, much effort has been devoted to the modular definition of language features that can be reused in various combinations to define new languages and…

Programming Languages · Computer Science 2021-08-26 Birthe van den Berg , Tom Schrijvers , Casper Bach-Poulsen , Nicolas Wu

Combining local exceptions and first class continuations leads to programs with complex control flow, as well as the possibility of expressing powerful constructs such as resumable exceptions. We describe and compare games models for a…

Logic in Computer Science · Computer Science 2013-09-06 James Laird

We show how to smoothly incorporate in the object-oriented paradigm constructs to raise, compose, and handle effects in an arbitrary monad. The underlying pure calculus is meant to be a representative of the last generation of OO languages,…

Programming Languages · Computer Science 2025-04-23 Francesco Dagnino , Paola Giannini , Elena Zucca

Different platforms for quantum computation are currently being developed with a steadily increasing number of physical qubits. To make today's devices practical for quantum software engineers, novel programming tools with maximal…

Quantum Physics · Physics 2019-07-17 Michael Cubeddu , Will Finigan , Thomas Lively , Johannes Flick , Prineha Narang