{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,4,11]],"date-time":"2026-04-11T02:13:32Z","timestamp":1775873612964,"version":"3.50.1"},"reference-count":20,"publisher":"Cambridge University Press (CUP)","license":[{"start":{"date-parts":[[2015,7,13]],"date-time":"2015-07-13T00:00:00Z","timestamp":1436745600000},"content-version":"unspecified","delay-in-days":193,"URL":"https:\/\/www.cambridge.org\/core\/terms"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["J. Funct. Prog."],"published-print":{"date-parts":[[2015]]},"abstract":"<jats:title>Abstract<\/jats:title><jats:p>We present a technique for automatically deriving test data generators from a given executable predicate representing the set of values we are interested in generating. The distribution of these generators is uniform over values of a given size. To make the generation efficient, we rely on laziness of the predicate, allowing us to prune the space of values quickly. In contrast, implementing test data generators by hand is labour intensive and error prone. Moreover, handwritten generators often have an unpredictable distribution of values, risking that some values are arbitrarily underrepresented. We also present a variation of the technique that has better performance, but where the distribution is skewed in a limited, albeit predictable way. Experimental evaluation of the techniques shows that the automatically derived generators are much easier to define than handwritten ones, and their performance, while lower, is adequate for some realistic applications.<\/jats:p>","DOI":"10.1017\/s0956796815000143","type":"journal-article","created":{"date-parts":[[2015,7,13]],"date-time":"2015-07-13T01:59:12Z","timestamp":1436752752000},"source":"Crossref","is-referenced-by-count":22,"title":["Generating constrained random data with uniform distribution"],"prefix":"10.1017","volume":"25","author":[{"given":"KOEN","family":"CLAESSEN","sequence":"first","affiliation":[]},{"given":"JONAS","family":"DUREG\u00c5RD","sequence":"additional","affiliation":[]},{"given":"MICHA\u0141 H.","family":"PA\u0141KA","sequence":"additional","affiliation":[]}],"member":"56","published-online":{"date-parts":[[2015,7,13]]},"reference":[{"key":"S0956796815000143_ref4","doi-asserted-by":"crossref","unstructured":"Claessen K. , Dureg\u00e5rd J. & Pa\u0142ka M. H. (2014) Generating constrained random data with uniform distribution. In Proceedings of the International Conference on Functional and Logic Programming (FLOPS 2014), Codish M. & Sumii E. (eds), LNCS, vol. 8475, Springer International Publishing, pp. 18\u201334.","DOI":"10.1007\/978-3-319-07151-0_2"},{"key":"S0956796815000143_ref1","doi-asserted-by":"crossref","unstructured":"Arts T. , Hughes J. , Johansson J. & Wiger Ulf. (2006) Testing telecoms software with Quviq QuickCheck. In Proceedings of the Workshop on Erlang (Erlang 2006). New York, NY, USA: ACM, pp. 2\u201310.","DOI":"10.1145\/1159789.1159792"},{"key":"S0956796815000143_ref13","unstructured":"Lindblad F. (2008) Property directed generation of first-order test data. In Trends in Functional Programming (TFP 2007). Intellect, pp. 105\u2013123."},{"key":"S0956796815000143_ref8","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796811000189"},{"key":"S0956796815000143_ref3","doi-asserted-by":"crossref","unstructured":"Christiansen J. & Fischer S. (2008) EasyCheck: Test data for free. In Proceedings of the International Conference on Functional and Logic Programming (FLOPS 2008). LNCS, vol. 4989. Berlin, Heidelberg: Springer, pp. 22\u2013336.","DOI":"10.1007\/978-3-540-78969-7_23"},{"key":"S0956796815000143_ref16","doi-asserted-by":"crossref","unstructured":"Reich J. S, Naylor, M. & Runciman C. (2012) Lazy generation of canonical test programs. In Implementation and Application of Functional Languages (IFL 2012). LNCS, vol. 7257, Springer, pp. 69\u201384.","DOI":"10.1007\/978-3-642-34407-7_5"},{"key":"S0956796815000143_ref9","doi-asserted-by":"crossref","unstructured":"Flajolet P. , \u00c9ric F. & Pivoteau C. (2007) Boltzmann sampling of unlabelled structures. In Proceedings of the Workshop on Analytic Algorithmic and Combinatorics. SIAM Press, pp. 201\u2013211.","DOI":"10.1137\/1.9781611972979.5"},{"key":"S0956796815000143_ref2","doi-asserted-by":"crossref","unstructured":"Boyapati C. , Khurshid S. & Marinov D. (2002) Korat: Automated testing based on Java predicates. In Proceedings of the International Symposium on Software Testing and Analysis (ISSTA 2002). New York, NY, USA: ACM, pp. 123\u2013133.","DOI":"10.1145\/566172.566191"},{"key":"S0956796815000143_ref12","volume-title":"The Art of Computer Programming, volume 4, fascicle 4: Generating All Trees\u2013History of Combinatorial Generation (Art of Computer Programming)","author":"Knuth","year":"2006"},{"key":"S0956796815000143_ref5","unstructured":"Claessen K. & Hughes J. (2000) QuickCheck: A lightweight tool for random testing of Haskell programs. In Proceedings of the International Conference on Functional Programming (ICFP 2000). New York, NY, USA: ACM, pp. 268\u2013279."},{"key":"S0956796815000143_ref7","doi-asserted-by":"crossref","unstructured":"Feldt R. & Poulding S. (2013) Finding test data with specific properties via metaheuristic search. In Proceedings of the International Symposium on Software Reliability Engineering (ISSRE 2013). IEEE, pp. 350\u2013359.","DOI":"10.1109\/ISSRE.2013.6698888"},{"key":"S0956796815000143_ref18","unstructured":"Yakushev A. R. & Jeuring J. (2009) Enumerating well-typed terms generically. In Proceedings of International Workshop of Approaches and Applications of Inductive Programming (AAIP 2009). LNCS, vol. 5812. Springer, pp. 93\u2013116."},{"key":"S0956796815000143_ref10","doi-asserted-by":"publisher","DOI":"10.1016\/0304-3975(94)90226-7"},{"key":"S0956796815000143_ref11","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796813000178"},{"key":"S0956796815000143_ref14","doi-asserted-by":"crossref","unstructured":"Pa\u0142ka M. H. (2012) Testing an Optimising Compiler by Generating Random Lambda Terms. Licentiate thesis, Chalmers University of Technology, Gothenburg, Sweden.","DOI":"10.1145\/1982595.1982615"},{"key":"S0956796815000143_ref15","doi-asserted-by":"crossref","unstructured":"Pa\u0142ka M. H. , Claessen K. , Russo A. & Hughes J. (2011) Testing an optimising compiler by generating random lambda terms. Proceedings of the International Workshop on Automation of Software Test (AST 2011). ACM, pp. 91\u201397.","DOI":"10.1145\/1982595.1982615"},{"key":"S0956796815000143_ref17","doi-asserted-by":"crossref","unstructured":"Runciman C. , Naylor M. & Lindblad F. (2008) Smallcheck and Lazy Smallcheck: Automatic exhaustive testing for small values. In Proceedings of the Haskell Symposium (Haskell 2008). New York, NY, USA: ACM, pp. 37\u201348.","DOI":"10.1145\/1411286.1411292"},{"key":"S0956796815000143_ref19","unstructured":"Yorgey B. A. (2010) Species and functors and types, oh my! In Proceedings of the Haskell Symposium (Haskell 2010). New York, NY, USA: ACM, pp. 147\u2013158."},{"key":"S0956796815000143_ref20","unstructured":"Yorgey B. A. (2014) Combinatorial Species and Labelled Structures. Ph.D. thesis, University of Pennsylvania."},{"key":"S0956796815000143_ref6","doi-asserted-by":"publisher","DOI":"10.1145\/2364506.2364515"}],"container-title":["Journal of Functional Programming"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.cambridge.org\/core\/services\/aop-cambridge-core\/content\/view\/S0956796815000143","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2019,6,6]],"date-time":"2019-06-06T22:28:46Z","timestamp":1559860126000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.cambridge.org\/core\/product\/identifier\/S0956796815000143\/type\/journal_article"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2015]]},"references-count":20,"alternative-id":["S0956796815000143"],"URL":"https:\/\/doi.org\/10.1017\/s0956796815000143","relation":{},"ISSN":["0956-7968","1469-7653"],"issn-type":[{"value":"0956-7968","type":"print"},{"value":"1469-7653","type":"electronic"}],"subject":[],"published":{"date-parts":[[2015]]},"article-number":"e8"}}