Property-Based Testing: Climbing the Stairway to Verification.

Publication date

2022

Authors

Chen, Zilin
Rizkallah, Christine
O'Connor, Liam
Susarla, Partha
Klein, Gerwin
Heiser, Gernot
Keller, GabrieleORCID 0000-0003-1442-5387ISNI 0000000353696972

Editors

Advisors

Supervisors

Document Type

Part of book
Open Access logo

License

taverne

Abstract

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.

Keywords

QuickCheck, functional programming, formal verification, systems programming, Taverne

Citation

Chen, Z, Rizkallah, C, O'Connor, L, Susarla, P, Klein, G, Heiser, G & Keller, G 2022, Property-Based Testing: Climbing the Stairway to Verification. in SLE ’22, December 06ś07, 2022, Auckland, New Zealand. Association for Computing Machinery, pp. 84-97. https://doi.org/10.1145/3567512.3567520