Polymorphic Iterable Sequential Effect Systems

by   Colin S. Gordon, et al.

Effect systems are lightweight extensions to type systems that can verify a wide range of important properties with modest developer burden. But our general understanding of effect systems is limited primarily to systems where the order of effects is irrelevant. Understanding such systems in terms of a semilattice of effects grounds understanding of the essential issues, and provides guidance when designing new effect systems. By contrast, sequential effect systems --- where the order of effects is important --- lack an established algebraic characterization. We derive an algebraic characterization from the shape of prior concrete sequential effect systems. We present an abstract polymorphic effect system with singleton effects parameterized by an effect quantale --- an algebraic structure with well-defined properties that can model a range of existing sequential effect systems. We define effect quantales, derive useful properties, and show how they cleanly model a variety of known sequential effect systems. We show that for most effect quantales, there is a free, general notion of iterating a sequential effect, and that for systems we consider the derived iteration agrees with the manually designed iteration operators in prior work. Identifying and applying the right algebraic structure led us to subtle insights into the design of sequential effect systems, which provides guidance on non-obvious points of designing sequential effect systems. We also position effect quantales with respect to work on categorical semantics for sequential effect systems, clarifying the distinctions between these systems and our own. In addition, our derived iteration construct should generalize to these semantic structures, addressing limitations of that work.


page 1

page 2

page 3

page 4


Sequential Effect Systems with Control Operators

Sequential effect systems are a class of effect system that exploits inf...

Error Localization for Sequential Effect Systems (Extended Version)

We describe a new concrete approach to giving predictable error location...

Factorisation systems for logical relations and monadic lifting in type-and-effect system semantics

Type-and-effect systems incorporate information about the computational ...

Handling Higher-Order Effects

Algebraic effect handlers is a programming paradigm where programmers ca...

A Direct-Style Effect Notation for Sequential and Parallel Programs

Modeling sequential and parallel composition of effectful computations h...

Behavioural Equivalence via Modalities for Algebraic Effects

The paper investigates behavioural equivalence between programs in a cal...

Dijkstra Monads for All

This paper proposes a general semantic framework for verifying programs ...

Please sign up or login with your details

Forgot password? Click here to reset