Automated Verification of Higher-Order Probabilistic Programs via a Dependent Refinement Type System

被引:0
|
作者
Kura, Satoshi [1 ]
Unno, Hiroshi [2 ]
机构
[1] Waseda Univ, Waseda, Japan
[2] Tohoku Univ, Tohoku, Japan
关键词
dependent refinement type system; higher-order program;
D O I
10.1145/3674662
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Verification of higher-order probabilistic programs is a challenging problem. We present a verification method that supports several quantitative properties of higher-order probabilistic programs. Usually, extending verification methods to handle the quantitative aspects of probabilistic programs often entails extensive modifications to existing tools, reducing compatibility with advanced techniques developed for qualitative verification. In contrast, our approach necessitates only small amounts of modification, facilitating the reuse of existing techniques and implementations. On the theoretical side, we propose a dependent refinement type system for a generalised higher-order fixed point logic (HFL). Combined with continuation-passing style encodings of properties into HFL, our dependent refinement type system enables reasoning about several quantitative properties, including weakest pre-expectations, expected costs, moments of cost, and conditional weakest pre-expectations for higher-order probabilistic programs with continuous distributions and conditioning. The soundness of our approach is proved in a general setting using a framework of categorical semantics so that we don't have to repeat similar proofs for each individual problem. On the empirical side, we implement a type checker for our dependent refinement type system that reduces the problem of type checking to constraint solving. We introduce admissible predicate variables and integrable predicate variables to constrained Horn clauses (CHC) so that we can soundly reason about the least fixed points and samplings from probability distributions. Our implementation demonstrates that existing CHC solvers developed for non-probabilistic programs can be extended to a solver for the extended CHC with only small efforts. We also demonstrate the ability of our type checker to verify various concrete examples.
引用
收藏
页数:30
相关论文
共 50 条
  • [31] A type system for higher-order modules
    Dreyer, D
    Crary, K
    Harper, R
    [J]. ACM SIGPLAN NOTICES, 2003, 38 (01) : 236 - 249
  • [32] Combining Higher-Order Model Checking with Refinement Type Inference
    Sato, Ryosuke
    Iwayama, Naoki
    Kobayashi, Naoki
    [J]. PROCEEDINGS OF THE 2019 ACM SIGPLAN WORKSHOP ON PARTIAL EVALUATION AND PROGRAM MANIPULATION (PEPM '19), 2019, : 47 - 53
  • [33] On Higher-Order Probabilistic Subrecursion
    Breuvart, Flavien
    Dal Lago, Ugo
    Herrou, Agathe
    [J]. FOUNDATIONS OF SOFTWARE SCIENCE AND COMPUTATION STRUCTURES (FOSSACS 2017), 2017, 10203 : 370 - 386
  • [34] ON HIGHER-ORDER PROBABILISTIC SUBRECURSION
    Breuvart, Flavien
    Dal Lago, Ugo
    Herrou, Agathe
    [J]. LOGICAL METHODS IN COMPUTER SCIENCE, 2021, 17 (04)
  • [35] A Hybrid Approach to Formal Verification of Higher-Order Masked Arithmetic Programs
    Gao, Pengfei
    Xie, Hongyi
    Song, Fu
    Chen, Taolue
    [J]. ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2021, 30 (03)
  • [36] A Higher-Order Logical Framework for the Algorithmic Debugging and Verification of Declarative Programs
    del Vado Virseda, Rafael
    [J]. PPDP'09: PROCEEDINGS OF THE 11TH INTERNATIONAL ACM SIGPLAN SYMPOSIUM ON PRINCIPLES AND PRACTICE OF DECLARATIVE PROGRAMMING, 2009, : 49 - 60
  • [37] maskVerif: Automated Verification of Higher-Order Masking in Presence of Physical Defaults
    Barthe, Gilles
    Belaid, Sonia
    Cassiers, Gaetan
    Fouque, Pierre-Alain
    Gregoire, Benjamin
    Standaert, Francois-Xavier
    [J]. COMPUTER SECURITY - ESORICS 2019, PT I, 2019, 11735 : 300 - 318
  • [38] Verification of Code Generators via Higher-Order Model Checking
    Suwa, Takashi
    Tsukada, Takeshi
    Kobayashi, Naoki
    Igarashi, Atsushi
    [J]. PROCEEDINGS OF THE 2017 ACM SIGPLAN WORKSHOP ON PARTIAL EVALUATION AND PROGRAM MANIPULATION (PEPM'17), 2017, : 59 - 70
  • [39] Modular Verification of Higher-Order Methods with Mandatory Calls Specified by Model Programs
    Shaner, Steve M.
    Leavens, Gary T.
    Naumann, David A.
    [J]. OOPSLA: 22ND INTERNATIONAL CONFERENCE ON OBJECT-ORIENTED PROGRAMMING, SYSTEMS, LANGUAGES, AND APPLICATIONS, PROCEEDINGS, 2007, : 351 - 367
  • [40] Modular verification of higher-order methods with mandatory calls specified by model programs
    Shaner, Steve M.
    Leavens, Gary T.
    Naumann, David A.
    [J]. ACM SIGPLAN NOTICES, 2007, 42 (10) : 351 - 367