Skip to main content

Quick specifications for the busy programmer


QuickSpec is a theory exploration system which tests a Haskell program to find equational properties of it, automatically. The equations can be used to help understand the program, or as lemmas to help prove the program correct. QuickSpec is largely automatic: the user just supplies the functions to be tested and QuickCheck data generators. Previous theory exploration systems, including earlier versions of QuickSpec itself, scaled poorly. This paper describes a new architecture for theory exploration with which we can find vastly more complex laws than before, and much faster. We demonstrate theory exploration in QuickSpec on problems both from functional programming and mathematics.

Hide All
Bachmair, L., Dershowitz, N. & Plaisted, D. A. (1989) Chapter 1 of Vol. II of Resolution of Equations in Algebraic Structures. In Completion without Failure, Ait-Kaci, H. and Nivat, M., eds., Academic Press.
Baez, J. C. (2002) The octonions. Bull. Am. Math. Soc. 39, 145205.
Buchberger, B., Creciun, A., Jebelean, T., Kovacs, L., Kutsia, T., Nakagawa, K., Piroi, F., Popov, N., Robu, J., Rosenkranz, M. & Windsteiger, W. (2006) Theorema: Towards computer-aided mathematical theory exploration. J. Appl. Log. 4 (4), 470504.
Bundy, A., McCasland, R. & Smith, P. (2015) MATHsAiD: Automated Mathematical Theory Exploration. Working paper. University of Edinburgh.
Claessen, K., Duregård, J. & Pałka, M. H. (2014) Generating constrained random data with uniform distribution. In International Symposium on Functional and Logic Programming. Springer, pp. 1834.
Claessen, K. & Hughes, J. (2000) QuickCheck: A lightweight tool for random testing of Haskell programs.In Proceedings of ICFP, pp. 268–279.
Claessen, K., Johansson, M., Rosén, D. & Smallbone, N. (2013) Automating inductive proofs using theory exploration. In Proceedings of the Conference on Auomtated Deduction (CADE), LNCS, vol. 7898. Springer, pp. 392–406.
Claessen, K., Smallbone, N. & Hughes, J. (2010) QuickSpec: Guessing formal specifications using testing. In Proceedings of TAP, pp. 6–21.
Duregård, J. (2016) Automating Black-Box Property Based Testing. PhD Thesis, Chalmers University of Technology.
Ernst, M. D., Perkins, J.f H., Guo, P. J., McCamant, S., Pacheco, C., Tschantz, M. S. & Xiao, C. (2007) The Daikon system for dynamic detection of likely invariants. Sci. Comput. Program. 69 (1–3), 3545.
Henderson, P. (1982) Functional geometry. In Symposium on LISP and Functional Programming, pp. 179–187.
Henderson, P. (2002) Functional geometry. Higher-Order Symbol. Comput. 15 (4), 349365.
Hughes, J. (1995) The design of a pretty-printing library. In Proceedings of Advanced Functional Programming. Springer Verlag, pp. 53–96.
Johansson, M., Dixon, L. & Bundy, A. (2011) Conjecture synthesis for inductive theories. J. Autom. Reason. 47 (3), 251289.
Johansson, M., Rosén, D., Smallbone, N. & Claessen, K. (2014) Hipster: Integrating theory exploration in a proof assistant. In Conference on Intelligent Computer Mathematics.
Knuth, D. E. & Bendix, P. B. (1983) Simple word problems in universal algebras. In Automation of Reasoning, Siekmann, JrgH. & Wrightson, G. (eds), Symbolic Computation. Berlin Heidelberg: Springer, pp. 342376.
Martin, U. & Nipkow, T. (1990) Ordered rewriting and confluence. In Proceedings of 10th International Conference Automated Deduction, Stickel, M. E. (ed), vol. 449, pp. 366–380.
Montano-Rivas, O., McCasland, R., Dixon, L. & Bundy, A. (2012) Scheme-based theorem discovery and concept invention. Expert Syst. Appl. 39 (2), 16371646.
Moufang, R. (1935) Zur struktur von alternativekörpen. Math. Ann. 110, 416430.
Smith, J.D.H. & Romanowska, Anna B. (1999) Post-modern algebra. Wiley-Interscience.
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Journal of Functional Programming
  • ISSN: 0956-7968
  • EISSN: 1469-7653
  • URL: /core/journals/journal-of-functional-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *


Full text views

Total number of HTML views: 2
Total number of PDF views: 82 *
Loading metrics...

Abstract views

Total abstract views: 381 *
Loading metrics...

* Views captured on Cambridge Core between 10th July 2017 - 19th July 2018. This data will be updated every 24 hours.

Quick specifications for the busy programmer

Submit a response


No Discussions have been published for this article.


Reply to: Submit a response

Your details

Conflicting interests

Do you have any conflicting interests? *