Associated Effects Flexible Abstractions for Effectful Programming

被引:0
|
作者
Lutze, Matthew [1 ]
Madsen, Magnus [1 ]
机构
[1] Aarhus Univ, Aarhus, Denmark
关键词
effect systems; associated effects; associated types; generic programming; type classes; type functions; ad-hoc polymorphism;
D O I
10.1145/3656393
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present associated effects, a programming language feature that enables type classes to abstract over the effects of their function signatures, allowing each type class instance to specify its concrete effects. Associated effects significantly increase the flexibility and expressive power of a programming language that combines a type and effect system with type classes. In particular, associated effects allow us to (i) abstract over total and partial functions, where partial functions may throw exceptions, (ii) abstract over immutable data structures and mutable data structures that have heap effects, and (iii) implement adaptors that combine type classes with algebraic effects. We implement associated effects as an extension of the Flix programming language and refactor the Flix Standard Library to use associated effects, significantly increasing its flexibility and expressive power. Specifically, we add associated effects to 11 type classes, which enables us to add 28 new type class instances.
引用
收藏
页数:23
相关论文
共 50 条
  • [21] Achieving programming model abstractions for reconfigurable computing
    Andrews, David
    Sass, Ron
    Anderson, Erik
    Agron, Jason
    Peck, Wesley
    Stevens, Jim
    Baijot, Fabrice
    Komp, Ed
    IEEE TRANSACTIONS ON VERY LARGE SCALE INTEGRATION (VLSI) SYSTEMS, 2008, 16 (01) : 34 - 44
  • [22] The role of concurrency in an evolutionary view of programming abstractions
    Crafa, Silvia
    JOURNAL OF LOGICAL AND ALGEBRAIC METHODS IN PROGRAMMING, 2015, 84 (06) : 732 - 741
  • [23] Associative programming and modeling: Abstractions over collaboration
    Kristensen, Bent Bruun
    ICSOFT 2006: Proceedings of the First International Conference on Software and Data Technologies, Vol 1, 2006, : 54 - 62
  • [24] PROGRAMMING, TRANSFORMING, AND PROVING WITH FUNCTION ABSTRACTIONS AND MEMORIES
    MASON, I
    TALCOTT, C
    LECTURE NOTES IN COMPUTER SCIENCE, 1989, 372 : 574 - 588
  • [25] Programming Abstractions for Simulation and Testing on Smart Manufacturing Systems
    Hsieh, Chiao
    Wu, Daniel
    Koh, Yubin
    Mitra, Sayan
    2022 IEEE 18TH INTERNATIONAL CONFERENCE ON AUTOMATION SCIENCE AND ENGINEERING (CASE), 2022, : 2287 - 2292
  • [26] Predicate abstractions in higher-order logic programming
    Chen, WD
    Warren, DS
    NEW GENERATION COMPUTING, 1996, 14 (02) : 195 - 236
  • [27] On the behaviour of coalgebras with side effects and algebras with effectful iteration
    Adamek, Jiri
    Milius, Stefan
    Urbat, Henning
    JOURNAL OF LOGIC AND COMPUTATION, 2021, 31 (06) : 1429 - 1481
  • [28] Reliable and Efficient Programming Abstractions for Wireless Sensor Networks
    Kothari, Nupur
    Gummadi, Ramakrishna
    Millstein, Todd
    Govindan, Ramesh
    PLDI'07: PROCEEDINGS OF THE 2007 ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION, 2007, : 200 - 210
  • [29] Programming Abstractions for Data Intensive Computing on Clouds and Grids
    Miceli, Chris
    Miceli, Michael
    Jha, Shantenu
    Kaiser, Hartmut
    Merzky, Andre
    CCGRID: 2009 9TH IEEE INTERNATIONAL SYMPOSIUM ON CLUSTER COMPUTING AND THE GRID, 2009, : 478 - 483
  • [30] Reliable and efficient programming abstractions for wireless sensor networks
    Kothari, Nupur
    Gummadi, Ramakrishna
    Millstein, Todd
    Govindan, Ramesh
    ACM SIGPLAN NOTICES, 2007, 42 (06) : 200 - 210