The Next 700 Relational Program Logics

被引:19
|
作者
Maillard, Kenji [1 ,2 ]
Hritcu, Catalin [1 ]
Rivas, Exequiel [1 ]
Van Muylder, Antoine [1 ,3 ]
机构
[1] Inria Paris, Paris, France
[2] ENS Paris, Paris, France
[3] Univ Paris, Paris, France
基金
欧洲研究理事会;
关键词
program verification; relational program logics; side-effects; monads; state; I/O; nondeterrninism; probabilities; exceptions; dependent types; semantics; relative monads; foundations; INFORMATION-FLOW; DEPENDENT TYPES; SAFETY; VERIFICATION; MONADS; STATE;
D O I
10.1145/3371072
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We propose the first framework for defining relational program logics for arbitrary monadic effects. The framework is embedded within a relational dependent type theory and is highly expressive. At the semantic level, we provide an algebraic presentation of relational specifications as a class of relative monads, and link computations and specifications by introducing relational effect observations, which map pairs of monadic computations to relational specifications in a way that respects the algebraic structure. For an arbitrary relational effect observation, we generically define the core of a sound relational program logic, and explain how to complete it to a full-fledged logic for the monadic effect at hand. We show that this generic framework can be used to define relational program logics for effects as diverse as state, input-output, nondeterminism, and discrete probabilities. We, moreover, show that by instantiating our framework with state and unbounded iteration we can embed a variant of Benton's Relational Hoare Logic, and also sketch how to reconstruct Relational Hoare Type Theory. Finally, we identify and overcome conceptual challenges that prevented previous relational program logics from properly dealing with control effects, and are the first to provide a relational program logic for exceptions.
引用
收藏
页数:33
相关论文
共 50 条
  • [1] The Next 700 Separation Logics
    Parkinson, Matthew
    VERIFIED SOFTWARE: THEORIES, TOOLS, EXPERIMENTS, 2010, 6217 : 169 - 182
  • [2] Divergences on monads for relational program logics
    Sato, Tetsuya
    Katsumata, Shin-ya
    MATHEMATICAL STRUCTURES IN COMPUTER SCIENCE, 2023, 33 (4-5) : 427 - 485
  • [3] Product programs and relational program logics
    Barthe, Gilles
    Crespo, Juan Manuel
    Kunz, Cesar
    JOURNAL OF LOGICAL AND ALGEBRAIC METHODS IN PROGRAMMING, 2016, 85 (05) : 847 - 859
  • [4] The Next 700 Program Transformers
    Hamilton, Geoff
    LOGIC-BASED PROGRAM SYNTHESIS AND TRANSFORMATION (LOPSTR 2021), 2022, 13290 : 113 - 134
  • [5] Relational logics and their applications
    Golinska-Pilarek, Joanna
    Orlowska, Ewa
    THEORY AND APPLICATIONS OF RELATIONAL STRUCTURES AS KNOWLEDGE INSTRUMENTS II, 2006, 4342 : 125 - +
  • [6] LOGICS FOR THE RELATIONAL SYLLOGISTIC
    Pratt-Hartmann, Ian
    Moss, Lawrence S.
    REVIEW OF SYMBOLIC LOGIC, 2009, 2 (04): : 647 - 683
  • [7] Evidence Logics with Relational Evidence
    Baltag, Alexandru
    Occhipinti, Andres
    LOGIC, RATIONALITY, AND INTERACTION, LORI 2017, 2017, 10455 : 17 - 32
  • [8] Relational models of Lambek logics
    Buszkowski, W
    THEORY AND APPLICATIONS OF RELATIONAL STRUCTURES AS KNOWLEDGE INSTRUMENTS: COST ACTION 274, TARSKI, REVISED PAPERS, 2003, 2929 : 196 - 213
  • [9] From XQuery to Relational Logics
    Benedikt, Michael
    Koch, Christoph
    ACM TRANSACTIONS ON DATABASE SYSTEMS, 2009, 34 (04):
  • [10] Implicational tonoid semilinear logics: Prelinear logics and their relational semantics
    Yang, Eunsuk
    JOURNAL OF INTELLIGENT & FUZZY SYSTEMS, 2022, 43 (01) : 1541 - 1552