Property-Based Testing via Proof Reconstruction

被引:2
|
作者
Blanco, Roberto [1 ]
Miller, Dale [2 ,3 ]
Momigliano, Alberto [4 ]
机构
[1] INRIA Paris, Paris, France
[2] INRIA Saclay, Palaiseau, France
[3] Ecole Polytech, LIX, Palaiseau, France
[4] Univ Milan, DI, Milan, Italy
关键词
LOGIC; SYSTEM; GENERATION; SEARCH;
D O I
10.1145/3354166.3354170
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Property-based testing (PBT) is a technique for validating code against an executable specification by automatically generating test-data. We present a proof-theoretical reconstruction of this style of testing for relational specifications and employ the Foundational Proof Certificate framework to describe test generators. We do this by presenting certain kinds of "proof outlines" that can be used to describe various common generation strategies in the PBT literature, ranging from random to exhaustive, including their combination. We also address the shrinking of counterexamples as a first step towards their explanation. Once generation is accomplished, the testing phase boils down to a standard logic programming search. After illustrating our techniques on simple, first-order (algebraic) data structures, we lift it to data structures containing bindings using.-tree syntax. The lambda Prolog programming language is capable of performing both the generation and checking of tests. We validate this approach by tackling benchmarks in the metatheory of programming languages coming from related tools such as PLT-Redex.
引用
收藏
页数:13
相关论文
共 50 条
  • [11] Property-Based Testing for Spark Streaming
    Riesco, A.
    Rodriguez-Hortala, J.
    THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2019, 19 (04) : 574 - 602
  • [12] Property-Based Testing of SPARQL Queries
    Almendros-Jimenez, Jesus M.
    Becerra-Teron, Antonio
    PROCEEDINGS OF THE 16TH INTERNATIONAL SYMPOSIUM ON DATABASE PROGRAMMING LANGUAGES (DBPL 2017), 2017,
  • [13] Towards Substructural Property-Based Testing
    Mantovani, Marco
    Momigliano, Alberto
    LOGIC-BASED PROGRAM SYNTHESIS AND TRANSFORMATION (LOPSTR 2021), 2022, 13290 : 92 - 112
  • [14] Property-Based Testing of Sensor Networks
    Loscher, Andreas
    Sagonas, Konstantinos
    Voigt, Thiemo
    2015 12TH ANNUAL IEEE INTERNATIONAL CONFERENCE ON SENSING, COMMUNICATION, AND NETWORKING (SECON), 2015, : 100 - 108
  • [15] Automating Targeted Property-Based Testing
    Loscher, Andreas
    Sagonas, Konstantinos
    2018 IEEE 11TH INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VERIFICATION AND VALIDATION (ICST), 2018, : 70 - 80
  • [16] Sitting Property-Based Testing at the Desktop
    Castro, Laura M.
    COMPUTER AIDED SYSTEMS THEORY - EUROCAST 2015, 2015, 9520 : 236 - 243
  • [17] Security Mutants for Property-Based Testing
    Buecher, Matthias
    Oudinet, Johan
    Pretschner, Alexander
    TESTS AND PROOFS, TAP 2011, 2011, 6706 : 69 - 77
  • [18] Application of Property-based Testing Tools for Metamorphic Testing
    Alzahrani, Nasser
    Spichkova, Maria
    Harland, James
    ENASE: PROCEEDINGS OF THE 17TH INTERNATIONAL CONFERENCE ON EVALUATION OF NOVEL APPROACHES TO SOFTWARE ENGINEERING, 2022, : 553 - 560
  • [19] A Property-Based Proof System for Contract-Based Design
    Cimatti, Alessandro
    Tonetta, Stefano
    2012 38TH EUROMICRO CONFERENCE ON SOFTWARE ENGINEERING AND ADVANCED APPLICATIONS (SEAA), 2012, : 21 - 28
  • [20] Checking Laws of the Blockchain with Property-Based Testing
    Chepurnoy, Alexander
    Rathee, Mayank
    2018 IEEE 1ST INTERNATIONAL WORKSHOP ON BLOCKCHAIN ORIENTED SOFTWARE ENGINEERING (IWBOSE), 2018, : 40 - 47