TY - GEN
T1 - Property-based testing via proof reconstruction
AU - Blanco, Roberto
AU - Miller, Dale
AU - Momigliano, Alberto
N1 - Publisher Copyright:
© 2019 ACM.
PY - 2019/10/7
Y1 - 2019/10/7
N2 - 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 λ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.
AB - 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 λ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.
U2 - 10.1145/3354166.3354170
DO - 10.1145/3354166.3354170
M3 - Conference contribution
AN - SCOPUS:85083362605
T3 - ACM International Conference Proceeding Series
BT - Proceedings of the 21st International Symposium on Principles and Practice of Declarative Programming, PPDP 2019
PB - Association for Computing Machinery
T2 - 21st International Symposium on Principles and Practice of Declarative Programming, PPDP 2019
Y2 - 7 October 2019 through 9 October 2019
ER -