skip to main content
research-article

Stateless model checking of event-driven applications

Published:23 October 2015Publication History
Skip Abstract Section

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.

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. P. Godefroid. Model checking for programming languages using VeriSoft. In Proc. 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. J. Ide, R. Bodik, and D. Kimelman. Concurrency concerns in rich internet applications. In Proc. Workshop on Exploiting Concurrency Efficiently and Correctly, 2009.Google ScholarGoogle Scholar
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. A. Mesbah, A. van Deursen, and D. Roest. Invariant-based automatic testing of modern web applications. IEEE Transactions on Software Engineering, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 ScholarGoogle Scholar
  24. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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 ScholarGoogle ScholarCross RefCross Ref
  26. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  27. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  28. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  29. K. Sen. Race directed random testing of concurrent programs. In Proc. 29th ACM SIGPLAN Conference on Programming Language Design and Implementation, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Stateless model checking of event-driven applications

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in

              Full Access

              • Published in

                cover image ACM SIGPLAN Notices
                ACM SIGPLAN Notices  Volume 50, Issue 10
                OOPSLA '15
                October 2015
                953 pages
                ISSN:0362-1340
                EISSN:1558-1160
                DOI:10.1145/2858965
                • Editor:
                • Andy Gill
                Issue’s Table of Contents
                • cover image ACM Conferences
                  OOPSLA 2015: Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications
                  October 2015
                  953 pages
                  ISBN:9781450336895
                  DOI:10.1145/2814270

                Copyright © 2015 ACM

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 23 October 2015

                Check for updates

                Qualifiers

                • research-article

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader
              About Cookies On This Site

              We use cookies to ensure that we give you the best experience on our website.

              Learn more

              Got it!