Chapter

Formal Methods for Executable Software Models

Volume 8483 of the series Lecture Notes in Computer Science pp 263-309

Test Case Generation by Symbolic Execution: Basic Concepts, a CLP-Based Instance, and Actor-Based Concurrency

  • Elvira AlbertAffiliated withDSIC, Complutense University of Madrid (UCM)
  • , Puri ArenasAffiliated withDSIC, Complutense University of Madrid (UCM)
  • , Miguel Gómez-ZamalloaAffiliated withDSIC, Complutense University of Madrid (UCM)
  • , Jose Miguel RojasAffiliated withDepartment of Computer Science, University of Sheffield

* Final gross prices may vary according to local VAT.

Get Access

Abstract

The focus of this tutorial is white-box test case generation (TCG) based on symbolic execution. Symbolic execution consists in executing a program with the contents of its input arguments being symbolic variables rather than concrete values. A symbolic execution tree characterizes the set of execution paths explored during the symbolic execution of a program. Test cases can be then obtained from the successful branches of the tree. The tutorial is split into three parts: (1) The first part overviews the basic techniques used in TCG to ensure termination, handling heap-manipulating programs, achieving compositionality in the process and guiding TCG towards interesting test cases. (2) In the second part, we focus on a particular implementation of the TCG framework in constraint logic programming (CLP). In essense, the imperative object-oriented program under test is automatically transformed into an equivalent executable CLP-translated program. The main advantage of CLP-based TCG is that the standard mechanism of CLP performs symbolic execution for free. The PET system is an open-source software that implements this approach. (3) Finally, in the last part, we study the extension of TCG to actor-based concurrent programs.