Improved semantics and implementation through property-based testing with QuickCheck

Huiqing Li, Simon Thompson
2014 Proceedings of the 9th International Workshop on Automation of Software Test - AST 2014  
Testing is the primary method to validate that a software implementation meets its specification. In this paper, we demonstrate an approach to validating an executable semantics using property-and model-based random testing in QuickCheck to automate and unify the testing of the semantics and its implementation. Our approach shows the use of executable semantics to bridge the gap between formal mathematical specification and implementation, as well as emphasising the suitability of functional
more » ... gramming languages -in this case Erlang -for writing executable semantics. The approach is illustrated through a concrete example, in which the implementation of a proposed extension to the Erlang programming language -scalable groups -is tested. This new component comes with a small-step operational semantics written in mathematical notation, and was initially tested using unit testing. Through our work, we were able to find new bugs in both the implementation and the specification.
doi:10.1145/2593501.2593509 dblp:conf/icse/LiT14 fatcat:a7lbgbmfmbbkrecigc4eqw423a