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 条
  • [41] Failing Faster: Overlapping Patterns for Property-Based Testing
    Fowler, Jonathan
    Hutton, Graham
    PRACTICAL ASPECTS OF DECLARATIVE LANGUAGES (PADL 2017), 2017, 10137 : 103 - 119
  • [42] Property-Based Testing of Browser Rendering Engines with a Consensus Oracle
    Martin, Joel
    Levine, David
    2018 IEEE 42ND ANNUAL COMPUTER SOFTWARE AND APPLICATIONS CONFERENCE (COMPSAC 2018), VOL 2, 2018, : 424 - 429
  • [43] Feasibility of Property-Based Testing for Time-Dependent Systems
    Lopez, Macias
    Castro, Laura M.
    Cabrero, David
    COMPUTER AIDED SYSTEMS THEORY, PT II, 2013, 8112 : 527 - 535
  • [44] Towards Integrating Statistical Model Checking into Property-Based Testing
    Aichernig, Bernhard K.
    Schumi, Richard
    2016 ACM/IEEE INTERNATIONAL CONFERENCE ON FORMAL METHODS AND MODELS FOR SYSTEM DESIGN (MEMOCODE), 2016, : 71 - 76
  • [45] ETNA: An Evaluation Platform for Property-Based Testing (Experience Report)
    Shi, Jessica
    Keles, Alperen
    Goldstein, Harrison
    Pierce, Benjamin C.
    Lampropoulos, Leonidas
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2023, 7 (ICFP):
  • [46] A PropEr Integration of Types and Function Specifications with Property-Based Testing
    Papadakis, Manolis
    Sagonas, Konstantinos
    ERLANG 11: PROCEEDINGS OF THE 2011 ACM SIGPLAN ERLANG WORKSHOP, 2011, : 39 - 50
  • [47] Delta Debugging for Property-Based Regression Testing of Quantum Programs
    Pontolillo, Gabriel
    Mousavi, Mohammad Reza
    PROCEEDINGS OF THE 2024 IEEE/ACM 5TH INTERNATIONAL WORKSHOP ON QUANTUM SOFTWARE ENGINEERING, Q-SE 2024, 2024, : 1 - 8
  • [48] Validating Formal Semantics by Property-Based Cross-Testing
    Bereczky, Peter
    Horpacsi, Daniel
    Koszegi, Judit
    Szeier, Soma
    Thompson, Simon
    PROCEEDINGS OF THE 32ND SYMPOSIUM ON IMPLEMENTATION AND APPLICATION OF FUNCTIONAL LANGUAGES, IFL 2020, 2020, : 150 - 161
  • [49] A Property-based Testing Framework for Multi-Agent Systems
    Benac Earle, Clara
    Fredlund, Lars-Ake
    AAMAS '19: PROCEEDINGS OF THE 18TH INTERNATIONAL CONFERENCE ON AUTONOMOUS AGENTS AND MULTIAGENT SYSTEMS, 2019, : 1823 - 1825
  • [50] Automatic property-based testing and path validation of XQuery programs
    Almendros-Jimenez, Jesus M.
    Becerra-Teron, Antonio
    SOFTWARE TESTING VERIFICATION & RELIABILITY, 2017, 27 (1-2): : 1 - 2