Reference. Models of a Non-associative Composition
Cite
Cited by (9)
Syntax and semantics of focalisation with relative monads and comonads mangel-2026-syntax
Classical Notions of Computation and the Hasegawa-Thielecke Theorem mangel-2026-classical
Notions of Stack-manipulating Computation and Relative Monads jiang_xue_new_2025
Monads provide a simple and concise interface to user-defined computational effects in functional programming languages. This enables equational reasoning about effects, abstraction over monadic interfaces and the development of monad transformer stacks to allow for multiple effects. Compiler implementors and assembly code programmers similarly virtualize effects, and would benefit from similar abstractions if possible. However, the implementation details of effects seem disconnected from the high-level monad interface: at this lower level much of the design is in the layout of the runtime stack, which is not accessible in a high-level programming language.
We demonstrate that the monadic interface can be faithfully adapted from high-level functional programming to a lower level setting with explicit stack manipulation. We use a polymorphic call-by-push-value (CBPV) calculus as a setting that captures the essence of stack-manipulation, with a type system that allows programs to define domain-specific stack structures. Within this setting, we show that the existing category-theoretic notion of a relative monad can be used to model the stack-based implementation of computational effects. To demonstrate generality, we adapt a variety of standard monads to relative monads. Additionally, we show that stack-manipulating programs can benefit from a generalization of do-notation we call “monadic blocks” that allow all CBPV code to be reinterpreted to work with an arbitrary relative monad. As an application, we show that all relative monads extend automatically to relative monad transformers, a process which is not automatic for monads in pure languages.
Gradual Type Theory new_licata_ahmed_2021
A Semantic Foundation for Sound Gradual Typing new_dissertation_2020
Gradual Type Theory new_licata_ahmed_2019
Gradually typed languages are designed to support both dynamically typed and statically typed programming styles while preserving the benefits of each. While existing gradual type soundness theorems for these languages aim to show that type-based reasoning is preserved when moving from the fully static setting to a gradual one, these theorems do not imply that correctness of type-based refactorings and optimizations is preserved. Establishing correctness of program transformations is technically difficult, because it requires reasoning about program equivalence, and is often neglected in the metatheory of gradual languages.
In this paper, we propose an axiomatic account of program equivalence in a gradual cast calculus, which we formalize in a logic we call gradual type theory (GTT). Based on Levy’s call-by-push-value, GTT gives an axiomatic account of both call-by-value and call-by-name gradual languages. Based on our axiomatic account we prove many theorems that justify optimizations and refactorings in gradually typed languages. For example, uniqueness principles for gradual type connectives show that if the βη laws hold for a connective, then casts between that connective must be equivalent to the so-called “lazy” cast semantics. Contrapositively, this shows that “eager” cast semantics violates the extensionality of function types. As another example, we show that gradual upcasts are pure functions and, dually, gradual downcasts are strict functions. We show the consistency and applicability of our axiomatic theory by proving that a contract-based implementation using the lazy cast semantics gives a logical relations model of our type theory, where equivalence in GTT implies contextual equivalence of the programs. Since GTT also axiomatizes the dynamic gradual guarantee, our model also establishes this central theorem of gradual typing. The model is parametrized by the implementation of the dynamic types, and so gives a family of implementations that validate type-based optimization and the gradual guarantee.
A theory of effects and resources: adjunction models and polarised calculi curien-2016-a
Polarised Intermediate Representation of Lambda Calculus with Sums munchmaccagnoni-2015-polarised
Formulae-as-types for an involutive negation munchmaccagnoni-2014-formulae
Cites 25 works (2 here)
With notes (2)
Focalisation and Classical Realisability munchmaccagnoni-2009-focalisation
On the unity of duality zeilberger-2008-on
External (23)
- Syntax and models of a non-associative composition of programs and proofs (2013)
- Resource modalities in tensor logic (2010)
- Control reduction theories: the benefit of structural substitution (2008)
- Generalized bialgebras and triples of operads (2006)
- Polarized and focalized linear and classical proofs (2005)
- Asynchronous Games 3 An Innocent Model of Linear Logic (2005)
- C'est maintenant qu'on calcule, au cœur de la dualité (2005)
- Sequentiality vs. concurrency in games and logic (2003)
- Adjunction Models For Call-By-Push-Value With Stacks (2003)
- Étude de la polarisation en logique (2002)
- Control categories and duality: on the categorical semantics of the lambda-mu calculus (2001)
- The duality of computation (2000)
- Direct Models of the Computational Lambda-calculus (1999)
- Call-by-Push-Value: A Subsuming Paradigm (1999)
- Re: co-exponential question (Category Theory mailing list) (1999)
- A new deconstructive logic: linear logic (1997)
- Categorical structure of continuation passing style (1997)
- Comprehension categories and the semantics of type dependency (1993)
- Continuation semantics or expressing implication by negation (1993)
- A game semantics for linear logic (1992)
- A computational analysis of Girard's translation and LC (1992)
- A new constructive logic: classic logic (1991)
- Computational lambda-calculus and monads (1989)