Reference. Just do it: simple monadic equational reasoning
Cite
Cited by (6)
Handling Higher-Order Effectful Operations with Judgemental Monadic Laws yang-2026-handling
This paper studies the design of programming languages with handlers of higher-order effectful operations - effectful operations that may take in computations as arguments or return computations as output. We present and analyse a core calculus with higher-kinded impredicative polymorphism, handlers of higher-order effectful operations, and optionally general recursion. The distinctive design choice of this calculus is that handlers are carried by lawless raw monads, while the computation judgements still satisfy the monadic laws judgementally. We present the calculus with a logical framework and give denotational models of the calculus using realizability semantics. We prove closed-term canonicity and parametricity for the recursion-free fragment of the language using synthetic Tait computability and a novel form of the ⊤⊤-lifting technique.
Algebraic Effects Meet Hoare Logic in Cubical Agda kidney-2024-algebraic
This paper presents a novel formalisation of algebraic effects with equations in Cubical Agda. Unlike previous work in the literature that employed setoids to deal with equations, the library presented here uses quotient types to faithfully encode the type of terms quotiented by laws. Apart from tools for equational reasoning, the library also provides an effect-generic Hoare logic for algebraic effects, which enables reasoning about effectful programs in terms of their pre- and post-conditions. A particularly novel aspect is that equational reasoning and Hoare-style reasoning are related by an elimination principle of Hoare logic.
Formalized High Level Synthesis with Applications to Cryptographic Hardware harrison-2023-formalized
An Algebraic Theory for Shared-State Concurrency dvir-2022-an
Reasoning about effect interaction by fusion yang-2021-reasoning
Effect handlers can be composed by applying them sequentially, each handling some operations and leaving other operations uninterpreted in the syntax tree. However, the semantics of composed handlers can be subtle—it is well known that different orders of composing handlers can lead to drastically different semantics. Determining the correct order of composition is a non-trivial task. To alleviate this problem, this paper presents a systematic way of deriving sufficient conditions on handlers for their composite to correctly handle combinations, such as the sum and the tensor, of the effect theories separately handled. These conditions are solely characterised by the clauses for relevant operations of the handlers, and are derived by fusing two handlers into one using a form of fold/build fusion and continuation-passing style transformation. As case studies, the technique is applied to commutative and distributive interaction of handlers to obtain a series of results about the interaction of common handlers: (a) equations respected by each handler are preserved after handler composition; (b) handling mutable state before any handler gives rise to a semantics in which state operations are commutative with any operations from the latter handler; (c) handling the writer effect and mutable state in either order gives rise to a correct handler of the commutative combination of these two theories.
Algorithmics bird-2021-algorithmics
Cites 40 works (1 here)
With notes (1)
Categories for the Working Mathematician maclane_1971
External (39)
- Effective reasoning about effectful traversals (work in progress) (2011)
- Kleene monads: Handling iteration in a framework of generic effects (2009)
- Handlers of Algebraic Effects (2009)
- The Monty Hall Problem: The Remarkable Story of Math's Most Contentious Brain Teaser (2009)
- HasCasl: Integrated higher-order specification and program development (2009)
- A Hoare Logic for the State Monad (2009)
- Hoare type theory, polymorphism and separation (2008)
- Ynot: dependent types for imperative programs (2008)
- Real World Haskell (2008)
- Reasoning about effects: Seeing the wood through the trees (2008)
- A Functional Specification of Effects (PhD thesis, Nottingham) (2008)
- The Category Theoretic Understanding of Universal Algebra: Lawvere Theories and Monads (2007)
- Beauty in the beast (2007)
- Probabilistic functional programming in Haskell (2006)
- Distributing probability over non-determinism (2006)
- MonadPlus reform proposal (2006)
- Abstraction, Refinement and Proof for Probabilistic Systems (2005)
- Separation and information hiding (2004)
- Haskell 98 Language and Libraries: The Revised Report (2003)
- Algebraic Operations and Generic Effects (2003)
- Notions of computation determine monads (2002)
- Stochastic lambda calculus and monads of probability distributions (2002)
- Monads and effects (2002)
- Prolog's control constructs in a functional setting — axioms and implementation (2001)
- Tackling the awkward squad: Monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell (2001)
- Recursive monadic bindings (2000)
- Continuous D-Cones: Convexity and Powerdomain Constructions (PhD thesis, TU Darmstadt) (1999)
- Imperative functional programming (1993)
- Comprehending monads (1992)
- Monads for functional programming (1992)
- Testing probabilistic and nondeterministic processes (1992)
- Notions of computation and monads (1991)
- Ask Marilyn (Parade Magazine, 9 September 1990) (1990)
- A probabilistic powerdomain of evaluations (1989)
- A critique of Abelson and Sussman or why calculating is better than scheming (1987)
- A couple of novelties in the propositional calculus (1985)
- A categorical approach to probability theory (1981)
- Functorial Semantics of Algebraic Theories (PhD thesis, Columbia) (1963)
- The category of probabilistic mappings (1962)