Filters








1,325 Hits in 5.9 sec

Handle with care: relational interpretation of algebraic effects and handlers

Dariusz Biernacki, Maciej Piróg, Piotr Polesiuk, Filip Sieczkowski
2017 Proceedings of the ACM on Programming Languages  
In this paper we tackle this problem by constructing a step-indexed relational interpretation of a call-by-value calculus with algebraic effect handlers and a row-based polymorphic type-and-effect system  ...  Algebraic effects and handlers have received a lot of attention recently, both from the theoretical point of view and in practical language design.  ...  ACKNOWLEDGMENTS We would like to thank the anonymous reviewers for their thorough and insightful comments, which allowed us to clarify and amend a number of issues.  ... 
doi:10.1145/3158096 dblp:journals/pacmpl/BiernackiPPS18 fatcat:kucbyyxxonfozf4gsrhz66p5ga

Linear-Logic Based Analysis of Constraint Handling Rules with Disjunction

Hariolf Betz, Thom Frühwirth
2013 ACM Transactions on Computational Logic  
CONSTRAINT HANDLING RULES WITH DISJUNCTION In this section, we recall the syntax of Constraint Handling Rules with Disjunction (CHR ∨ ) and its operational semantics ω ∨ e .  ...  Constraint Handling Rules with Disjunction (CHR ∨ ) [Abdennadher and Schütz 1998] extends the inherently comitted-choice formalism of CHR with the possibility to include don't-know non-determinism and  ...  ACKNOWLEDGMENTS We are grateful to the reviewers of an earlier version of this paper for their helpful remarks. Hariolf Betz has been funded by Baden-Württemberg federal state grant LGFG #0518.  ... 
doi:10.1145/2422085.2422086 fatcat:5npuse5qcjhvrhisrceioncbdq

Fusion for Free [chapter]

Nicolas Wu, Tom Schrijvers
2015 Lecture Notes in Computer Science  
Algebraic effect handlers are a recently popular approach for modelling side-effects that separates the syntax and semantics of effectful operations.  ...  The semantics is captured by algebras, and effect handlers pass these over the syntax trees to interpret them into a semantic domain.  ...  Acknowledgments The authors would like to thank Ralf Hinze for suggesting that they consider the specification that free monads satisfy in terms of adjunctions, and to James McKinna who helped baptize  ... 
doi:10.1007/978-3-319-19797-5_15 fatcat:3pnkehpexvan3hfdjdfrvogjky

Efficient Algebraic Effect Handlers for Prolog [article]

Amr Hany Saleh, Tom Schrijvers
2016 arXiv   pre-print
As a remedy, this work introduces algebraic effect handlers for Prolog, as a high-level and structured way of defining new side-effects in a modular fashion.  ...  Recent work has provided delimited control for Prolog to dynamically manipulate the program control-flow, and to implement a wide range of control-flow and dataflow effects on top of.  ...  We are grateful to Bart Demoen for his support of hProlog.  ... 
arXiv:1608.00816v1 fatcat:r4d6xxezenc4batanbwns7mujq

Structured Handling of Scoped Effects: Extended Version [article]

Zhixuan Yang, Marco Paviotti, Nicolas Wu, Birthe van den Berg, Tom Schrijvers
2022 arXiv   pre-print
However, the family of operations that delimit scopes are not algebraic and are usually modelled as handlers, thus preventing them from being used freely in conjunction with algebraic operations.  ...  Additionally, our approach automatically induces fusion laws of handlers of scoped effects, which are useful for reasoning and optimisation.  ...  Acknowledgements This work is supported by EPSRC grant number EP/S028129/1 on 'Scoped Contextual Operations and Effects', by FWO project G095917N, and KU Leuven project C14/20/079.  ... 
arXiv:2201.10287v1 fatcat:vwkbwbsjifd45kzkoqqg4pjose

Programming and reasoning with algebraic effects and dependent types

Edwin Brady
2013 SIGPLAN notices  
In this paper I describe an alternative approach based on handling algebraic effects, implemented in the IDRIS programming language.  ...  motivation for separating effects, and a temptation to build an application around one general purpose monad capturing all of an application's state and exception handling needs.  ...  We achieve this by making effects and contexts instances of a a type class, Handler, which has a method handle explaining this interpretation: class Handler (e : Effect) (m : Type -> Type) where handle  ... 
doi:10.1145/2544174.2500581 fatcat:snwt3cilzrektookv37gmkc2vu

Programming and reasoning with algebraic effects and dependent types

Edwin Brady
2013 Proceedings of the 18th ACM SIGPLAN international conference on Functional programming - ICFP '13  
In this paper I describe an alternative approach based on handling algebraic effects, implemented in the IDRIS programming language.  ...  However, real programs have side-effects including state management, exceptions and interactions with the outside world.  ...  My thanks to the inhabitants of the #idris IRC channel on irc.freenode.net for their feedback, and to the anonymous referees for their helpful comments.  ... 
doi:10.1145/2500365.2500581 dblp:conf/icfp/Brady13 fatcat:pva45wyqhjafhbtrydtatbwnom

