skip to main content
10.1145/2254064.2254090acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Sound and precise analysis of parallel programs through schedule specialization

Published: 11 June 2012 Publication History

Abstract

Parallel programs are known to be difficult to analyze. A key reason is that they typically have an enormous number of execution interleavings, or schedules. Static analysis over all schedules requires over-approximations, resulting in poor precision; dynamic analysis rarely covers more than a tiny fraction of all schedules. We propose an approach called schedule specialization to analyze a parallel program over only a small set of schedules for precision, and then enforce these schedules at runtime for soundness of the static analysis results. We build a schedule specialization framework for C/C++ multithreaded programs that use Pthreads. Our framework avoids the need to modify every analysis to be schedule-aware by specializing a program into a simpler program based on a schedule, so that the resultant program can be analyzed with stock analyses for improved precision. Moreover, our framework provides a precise schedule-aware def-use analysis on memory locations, enabling us to build three highly precise analyses: an alias analyzer, a data-race detector, and a path slicer. Evaluation on 17 programs, including 2 real-world programs and 15 popular benchmarks, shows that analyses using our framework reduced may-aliases by 61.9%, false race reports by 69%, and path slices by 48.7%; and detected 7 unknown bugs in well-checked programs.

References

[1]
The LLVM compiler framework. http://llvm.org.
[2]
The Princeton application repository for shared-memory computers (PARSEC). http://parsec.cs.princeton.edu/.
[3]
Parallel BZIP2 (PBZIP2). http://compression.ca/pbzip2/.
[4]
Stanford parallel applications for shared memory (SPLASH). http://www-flash.stanford.edu/apps/SPLASH/.
[5]
STP Constraint Solver. https://sites.google.com/site/stpfastprover/.
[6]
H. Agrawal and J. R. Horgan. Dynamic program slicing. In Proceedings of the ACM SIGPLAN '90 Conference on Programming Language Design and Implementation (PLDI '90), pages 246--256, 1990.
[7]
Apache Web Server. http://www.apache.org.
[8]
A. Aviram, S.-C. Weng, S. Hu, and B. Ford. Efficient system-enforced deterministic parallelism. In Proceedings of the Ninth Symposium on Operating Systems Design and Implementation (OSDI '10), Oct. 2010.
[9]
D. Avots, M. Dalton, V. B. Livshits, and M. S. Lam. Improving software security with a C pointer analysis. In Proceedings of the 27th International Conference on Software Engineering (ICSE '05), pages 332--341, May 2005.
[10]
T. Bergan, O. Anderson, J. Devietti, L. Ceze, and D. Grossman. CoreDet: a compiler and runtime system for deterministic multithreaded execution. In Fifteenth International Conference on Architecture Support for Programming Languages and Operating Systems (ASPLOS '10), pages 53--64, Mar. 2010.
[11]
T. Bergan, N. Hunt, L. Ceze, and S. D. Gribble. Deterministic process groups in dOS. In Proceedings of the Ninth Symposium on Operating Systems Design and Implementation (OSDI '10), pages 1--16, Oct. 2010.
[12]
E. Berger, T. Yang, T. Liu, D. Krishnan, and A. Novark. Grace: safe and efficient concurrent programming. In Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA '09), pages 81--96, Oct. 2009.
[13]
O. A. R. Board. OpenMP application program interface version 3.0, May 2008.
[14]
C. Consel and O. Danvy. Tutorial notes on partial evaluation. In Proceedings of the 20th Annual Symposium on Principles of Programming Languages (POPL '93), pages 493--501, 1993.
[15]
M. Costa, M. Castro, L. Zhou, L. Zhang, and M. Peinado. Bouncer: securing software by blocking bad input. In Proceedings of the 21st ACM Symposium on Operating Systems Principles (SOSP '07), pages 117--130, Oct. 2007.
[16]
H. Cui, J. Wu, C.-C. Tsai, and J. Yang. Stable deterministic multithreading through schedule memoization. In Proceedings of the Ninth Symposium on Operating Systems Design and Implementation (OSDI '10), Oct. 2010.
[17]
H. Cui, J. Wu, J. Gallagher, H. Guo, and J. Yang. Efficient deterministic multithreading through schedule relaxation. In Proceedings of the 23rd ACM Symposium on Operating Systems Principles (SOSP '11), Oct. 2011.
[18]
J. Devietti, B. Lucia, L. Ceze, and M. Oskin. DMP: deterministic shared memory multiprocessing. In Fourteenth International Conference on Architecture Support for Programming Languages and Operating Systems (ASPLOS '09), pages 85--96, Mar. 2009.
[19]
Q. Gao, W. Zhang, Z. Chen, M. Zheng, and F. Qin. 2ndStrike: towards manifesting hidden concurrency typestate bugs. In Sixteenth International Conference on Architecture Support for Programming Languages and Operating Systems (ASPLOS '11), pages 239--250, Mar. 2011.
[20]
R. Glück and J. Jørgensen. Efficient multi-level generating extensions for program specialization. In Proceedings of the 7th International Symposium on Programming Languages: Implementations, Logics and Programs, pages 259--278, 1995.
[21]
R. Jhala and R. Majumdar. Path slicing. In Proceedings of the ACM SIGPLAN 2005 Conference on Programming Language Design and Implementation (PLDI '05), pages 38--47, 2005.
[22]
J. Jørgensen. Generating a compiler for a lazy language by partial evaluation. In Proceedings of the 19th Annual Symposium on Principles of Programming Languages (POPL '92), pages 258--268, 1992.
[23]
N. G. Leveson and C. S. Turner. An investigation of the therac-25 accidents. Computer, 26 (7): 18--41, 1993.
[24]
T. Liu, C. Curtsinger, and E. D. Berger. DTHREADS: efficient deterministic multithreading. In Proceedings of the 23rd ACM Symposium on Operating Systems Principles (SOSP '11), Oct. 2011.
[25]
S. Lu, S. Park, E. Seo, and Y. Zhou. Learning from mistakes: a comprehensive study on real world concurrency bug characteristics. In Thirteenth International Conference on Architecture Support for Programming Languages and Operating Systems (ASPLOS '08), pages 329--339, Mar. 2008.
[26]
G. C. Necula, S. McPeak, and W. Weimer. CCured: type-safe retrofitting of legacy code. In Proceedings of the 29th Annual Symposium on Principles of Programming Languages(POPL '02), pages 128--139, 2002.
[27]
V. Nirkhe and W. Pugh. Partial evaluation of high-level imperative programming languages with applications in hard real-time systems. In Proceedings of the 19th Annual Symposium on Principles of Programming Languages (POPL '92), pages 269--280, 1992.
[28]
M. Olszewski, J. Ansel, and S. Amarasinghe. Kendo: efficient deterministic multithreading in software. In Fourteenth International Conference on Architecture Support for Programming Languages and Operating Systems (ASPLOS '09), pages 97--108, Mar. 2009.
[29]
S. Park, S. Lu, and Y. Zhou. CTrigger: exposing atomicity violation bugs from their hiding places. In Fourteenth International Conference on Architecture Support for Programming Languages and Operating Systems (ASPLOS '09), pages 25--36, Mar. 2009.
[30]
K. Poulsen. Software bug contributed to blackout. http://www.securityfocus.com/news/8016, Feb. 2004.
[31]
T. Reps and T. Turnidge. Program specialization via program slicing. In Proceedings of the Dagstuhl Seminar on Partial Evaluation, volume 1101, pages 409--429. Springer-Verlag, 1996.
[32]
M. Ronsse and K. De Bosschere. Recplay: a fully integrated practical record/replay system. ACM Trans. Comput. Syst., 17 (2): 133--152, 1999.
[33]
R. Rugina and M. Rinard. Symbolic bounds analysis of pointers, array indices, and accessed memory regions. In Proceedings of the ACM SIGPLAN 2000 Conference on Programming Language Design and Implementation (PLDI '00), pages 182--195, June 2000.
[34]
The Open Group and the IEEE. POSIX.1-2008. http://pubs.opengroup.org/onlinepubs/9699919799/, 2008.
[35]
M. D. Weiser. Program slices: formal, psychological, and practical investigations of an automatic program abstraction method. PhD thesis, 1979.
[36]
J. Whaley and M. S. Lam. Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation (PLDI '04), pages 131--144, June 2004.
[37]
J. Yang, A. Cui, J. Gallagher, S. Stolfo, and S. Sethumadhavan. Concurrency attacks. Technical Report CUCS-028-11, Columbia University.
[38]
W. Zhang, C. Sun, and S. Lu. ConMem: detecting severe concurrency bugs through an effect-oriented approach. In Fifteenth International Conference on Architecture Support for Programming Languages and Operating Systems (ASPLOS '10), pages 179--192, Mar. 2010.
[39]
W. Zhang, J. Lim, R. Olichandran, J. Scherpelz, G. Jin, S. Lu, and T. Reps. ConSeq: detecting concurrency bugs through sequential errors. In Sixteenth International Conference on Architecture Support for Programming Languages and Operating Systems (ASPLOS '11), pages 251--264, Mar. 2011.
[40]
X. Zhang and R. Gupta. Cost effective dynamic program slicing. In Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation (PLDI '04), pages 94--106, 2004.

Cited By

View all
  • (2023)Static Deadlock Detection in Low-Level C CodeComputer Aided Systems Theory – EUROCAST 202210.1007/978-3-031-25312-6_31(267-276)Online publication date: 10-Feb-2023
  • (2022)Understanding and Reaching the Performance Limit of Schedule Tuning on Stable Synchronization DeterminismProceedings of the International Conference on Parallel Architectures and Compilation Techniques10.1145/3559009.3569669(223-238)Online publication date: 8-Oct-2022
  • (2021)Canary: practical static detection of inter-thread value-flow bugsProceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3453483.3454099(1126-1140)Online publication date: 19-Jun-2021
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '12: Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation
June 2012
572 pages
ISBN:9781450312059
DOI:10.1145/2254064
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 47, Issue 6
    PLDI '12
    June 2012
    534 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2345156
    Issue’s Table of Contents
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: 11 June 2012

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. constraint solving
  2. control-flow analysis
  3. data-flow analysis
  4. multithreading
  5. parallel programs
  6. specialization

Qualifiers

  • Research-article

Conference

PLDI '12
Sponsor:

Acceptance Rates

PLDI '12 Paper Acceptance Rate 48 of 255 submissions, 19%;
Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)11
  • Downloads (Last 6 weeks)1
Reflects downloads up to 01 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2023)Static Deadlock Detection in Low-Level C CodeComputer Aided Systems Theory – EUROCAST 202210.1007/978-3-031-25312-6_31(267-276)Online publication date: 10-Feb-2023
  • (2022)Understanding and Reaching the Performance Limit of Schedule Tuning on Stable Synchronization DeterminismProceedings of the International Conference on Parallel Architectures and Compilation Techniques10.1145/3559009.3569669(223-238)Online publication date: 8-Oct-2022
  • (2021)Canary: practical static detection of inter-thread value-flow bugsProceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3453483.3454099(1126-1140)Online publication date: 19-Jun-2021
  • (2020)On Scheduling Constraint Abstraction for Multi-Threaded Program VerificationIEEE Transactions on Software Engineering10.1109/TSE.2018.286412246:5(549-565)Online publication date: 1-May-2020
  • (2019)GPU-accelerated fixpoint algorithms for faster compiler analysesProceedings of the 28th International Conference on Compiler Construction10.1145/3302516.3307352(122-134)Online publication date: 16-Feb-2019
  • (2018)Scheduling constraint based abstraction refinement for weak memory modelsProceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering10.1145/3238147.3238223(645-655)Online publication date: 3-Sep-2018
  • (2018)Discovering Concurrency ErrorsLectures on Runtime Verification10.1007/978-3-319-75632-5_2(34-60)Online publication date: 11-Feb-2018
  • (2017)P/Taint: unified points-to and taint analysisProceedings of the ACM on Programming Languages10.1145/31339261:OOPSLA(1-28)Online publication date: 12-Oct-2017
  • (2015)Advances in noise-based testing of concurrent softwareSoftware Testing, Verification & Reliability10.1002/stvr.154625:3(272-309)Online publication date: 1-May-2015
  • (2014)SKIProceedings of the 11th USENIX conference on Operating Systems Design and Implementation10.5555/2685048.2685081(415-431)Online publication date: 6-Oct-2014
  • 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