Just do It: Simple Monadic Equational Reasoning

被引:14
|
作者
Gibbons, Jeremy [1 ]
Hinze, Ralf [1 ]
机构
[1] Univ Oxford, Dept Comp Sci, Oxford OX1 3QD, England
基金
英国工程与自然科学研究理事会;
关键词
Languages; Theory; Verification; Monads; equational reasoning; Lawvere theories; algebraic specification; PROBABILITY;
D O I
10.1145/2034574.2034777
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
One of the appeals of pure functional programming is that it is so amenable to equational reasoning. One of the problems of pure functional programming is that it rules out computational effects. Moggi and Wadler showed how to get round this problem by using monads to encapsulate the effects, leading in essence to a phase distinction-a pure functional evaluation yielding an impure imperative computation. Still, it has not been clear how to reconcile that phase distinction with the continuing appeal of functional programming; does the impure imperative part become inaccessible to equational reasoning? We think not; and to back that up, we present a simple axiomatic approach to reasoning about programs with computational effects.
引用
收藏
页码:2 / 14
页数:13
相关论文
共 50 条
  • [1] Just do It: Simple Monadic Equational Reasoning
    Gibbons, Jeremy
    Hinze, Ralf
    ICFP 11 - PROCEEDINGS OF THE 2011 ACM SIGPLAN: INTERNATIONAL CONFERENCE ON FUNCTIONAL PROGRAMMING, 2011, : 2 - 14
  • [2] Towards a Practical Library for Monadic Equational Reasoning in Coq
    Saito, Ayumu
    Affeldt, Reynald
    MATHEMATICS OF PROGRAM CONSTRUCTION (MPC 2022, 2022, 13544 : 151 - 177
  • [3] A Hierarchy of Monadic Effects for Program Verification Using Equational Reasoning
    Affeldt, Reynald
    Nowak, David
    Saikawa, Takafumi
    MATHEMATICS OF PROGRAM CONSTRUCTION, 2019, 11825 : 226 - 254
  • [4] A practical formalization of monadic equational reasoning in dependent-type theory
    Affeldt, Reynald
    Garrigue, Jacques
    Saikawa, Takafumi
    JOURNAL OF FUNCTIONAL PROGRAMMING, 2025, 35
  • [5] Unions of equational monadic theories
    Hoffman, Piotr
    TERM REWRITING AND APPLICATIONS, PROCEEDINGS, 2006, 4098 : 81 - 95
  • [6] EQUATIONAL REASONING IN ISABELLE
    NIPKOW, T
    SCIENCE OF COMPUTER PROGRAMMING, 1989, 12 (02) : 123 - 149
  • [7] Combining Equational Reasoning
    Tiwari, Ashish
    FRONTIERS OF COMBINING SYSTEMS, PROCEEDINGS, 2009, 5749 : 68 - 83
  • [8] Equational Reasoning with Applicative Functors
    Lochbihler, Andreas
    Schneider, Joshua
    INTERACTIVE THEOREM PROVING (ITP 2016), 2016, 9807 : 252 - 273
  • [9] FREE EXTENSIONS IN EQUATIONAL CLASS - APPLICATION TO BOOLEAN AND MONADIC RINGS
    MAYET, A
    COMPTES RENDUS HEBDOMADAIRES DES SEANCES DE L ACADEMIE DES SCIENCES SERIE A, 1972, 275 (17): : 777 - &
  • [10] Equational reasoning using AC constraints
    Plaisted, DA
    Zhu, YS
    IJCAI-97 - PROCEEDINGS OF THE FIFTEENTH INTERNATIONAL JOINT CONFERENCE ON ARTIFICIAL INTELLIGENCE, VOLS 1 AND 2, 1997, : 108 - 113