Testing multithreaded programs with contextual unfoldings and dynamic symbolic execution

Research output: Chapter in Book/Report/Conference proceedingConference contributionScientificpeer-review


  • Kari Kähkönen
  • Keijo Heljanko

Research units


Systematic testing of multithreaded programs is challenging as possible execution paths depend not only on input values but also on how threads interleave their executions. As the number of all interleavings is typically too large to explore exhaustively, ways to avoid testing irrelevant interleavings are needed. We have previously presented a testing approach that is based on dynamic symbolic execution to handle input values and on Petri net unfoldings to succinctly represent how threads can interleave their executions. In this paper we improve this approach by using contextual nets instead of ordinary nets. This way, the interleavings of threads can be represented even more succinctly which allows the local states of threads to be covered with less test executions. Furthermore, the new approach makes it possible to test programs that create threads dynamically which was a limitation of the previous approach. We have implemented our improved algorithm in a testing tool for Java programs. Experiments demonstrate that the new approach can significantly reduce the number of needed tests to cover all the reachable local states of threads while keeping additional overhead required by the algorithm small.


Original languageEnglish
Title of host publication2014 14th International Conference on Application of Concurrency to System Design (ACSD)
Publication statusPublished - 2014
MoE publication typeA4 Article in a conference publication
EventInternational Conference on Application of Concurrency to System Design - Tunis, Tunisia
Duration: 23 Jun 201427 Jun 2014
Conference number: 14

Publication series

NameInternational Conference on Application of Concurrency to System Design. Proceedings
ISSN (Electronic)1550-4808


ConferenceInternational Conference on Application of Concurrency to System Design
Abbreviated titleACSD

ID: 9269155