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 条
  • [41] High-Level Programming Abstractions for Distributed Graph Processing
    Kalavri, Vasiliki
    Vlassov, Vladimir
    Haridi, Seif
    IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, 2018, 30 (02) : 305 - 324
  • [42] Towards visual programming abstractions in Software-Defined Networking
    Rojas, Elisa
    Zaballa, Eder Ollora
    Noci, Victoria
    INTERNET TECHNOLOGY LETTERS, 2022, 5 (03)
  • [43] COMPILATION OF PREDICATE ABSTRACTIONS IN HIGHER-ORDER LOGIC PROGRAMMING
    CHEN, WD
    WARREN, DS
    LECTURE NOTES IN COMPUTER SCIENCE, 1991, 528 : 287 - 298
  • [44] Models and parallel programming abstractions to enhance concurrency of parallel programs
    Doroshenko, A
    Tseitlin, G
    FUNDAMENTA INFORMATICAE, 2004, 60 (1-4) : 99 - 111
  • [45] Block-Based Programming Abstractions for Explicit Parallel Computing
    Feng, Annette
    Tilevich, Eli
    Feng, Wu-chun
    2015 IEEE BLOCKS AND BEYOND WORKSHOP (BLOCKS AND BEYOND), 2015, : 71 - 75
  • [46] Thinking objectively object-oriented abstractions for distributed programming
    Guerraoui, R
    Fayad, ME
    COMMUNICATIONS OF THE ACM, 1999, 42 (08) : 125 - 127
  • [47] FLEXIBLE INCOME PROGRAMMING
    ROSE, T
    MEHR, RI
    JOURNAL OF RISK AND INSURANCE, 1980, 47 (01) : 44 - 60
  • [48] High-level abstractions for message-passing parallel programming
    Chan, F
    Cao, JN
    Sun, YD
    PARALLEL COMPUTING, 2003, 29 (11-12) : 1589 - 1621
  • [49] Assigning Blame: Mapping Performance to High Level Parallel Programming Abstractions
    Rutar, Nick
    Hollingsworth, Jeffrey K.
    EURO-PAR 2009: PARALLEL PROCESSING, PROCEEDINGS, 2009, 5704 : 21 - 32
  • [50] Interaction-Oriented Software Engineering: Programming abstractions for autonomy and decentralization
    Chopra, Amit K.
    AI COMMUNICATIONS, 2022, 35 (04) : 381 - 391