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.
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.
Originalsprog | Engelsk |
---|---|
Titel | POPL'10 : Proceedings of the 37th annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages |
Antal sider | 12 |
Forlag | Association for Computing Machinery |
Publikationsdato | jan. 2010 |
Sider | 483-494 |
ISBN (Trykt) | 978-1-60558-479-9 |
DOI | |
Status | Udgivet - jan. 2010 |
Begivenhed | 37th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages - Madrid, Spanien Varighed: 17 jan. 2010 → 23 jan. 2010 Konferencens nummer: 37 |
Konference
Konference | 37th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages |
---|---|
Nummer | 37 |
Land/Område | Spanien |
By | Madrid |
Periode | 17/01/2010 → 23/01/2010 |