Programming with algebraic effects and handlers

Andrej Bauer, Matija Pretnar
2015 Journal of Logical and Algebraic Methods in Programming  
Eff is a programming language based on the algebraic approach to computational effects, in which effects are viewed as algebraic operations and effect handlers as homomorphisms from free algebras.  ...  Eff supports first-class effects and handlers through which we may easily define new computational effects, seamlessly combine existing ones, and handle them in novel ways.  ...  Ohad Kammar contributed parts of the type inference code in our implementation of eff . The cooperative multithreading example from Section 6.10 was written together with Chris Stone.  ... 
doi:10.1016/j.jlamp.2014.02.001 fatcat:h2h72jrolnawrcstvjug5y4iai

Reasoning about effect interaction by fusion

Zhixuan Yang, Nicolas Wu
2021 Proceedings of the ACM on Programming Languages (PACMPL)  
; (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.  ...  Effect handlers can be composed by applying them sequentially, each handling some operations and leaving other operations uninterpreted in the syntax tree.  ...  ACKNOWLEDGMENTS This work has been supported by EPSRC grant number EP/S028129/1 on 'Scoped Contextual Operations and Effects'.  ... 
doi:10.1145/3473578 fatcat:idbw47jndjbcvgfwco3zip3bbu

Type directed compilation of row-typed algebraic effects

Daan Leijen
2017 Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages - POPL 2017  
In particular, we show how algebraic effects generalize over common constructs like exception handling, state, iterators and async-await.  ...  Algebraic effect handlers, are recently gaining in popularity as a purely functional approach to modeling effects.  ...  Related Work Algebraic effects were described by Plotkin and Power [36] as an algebraic model of computational effects.  ... 
doi:10.1145/3009837.3009872 fatcat:ytps3xv3qzeblewdae474wkwoq

Type directed compilation of row-typed algebraic effects

Daan Leijen
2017 SIGPLAN notices  
In particular, we show how algebraic effects generalize over common constructs like exception handling, state, iterators and async-await.  ...  Algebraic effect handlers, are recently gaining in popularity as a purely functional approach to modeling effects.  ...  Related Work Algebraic effects were described by Plotkin and Power [36] as an algebraic model of computational effects.  ... 
doi:10.1145/3093333.3009872 fatcat:zsiubfvgizhcnixyty6rvy7ahq

Local algebraic effect theories

ŽIGA LUKŠIČ, MATIJA PRETNAR
2020 Journal of functional programming  
Algebraic effects are computational effects that can be described with a set of basic operations and equations between them.  ...  As many interesting effect handlers do not respect these equations, most approaches assume a trivial theory, sacrificing both reasoning power and safety.  ...  Dagstuhl seminars 16112 [3] and 18172 [8] , and the anonymous referees for all their helpful insights and suggestions.  ... 
doi:10.1017/s0956796819000212 fatcat:qfbmvluka5d6lozzlj2xgnglum

Handling Polymorphic Algebraic Effects [chapter]

Taro Sekiyama, Atsushi Igarashi
2019 Lecture Notes in Computer Science  
Algebraic effects and handlers are a powerful abstraction mechanism to represent and implement control effects.  ...  In this work, we study their extension with parametric polymorphism that allows abstracting not only expressions but also effects and handlers.  ...  JPMJER1603), JST (Sekiyama), and JSPS KAKENHI Grant Number JP15H05706 (Igarashi).  ... 
doi:10.1007/978-3-030-17184-1_13 fatcat:h34ioltppnem3lfhlu6typabye

Implementing Algebraic Effects in C [chapter]

Daan Leijen
2017 Lecture Notes in Computer Science  
We describe a full implementation of algebraic effects and handlers as a library in standard and portable C99, where effect operations can be used just like regular C functions.  ...  This gives two orders of magnitude improvement to the performance of tail resumptive operations (up to about 150 million operations per second on a Core i7@2.6GHz) Updates: 2017-06-30: Added Section A.4  ...  Resuming under the same handler is important as it ensures that our semantics correspond to the original categorical interpretation of algebraic effect handlers as a fold over the effect algebra [37]  ... 
doi:10.1007/978-3-319-71237-6_17 fatcat:wx2iiaetlbce5pquewq3y3yuj4

Modular Probabilistic Models via Algebraic Effects [article]

Minh Nguyen, Roly Perera, Meng Wang, Nicolas Wu
2022 arXiv   pre-print
We also demonstrate how simulation and inference can be expressed naturally as composable program transformations using algebraic effect handlers.  ...  Using Haskell as the host language, we present an embedded domain specific language based on algebraic effects, where probabilistic models are modular, first-class, and reusable for both simulation and  ...  We also thank Alessio Zakaria who has been a constant source of support and drive behind our ideas, and the members of the Bristol Programming Languages research group for creating the wonderful environment  ... 
arXiv:2203.04608v3 fatcat:7nesx5lhvrbdtfe266vbqarv4e
« Previous Showing results 1 — 15 out of 1,325 results