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
来源
PROCEEDINGS OF THE 21ST INTERNATIONAL SYMPOSIUM ON PRINCIPLES AND PRACTICE OF DECLARATIVE PROGRAMMING (PPDP 2019) | 2019年
关键词
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 条
  • [1] Property-Based Testing by Elaborating Proof Outlines
    Miller, Dale
    Momigliano, Alberto
    THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2024,
  • [2] Towards Substructural Property-Based Testing
    Mantovani, Marco
    Momigliano, Alberto
    LOGIC-BASED PROGRAM SYNTHESIS AND TRANSFORMATION (LOPSTR 2021), 2022, 13290 : 92 - 112
  • [3] Automating Targeted Property-Based Testing
    Loscher, Andreas
    Sagonas, Konstantinos
    2018 IEEE 11TH INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VERIFICATION AND VALIDATION (ICST), 2018, : 70 - 80
  • [4] Don't Go Down the Rabbit Hole: Reprioritizing Enumeration for Property-Based Testing
    Mittelman, Segev Elazar
    Resnick, Aviel
    Perez, Ivan
    Goodloe, Alwyn E.
    Lampropoulos, Leonidas
    PROCEEDINGS OF THE 16TH ACM SIGPLAN INTERNATIONAL SYMPOSIUM ON HASKELL, HASKELL 2023, 2023, : 59 - 71
  • [5] Property-based Semantic Similarity and Relatedness for Improving Recommendation Accuracy and Diversity
    Likavec, Silvia
    Osborne, Francesco
    Cena, Federica
    INTERNATIONAL JOURNAL ON SEMANTIC WEB AND INFORMATION SYSTEMS, 2015, 11 (04) : 1 - 40
  • [6] The Property-Based Practical Applications and Solutions of Genetically Encoded Acetylcholine and Monoamine Sensors
    Chen, Jun
    Cho, Katriel E.
    Skwarzynska, Daria
    Clancy, Shaylyn
    Conley, Nicholas J.
    Clinton, Sarah M.
    Li, Xiaokun
    Lin, Li
    Zhu, J. Julius
    JOURNAL OF NEUROSCIENCE, 2021, 41 (11): : 2318 - 2328
  • [7] Property-based selection criteria of low GWP working fluids for organic Rankine cycle
    Sarkar, Jahar
    JOURNAL OF THE BRAZILIAN SOCIETY OF MECHANICAL SCIENCES AND ENGINEERING, 2017, 39 (04) : 1419 - 1428
  • [8] Structure- and Property-Based Design of Aminooxazoline Xanthenes as Selective, Orally Efficacious, and CNS Penetrable BACE Inhibitors for the Treatment of Alzheimer's Disease
    Huang, Hongbing
    La, Daniel S.
    Cheng, Alan C.
    Whittington, Douglas A.
    Patel, Vinod F.
    Chen, Kui
    Dineen, Thomas A.
    Epstein, Oleg
    Graceffa, Russell
    Hickman, Dean
    Kiang, Y. -H.
    Louie, Steven
    Luo, Yi
    Wahl, Robert C.
    Wen, Paul H.
    Wood, Stephen
    Fremeau, Robert T., Jr.
    JOURNAL OF MEDICINAL CHEMISTRY, 2012, 55 (21) : 9156 - 9169
  • [9] How testing helps to diagnose proof failures
    Petiot, Guillaume
    Kosmatov, Nikolai
    Botella, Bernard
    Giorgetti, Alain
    Julliand, Jacques
    FORMAL ASPECTS OF COMPUTING, 2018, 30 (06) : 629 - 657
  • [10] CT-IoT: a combinatorial testing-based path selection framework for effective IoT testing
    Hu, Linghuan
    Wong, W. Eric
    Kuhn, D. Richard
    Kacker, Raghu N.
    Li, Shuo
    EMPIRICAL SOFTWARE ENGINEERING, 2022, 27 (02)