Template-based Theory Exploration: Discovering Properties of Functional Programs by Testing
Paper i proceeding, 2020

We present RoughSpec, a template-based extension of the theory exploration tool QuickSpec. QuickSpec uses testing to automatically discover equational properties about functions in a Haskell program. These properties can help the user understand the program or be used as a source of possible lemmas in proofs of the program's correctness. In RoughSpec, the user supplies templates, which describe families of laws such as associativity and distributivity, and we only consider properties that match the templates. This restriction limits the search space and ensures that only relevant properties are discovered. In this way, we sacrifice broad search for more direction towards desirable property patterns, which makes theory exploration tractable and scalable. We also combine RoughSpec with QuickSpec, using QuickSpec to perform a complete search for smaller term sizes, while using templates for larger, more complex properties, in order to leverage the strengths of both systems.

Algebraic properties

Functional programming

Property-based testing

Theory exploration

QuickSpec

Program understanding

Författare

Sólrún Einarsdóttir

Chalmers, Data- och informationsteknik, Funktionell programmering

Nicholas Smallbone

Chalmers, Data- och informationsteknik, Funktionell programmering

Moa Johansson

Elektroteknik, datateknik, IT samt Industriell ekonomi

ACM International Conference Proceeding Series

67-78

32nd Symposium on Implementation and Application of Functional Languages, IFL 2020
Virtual, Online, United Kingdom,

Ämneskategorier

Datavetenskap (datalogi)

Datorsystem

Matematisk analys

DOI

10.1145/3462172.3462192

Mer information

Senast uppdaterat

2021-08-25