publications: - title: "Randomized Testing in PLT Redex" author: - name: "Casey Klein" link: "http://users.eecs.northwestern.edu/~clk800/" - name: "Robby Findler" link: "http://www.eecs.northwestern.edu/~robby/" year: "2009" abstract: "This paper presents new support for randomized testing in PLT Redex, a domain-specific language for formalizing operational semantics. In keeping with the overall spirit of Redex, the testing support is as lightweight as possible—Redex programmers simply write down predicates that correspond to facts about their calculus and the tool randomly generates program expressions in an attempt to falsify the predicates. Redex’s automatic test case generation begins with simple expressions, but as time passes, it broadens its search to include increasingly complex expressions. To improve test coverage, test generation exploits the structure of the model’s metafunction and reduction relation definitions. The paper also reports on a case-study applying Redex’s testing support to the latest revision of the Scheme standard. Despite a community review period, as well as a comprehensive, manually constructed test suite, Redex’s random test case generation was able to identify several bugs in the semantics." tags: - "PLT Redex" - "programming languages" - "semantics" - "test coverage" - "meta programming" - "case study" - "meta-model" - "modeling language" - "language modeling" - "testing" - "reviewing" - "random testing" - "operational semantics" - "Meta-Environment" - "search" - "coverage" - "domain-specific language" researchr: "https://researchr.org/publication/KleinFindler2009" cites: 0 citedby: 0 booktitle: "Workshop on Scheme and Functional Programming (SFP)" kind: "inproceedings" key: "KleinFindler2009" - title: "Random testing for higher-order, stateful programs" author: - name: "Casey Klein" link: "http://users.eecs.northwestern.edu/~clk800/" - name: "Matthew Flatt" link: "http://www.cs.utah.edu/~mflatt/" - name: "Robby Findler" link: "http://www.eecs.northwestern.edu/~robby/" year: "2010" doi: "http://doi.acm.org/10.1145/1869459.1869505" 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." links: doi: "http://doi.acm.org/10.1145/1869459.1869505" dblp: "http://dblp.uni-trier.de/rec/bibtex/conf/oopsla/KleinFF10" tags: - "object-oriented programming" - "semantics" - "Java" - "meta programming" - "formal semantics" - "contracts" - "testing" - "type system" - "random testing" - " mutable objects" - "subject-oriented programming" - "operational semantics" - "Meta-Environment" - "systematic-approach" - "feature-oriented programming" - "meta-objects" researchr: "https://researchr.org/publication/KleinFF10" cites: 0 citedby: 0 pages: "555-566" booktitle: "Proceedings of the 25th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2010, October 17-21, 2010, Reno/Tahoe, Nevada, USA" editor: - name: "William R. Cook" link: "http://www.cs.utexas.edu/~wcook/" - name: "Siobhán Clarke" link: "https://www.cs.tcd.ie/Siobhan.Clarke/" - name: "Martin C. Rinard" link: "https://researchr.org/alias/martin-c.-rinard" address: "Reno/Tahoe, Nevada" publisher: "ACM" isbn: "978-1-4503-0203-6" kind: "inproceedings" key: "KleinFF10"