9 research outputs found
Substitution, jumps, and algebraic effects
Contains fulltext :
129931.pdf (author's version ) (Open Access
No value restriction is needed for algebraic effects and handlers
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 surprising. On the one hand, the soundness of unrestricted
call-by-value Hindley-Milner polymorphism is known to fail in the presence of
computational effects such as reference cells and continuations. On the other
hand, many programming examples can be recast to use effect handlers instead of
these effects. Analysing the expressive power of effect handlers with respect
to state effects, we claim handlers cannot express reference cells, and show
they can simulate dynamically scoped state
Modular Termination for Second-Order Computation Rules and Application to Algebraic Effect Handlers
We present a new modular proof method of termination for second-order
computation, and report its implementation SOL. The proof method is useful for
proving termination of higher-order foundational calculi. To establish the
method, we use a variation of semantic labelling translation and Blanqui's
General Schema: a syntactic criterion of strong normalisation. As an
application, we apply this method to show termination of a variant of
call-by-push-value calculus with algebraic effects and effect handlers. We also
show that our tool SOL is effective to solve higher-order termination problems.Comment: 27 page
Cyclic Datatypes modulo Bisimulation based on Second-Order Algebraic Theories
Cyclic data structures, such as cyclic lists, in functional programming are
tricky to handle because of their cyclicity. This paper presents an
investigation of categorical, algebraic, and computational foundations of
cyclic datatypes. Our framework of cyclic datatypes is based on second-order
algebraic theories of Fiore et al., which give a uniform setting for syntax,
types, and computation rules for describing and reasoning about cyclic
datatypes. We extract the "fold" computation rules from the categorical
semantics based on iteration categories of Bloom and Esik. Thereby, the rules
are correct by construction. We prove strong normalisation using the General
Schema criterion for second-order computation rules. Rather than the fixed
point law, we particularly choose Bekic law for computation, which is a key to
obtaining strong normalisation. We also prove the property of "Church-Rosser
modulo bisimulation" for the computation rules. Combining these results, we
have a remarkable decidability result of the equational theory of cyclic data
and fold.Comment: 38 page
Scoped effects as parameterized algebraic theories
Notions of computation can be modelled by monads. Algebraic effects offer a characterization of monads in terms of algebraic
operations and equational axioms, where operations are basic programming features, such as reading or updating the state, and axioms specify
observably equivalent expressions. However, many useful programming
features depend on additional mechanisms such as delimited scopes or
dynamically allocated resources. Such mechanisms can be supported via
extensions to algebraic effects including scoped effects and parameterized algebraic theories. We present a fresh perspective on scoped effects
by translation into a variation of parameterized algebraic theories. The
translation enables a new approach to equational reasoning for scoped
effects and gives rise to an alternative characterization of monads in
terms of generators and equations involving both scoped and algebraic
operations. We demonstrate the power of our fresh perspective by way of
equational characterizations of several known models of scoped effects
Strongly Normalising Cyclic Data Computation by Iteration Categories of Second-Order Algebraic Theories
Cyclic data structures, such as cyclic lists, in functional
programming are tricky to handle because of their cyclicity. This
paper presents an investigation of categorical, algebraic, and
computational foundations of cyclic datatypes. Our framework of
cyclic datatypes is based on second-order algebraic theories of Fiore
et al., which give a uniform setting for syntax, types, and
computation rules for describing and reasoning about cyclic datatypes.
We extract the ``fold\u27\u27 computation rules from the categorical
semantics based on iteration categories of Bloom and Esik. Thereby,
the rules are correct by construction. Finally, we prove strong
normalisation using the General Schema criterion for second-order
computation rules. Rather than the fixed point law, we particularly
choose Bekic law for computation, which is a key to obtaining strong
normalisation
Modular Termination for Second-Order Computation Rules and Application to Algebraic Effect Handlers
We present a new modular proof method of termination for second-order
computation, and report its implementation SOL. The proof method is useful for
proving termination of higher-order foundational calculi. To establish the
method, we use a variation of semantic labelling translation and Blanqui's
General Schema: a syntactic criterion of strong normalisation. As an
application, we apply this method to show termination of a variant of
call-by-push-value calculus with algebraic effects and effect handlers. We also
show that our tool SOL is effective to solve higher-order termination problems