Randomized Testing in PLT Redex

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, manuallyconstructed test suite, Redex’s random test case generation was able to identify several bugs in the semantics.

[1]  Grigore Rosu,et al.  Runtime Verification of C Memory Safety , 2009, RV.

[2]  Robert Bruce Findler,et al.  Redex: Debugging Operational Semantics , 2004 .

[3]  Matthias Felleisen,et al.  Functional programming and theorem proving for undergraduates: a progress report , 2008, FDPE '08.

[4]  Frank Pfenning,et al.  Twelf User''s Guide , 2002 .

[5]  Corina S. Pasareanu,et al.  Test input generation for java containers using state matching , 2006, ISSTA '06.

[6]  Emden R. Gansner,et al.  An open graph visualization system and its applications to software engineering , 2000, Softw. Pract. Exp..

[7]  Hubert Comon,et al.  Tree automata techniques and applications , 1997 .

[8]  R. Kent Dybvig,et al.  Revised6 Report on the Algorithmic Language Scheme , 2009 .

[9]  Bertrand Meyer,et al.  Experimental assessment of random testing for object-oriented software , 2007, ISSTA '07.

[10]  Marinus J. Plasmeijer,et al.  Gast: Generic Automated Software Testing , 2002, IFL.

[11]  Tobias Nipkow,et al.  Random testing in Isabelle/HOL , 2004, Proceedings of the Second International Conference on Software Engineering and Formal Methods, 2004. SEFM 2004..

[12]  Chandrasekhar Boyapati,et al.  Efficient software model checking of soundness of type systems , 2008, OOPSLA.

[13]  Alex Groce,et al.  Randomized Differential Testing as a Prelude to Formal Verification , 2007, 29th International Conference on Software Engineering (ICSE'07).

[14]  Koen Claessen,et al.  QuickCheck: a lightweight tool for random testing of Haskell programs , 2000, ICFP.

[15]  Christine Paulin-Mohring,et al.  The coq proof assistant reference manual , 2000 .

[16]  Matthias Felleisen,et al.  A Visual Environment for Developing Context-Sensitive Term Rewriting Systems , 2004, RTA.

[17]  S. Griffis EDITOR , 1997, Journal of Navigation.

[18]  Sebastian Fischer,et al.  EasyCheck - Test Data for Free , 2008, FLOPS.

[19]  Matthias Felleisen,et al.  Semantics Engineering with PLT Redex , 2009 .

[20]  Colin Runciman,et al.  Smallcheck and lazy smallcheck: automatic exhaustive testing for small values , 2008, Haskell '08.