{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,4,11]],"date-time":"2026-04-11T00:50:25Z","timestamp":1775868625567,"version":"3.50.1"},"reference-count":43,"publisher":"Association for Computing Machinery (ACM)","issue":"ICFP","license":[{"start":{"date-parts":[[2023,8,30]],"date-time":"2023-08-30T00:00:00Z","timestamp":1693353600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/100000001","name":"National Science Foundation","doi-asserted-by":"publisher","award":["1421243"],"award-info":[{"award-number":["1421243"]}],"id":[{"id":"10.13039\/100000001","id-type":"DOI","asserted-by":"publisher"}]},{"DOI":"10.13039\/501100000266","name":"Engineering and Physical Sciences Research Council","doi-asserted-by":"publisher","award":["EP\/T008911\/1"],"award-info":[{"award-number":["EP\/T008911\/1"]}],"id":[{"id":"10.13039\/501100000266","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2023,8,30]]},"abstract":"<jats:p>Expert users of property-based testing often labor to craft random generators that encode detailed knowledge about what it means for a test input to be valid and interesting. Fortunately, the fruits of this labor can also be put to other uses. In the bidirectional programming literature, for example, generators have been repurposed as validity checkers, while Python's Hypothesis library uses the same structures for shrinking and mutating test inputs.<\/jats:p>\n          <jats:p>To unify and generalize these uses and many others, we propose reflective generators, a new foundation for random data generators that can \"reflect\" on an input value to calculate the random choices that could have been made to produce it. Reflective generators combine ideas from two existing abstractions: free generators and partial monadic profunctors. They can be used to implement and enhance the aforementioned shrinking and mutation algorithms, generalizing them to work for any values that can be produced by the generator, not just ones for which a trace of the generator's execution is available. Beyond shrinking and mutation, reflective generators generalize a published algorithm for example-based generation, and they can also be used as checkers, partial value completers, and other kinds of test data producers.<\/jats:p>","DOI":"10.1145\/3607842","type":"journal-article","created":{"date-parts":[[2023,8,31]],"date-time":"2023-08-31T17:40:31Z","timestamp":1693503631000},"page":"322-355","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":8,"title":["Reflecting on Random Generation"],"prefix":"10.1145","volume":"7","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-9631-1169","authenticated-orcid":false,"given":"Harrison","family":"Goldstein","sequence":"first","affiliation":[{"name":"University of Pennsylvania, USA"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-4423-6918","authenticated-orcid":false,"given":"Samantha","family":"Frohlich","sequence":"additional","affiliation":[{"name":"University of Bristol, UK"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-7780-630X","authenticated-orcid":false,"given":"Meng","family":"Wang","sequence":"additional","affiliation":[{"name":"University of Bristol, UK"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-7839-1636","authenticated-orcid":false,"given":"Benjamin C.","family":"Pierce","sequence":"additional","affiliation":[{"name":"University of Pennsylvania, USA"}]}],"member":"320","published-online":{"date-parts":[[2023,8,31]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.14722\/ndss.2019.23412"},{"key":"e_1_2_1_2_1","unstructured":"Rudy Matela Braquehais. 2017. Tools for Discovery Refinement and Generalization of Functional Properties by Enumerative Testing. Oct. http:\/\/etheses.whiterose.ac.uk\/19178\/ Publisher: University of York"},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/3469279"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/3236778"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/351240.351266"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1145\/3452379"},{"key":"e_1_2_1_7_1","unstructured":"Zac Hatfield Dodds. 2022. current maintainer of Hypothesis (. https:\/\/github.com\/HypothesisWorks\/hypothesis"},{"key":"e_1_2_1_8_1","volume-title":"OCaml Workshop. https:\/\/github.com\/ocaml\/ocaml.org-media\/blob\/master\/meetings\/ocaml\/2017\/extended-abstract__2017__stephen-dolan_mindy-preston__testing-with-crowbar.pdf","author":"Dolan Stephen","year":"2017","unstructured":"Stephen Dolan and Mindy Preston. 2017. Testing with crowbar. In OCaml Workshop. https:\/\/github.com\/ocaml\/ocaml.org-media\/blob\/master\/meetings\/ocaml\/2017\/extended-abstract__2017__stephen-dolan_mindy-preston__testing-with-crowbar.pdf"},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/2430532.2364515"},{"key":"e_1_2_1_10_1","unstructured":"Andrea Fioraldi Dominik Maier Heiko Ei\u00dffeldt and Marc Heuse. 2020. AFL++ : Combining Incremental Steps of Fuzzing Research. https:\/\/www.usenix.org\/conference\/woot20\/presentation\/fioraldi"},{"key":"e_1_2_1_11_1","volume-title":"Bidirectional programming languages","author":"Foster John Nathan","year":"1884","unstructured":"John Nathan Foster. 2009. Bidirectional programming languages. University of Pennsylvania. United States \u2013 Pennsylvania. https:\/\/www.proquest.com\/docview\/304986072\/abstract\/11884B3FBDDB4DCFPQ\/1 ISBN: 9781109710137"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1016\/0304-3975(86)90044-7"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1145\/1375581.1375607"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1109\/ASE.2017.8115618"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/3563291"},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/2593882.2593900"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.5555\/2362793.2362831"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-47147-7_4"},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.1145\/3428273"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-32202-0_3"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/2887747.2804319"},{"key":"e_1_2_1_22_1","unstructured":"Ed Kmett. 2023. free: Haskell Package. \/\/hackage.haskell.org\/package\/free"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1214\/aoms\/1177729694"},{"key":"e_1_2_1_24_1","volume-title":"Parsec: Direct Style Monadic Parser Combinators For The Real World. 22","author":"Leijen Daan","year":"2001","unstructured":"Daan Leijen and Erik Meijer. 2001. Parsec: Direct Style Monadic Parser Combinators For The Real World. 22. http:\/\/www.cs.uu.nl\/research\/techreps\/repo\/CS-2001\/2001-35.pdf"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1109\/18.61115"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.ECOOP.2020.13"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.21105\/joss.01891"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/2088456.1863529"},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1016\/0890-5401(91)90052-4"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1145\/1982595.1982615"},{"key":"e_1_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/3519939.3523707"},{"key":"e_1_2_1_32_1","volume-title":"Publisher: Aspect-Oriented Software Association","author":"Pickering M.","year":"2017","unstructured":"M. Pickering, J. Gibbons, and N. Wu. 2017. Profunctor optics: Modular data accessors. Art, Science, and Engineering of Programming, 1, 2 (2017), issn:2473-7321 https:\/\/ora.ox.ac.uk\/objects\/uuid:9989be57-a045-4504-b9d7-dc93fd508365 Publisher: Aspect-Oriented Software Association"},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/2633357.2633365"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-06859-7_148"},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/1543134.1411292"},{"key":"e_1_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2020.3013716"},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/3460319.3464814"},{"key":"e_1_2_1_38_1","unstructured":"Jacob Stanley. 2023. Hedgehog will eat all your bugs. https:\/\/hedgehog.qa\/"},{"key":"e_1_2_1_39_1","first-page":"339","article-title":"Free algebras, input processes and free monads","volume":"016","author":"Trnkov\u00e1 Vera","year":"1975","unstructured":"Vera Trnkov\u00e1, Ji\u0159\u00ed Ad\u00e1mek, V\u00e1clav Koubek, and Jan Reiterman. 1975. Free algebras, input processes and free monads. Commentationes Mathematicae Universitatis Carolinae, 016 (1975), 339\u2013351. http:\/\/dml.mathdoc.fr\/item\/105628","journal-title":"Commentationes Mathematicae Universitatis Carolinae"},{"key":"e_1_2_1_40_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-45744-4_29"},{"key":"e_1_2_1_41_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2019.00081"},{"key":"e_1_2_1_42_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-17184-1_6"},{"key":"e_1_2_1_43_1","unstructured":"Micha\u0142 Zalewski. 2022. American Fuzzy Lop (AFL). https:\/\/github.com\/google\/AFL original-date: 2019-07-25T16:50:06Z"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3607842","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3607842","content-type":"application\/pdf","content-version":"vor","intended-application":"syndication"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3607842","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T16:37:06Z","timestamp":1750178226000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3607842"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,8,30]]},"references-count":43,"journal-issue":{"issue":"ICFP","published-print":{"date-parts":[[2023,8,30]]}},"alternative-id":["10.1145\/3607842"],"URL":"https:\/\/doi.org\/10.1145\/3607842","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,8,30]]},"assertion":[{"value":"2023-08-31","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}