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 条
  • [21] FlinkCheck: Property-Based Testing for Apache Flink
    Espinosa, Cristina Valentina
    Martin-Martin, Enrique
    Riesco, Adrian
    Rodriguez-Hortala, Juan
    IEEE ACCESS, 2019, 7 : 150369 - 150382
  • [22] Property-Based Testing: Climbing the Stairway to Verification
    Chen, Zilin
    Rizkallah, Christine
    O'Connor, Liam
    Susarla, Partha
    Klein, Gerwin
    Heiser, Gernot
    Keller, Gabriele
    PROCEEDINGS OF THE 15TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON SOFTWARE LANGUAGE ENGINEERING, SLE 2022, 2022, : 84 - 97
  • [23] Automatic Property-based Testing of GraphQL APIs
    Karlsson, Stefan
    Causevic, Adnan
    Sundmark, Daniel
    2021 IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATION OF SOFTWARE TEST (AST 2021), 2021, : 1 - 10
  • [24] Property-Based Testing for the Robot Operating System
    Santos, Andre
    Cunha, Alcino
    Macedo, Nuno
    PROCEEDINGS OF THE 9TH ACM SIGSOFT INTERNATIONAL WORKSHOP ON AUTOMATING TEST CASE DESIGN, SELECTION, AND EVALUATION (A-TEST '18), 2018, : 56 - 62
  • [25] From Temporal Models to Property-based Testing
    Alzahrani, Nasser
    Spichkova, Maria
    Blech, Jan Olaf
    ENASE: PROCEEDINGS OF THE 12TH INTERNATIONAL CONFERENCE ON EVALUATION OF NOVEL APPROACHES TO SOFTWARE ENGINEERING, 2017, : 241 - 246
  • [26] Genetic Algorithms as Shrinkers in Property-Based Testing
    Lo, Fang-Yi
    Chen, Chao-Hong
    Chen, Ying-ping
    PROCEEDINGS OF THE 2019 GENETIC AND EVOLUTIONARY COMPUTATION CONFERENCE COMPANION (GECCCO'19 COMPANION), 2019, : 291 - 292
  • [27] A property-based testing framework for encryption programs
    Sun, Chang-ai
    Wang, Zuoyi
    Wang, Guan
    FRONTIERS OF COMPUTER SCIENCE, 2014, 8 (03) : 478 - 489
  • [28] A property-based testing framework for encryption programs
    Chang-ai Sun
    Zuoyi Wang
    Guan Wang
    Frontiers of Computer Science, 2014, 8 : 478 - 489
  • [29] Requirements Analysis via Property-based Approach
    Zhao, Lin
    Xu, Tianhua
    Zheng, Wei
    2012 7TH INTERNATIONAL CONFERENCE ON COMPUTING AND CONVERGENCE TECHNOLOGY (ICCCT2012), 2012, : 1153 - 1156
  • [30] Validation of SDN policies: a property-based testing perspective
    Castro, Laura M.
    Paladi, Nicolae
    10TH INT CONF ON EMERGING UBIQUITOUS SYST AND PERVAS NETWORKS (EUSPN-2019) / THE 9TH INT CONF ON CURRENT AND FUTURE TRENDS OF INFORMAT AND COMMUN TECHNOLOGIES IN HEALTHCARE (ICTH-2019) / AFFILIATED WORKOPS, 2019, 160 : 23 - 29