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.
- The LLVM compiler framework. http://llvm.org.Google Scholar
- The Princeton application repository for shared-memory computers (PARSEC). http://parsec.cs.princeton.edu/.Google Scholar
- Parallel BZIP2 (PBZIP2). http://compression.ca/pbzip2/.Google Scholar
- Stanford parallel applications for shared memory (SPLASH). http://www-flash.stanford.edu/apps/SPLASH/.Google Scholar
- STP Constraint Solver. https://sites.google.com/site/stpfastprover/.Google Scholar
- 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. Google Scholar
Digital Library
- Apache Web Server. http://www.apache.org.Google Scholar
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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.Google Scholar
Digital Library
- O. A. R. Board. OpenMP application program interface version 3.0, May 2008.Google Scholar
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- N. G. Leveson and C. S. Turner. An investigation of the therac-25 accidents. Computer, 26 (7): 18--41, 1993. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- K. Poulsen. Software bug contributed to blackout. http://www.securityfocus.com/news/8016, Feb. 2004.Google Scholar
- 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. Google Scholar
Digital Library
- M. Ronsse and K. De Bosschere. Recplay: a fully integrated practical record/replay system. ACM Trans. Comput. Syst., 17 (2): 133--152, 1999. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- The Open Group and the IEEE. POSIX.1-2008. http://pubs.opengroup.org/onlinepubs/9699919799/, 2008.Google Scholar
- M. D. Weiser. Program slices: formal, psychological, and practical investigations of an automatic program abstraction method. PhD thesis, 1979. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- J. Yang, A. Cui, J. Gallagher, S. Stolfo, and S. Sethumadhavan. Concurrency attacks. Technical Report CUCS-028-11, Columbia University.Google Scholar
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
- 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. Google Scholar
Digital Library
Index Terms
Sound and precise analysis of parallel programs through schedule specialization
Recommendations
Sound and precise analysis of parallel programs through schedule specialization
PLDI '12: Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and ImplementationParallel 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; ...
Precise and efficient integration of interprocedural alias information into data-flow analysis
Data-flow analysis is a basis for program optimization and parallelizing transformations. The mechanism of passing reference parameters at call sites generates interprocedural aliases which complicate this analysis. Solutions have been developed for ...
Hybrid approach for data-flow analysis of MPI programs
ICS '13: Proceedings of the 27th international ACM conference on International conference on supercomputingWith the increasing cost of developing robust HPC software, precise data-flow analysis for MPI programs -- the mainstay of HPC programming -- are essential. The knowledge of communication is essential for precise data-flow analysis and the difficulty of ...







Comments