Property-Based Testing by Elaborating Proof Outlines

0Citations
Citations of this article
1Readers
Mendeley users who have this article in their library.

Abstract

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 encoding certain kinds of “proof outlines” as proof certificates that can 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 toward their explanation. Once generation is accomplished, the testing phase is a standard logic programing search. After illustrating our techniques on simple, first-order (algebraic) data structures, we lift it to data structures containing bindings by using the λ-tree syntax approach to encode bindings. The λProlog programing language can perform both generating and checking of tests using this approach to syntax. We then further extend PBT to specifications in a fragment of linear logic.

Cite

CITATION STYLE

APA

Miller, D., & Momigliano, A. (2024). Property-Based Testing by Elaborating Proof Outlines. Theory and Practice of Logic Programming. https://doi.org/10.1017/S1471068424000176

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free