A Partial Order Reduction Technique for Event-driven Multi-threaded Programs

Event-driven multi-threaded programming is fast becoming a preferred style of developing efficient and responsive applications. In this concurrency model, multiple threads execute concurrently, communicating through shared objects as well as by posting asynchronous events that are executed in their order of arrival. In this work, we consider partial order reduction (POR) for event-driven multi-threaded programs. The existing POR techniques treat event queues associated with threads as shared objects and thereby, reorder every pair of events handled on the same thread even if reordering them does not lead to different states. We do not treat event queues as shared objects and propose a new POR technique based on a novel backtracking set called the dependence-covering set. Events handled by the same thread are reordered by our POR technique only if necessary. We prove that exploring dependence-covering sets suffices to detect all deadlock cycles and assertion violations defined over local variables. To evaluate effectiveness of our POR scheme, we have implemented a dynamic algorithm to compute dependence-covering sets. On execution traces obtained from a few Android applications, we demonstrate that our technique explores many fewer transitions ---often orders of magnitude fewer--- compared to exploration based on persistent sets, wherein, event queues are considered as shared objects.

[1]  Chao Wang,et al.  Dynamic partial order reduction for relaxed memory models , 2015, PLDI.

[2]  Martin T. Vechev,et al.  Scalable race detection for Android applications , 2015, OOPSLA.

[3]  Jeff Huang,et al.  Maximal causality reduction for TSO and PSO , 2016, OOPSLA.

[4]  Patrice Godefroid,et al.  Partial-Order Methods for the Verification of Concurrent Systems , 1996, Lecture Notes in Computer Science.

[5]  Klaus Havelund,et al.  Model Checking Programs , 2004, Automated Software Engineering.

[6]  Antti Valmari,et al.  Stubborn sets for reduced state space generation , 1991, Applications and Theory of Petri Nets.

[7]  Patrick Lam,et al.  SATCheck: SAT-directed stateless model checking for SC and TSO , 2015, OOPSLA.

[8]  Parosh Aziz Abdulla,et al.  Stateless model checking for TSO and PSO , 2015, Acta Informatica.

[9]  Grigore Rosu,et al.  Maximal sound predictive race detection with control flow abstraction , 2014, PLDI.

[10]  Katherine E. Coons,et al.  Fast error detection with coverage guarantees for concurrent software , 2013 .

[11]  WangChao,et al.  Dynamic partial order reduction for relaxed memory models , 2015 .

[12]  Grigore Rosu,et al.  Maximal Causal Models for Sequentially Consistent Systems , 2012, RV.

[13]  Koushik Sen,et al.  CUTE: a concolic unit testing engine for C , 2005, ESEC/FSE-13.

[14]  Brink van der Merwe,et al.  Verifying android applications using Java PathFinder , 2012, ACM SIGSOFT Softw. Eng. Notes.

[15]  Gerard J. Holzmann,et al.  The SPIN Model Checker - primer and reference manual , 2003 .

[16]  Mahesh Viswanathan,et al.  Model Checking Multithreaded Programs with Asynchronous Atomic Methods , 2006, CAV.

[17]  Madan Musuvathi,et al.  Iterative context bounding for systematic testing of multithreaded programs , 2007, PLDI '07.

[18]  Sam Malek,et al.  Testing android apps through symbolic execution , 2012, ACM SIGSOFT Softw. Eng. Notes.

[19]  Anca Muscholl,et al.  Trace Theory , 2011, Encyclopedia of Parallel Computing.

[20]  Darko Marinov,et al.  A Framework for State-Space Exploration of Java-Based Actor Programs , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.

[21]  Serdar Tasiran,et al.  Systematic Asynchrony Bug Exploration for Android Apps , 2015, CAV.

[22]  Parosh Aziz Abdulla,et al.  Stateless Model Checking for POWER , 2016, CAV.

[23]  Doron A. Peled,et al.  All from One, One for All: on Model Checking Using Representatives , 1993, CAV.

[24]  Edmund M. Clarke,et al.  State space reduction using partial order techniques , 1999, International Journal on Software Tools for Technology Transfer.

[25]  Rupak Majumdar,et al.  Algorithmic verification of asynchronous programs , 2010, TOPL.

[26]  Jeff Huang,et al.  Stateless model checking concurrent programs with maximal causality reduction , 2015, PLDI.

[27]  Gerard J. Holzmann,et al.  The SPIN Model Checker , 2003 .

[28]  Heila van der Merwe Verification of Android Applications , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

[29]  Ganesh Gopalakrishnan,et al.  Dynamic Verification of MPI Programs with Reductions in Presence of Split Operations and Relaxed Orderings , 2008, CAV.

[30]  Zvonimir Rakamaric,et al.  Delay-bounded scheduling , 2011, POPL '11.

[31]  Rupak Majumdar,et al.  Race detection for Android applications , 2014, PLDI.

[32]  Patrice Godefroid,et al.  Software Model Checking: The VeriSoft Approach , 2005, Formal Methods Syst. Des..

[33]  Axel Legay,et al.  TransDPOR: A Novel Dynamic Partial-Order Reduction Technique for Testing Actor Programs , 2012, FMOODS/FORTE.

[34]  Masumi Nakamura,et al.  Programming Android , 2011 .

[35]  Parosh Aziz Abdulla,et al.  Optimal dynamic partial order reduction , 2014, POPL.

[36]  Patrice Godefroid,et al.  Dynamic partial-order reduction for model checking software , 2005, POPL '05.

[37]  Daniel Kroening,et al.  Unfolding-based Partial Order Reduction , 2015, CONCUR.

[38]  Akash Lal,et al.  Asynchronous programs with prioritized task-buffers , 2012, SIGSOFT FSE.

[39]  Friedemann Mattern,et al.  Virtual Time and Global States of Distributed Systems , 2002 .

[40]  Patrice Godefroid,et al.  Model checking for programming languages using VeriSoft , 1997, POPL '97.

[41]  Satish Narayanasamy,et al.  Race detection for event-driven mobile applications , 2014, PLDI.

[42]  Koushik Sen,et al.  Automated Systematic Testing of Open Distributed Programs , 2006, FASE.

[43]  Ganesh Gopalakrishnan,et al.  Semantics driven dynamic partial-order reduction of MPI-based parallel programs , 2007, PADTAD '07.

[44]  Dimitar Dimitrov,et al.  Stateless model checking of event-driven applications , 2015, OOPSLA.