{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,4,22]],"date-time":"2026-04-22T20:57:26Z","timestamp":1776891446605,"version":"3.51.2"},"reference-count":22,"publisher":"Centre pour la Communication Scientifique Directe (CCSD)","license":[{"start":{"date-parts":[[2017,8,30]],"date-time":"2017-08-30T00:00:00Z","timestamp":1504051200000},"content-version":"unspecified","delay-in-days":241,"URL":"https:\/\/www.cambridge.org\/core\/terms"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["J. Funct. Prog."],"published-print":{"date-parts":[[2017]]},"abstract":"<jats:title>Abstract<\/jats:title>\n                  <jats:p>\n                    Enumerations represented as bijections between the natural numbers and elements of some given type have recently garnered interest in property-based testing because of their efficiency and flexibility. There are, however, many ways of defining these bijections, some of which are better than others. This paper offers a new property of enumeration combinators called\n                    <jats:italic>fairness<\/jats:italic>\n                    that identifies enumeration combinators that are better suited to property-based testing. Intuitively, the result of a fair combinator indexes into its argument enumerations equally when constructing its result. For example, extracting the\n                    <jats:italic>n<\/jats:italic>\n                    th element from our enumeration of three-tuples indexes about\n                    <jats:inline-formula>\n                      <jats:alternatives>\n                        <jats:inline-graphic xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" mime-subtype=\"gif\" xlink:type=\"simple\" xlink:href=\"S0956796817000107_inline1\"\/>\n                        <jats:tex-math>$\\sqrt[3]{n}$<\/jats:tex-math>\n                      <\/jats:alternatives>\n                    <\/jats:inline-formula>\n                    elements into each of its components instead of, say, indexing\n                    <jats:inline-formula>\n                      <jats:alternatives>\n                        <jats:inline-graphic xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" mime-subtype=\"gif\" xlink:type=\"simple\" xlink:href=\"S0956796817000107_inline2\"\/>\n                        <jats:tex-math>$\\sqrt[2]{n}$<\/jats:tex-math>\n                      <\/jats:alternatives>\n                    <\/jats:inline-formula>\n                    into one and\n                    <jats:inline-formula>\n                      <jats:alternatives>\n                        <jats:inline-graphic xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" mime-subtype=\"gif\" xlink:type=\"simple\" xlink:href=\"S0956796817000107_inline3\"\/>\n                        <jats:tex-math>$\\sqrt[4]{n}$<\/jats:tex-math>\n                      <\/jats:alternatives>\n                    <\/jats:inline-formula>\n                    into the other two, as you would if a three-tuple were built out of nested pairs. Similarly, extracting the\n                    <jats:italic>n<\/jats:italic>\n                    th element from our enumeration of a three-way union returns an element that is\n                    <jats:inline-formula>\n                      <jats:alternatives>\n                        <jats:inline-graphic xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" mime-subtype=\"gif\" xlink:type=\"simple\" xlink:href=\"S0956796817000107_inline4\"\/>\n                        <jats:tex-math>$\\frac{n}{3}$<\/jats:tex-math>\n                      <\/jats:alternatives>\n                    <\/jats:inline-formula>\n                    into one of the argument enumerators. The paper presents a semantics of enumeration combinators, a theory of fairness, proofs establishing fairness of our new combinators and that some combinations of fair combinators are not fair. We also report on an evaluation of fairness for the purpose of finding bugs in programming-language models. We show that fair enumeration combinators have complementary strengths to an existing, well-tuned ad hoc random generator (better on short time scales and worse on long time scales) and that using unfair combinators is worse across the board.\n                  <\/jats:p>","DOI":"10.1017\/s0956796817000107","type":"journal-article","created":{"date-parts":[[2017,8,30]],"date-time":"2017-08-30T00:51:09Z","timestamp":1504054269000},"source":"Crossref","is-referenced-by-count":7,"title":["Fair enumeration combinators"],"prefix":"10.46298","volume":"27","author":[{"given":"MAX S.","family":"NEW","sequence":"first","affiliation":[]},{"given":"BURKE","family":"FETSCHER","sequence":"additional","affiliation":[]},{"given":"ROBERT BRUCE","family":"FINDLER","sequence":"additional","affiliation":[]},{"given":"JAY","family":"MCCARTHY","sequence":"additional","affiliation":[]}],"member":"25203","published-online":{"date-parts":[[2017,8,30]]},"reference":[{"key":"S0956796817000107_ref19","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-37036-6_14"},{"key":"S0956796817000107_ref7","article-title":"Every bit counts: The binary representation of typed data and programs","volume":"22","author":"Kennedy","year":"2010","journal-title":"J. Funct. Program."},{"key":"S0956796817000107_ref3","doi-asserted-by":"crossref","unstructured":"Classen K. & Hughes J. (2000) QuickCheck: A lightweight tool for random testing of Haskell programs. In Proceedings of the International Conference on Functional Programming.","DOI":"10.1145\/351240.351266"},{"key":"S0956796817000107_ref6","unstructured":"Flatt M. & PLT (2010) Reference: Racket. Technical Report PLT-TR-2010-1. PLT Design Inc. Available at: https:\/\/racket-lang.org\/tr1\/"},{"key":"S0956796817000107_ref22","doi-asserted-by":"crossref","unstructured":"Yang X. , Chen Y. , Eide E. & Regehr J. (2011) Finding and understanding bin C compilers. In Proceedings of the Programming Language Design and Implementation.","DOI":"10.1145\/1993498.1993532"},{"key":"S0956796817000107_ref20","unstructured":"Tarau P. (2012) Deriving a fast inverse of the generalized cantor N-tupling bijection. In Proceedings of the International Conference on Logic Programming."},{"key":"S0956796817000107_ref10","doi-asserted-by":"crossref","unstructured":"Klein C. , Findler R. B. & Flatt M. (2013) The racket virtual machine and randomized testing. Higher-Order Symbol. Comput.","DOI":"10.1007\/s10990-013-9091-1"},{"key":"S0956796817000107_ref2","doi-asserted-by":"crossref","unstructured":"Bulwahn L. (2012) The new quickcheck for Isabelle: Random, exhaustive and symbolic testing under one roof. In Proceedings of the International Conference on Certified Programs and Proofs.","DOI":"10.1007\/978-3-642-35308-6_10"},{"key":"S0956796817000107_ref8","doi-asserted-by":"crossref","unstructured":"Klein C. , Clements J. , Dimoulas C. , Eastlund C. , Felleisen M. , Flatt M. , McCarthy J. A. , Rafkind J. , Tobin-Hochstadt S. & Findler R. B. (2012) Run your research: On the effectiveness of lightweight mechanization. In Proceedings of the Symposium on Principles of Programming Languages.","DOI":"10.1145\/2103656.2103691"},{"key":"S0956796817000107_ref1","doi-asserted-by":"publisher","DOI":"10.1007\/s10817-011-9226-1"},{"key":"S0956796817000107_ref16","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. In Proceedings of the International Workshop on Automation of Software Test.","DOI":"10.1145\/1982595.1982615"},{"key":"S0956796817000107_ref5","volume-title":"Semantics Engineering with PLT Redex","author":"Felleisen","year":"2009"},{"key":"S0956796817000107_ref4","doi-asserted-by":"crossref","unstructured":"Dureg\u00e5rd J. , Jansson P. & Wang M. (2012) Feat: Functional enumeration of algebraic types. In Proceedings of the Haskell Symposium.","DOI":"10.1145\/2364506.2364515"},{"key":"S0956796817000107_ref15","doi-asserted-by":"crossref","unstructured":"Pa\u0142ka M. H. (2012) Testing an Optimising Compiler by Generating Random Lambda Terms. Licentiate of Philosophy Dissertation. Chalmers University of Technology and G\u00f6teborg University.","DOI":"10.1145\/1982595.1982615"},{"key":"S0956796817000107_ref21","doi-asserted-by":"publisher","DOI":"10.1017\/S1471068413000537"},{"key":"S0956796817000107_ref9","unstructured":"Klein C. & Findler R. B. (2009) Randomized testing in PLT redex. In Proceedings of the Scheme and Functional Programming, pp. 26\u201336."},{"key":"S0956796817000107_ref11","doi-asserted-by":"crossref","unstructured":"Kuraj I. & Kuncak V. (2014) SciFe: Scala framework for efficient enumeration of data structures with invariants. In Proceedings of the Scala Workshop.","DOI":"10.1145\/2637647.2637655"},{"key":"S0956796817000107_ref13","doi-asserted-by":"crossref","unstructured":"Matthews J. , Findler R. B. , Flatt M. & Felleisen M. (2004) A visual environment for developing context-sensitive term rewriting systems. In Proceedings of the International Conference on Rewriting Techniques and Applications.","DOI":"10.1007\/978-3-540-25979-4_21"},{"key":"S0956796817000107_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.","DOI":"10.1145\/1411286.1411292"},{"key":"S0956796817000107_ref18","unstructured":"Szudzik M. (2006) An elegant pairing function. Available at: http:\/\/szudzik.com\/ElegantPairing.pdf."},{"key":"S0956796817000107_ref14","doi-asserted-by":"publisher","DOI":"10.1145\/96267.96279"},{"key":"S0956796817000107_ref12","doi-asserted-by":"crossref","unstructured":"Kuraj I. , Kuncak V. & Jackson D. (2015) Programming with enumerable sets of structures. In Proceedings of the Object-Oriented Programming, Systems, Languages, and Applications.","DOI":"10.1145\/2814270.2814323"}],"container-title":["Journal of Functional Programming"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.cambridge.org\/core\/services\/aop-cambridge-core\/content\/view\/S0956796817000107","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,4,22]],"date-time":"2026-04-22T20:19:51Z","timestamp":1776889191000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.cambridge.org\/core\/product\/identifier\/S0956796817000107\/type\/journal_article"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2017]]},"references-count":22,"alternative-id":["S0956796817000107"],"URL":"https:\/\/doi.org\/10.1017\/s0956796817000107","relation":{},"ISSN":["0956-7968","1469-7653"],"issn-type":[{"value":"0956-7968","type":"print"},{"value":"1469-7653","type":"electronic"}],"subject":[],"published":{"date-parts":[[2017]]},"article-number":"e19"}}