Specification and Verification for Unrestricted Algebraic Effects and Handling

被引:0
|
作者
Song, Yahui [1 ]
Foo, Darius [1 ]
Chin, Wei-Ngan [2 ]
机构
[1] Natl Univ Singapore, Sch Comp, Singapore, Singapore
[2] Natl Univ Singapore, Dept Comp Sci, Singapore, Singapore
关键词
Multi-shot Continuations; Separation Logic; Automated Verification; Effectful Specification Logic; HANDLERS;
D O I
10.1145/3674656
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Programming with user-defined effects and effect handlers has many practical use cases involving imperative effects. Additionally, it is natural and powerful to use multi-shot effect handlers for non-deterministic or probabilistic programs that allow backtracking to compute a comprehensive outcome. Existing works for verifying effect handlers are restricted in one of three ways: i) permitting multi-shot continuations under pure setting; ii) allowing heap manipulation for only one-shot continuations; or iii) allowing multi-shot continuations with heap-manipulation but under a restricted frame rule. This work proposes a novel calculus called Effectful Specification Logic (ESL) ESL ) to support unrestricted effect handlers, where zero-/one-/multi-shot continuations can co-exist with imperative effects and higher-order constructs. ESL captures behaviors in stages, and provides precise models to support invoked effects, handlers and continuations. To show its feasibility, we prototype an automated verification system for this novel specification logic, prove its soundness, report on useful case studies, and present experimental results. With this proposal, we have provided an extended specification logic that is capable of modeling arbitrary imperative higher-order programs with algebraic effects and continuation-enabled handlers.
引用
收藏
页数:29
相关论文
共 50 条
  • [31] AN ALGEBRAIC SPECIFICATION OF A PASCAL COMPILER
    DESPEYROUX, J
    [J]. SIGPLAN NOTICES, 1983, 18 (12): : 34 - 48
  • [32] ON RECENT TRENDS IN ALGEBRAIC SPECIFICATION
    EHRIG, H
    PEPPER, P
    OREJAS, F
    [J]. LECTURE NOTES IN COMPUTER SCIENCE, 1989, 372 : 263 - 288
  • [33] Topological methods for algebraic specification
    Meinke, K
    [J]. THEORETICAL COMPUTER SCIENCE, 1996, 166 (1-2) : 263 - 290
  • [34] Algebraic specification of reactive systems
    Broy, M
    [J]. THEORETICAL COMPUTER SCIENCE, 2000, 239 (01) : 3 - 40
  • [35] ON OBSERVATIONAL EQUIVALENCE AND ALGEBRAIC SPECIFICATION
    SANNELLA, D
    TARLECKI, A
    [J]. LECTURE NOTES IN COMPUTER SCIENCE, 1985, 185 : 308 - 322
  • [36] GETTING SPECIFICATION INTO SOLIDS HANDLING
    REDMAN, J
    [J]. CHEMICAL ENGINEER-LONDON, 1991, (507): : 13 - &
  • [37] Properties as processes: Their specification and verification
    Kelso, J
    Milne, G
    [J]. FORMAL TECHNIQUES FOR NETWORKED AND DISTRIBUTED SYSTEMS - FORTE 2005, 2005, 3731 : 503 - 517
  • [38] Specification and Verification of Pharmacokinetic Models
    Kwon, YoungMin
    Kim, Eunhee
    [J]. ADVANCES IN COMPUTATIONAL BIOLOGY, 2010, 680 : 465 - 472
  • [39] SPECIFICATION AND VERIFICATION OF VLSI SYSTEMS
    WILK, A
    PNUELI, A
    [J]. 1989 IEEE INTERNATIONAL CONFERENCE ON COMPUTER-AIDED DESIGN: DIGEST OF TECHNICAL PAPERS, 1989, : 460 - 463
  • [40] OCCAM IN THE SPECIFICATION AND VERIFICATION OF MICROPROCESSORS
    ROSCOE, AW
    [J]. PHILOSOPHICAL TRANSACTIONS OF THE ROYAL SOCIETY OF LONDON SERIES A-MATHEMATICAL PHYSICAL AND ENGINEERING SCIENCES, 1992, 339 (1652): : 137 - 151