HANDLING ALGEBRAIC EFFECTS

被引:101
|
作者
Plotkin, Gordon D. [1 ]
Pretnar, Matija [2 ]
机构
[1] Univ Edinburgh, Sch Informat, Lab Fdn Comp Sci, Edinburgh EH8 9YL, Midlothian, Scotland
[2] Univ Ljubljana, Fac Math & Phys, Ljubljana 61000, Slovenia
基金
英国工程与自然科学研究理事会;
关键词
algebraic effects; exception handlers; generalised handlers; COMPUTATION; NOTIONS;
D O I
10.2168/LMCS-9(4:23)2013
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Algebraic effects are computational effects that can be represented by an equational theory whose operations produce the effects at hand. The free model of this theory induces the expected computational monad for the corresponding effect. Algebraic effects include exceptions, state, nondeterminism, interactive input/output, and time, and their combinations. Exception handling, however, has so far received no algebraic treatment. We present such a treatment, in which each handler yields a model of the theory for exceptions, and each handling construct yields the homomorphism induced by the universal property of the free model. We further generalise exception handlers to arbitrary algebraic effects. The resulting programming construct includes many previously unrelated examples from both theory and practice, including relabelling and restriction in Milner's CCS, timeout, rollback, and stream redirection.
引用
收藏
页数:36
相关论文
共 50 条
  • [1] Handling Fibred Algebraic Effects
    Ahman, Danel
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2018, 2
  • [2] Handling Polymorphic Algebraic Effects
    Sekiyama, Taro
    Igarashi, Atsushi
    [J]. PROGRAMMING LANGUAGES AND SYSTEMS, ESOP 2019: 28TH EUROPEAN SYMPOSIUM ON PROGRAMMING, 2019, 11423 : 353 - 380
  • [3] Specification and Verification for Unrestricted Algebraic Effects and Handling
    Song, Yahui
    Foo, Darius
    Chin, Wei-Ngan
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2024, 8 (ICFP):
  • [4] ALGEBRAIC SEMANTICS OF EXCEPTION HANDLING
    BERNOT, G
    BIDOIT, M
    CHOPPY, C
    [J]. LECTURE NOTES IN COMPUTER SCIENCE, 1986, 213 : 173 - 186
  • [5] AN EXCEPTION HANDLING METHOD FOR CONSTRUCTIVE ALGEBRAIC SPECIFICATIONS
    VANHOREBEEK, I
    LEWI, J
    BEVERS, E
    DUPONCHEEL, L
    VANPUYMBROECK, W
    [J]. SOFTWARE-PRACTICE & EXPERIENCE, 1988, 18 (05): : 443 - 458
  • [6] Algebraic Model for Handling Access Control Policies
    Sabri, Khair Eddin
    Hiary, Hazem
    [J]. 7TH INTERNATIONAL CONFERENCE ON AMBIENT SYSTEMS, NETWORKS AND TECHNOLOGIES (ANT 2016) / THE 6TH INTERNATIONAL CONFERENCE ON SUSTAINABLE ENERGY INFORMATION TECHNOLOGY (SEIT-2016) / AFFILIATED WORKSHOPS, 2016, 83 : 653 - 657
  • [7] ON PARAMETRIC ALGEBRAIC SPECIFICATIONS WITH CLEAN ERROR HANDLING
    GOGOLLA, M
    [J]. LECTURE NOTES IN COMPUTER SCIENCE, 1987, 249 : 81 - 95
  • [8] ON METHODS OF HANDLING ALGEBRAIC SIGNS ON THE HOLLERITH MULTIPLIER
    Matthai, Abraham
    [J]. SANKHYA, 1950, 10 : 124 - 126
  • [9] Handling algebraic properties in automatic analysis of security protocols
    Boichut, Y.
    Heam, P. -C.
    Kouchnarenko, O.
    [J]. THEORETICAL ASPECTS OF COMPUTING - ICTAC 2006, 2006, 4281 : 153 - 167
  • [10] HANDLING FRACTIONS AND N-TUPLES IN ALGEBRAIC LANGUAGES
    CHEATHAM, TE
    [J]. COMMUNICATIONS OF THE ACM, 1960, 3 (07) : 391 - 391