Covering All the Bases: Type-Based Verification of Test Input Generators

Test input generators are an important part of property-based testing (PBT) frameworks. Because PBT is intended to test deep semantic and structural properties of a program, the outputs produced by these generators can be complex data structures, constrained to satisfy properties the developer belie...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:Proceedings of ACM on programming languages 2023-06, Vol.7 (PLDI), p.1244-1267, Article 157
Hauptverfasser: Zhou, Zhe, Mishra, Ashish, Delaware, Benjamin, Jagannathan, Suresh
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page 1267
container_issue PLDI
container_start_page 1244
container_title Proceedings of ACM on programming languages
container_volume 7
creator Zhou, Zhe
Mishra, Ashish
Delaware, Benjamin
Jagannathan, Suresh
description Test input generators are an important part of property-based testing (PBT) frameworks. Because PBT is intended to test deep semantic and structural properties of a program, the outputs produced by these generators can be complex data structures, constrained to satisfy properties the developer believes is most relevant to testing the function of interest. An important feature expected of these generators is that they be capable of producing all acceptable elements that satisfy the function’s input type and generator-provided constraints. However, it is not readily apparent how we might validate whether a particular generator’s output satisfies this coverage requirement. Typically, developers must rely on manual inspection and post-mortem analysis of test runs to determine if the generator is providing sufficient coverage; these approaches are error-prone and difficult to scale as generators become more complex. To address this important concern, we present a new refinement type-based verification procedure for validating the coverage provided by input test generators, based on a novel interpretation of types that embeds “must-style” underapproximate reasoning principles as a fundamental part of the type system. The types associated with expressions now capture the set of values guaranteed to be produced by the expression, rather than the typical formulation that uses types to represent the set of values an expression may produce. Beyond formalizing the notion of coverage types in the context of a rich core language with higher-order procedures and inductive datatypes, we also present a detailed evaluation study to justify the utility of our ideas.
doi_str_mv 10.1145/3591271
format Article
fullrecord <record><control><sourceid>acm_cross</sourceid><recordid>TN_cdi_crossref_primary_10_1145_3591271</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>3591271</sourcerecordid><originalsourceid>FETCH-LOGICAL-a277t-6a650385ca0135adda141463cb13eab1e069223ed4ab1c1043fd467d319061d83</originalsourceid><addsrcrecordid>eNpNkM1Lw0AUxBdRsNTi3dPePEX3ZT-SeKtB20LBS_QaXndfNJImZXcV-t-b0iqeZob5MYdh7BrEHYDS91IXkGZwxiapynQCKoXzf_6SzUL4FEJAIVUuiwlblsM3-bZ_5_Ou4_GD-CMGCg-82u8oOXjH30agaS3Gduj50PCKQuSrfvcV-YJ68hgHH67YRYNdoNlJp-z1-akql8n6ZbEq5-sE0yyLiUGjhcy1RQFSo3MICpSRdgOScAMkTJGmkpwagwWhZOOUyZyEQhhwuZyy2-Ou9UMInpp659st-n0Noj58UJ8-GMmbI4l2-wf9lj-uJ1Rf</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype></control><display><type>article</type><title>Covering All the Bases: Type-Based Verification of Test Input Generators</title><source>ACM Digital Library Complete</source><source>EZB-FREE-00999 freely available EZB journals</source><creator>Zhou, Zhe ; Mishra, Ashish ; Delaware, Benjamin ; Jagannathan, Suresh</creator><creatorcontrib>Zhou, Zhe ; Mishra, Ashish ; Delaware, Benjamin ; Jagannathan, Suresh</creatorcontrib><description>Test input generators are an important part of property-based testing (PBT) frameworks. Because PBT is intended to test deep semantic and structural properties of a program, the outputs produced by these generators can be complex data structures, constrained to satisfy properties the developer believes is most relevant to testing the function of interest. An important feature expected of these generators is that they be capable of producing all acceptable elements that satisfy the function’s input type and generator-provided constraints. However, it is not readily apparent how we might validate whether a particular generator’s output satisfies this coverage requirement. Typically, developers must rely on manual inspection and post-mortem analysis of test runs to determine if the generator is providing sufficient coverage; these approaches are error-prone and difficult to scale as generators become more complex. To address this important concern, we present a new refinement type-based verification procedure for validating the coverage provided by input test generators, based on a novel interpretation of types that embeds “must-style” underapproximate reasoning principles as a fundamental part of the type system. The types associated with expressions now capture the set of values guaranteed to be produced by the expression, rather than the typical formulation that uses types to represent the set of values an expression may produce. Beyond formalizing the notion of coverage types in the context of a rich core language with higher-order procedures and inductive datatypes, we also present a detailed evaluation study to justify the utility of our ideas.</description><identifier>ISSN: 2475-1421</identifier><identifier>EISSN: 2475-1421</identifier><identifier>DOI: 10.1145/3591271</identifier><language>eng</language><publisher>New York, NY, USA: ACM</publisher><subject>Automated static analysis ; Language types ; Software and its engineering</subject><ispartof>Proceedings of ACM on programming languages, 2023-06, Vol.7 (PLDI), p.1244-1267, Article 157</ispartof><rights>Owner/Author</rights><lds50>peer_reviewed</lds50><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed><citedby>FETCH-LOGICAL-a277t-6a650385ca0135adda141463cb13eab1e069223ed4ab1c1043fd467d319061d83</citedby><cites>FETCH-LOGICAL-a277t-6a650385ca0135adda141463cb13eab1e069223ed4ab1c1043fd467d319061d83</cites><orcidid>0000-0002-1016-6261 ; 0000-0002-0513-3107 ; 0000-0001-6871-2424 ; 0000-0003-3900-7501</orcidid></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><linktopdf>$$Uhttps://dl.acm.org/doi/pdf/10.1145/3591271$$EPDF$$P50$$Gacm$$Hfree_for_read</linktopdf><link.rule.ids>314,776,780,2276,27903,27904,40175,75974</link.rule.ids></links><search><creatorcontrib>Zhou, Zhe</creatorcontrib><creatorcontrib>Mishra, Ashish</creatorcontrib><creatorcontrib>Delaware, Benjamin</creatorcontrib><creatorcontrib>Jagannathan, Suresh</creatorcontrib><title>Covering All the Bases: Type-Based Verification of Test Input Generators</title><title>Proceedings of ACM on programming languages</title><addtitle>ACM PACMPL</addtitle><description>Test input generators are an important part of property-based testing (PBT) frameworks. Because PBT is intended to test deep semantic and structural properties of a program, the outputs produced by these generators can be complex data structures, constrained to satisfy properties the developer believes is most relevant to testing the function of interest. An important feature expected of these generators is that they be capable of producing all acceptable elements that satisfy the function’s input type and generator-provided constraints. However, it is not readily apparent how we might validate whether a particular generator’s output satisfies this coverage requirement. Typically, developers must rely on manual inspection and post-mortem analysis of test runs to determine if the generator is providing sufficient coverage; these approaches are error-prone and difficult to scale as generators become more complex. To address this important concern, we present a new refinement type-based verification procedure for validating the coverage provided by input test generators, based on a novel interpretation of types that embeds “must-style” underapproximate reasoning principles as a fundamental part of the type system. The types associated with expressions now capture the set of values guaranteed to be produced by the expression, rather than the typical formulation that uses types to represent the set of values an expression may produce. Beyond formalizing the notion of coverage types in the context of a rich core language with higher-order procedures and inductive datatypes, we also present a detailed evaluation study to justify the utility of our ideas.</description><subject>Automated static analysis</subject><subject>Language types</subject><subject>Software and its engineering</subject><issn>2475-1421</issn><issn>2475-1421</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2023</creationdate><recordtype>article</recordtype><recordid>eNpNkM1Lw0AUxBdRsNTi3dPePEX3ZT-SeKtB20LBS_QaXndfNJImZXcV-t-b0iqeZob5MYdh7BrEHYDS91IXkGZwxiapynQCKoXzf_6SzUL4FEJAIVUuiwlblsM3-bZ_5_Ou4_GD-CMGCg-82u8oOXjH30agaS3Gduj50PCKQuSrfvcV-YJ68hgHH67YRYNdoNlJp-z1-akql8n6ZbEq5-sE0yyLiUGjhcy1RQFSo3MICpSRdgOScAMkTJGmkpwagwWhZOOUyZyEQhhwuZyy2-Ou9UMInpp659st-n0Noj58UJ8-GMmbI4l2-wf9lj-uJ1Rf</recordid><startdate>20230606</startdate><enddate>20230606</enddate><creator>Zhou, Zhe</creator><creator>Mishra, Ashish</creator><creator>Delaware, Benjamin</creator><creator>Jagannathan, Suresh</creator><general>ACM</general><scope>AAYXX</scope><scope>CITATION</scope><orcidid>https://orcid.org/0000-0002-1016-6261</orcidid><orcidid>https://orcid.org/0000-0002-0513-3107</orcidid><orcidid>https://orcid.org/0000-0001-6871-2424</orcidid><orcidid>https://orcid.org/0000-0003-3900-7501</orcidid></search><sort><creationdate>20230606</creationdate><title>Covering All the Bases: Type-Based Verification of Test Input Generators</title><author>Zhou, Zhe ; Mishra, Ashish ; Delaware, Benjamin ; Jagannathan, Suresh</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-a277t-6a650385ca0135adda141463cb13eab1e069223ed4ab1c1043fd467d319061d83</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2023</creationdate><topic>Automated static analysis</topic><topic>Language types</topic><topic>Software and its engineering</topic><toplevel>peer_reviewed</toplevel><toplevel>online_resources</toplevel><creatorcontrib>Zhou, Zhe</creatorcontrib><creatorcontrib>Mishra, Ashish</creatorcontrib><creatorcontrib>Delaware, Benjamin</creatorcontrib><creatorcontrib>Jagannathan, Suresh</creatorcontrib><collection>CrossRef</collection><jtitle>Proceedings of ACM on programming languages</jtitle></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Zhou, Zhe</au><au>Mishra, Ashish</au><au>Delaware, Benjamin</au><au>Jagannathan, Suresh</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Covering All the Bases: Type-Based Verification of Test Input Generators</atitle><jtitle>Proceedings of ACM on programming languages</jtitle><stitle>ACM PACMPL</stitle><date>2023-06-06</date><risdate>2023</risdate><volume>7</volume><issue>PLDI</issue><spage>1244</spage><epage>1267</epage><pages>1244-1267</pages><artnum>157</artnum><issn>2475-1421</issn><eissn>2475-1421</eissn><abstract>Test input generators are an important part of property-based testing (PBT) frameworks. Because PBT is intended to test deep semantic and structural properties of a program, the outputs produced by these generators can be complex data structures, constrained to satisfy properties the developer believes is most relevant to testing the function of interest. An important feature expected of these generators is that they be capable of producing all acceptable elements that satisfy the function’s input type and generator-provided constraints. However, it is not readily apparent how we might validate whether a particular generator’s output satisfies this coverage requirement. Typically, developers must rely on manual inspection and post-mortem analysis of test runs to determine if the generator is providing sufficient coverage; these approaches are error-prone and difficult to scale as generators become more complex. To address this important concern, we present a new refinement type-based verification procedure for validating the coverage provided by input test generators, based on a novel interpretation of types that embeds “must-style” underapproximate reasoning principles as a fundamental part of the type system. The types associated with expressions now capture the set of values guaranteed to be produced by the expression, rather than the typical formulation that uses types to represent the set of values an expression may produce. Beyond formalizing the notion of coverage types in the context of a rich core language with higher-order procedures and inductive datatypes, we also present a detailed evaluation study to justify the utility of our ideas.</abstract><cop>New York, NY, USA</cop><pub>ACM</pub><doi>10.1145/3591271</doi><tpages>24</tpages><orcidid>https://orcid.org/0000-0002-1016-6261</orcidid><orcidid>https://orcid.org/0000-0002-0513-3107</orcidid><orcidid>https://orcid.org/0000-0001-6871-2424</orcidid><orcidid>https://orcid.org/0000-0003-3900-7501</orcidid><oa>free_for_read</oa></addata></record>
fulltext fulltext
identifier ISSN: 2475-1421
ispartof Proceedings of ACM on programming languages, 2023-06, Vol.7 (PLDI), p.1244-1267, Article 157
issn 2475-1421
2475-1421
language eng
recordid cdi_crossref_primary_10_1145_3591271
source ACM Digital Library Complete; EZB-FREE-00999 freely available EZB journals
subjects Automated static analysis
Language types
Software and its engineering
title Covering All the Bases: Type-Based Verification of Test Input Generators
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-27T16%3A06%3A32IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-acm_cross&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Covering%20All%20the%20Bases:%20Type-Based%20Verification%20of%20Test%20Input%20Generators&rft.jtitle=Proceedings%20of%20ACM%20on%20programming%20languages&rft.au=Zhou,%20Zhe&rft.date=2023-06-06&rft.volume=7&rft.issue=PLDI&rft.spage=1244&rft.epage=1267&rft.pages=1244-1267&rft.artnum=157&rft.issn=2475-1421&rft.eissn=2475-1421&rft_id=info:doi/10.1145/3591271&rft_dat=%3Cacm_cross%3E3591271%3C/acm_cross%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_id=info:pmid/&rfr_iscdi=true