skip to main content
10.1145/3092703.3092733acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
research-article

Efficient computation of happens-before relation for event-driven programs

Published: 10 July 2017 Publication History

Abstract

An emerging style of programming is to use both threads and events to achieve better scalability. The improved scalability comes at the price of increased complexity, as both threads and events can follow non-deterministic schedules. The happens-before (HB) relation captures the space of possible schedules and forms the basis of various concurrency analyses. Improving efficiency of the HB computation can speed up these analyses.
In this paper, we identify a major bottleneck in computation of the HB relation for such event-driven programs. Event-driven programs are designed to interact continuously with their environment, and usually receive a large number of events even within a short span of time. This increases the cost of discovering the HB order among the events. We propose a novel data structure, called event graph, that maintains a subset of the HB relation to efficiently infer order between any pair of events. We present an algorithm, called EventTrack, which improves efficiency of vector clock based HB computation for event-driven programs using event graphs.
We have implemented EventTrack and evaluated it on traces of eight Android applications. Compared to the state-of-the-art technique, EventTrack gave an average speedup of 4.9X. The speedup ranged from 1.8X to 10.3X across the applications.

References

[1]
Pavol Bielik, Veselin Raychev, and Martin Vechev. 2015. EventRacer for Android. (2015). Retrieved May 10, 2017 from http://eventracer.org/android
[2]
Pavol Bielik, Veselin Raychev, and Martin Vechev. 2015. Scalable Race Detection for Android Applications. In Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2015). ACM, New York, NY, USA, 332–348.
[3]
Swarnendu Biswas, Jipeng Huang, Aritra Sengupta, and Michael D. Bond. 2014.
[4]
DoubleChecker: Efficient Sound and Precise Atomicity Checking. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’14). ACM, New York, NY, USA, 28–39.
[5]
Mark Christiaens and Koen De Bosschere. 2001.
[6]
TRaDe, a Topological Approach to On-the-fly Race Detection in Java Programs. In Proceedings of the 2001 Symposium on JavaTM Virtual Machine Research and Technology Symposium - Volume 1 (JVM’01). USENIX Association, Berkeley, CA, USA, 15–15. http://dl.acm.org/citation.cfm?id=1267847.1267862
[7]
Cormac Flanagan and Stephen N. Freund. 2009. FastTrack: Efficient and Precise Dynamic Race Detection. In Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’09). ACM, New York, NY, USA, 121–133.
[8]
Cormac Flanagan, Stephen N. Freund, and Jaeheon Yi. 2008.
[9]
Velodrome: A Sound and Complete Dynamic Atomicity Checker for Multithreaded Programs. In Proceedings of the 29th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’08). ACM, New York, NY, USA, 293–303.
[10]
Chun-Hung Hsiao, Satish Narayanasamy, Essam Muhammad Idris Khan, Cristiano L. Pereira, and Gilles A. Pokam. 2017.
[11]
AsyncClock: Scalable Inference of Asynchronous Event Causality. In Proceedings of the Twenty-Second International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS ’17). ACM, New York, NY, USA, 193–205.
[12]
Chun-Hung Hsiao, Jie Yu, Satish Narayanasamy, Ziyun Kong, Cristiano L. Pereira, Gilles A. Pokam, Peter M. Chen, and Jason Flinn. 2014. Race Detection for Eventdriven Mobile Applications. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’14). ACM, New York, NY, USA, 326–336.
[13]
Yongjian Hu, Iulian Neamtiu, and Arash Alavi. 2016. Automatically Verifying and Reproducing Event-based Races in Android Apps. In Proceedings of the 25th International Symposium on Software Testing and Analysis (ISSTA 2016). ACM, New York, NY, USA, 377–388.
[14]
H. V. Jagadish. 1990. A Compression Technique to Materialize Transitive Closure. ACM Trans. Database Syst. 15, 4 (Dec. 1990), 558–598.
[15]
Casper S. Jensen, Anders Møller, Veselin Raychev, Dimitar Dimitrov, and Martin Vechev. 2015. Stateless Model Checking of Event-driven Applications. In Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2015). ACM, New York, NY, USA, 57–73.
[16]
Leslie Lamport. 1978. Time, Clocks, and the Ordering of Events in a Distributed System. Commun. ACM 21, 7 (1978), 558–565.
[17]
Pallavi Maiya, Rahul Gupta, Aditya Kanade, and Rupak Majumdar. 2016. Partial Order Reduction for Event-Driven Multi-threaded Programs. In Proceedings of the 22nd International Conference on Tools and Algorithms for the Construction and Analysis of Systems - Volume 9636. Springer-Verlag New York, Inc., New York, NY, USA, 680–697.
[18]
Pallavi Maiya and Aditya Kanade. 2017.
[19]
Correctness Proofs and Complexity Analysis of EventTrack Algorithm. (2017). Retrieved May 10, 2017 from http: //www.iiscseal.net/publications/eventtrackappendix.pdf
[20]
Pallavi Maiya and Aditya Kanade. 2017. EventTrack. (2017). Retrieved May 10, 2017 from http://bitbucket.org/iiscseal/eventtrack
[21]
Pallavi Maiya, Aditya Kanade, and Rupak Majumdar. 2014. DroidRacer. (2014).
[22]
Retrieved May 10, 2017 from http://www.iiscseal.net/droidracer
[23]
Pallavi Maiya, Aditya Kanade, and Rupak Majumdar. 2014. Race Detection for Android Applications. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’14). ACM, New York, NY, USA, 316–325.
[24]
Friedemann Mattern. 1989. Virtual time and global states of distributed systems. Parallel and Distributed Algorithms 1, 23 (1989), 215–226.
[25]
Zigurd Mednieks, Laird Dornin, G Blake Meike, and Masumi Nakamura. 2012.
[26]
Programming Android. O’Reilly Media, Inc.
[27]
Robert O’Callahan and Jong-Deok Choi. 2003.
[28]
Hybrid Dynamic Data Race Detection. In Proceedings of the Ninth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP ’03). ACM, New York, NY, USA, 167–178.
[29]
Boris Petrov, Martin Vechev, Manu Sridharan, and Julian Dolby. 2012.
[30]
Race Detection for Web Applications. In Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’12). ACM, New York, NY, USA, 251–262.
[31]
Eli Pozniansky and Assaf Schuster. 2003. Efficient On-the-fly Data Race Detection in Multithreaded C++ Programs. In Proceedings of the Ninth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP ’03). ACM, New York, NY, USA, 179–190.
[32]
Veselin Raychev, Martin Vechev, and Manu Sridharan. 2013.
[33]
Effective Race Detection for Event-driven Programs. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages, and Applications (OOPSLA ’13). ACM, New York, NY, USA, 151–166. //dx.
[34]
Anirudh Santhiar, Shalini Kaleeswaran, and Aditya Kanade. 2016. Efficient Race Detection in the Presence of Programmatic Event Loops. In Proceedings of the 25th International Symposium on Software Testing and Analysis (ISSTA 2016). ACM, New York, NY, USA, 366–376.
[35]
Yannis Smaragdakis, Jacob Evans, Caitlin Sadowski, Jaeheon Yi, and Cormac Flanagan. 2012. Sound Predictive Race Detection in Polynomial Time. In Proceedings of the 39th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’12). ACM, New York, NY, USA, 387–400.

