Affiliation:
1. University of Copenhagen, Copenhagen, Denmark
Abstract
In functional programming, monadic characterizations of computational effects are normally understood denotationally: they describe how an effectful program can be systematically expanded or translated into a larger, pure program, which can then be evaluated according to an effect-free semantics. Any effect-specific operations expressible in the monad are also given purely functional definitions, but these definitions are only directly executable in the context of an already translated program. This approach thus takes an inherently Church-style view of effects: the nominal meaning of every effectful term in the program depends crucially on its type.
We present here a complementary, operational view of monadic effects, in which an effect definition directly induces an imperative behavior of the new operations expressible in the monad. This behavior is formalized as additional operational rules for only the new constructs; it does not require any structural changes to the evaluation judgment. Specifically, we give a small-step operational semantics of a prototypical functional language supporting programmer-definable, layered effects, and show how this semantics naturally supports reasoning by familiar syntactic techniques, such as showing soundness of a Curry-style effect-type system by the progress+preservation method.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
5 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Bounded Abstract Effects;ACM Transactions on Programming Languages and Systems;2022-01-12
2. Polymorphic Iterable Sequential Effect Systems;ACM Transactions on Programming Languages and Systems;2021-03-31
3. On the expressive power of user-defined effects: effect handlers, monadic reflection, delimited control;Proceedings of the ACM on Programming Languages;2017-08-29
4. Tor : Modular search with hookable disjunction;Science of Computer Programming;2014-05
5. Modular monadic meta-theory;ACM SIGPLAN Notices;2013-11-12