AAU Student Projects - visit Aalborg University's student projects portal
A master's thesis from Aalborg University
Book cover


DropShadow: Instrumenting Go with Contracts and Automatic Property-Based Test Generation of Hyperproperties

Term

4. term

Education

Publication year

2024

Submitted on

Pages

60

Abstract

This report presents an exploration and evaluation of DropShadow: a testing framework, leveraging contract-driven testing which automatically generates and executes property-based tests for the Go programming language. The tool integrates contracts written by the developer directly into Go source code and allows for the automatic generation of tests, checking both trace- and hyperproperties; the latter achieved through sequential self-composition. This integration aims to facilitate property-based testing, reducing the required manual work for writing tests, as well as, introduce more comprehensive automated checks for program correctness against specified behaviours. Moreover, this contractual integration ensures not only individual functions comply with their specifications, but also functions calling or called by said functions, hence offering a cascading assurance of reliability throughout the program. Our evaluation shows a potential practical application of the tool in different settings through the use of various constructs with the added benefit of mitigating contractual explosion.