Cited By

View all
  • (2023)Tailoring Stateless Model Checking for Event-Driven Multi-threaded ProgramsAutomated Technology for Verification and Analysis10.1007/978-3-031-45332-8_9(176-198)Online publication date: 19-Oct-2023
  • (2022)A causal consistency model based on grouping strategyThe Journal of Supercomputing10.1007/s11227-022-04441-378:16(17736-17757)Online publication date: 23-May-2022
  • (2021)Flaky test detection in Android via event order explorationProceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3468264.3468584(367-378)Online publication date: 20-Aug-2021
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ISSTA 2017: Proceedings of the 26th ACM SIGSOFT International Symposium on Software Testing and Analysis
July 2017
447 pages
ISBN:9781450350761
DOI:10.1145/3092703
  • General Chair:
  • Tevfik Bultan,
  • Program Chair:
  • Koushik Sen
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 10 July 2017

Permissions

Request permissions for this article.

Check for updates

Badges

Author Tags

  1. Android
  2. Concurrency Analysis
  3. Event-driven Programs
  4. Happens-before Reasoning
  5. Vector Clock

Qualifiers

  • Research-article

Conference

ISSTA '17
Sponsor:

Acceptance Rates

Overall Acceptance Rate 58 of 213 submissions, 27%

Upcoming Conference

ISSTA '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)31
  • Downloads (Last 6 weeks)5
Reflects downloads up to 17 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2023)Tailoring Stateless Model Checking for Event-Driven Multi-threaded ProgramsAutomated Technology for Verification and Analysis10.1007/978-3-031-45332-8_9(176-198)Online publication date: 19-Oct-2023
  • (2022)A causal consistency model based on grouping strategyThe Journal of Supercomputing10.1007/s11227-022-04441-378:16(17736-17757)Online publication date: 23-May-2022
  • (2021)Flaky test detection in Android via event order explorationProceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3468264.3468584(367-378)Online publication date: 20-Aug-2021
  • (2021)Race Detection for Event-Driven Node.js Applications2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE)10.1109/ASE51524.2021.9678814(480-491)Online publication date: Nov-2021
  • (2020)RegionTrackACM Transactions on Software Engineering and Methodology10.1145/341237730:1(1-49)Online publication date: 31-Dec-2020
  • (2020)Efficient reordering and replay of execution traces of distributed reactive systems in the context of model-driven developmentProceedings of the 23rd ACM/IEEE International Conference on Model Driven Engineering Languages and Systems10.1145/3365438.3410939(285-296)Online publication date: 16-Oct-2020
  • (2020)ER catcherProceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering10.1145/3324884.3416639(324-335)Online publication date: 21-Dec-2020
  • (2019)Precise Static Happens-Before Analysis for Detecting UAF Order Violations in Android2019 12th IEEE Conference on Software Testing, Validation and Verification (ICST)10.1109/ICST.2019.00035(276-287)Online publication date: Apr-2019
  • (2019)Detecting atomicity violations for event-driven Node.js applicationsProceedings of the 41st International Conference on Software Engineering10.1109/ICSE.2019.00073(631-642)Online publication date: 25-May-2019
  • (2017)Systematic reduction of GUI test sequencesProceedings of the 32nd IEEE/ACM International Conference on Automated Software Engineering10.5555/3155562.3155668(849-860)Online publication date: 30-Oct-2017
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media