Loading…
Random Testing for Higher-Order, Stateful Programs
Testing is among the most effective tools available for finding bugs. Still, we know of no automatic technique for generating test cases that expose bugs involving a combination of mutable state and callbacks, even though objects and method overriding set up exactly that combination. For such cases,...
Saved in:
Published in: | ACM SIGPLAN notices 2010-10, Vol.45 (10), p.555-566 |
---|---|
Main Authors: | , , |
Format: | Article |
Language: | English |
Subjects: | |
Citations: | Items that this one cites |
Online Access: | Get full text |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
cited_by | |
---|---|
cites | cdi_FETCH-LOGICAL-c266t-8b93173c5e4c023af638a7e312673b1fddf4fff44e6652ede934de1b1eb715143 |
container_end_page | 566 |
container_issue | 10 |
container_start_page | 555 |
container_title | ACM SIGPLAN notices |
container_volume | 45 |
creator | KLEIN, Casey FLATT, Matthew FINDLER, Robert Bruce |
description | Testing is among the most effective tools available for finding bugs. Still, we know of no automatic technique for generating test cases that expose bugs involving a combination of mutable state and callbacks, even though objects and method overriding set up exactly that combination. For such cases, a test generator must create callbacks or subclasses that aggressively exercise side-effecting operations using combinations of generated objects.
This paper presents a new algorithm for randomly testing programs that use state and callbacks. Our algorithm exploits a combination of contracts and environment bindings to guide the test-case generator toward interesting inputs. Our prototype implementation for Racket (formerly PLT Scheme) - which has a Java-like class system, but with first-class classes as well as gbeta-like augmentable methods - uncovered dozens of bugs in a well-tested and widely used text-editor library.
We describe our approach in a precise, formal notation, borrowing the techniques used to describe operational semantics and type systems. The formalism enables us to provide a compact and self-contained explanation of the core of our technique without the ambiguity usually present in pseudo-code descriptions. |
doi_str_mv | 10.1145/1932682.1869505 |
format | article |
fullrecord | <record><control><sourceid>pascalfrancis_cross</sourceid><recordid>TN_cdi_pascalfrancis_primary_23661091</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>23661091</sourcerecordid><originalsourceid>FETCH-LOGICAL-c266t-8b93173c5e4c023af638a7e312673b1fddf4fff44e6652ede934de1b1eb715143</originalsourceid><addsrcrecordid>eNo9jz1PwzAURS0EEqUws2Zhw62fvzOiCihSpSIoc-TYzyEoaSo7DPx7qBox3bucIx1CboEtAKRaQim4tnwBVpeKqTMyA6UsBdDs_Pi5oNxqc0mucv5iDCwYPiP8ze3D0Bc7zGO7b4o4pGLdNp-Y6DYFTPfF--hGjN9d8ZqGJrk-X5OL6LqMN9POycfT4261ppvt88vqYUM913qkti4FGOEVSs-4cFEL6wwK4NqIGmIIUcYYpUStFceApZABoQasDSiQYk6WJ69PQ84JY3VIbe_STwWsOiZXU3I1Jf8Rdyfi4LJ3XUxu79v8j3GhNbASxC8u11Sw</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype></control><display><type>article</type><title>Random Testing for Higher-Order, Stateful Programs</title><source>Association for Computing Machinery:Jisc Collections:ACM OPEN Journals 2023-2025 (reading list)</source><creator>KLEIN, Casey ; FLATT, Matthew ; FINDLER, Robert Bruce</creator><creatorcontrib>KLEIN, Casey ; FLATT, Matthew ; FINDLER, Robert Bruce</creatorcontrib><description>Testing is among the most effective tools available for finding bugs. Still, we know of no automatic technique for generating test cases that expose bugs involving a combination of mutable state and callbacks, even though objects and method overriding set up exactly that combination. For such cases, a test generator must create callbacks or subclasses that aggressively exercise side-effecting operations using combinations of generated objects.
This paper presents a new algorithm for randomly testing programs that use state and callbacks. Our algorithm exploits a combination of contracts and environment bindings to guide the test-case generator toward interesting inputs. Our prototype implementation for Racket (formerly PLT Scheme) - which has a Java-like class system, but with first-class classes as well as gbeta-like augmentable methods - uncovered dozens of bugs in a well-tested and widely used text-editor library.
We describe our approach in a precise, formal notation, borrowing the techniques used to describe operational semantics and type systems. The formalism enables us to provide a compact and self-contained explanation of the core of our technique without the ambiguity usually present in pseudo-code descriptions.</description><identifier>ISSN: 1523-2867</identifier><identifier>ISSN: 0362-1340</identifier><identifier>EISSN: 1558-1160</identifier><identifier>DOI: 10.1145/1932682.1869505</identifier><language>eng</language><publisher>New York, NY: Association for Computing Machinery</publisher><subject>Applied sciences ; Computer science; control theory; systems ; Computer systems and distributed systems. User interface ; Computer systems performance. Reliability ; Exact sciences and technology ; Software</subject><ispartof>ACM SIGPLAN notices, 2010-10, Vol.45 (10), p.555-566</ispartof><rights>2015 INIST-CNRS</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed><cites>FETCH-LOGICAL-c266t-8b93173c5e4c023af638a7e312673b1fddf4fff44e6652ede934de1b1eb715143</cites></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>309,310,780,784,789,790,23930,23931,25140,27925</link.rule.ids><backlink>$$Uhttp://pascal-francis.inist.fr/vibad/index.php?action=getRecordDetail&idt=23661091$$DView record in Pascal Francis$$Hfree_for_read</backlink></links><search><creatorcontrib>KLEIN, Casey</creatorcontrib><creatorcontrib>FLATT, Matthew</creatorcontrib><creatorcontrib>FINDLER, Robert Bruce</creatorcontrib><title>Random Testing for Higher-Order, Stateful Programs</title><title>ACM SIGPLAN notices</title><description>Testing is among the most effective tools available for finding bugs. Still, we know of no automatic technique for generating test cases that expose bugs involving a combination of mutable state and callbacks, even though objects and method overriding set up exactly that combination. For such cases, a test generator must create callbacks or subclasses that aggressively exercise side-effecting operations using combinations of generated objects.
This paper presents a new algorithm for randomly testing programs that use state and callbacks. Our algorithm exploits a combination of contracts and environment bindings to guide the test-case generator toward interesting inputs. Our prototype implementation for Racket (formerly PLT Scheme) - which has a Java-like class system, but with first-class classes as well as gbeta-like augmentable methods - uncovered dozens of bugs in a well-tested and widely used text-editor library.
We describe our approach in a precise, formal notation, borrowing the techniques used to describe operational semantics and type systems. The formalism enables us to provide a compact and self-contained explanation of the core of our technique without the ambiguity usually present in pseudo-code descriptions.</description><subject>Applied sciences</subject><subject>Computer science; control theory; systems</subject><subject>Computer systems and distributed systems. User interface</subject><subject>Computer systems performance. Reliability</subject><subject>Exact sciences and technology</subject><subject>Software</subject><issn>1523-2867</issn><issn>0362-1340</issn><issn>1558-1160</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2010</creationdate><recordtype>article</recordtype><recordid>eNo9jz1PwzAURS0EEqUws2Zhw62fvzOiCihSpSIoc-TYzyEoaSo7DPx7qBox3bucIx1CboEtAKRaQim4tnwBVpeKqTMyA6UsBdDs_Pi5oNxqc0mucv5iDCwYPiP8ze3D0Bc7zGO7b4o4pGLdNp-Y6DYFTPfF--hGjN9d8ZqGJrk-X5OL6LqMN9POycfT4261ppvt88vqYUM913qkti4FGOEVSs-4cFEL6wwK4NqIGmIIUcYYpUStFceApZABoQasDSiQYk6WJ69PQ84JY3VIbe_STwWsOiZXU3I1Jf8Rdyfi4LJ3XUxu79v8j3GhNbASxC8u11Sw</recordid><startdate>20101001</startdate><enddate>20101001</enddate><creator>KLEIN, Casey</creator><creator>FLATT, Matthew</creator><creator>FINDLER, Robert Bruce</creator><general>Association for Computing Machinery</general><scope>IQODW</scope><scope>AAYXX</scope><scope>CITATION</scope></search><sort><creationdate>20101001</creationdate><title>Random Testing for Higher-Order, Stateful Programs</title><author>KLEIN, Casey ; FLATT, Matthew ; FINDLER, Robert Bruce</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-c266t-8b93173c5e4c023af638a7e312673b1fddf4fff44e6652ede934de1b1eb715143</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2010</creationdate><topic>Applied sciences</topic><topic>Computer science; control theory; systems</topic><topic>Computer systems and distributed systems. User interface</topic><topic>Computer systems performance. Reliability</topic><topic>Exact sciences and technology</topic><topic>Software</topic><toplevel>online_resources</toplevel><creatorcontrib>KLEIN, Casey</creatorcontrib><creatorcontrib>FLATT, Matthew</creatorcontrib><creatorcontrib>FINDLER, Robert Bruce</creatorcontrib><collection>Pascal-Francis</collection><collection>CrossRef</collection><jtitle>ACM SIGPLAN notices</jtitle></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>KLEIN, Casey</au><au>FLATT, Matthew</au><au>FINDLER, Robert Bruce</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Random Testing for Higher-Order, Stateful Programs</atitle><jtitle>ACM SIGPLAN notices</jtitle><date>2010-10-01</date><risdate>2010</risdate><volume>45</volume><issue>10</issue><spage>555</spage><epage>566</epage><pages>555-566</pages><issn>1523-2867</issn><issn>0362-1340</issn><eissn>1558-1160</eissn><abstract>Testing is among the most effective tools available for finding bugs. Still, we know of no automatic technique for generating test cases that expose bugs involving a combination of mutable state and callbacks, even though objects and method overriding set up exactly that combination. For such cases, a test generator must create callbacks or subclasses that aggressively exercise side-effecting operations using combinations of generated objects.
This paper presents a new algorithm for randomly testing programs that use state and callbacks. Our algorithm exploits a combination of contracts and environment bindings to guide the test-case generator toward interesting inputs. Our prototype implementation for Racket (formerly PLT Scheme) - which has a Java-like class system, but with first-class classes as well as gbeta-like augmentable methods - uncovered dozens of bugs in a well-tested and widely used text-editor library.
We describe our approach in a precise, formal notation, borrowing the techniques used to describe operational semantics and type systems. The formalism enables us to provide a compact and self-contained explanation of the core of our technique without the ambiguity usually present in pseudo-code descriptions.</abstract><cop>New York, NY</cop><pub>Association for Computing Machinery</pub><doi>10.1145/1932682.1869505</doi><tpages>12</tpages><oa>free_for_read</oa></addata></record> |
fulltext | fulltext |
identifier | ISSN: 1523-2867 |
ispartof | ACM SIGPLAN notices, 2010-10, Vol.45 (10), p.555-566 |
issn | 1523-2867 0362-1340 1558-1160 |
language | eng |
recordid | cdi_pascalfrancis_primary_23661091 |
source | Association for Computing Machinery:Jisc Collections:ACM OPEN Journals 2023-2025 (reading list) |
subjects | Applied sciences Computer science control theory systems Computer systems and distributed systems. User interface Computer systems performance. Reliability Exact sciences and technology Software |
title | Random Testing for Higher-Order, Stateful Programs |
url | http://sfxeu10.hosted.exlibrisgroup.com/loughborough?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-04T15%3A30%3A39IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-pascalfrancis_cross&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Random%20Testing%20for%20Higher-Order,%20Stateful%20Programs&rft.jtitle=ACM%20SIGPLAN%20notices&rft.au=KLEIN,%20Casey&rft.date=2010-10-01&rft.volume=45&rft.issue=10&rft.spage=555&rft.epage=566&rft.pages=555-566&rft.issn=1523-2867&rft.eissn=1558-1160&rft_id=info:doi/10.1145/1932682.1869505&rft_dat=%3Cpascalfrancis_cross%3E23661091%3C/pascalfrancis_cross%3E%3Cgrp_id%3Ecdi_FETCH-LOGICAL-c266t-8b93173c5e4c023af638a7e312673b1fddf4fff44e6652ede934de1b1eb715143%3C/grp_id%3E%3Coa%3E%3C/oa%3E%3Curl%3E%3C/url%3E&rft_id=info:oai/&rft_id=info:pmid/&rfr_iscdi=true |