Computer Science > Programming Languages
[Submitted on 9 Sep 2023 (v1), last revised 12 Sep 2023 (this version, v2)]
Title:pun: Fun with Properties; Towards a Programming Language With Built-in Facilities for Program Validation
View PDFAbstract: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.
Submission history
From: Michael Kirkedal Thomsen [view email][v1] Sat, 9 Sep 2023 06:28:28 UTC (16 KB)
[v2] Tue, 12 Sep 2023 11:07:52 UTC (16 KB)
References & Citations
Bibliographic and Citation Tools
Bibliographic Explorer (What is the Explorer?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)
Code, Data and Media Associated with this Article
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)
Demos
Recommenders and Search Tools
Influence Flower (What are Influence Flowers?)
Connected Papers (What is Connected Papers?)
CORE Recommender (What is CORE?)
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.