[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-86586-en":3,"doc-seo-86586-105":30,"detail-sidebar-cat-0-en-105":92},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":21,"is_downloadable":21,"audit_status":21,"page_count":22,"language":23,"language_code":24,"site_id":25,"html_lang":24,"table_of_contents":26,"faqs":27,"seo_title":13,"seo_description":14,"update_tm":28,"read_time":29},86586,7971461741311,"Ophelia","https://ap-avatar.wpscdn.com/avatar/74000253aff267980c6?x-image-process=image/resize,m_fixed,w_180,h_180&k=1779345379180704826",8,"Research & Report","Complexity Theory of Randomised Testing","Randomised testing is widely used for software validation, yet its theoretical foundations for input generation are unclear. This work develops complexity-theoretic foundations for random generators used in testing. Generators are modeled as Turing machine transducers consuming random bits and producing string outputs, showing their generable languages coincide with recursively enumerable languages. It further characterizes efficient generation via complexity classes, certificate schemes, and limitations for property-based testing libraries under standard cryptographic assumptions.","arXiv :2607 . 1 18 1 1v 1 [ cs .PL] 13 Jul 2026  \nComplexity Theory of Randomised Testing  \nPINGSHI YU, Imperial College London, United Kingdom CHENGSONG TAN, Kaihong, China  \nNICOLAS WU, Imperial College London, United Kingdom ALASTAIR DONALDSON, Imperial College London, United Kingdom  \nRandomised testing is a widely-used approach to software validation, yet despite years of practical development its theoretical foundations remain thin. In particular, the fundamental question of what it means for a set of inputs to be generable has gone unanswered in both the literature and folklore. We present, for the first time, complexity-theoretic foundations for random generators in software testing. We model generators as Turing machine transducers that consume random bits and produce string-encoded outputs, and show that the theoretically generable languages coincide exactly with the recursively enumerable languages. This has direct implications for testing at the boundaries of decidability, such as in the field of compiler testing. Turning to efficient generation, we show that the polynomial-time generable languages lie within NP, that certain important NP-complete languages admit efficient generators, and that—under standard cryptographic assumptions—there are languages in P for which no efficient generator exists: the complexity of efficienct generation and of efficient decision are not the same. We then show that space-bounded complexity is the natural framework for generators producing correlated samples, capturing methodologies such as coverageguided fuzzing and symbolic execution. Beyond classification, we characterise efficient generability: a language has a polynomial-time generator iffit admits a certificate scheme over a verifier—so witness planting, the folklore technique behind generators to test SAT solvers, is in a sense the only route to efficient generation. Our theory also yields design principles for property-based testing libraries: we prove no library can compositionally derive efficient generators from logical predicates involving conjunction or negation, under standard assumptions. However, restricted classes like NL (equivalently, linear Datalog predicates) would admit such a compilation.  \n1 Introduction  \nAt first sight, software testing, concerned with the observed behaviour of particular programs on particular inputs, is far removed from complexity theory, which distinguishes what can be computed in principle from what can be computed by an efficient algorithm. Yet, in property-based testing (PBT) [10, 33], where a system under test (SUT) is executed on many automatically generated inputs, a critical component to the success of a testing campaign is the generator, a randomised algorithm. Due to the intricacies of realistic generators, much work has gone into their implementation [31, 50], library tooling [10, 20, 33, 52], and on automatic derivation of generators from predicates [16, 17, 28] . But despite their importance, little is known about the theoretical limits of generator expressivity: what can be generated at all, and what can be generated efficiently?  \nWe give the first complexity-theoretic formalisation of generators in randomised testing, establishing a number of results about what can and cannot be generated, and why. Our formulation is applicable to the majority of generators found in testing practice: generators are modelled as Turing machine transducers that consume bitstrings and must eventually produce string-encoded outputs. Once generators are cast within this framework, each generator associates with a formal language—the set of outputs it can produce. This allows rigorous investigation of the limits of generation in general, as well as under a variety of time and space constraints. In establishing our novel framework, we build upon previous theoretical work on language generation that predates PBT (and which in our view deserves more attention) [44, 45] .  \nAuthors’ Contact Informati","cbCairkiA0roK2MY","https://ap.wps.com/l/cbCairkiA0roK2MY","pdf",935148,9,1,44,"English","en",105,"# Introduction\n## Problem motivation in property-based testing\n## Generator formalisation and language view\n## Main technical contributions and implications\n## Example: testing termination checkers","[{\"question\":\"How are randomised testing generators formalised in this work?\",\"answer\":\"Generators are modeled as Turing machine transducers that consume random bits and eventually produce string-encoded outputs.\"},{\"question\":\"What languages can generators produce in principle?\",\"answer\":\"The set of theoretically generable languages exactly matches the recursively enumerable languages.\"},{\"question\":\"How does the paper distinguish efficient generation from efficient decision?\",\"answer\":\"Polynomial-time generable languages fall within NP, some NP-complete languages admit efficient generators, and under standard cryptographic assumptions there exist languages in P with no efficient generator—showing generation efficiency can differ from decision complexity.\"}]",1784212791,111,{"code":4,"msg":31,"data":32},"ok",{"site_id":25,"language":24,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":87,"head_meta":89,"extra_data":91,"updated_unix":28},"complexity-theory-of-randomised-testing","",{"@graph":36,"@context":86},[37,54,69],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,51],{"item":41,"name":42,"@type":43,"position":21},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":50},"https://docshare.wps.com/document/research-report/",3,{"item":52,"name":13,"@type":43,"position":53},"https://docshare.wps.com/document/complexity-theory-of-randomised-testing/86586/",4,{"url":52,"name":13,"@type":55,"author":56,"headline":13,"publisher":58,"fileFormat":61,"inLanguage":24,"description":14,"dateModified":62,"datePublished":63,"encodingFormat":61,"isAccessibleForFree":64,"interactionStatistic":65},"DigitalDocument",{"name":9,"@type":57},"Person",{"url":41,"name":59,"@type":60},"DocShare","Organization","application/pdf","2026-07-25","2026-07-16",true,{"@type":66,"interactionType":67,"userInteractionCount":20},"InteractionCounter",{"@type":68},"ViewAction",{"@type":70,"mainEntity":71},"FAQPage",[72,78,82],{"name":73,"@type":74,"acceptedAnswer":75},"How are randomised testing generators formalised in this work?","Question",{"text":76,"@type":77},"Generators are modeled as Turing machine transducers that consume random bits and eventually produce string-encoded outputs.","Answer",{"name":79,"@type":74,"acceptedAnswer":80},"What languages can generators produce in principle?",{"text":81,"@type":77},"The set of theoretically generable languages exactly matches the recursively enumerable languages.",{"name":83,"@type":74,"acceptedAnswer":84},"How does the paper distinguish efficient generation from efficient decision?",{"text":85,"@type":77},"Polynomial-time generable languages fall within NP, some NP-complete languages admit efficient generators, and under standard cryptographic assumptions there exist languages in P with no efficient generator—showing generation efficiency can differ from decision complexity.","https://schema.org",{"og:url":52,"og:type":88,"og:title":13,"og:site_name":59,"og:description":14},"article",{"robots":90,"canonical":52},"index,follow",{"doc_id":7,"site_id":25},{"code":4,"msg":5,"data":93},[94,98,102,106,111,116,121,124,128,131,135],{"id":21,"doc_module":4,"doc_module_name":46,"category_name":95,"show_sort_weight":96,"slug":97},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":99,"show_sort_weight":100,"slug":101},"Literature",80,"literature",{"id":53,"doc_module":4,"doc_module_name":46,"category_name":103,"show_sort_weight":104,"slug":105},"Exam",70,"exam",{"id":107,"doc_module":4,"doc_module_name":46,"category_name":108,"show_sort_weight":109,"slug":110},5,"Comic",60,"comic",{"id":112,"doc_module":4,"doc_module_name":46,"category_name":113,"show_sort_weight":114,"slug":115},6,"Technology",50,"technology",{"id":117,"doc_module":4,"doc_module_name":46,"category_name":118,"show_sort_weight":119,"slug":120},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":122,"slug":123},30,"research-report",{"id":20,"doc_module":4,"doc_module_name":46,"category_name":125,"show_sort_weight":126,"slug":127},"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":46,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":46,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":46,"category_name":137,"show_sort_weight":107,"slug":138},19,"General","general"]