Trustworthy Systems

Property-based testing: Climbing the stairway to verification


Zilin Chen, Christine Rizkallah, Liam O'Connor, Partha Susarla, Gerwin Klein, Gernot Heiser and Gabriele Keller

    School of Computer Science and Engineering
    Sydney 2052, Australia


Property-based testing (PBT) is a powerful tool that is widely available in modern programming languages. It has been used to reduce formal software verification effort. We demonstrate how PBT can be used in conjunction with formal verification to incrementally gain greater assurance in code correctness by integrating PBT into the verification framework of Cogent—a programming language equipped with a certifying compiler for developing high-assurance systems components. Specifically, for PBT and formal verification to work in tandem, we structure the tests to mirror the refinement proof that we used in Cogent's verification framework: The expected behaviour of the system under test is captured by a functional correctness specification, which mimics the formal specification of the system, and we test the refinement relation between the implementation and the specification. We exhibit the additional benefits that this mutualism brings to developers and demonstrate the techniques we used in this style of PBT, by studying two concrete examples.

BibTeX Entry

    address          = {New York, NY, USA},
    author           = {Zilin Chen and Christine Rizkallah and Liam O'Connor and Partha Susarla and Gerwin Klein and Gernot
                        Heiser and Gabriele Keller},
    booktitle        = {Proceedings of the 15th ACM SIGPLAN International Conference on Software Language Engineering},
    doi              = {10.1145/3567512.3567520},
    location         = {Auckland, New Zealand},
    month            = dec,
    nodate           = {December 06–07, 2022},
    numpages         = {14},
    paperurl         = {},
    publisher        = {ACM},
    series           = {SLE 2022},
    title            = {Property-Based Testing: Climbing the Stairway to Verification},
    url              = {},
    year             = {2022}