English

pun: Fun with Properties; Towards a Programming Language With Built-in Facilities for Program Validation

Programming Languages 2023-09-13 v2

Abstract

Property-based testing is a powerful method to validate program correctness. It is, however, not widely use in industry as the barrier of entry can be very high. One of the hindrances is to write the generators that are needed to generate randomised input data. Program properties often take complicated data structures as inputs and, it requires a significant amount of effort to write generators for such structures in a invariant preserving way. In this paper, we suggest and formalise a new programming language \textsf{pun}; a simple functional programming with properties as a built-in mechanism for program validation. We show how to generate input for \textsf{pun} properties automatically, thus, providing the programmer with a low barrier of entry for using property-based testing. We evaluate our work a on library for binary search trees and compare the test results to a similar library in Haskell.

Keywords

Cite

@article{arxiv.2309.04696,
  title  = {pun: Fun with Properties; Towards a Programming Language With Built-in Facilities for Program Validation},
  author = {Triera Gashi and Sophie Adeline Solheim Bosio and Joachim Tilsted Kristensen and Michael Kirkedal Thomsen},
  journal= {arXiv preprint arXiv:2309.04696},
  year   = {2023}
}

Comments

Submitted to 35th Norwegian ICT Conference for Research and Education

R2 v1 2026-06-28T12:16:51.933Z