Abstract
Modern event-driven applications, such as, web pages and mobile apps, rely on asynchrony to ensure smooth end-user experience. Unfortunately, even though these applications are executed by a single event-loop thread, they can still exhibit nondeterministic behaviors depending on the execution order of interfering asynchronous events. As in classic shared-memory concurrency, this nondeterminism makes it challenging to discover errors that manifest only in specific schedules of events. In this work we propose the first stateless model checker for event-driven applications, called R4. Our algorithm systematically explores the nondeterminism in the application and concisely exposes its overall effect, which is useful for bug discovery. The algorithm builds on a combination of three key insights: (i) a dynamic partial order reduction (DPOR) technique for reducing the search space, tailored to the domain of event-driven applications, (ii) conflict-reversal bounding based on a hypothesis that most errors occur with a small number of event reorderings, and (iii) approximate replay of event sequences, which is critical for separating harmless from harmful nondeterminism. We instantiate R4 for the domain of client-side web applications and use it to analyze event interference in a number of real-world programs. The experimental results indicate that the precision and overall exploration capabilities of our system significantly exceed that of existing techniques.
- P. Abdulla, S. Aronis, B. Jonsson, and K. Sagonas. Optimal dynamic partial order reduction. In Proc. 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2014. Google Scholar
Digital Library
- S. Andrica and G. Candea. Warr: A tool for high-fidelity web application record and replay. In Proc. 41st IEEE/IFIP International Conference on Dependable Systems & Networks, 2011. Google Scholar
Digital Library
- S. Artzi, J. Dolby, S. H. Jensen, A. Møller, and F. Tip. A framework for automated testing of JavaScript web applications. In Proc. 33rd International Conference on Software Engineering, 2011. Google Scholar
Digital Library
- B. Burg, R. Bailey, A. J. Ko, and M. D. Ernst. Interactive record/replay for web application debugging. In Proc. 26th Symposium on User Interface Software and Technology, 2013. Google Scholar
Digital Library
- K. E. Coons, M. Musuvathi, and K. S. McKinley. Bounded partial-order reduction. In Proc. 28th ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications, 2013. Google Scholar
Digital Library
- D. Dimitrov, V. Raychev, M. Vechev, and E. Koskinen. Commutativity race detection. In Proc. 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, 2014. Google Scholar
Digital Library
- M. Emmi, S. Qadeer, and Z. Rakamari´c. Delay-bounded scheduling. In Proc. 38th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2011. Google Scholar
Digital Library
- J. Erickson, M. Musuvathi, S. Burckhardt, and K. Olynyk. Effective data-race detection for the kernel. In Proc. 7th USENIX Symposium on Operation Systems Design and Implementation, 2010. Google Scholar
Digital Library
- C. Flanagan and P. Godefroid. Dynamic partial-order reduction for model checking software. In Proc. 32th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2005. Google Scholar
Digital Library
- P. Godefroid. Partial-order methods for the verification of concurrent systems: an approach to the state-explosion problem. PhD thesis, Universite de Liege, faculté des sciences appliquées, 1996.Google Scholar
Digital Library
- P. Godefroid. Model checking for programming languages using VeriSoft. In Proc. 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 1997. Google Scholar
Digital Library
- S. Hong, Y. Park, M. Kim, et al. Detecting concurrency errors in client-side JavaScript web applications. In Proc. 6th International Conference on Software Testing, Verification and Validation, 2014. Google Scholar
Digital Library
- C.-H. Hsiao, J. Yu, S. Narayanasamy, Z. Kong, C. L. Pereira, G. A. Pokam, P. M. Chen, and J. Flinn. Race detection for event-driven mobile applications. In Proc. 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, 2014. Google Scholar
Digital Library
- J. Ide, R. Bodik, and D. Kimelman. Concurrency concerns in rich internet applications. In Proc. Workshop on Exploiting Concurrency Efficiently and Correctly, 2009.Google Scholar
- B. Kasikci, C. Zamfir, and G. Candea. Data races vs. data race bugs: telling the difference with Portend. In Proc. 17th International Conference on Architectural Support for Programming Languages and Operating Systems, 2012. Google Scholar
Digital Library
- C. E. Killian, J. W. Anderson, R. Jhala, and A. Vahdat. Life, death, and the critical transition: Finding liveness bugs in systems code. In Proc. 4th Symposium on Networked Systems Design and Implementation, 2007. Google Scholar
Digital Library
- A. Machiry, R. Tahiliani, and M. Naik. Dynodroid: An input generation system for Android apps. In Proc. European Software Engineering Conference and Symposium on the Foundations of Software Engineering, 2013. Google Scholar
Digital Library
- P. Maiya, A. Kanade, and R. Majumdar. Race detection for Android applications. In Proc. 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, 2014. Google Scholar
Digital Library
- A. Mesbah, A. van Deursen, and S. Lenselink. Crawling Ajaxbased web applications through dynamic analysis of user interface state changes. ACM Transactions on the Web, 6(1): 3:1–3:30, 2012. Google Scholar
Digital Library
- A. Mesbah, A. van Deursen, and D. Roest. Invariant-based automatic testing of modern web applications. IEEE Transactions on Software Engineering, 2012. Google Scholar
Digital Library
- J. Mickens, J. Elson, and J. Howell. Mugshot: Deterministic capture and replay for JavaScript applications. In Proc. 7th USENIX Conference on Networked Systems Design and Implementation, 2010. Google Scholar
Digital Library
- M. Musuvathi and S. Qadeer. Iterative context bounding for systematic testing of multithreaded programs. In Proc. 28th ACM SIGPLAN Conference on Programming Language Design and Implementation, 2007. Google Scholar
Digital Library
- E. Mutlu, S. Tasiran, and B. Livshits. I know it when I see it: Observable races in JavaScript applications. Technical report, Microsoft Research, 2014.Google Scholar
- S. Narayanasamy, Z. Wang, J. Tigani, A. Edwards, and B. Calder. Automatically classifying benign and harmful data races using replay analysis. In Proc. 28th ACM SIGPLAN Conference on Programming Language Design and Implementation, 2007. Google Scholar
Digital Library
- J. W. O’Leary, M. Talupur, and M. R. Tuttle. Protocol verification using flows: An industrial experience. In Proc. 9th International Conference on Formal Methods in Computer-Aided Design, 2009.Google Scholar
Cross Ref
- B. Petrov, M. T. Vechev, M. Sridharan, and J. Dolby. Race detection for web applications. In Proc. 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation, 2012. Google Scholar
Digital Library
- V. Raychev, M. T. Vechev, and M. Sridharan. Effective race detection for event-driven programs. In Proc. 28th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, 2013. Google Scholar
Digital Library
- P. Saxena, D. Akhawe, S. Hanna, S. McCamant, D. Song, and F. Mao. A symbolic execution framework for JavaScript. In Proc. 31st IEEE Symposium on Security and Privacy, 2010. Google Scholar
Digital Library
- K. Sen. Race directed random testing of concurrent programs. In Proc. 29th ACM SIGPLAN Conference on Programming Language Design and Implementation, 2008. Google Scholar
Digital Library
- K. Sen, S. Kalasapur, T. Brutch, and S. Gibbs. Jalangi: A selective record-replay and dynamic analysis framework for JavaScript. In Proc. Symposium on the Foundations of Software Engineering, 2013. Google Scholar
Digital Library
- M. Talupur and H. Han. Biased model checking using flows. In Proc. 17th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, 2011. Google Scholar
Digital Library
Index Terms
Stateless model checking of event-driven applications
Recommendations
Stateless model checking of event-driven applications
OOPSLA 2015: Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and ApplicationsModern event-driven applications, such as, web pages and mobile apps, rely on asynchrony to ensure smooth end-user experience. Unfortunately, even though these applications are executed by a single event-loop thread, they can still exhibit ...
Fair stateless model checking
PLDI '08Stateless model checking is a useful state-space exploration technique for systematically testing complex real-world software. Existing stateless model checkers are limited to the verification of safety properties on terminating programs. However, ...
Stateless model checking with data-race preemption points
OOPSLA 2016: Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and ApplicationsStateless model checking is a powerful technique for testing concurrent programs, but suffers from exponential state space explosion when the test input parameters are too large. Several reduction techniques can mitigate this explosion, but even after ...






Comments