skip to main content
research-article

NDSeq: runtime checking for nondeterministic sequential specifications of parallel correctness

Authors Info & Claims
Published:04 June 2011Publication History
Skip Abstract Section

Abstract

We propose to specify the correctness of a program's parallelism using a sequential version of the program with controlled nondeterminism. Such a nondeterministic sequential specification allows (1) the correctness of parallel interference to be verified independently of the program's functional correctness, and (2) the functional correctness of a program to be understood and verified on a sequential version of the program, one with controlled nondeterminism but no interleaving of parallel threads.

We identify a number of common patterns for writing nondeterministic sequential specifications. We apply these patterns to specify the parallelism correctness for a variety of parallel Java benchmarks, even in cases when the functional correctness is far too complex to feasibly specify.

We describe a sound runtime checking technique to validate that an execution of a parallel program conforms to its nondeterministic sequential specification. The technique uses a novel form of conflict-serializability checking to identify, for a given interleaved execution of a parallel program, an equivalent nondeterministic sequential execution. Our experiments show a significant reduction in the number of false positives versus traditional conflict-serializability in checking for parallelization bugs.

References

  1. T. Ball, A. Podelski, and S. K. Rajamani. Boolean and cartesian abstraction for model checking C programs. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS), pages 268--283, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. P. A. Bernstein, V. Hadzilacos, and N. Goodman. Concurrency Control and Recovery in Database Systems. Addison-Wesley, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. D. Beyer, T. A. Henzinger, R. Jhala, and R. Majumdar. The software model checker Blast: Applications to software engineering. Int. J. Softw. Tools Technol. Transf., 9: 505--525, October 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. VanDrunen, von Dincklage, and Wiedermann}dacapoS. M. Blackburn, R. Garner, C. Hoffmann, A. M. Khang, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. In Object-oriented Programming Systems, Languages, and Applications (OOPSLA), pages 169--190, 2006. Google ScholarGoogle Scholar
  5. R. L. Bocchino, Jr., V. S. Adve, D. Dig, S. V. Adve, S. Heumann, R. Komuravelli, J. Overbey, P. Simmons, H. Sung, and M. Vakilian. A type and effect system for Deterministic Parallel Java. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 97--116, 2009. Google ScholarGoogle Scholar
  6. R. L. Bocchino, Jr., S. Heumann, N. Honarmand, S. V. Adve, V. S. Adve, A. Welc, and T. Shpeisman. Safe nondeterminism in a deterministic-by-default parallel language. In Principles of Programming Languages (POPL), pages 535--548, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. S. Burckhardt, C. Dern, M. Musuvathi, and R. Tan. Line-up: A complete and automatic linearizability checker. In Programming Language Design and Implementation (PLDI), pages 330--340, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. J. Burnim and K. Sen. Asserting and checking determinism for multithreaded programs. In Foundations of Software Engineering (FSE), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J. Burnim, G. Necula, and K. Sen. Separating functional and parallel correctness using nondeterministic sequential specifications. In Hot Topics in Parallelism (HOTPAR), 2010. Position paper. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. R. Colvin, L. Groves, V. Luchangco, and M. Moir. Formal verification of a lazy concurrent list-based set algorithm. In Computer Aided Verification (CAV), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. T. Elmas, S. Qadeer, and S. Tasiran. A calculus of atomic actions. In Principles of Programming Languages (POPL), pages 2--15, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. A. Farzan and P. Madhusudan. Monitoring atomicity in concurrent programs. In Computer Aided Verification (CAV), pages 52--65, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. A. Finkel, B. Willems, and P. Wolper. A direct symbolic approach to model checking pushdown systems. In Workshop on Verification of Infinite State Systems (INFINITY), 1997.Google ScholarGoogle Scholar
  14. C. Flanagan and S. Qadeer. A type and effect system for atomicity. In Programming Language Design and Implementation (PLDI), 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. C. Flanagan, S. N. Freund, and S. Qadeer. Exploiting purity for atomicity. In International Symposium on Software Testing and Analysis (ISSTA), pages 221--231, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. C. Flanagan, S. N. Freund, and J. Yi. Velodrome: A sound and complete dynamic atomicity checker for multithreaded programs. In Programming Language Design and Implementation (PLDI), pages 293--303, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. C. Hammer, J. Dolby, M. Vaziri, and F. Tip. Dynamic detection of atomic-set-serializability violations. In International Conference on Software Engineering (ICSE), pages 231--240, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. M. Herlihy and N. Shavit. The Art of Multiprocessor Programming. Morgan Kaufmann, March 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. P. Herlihy and J. M. Wing. Linearizability: A correctness condition for concurrent objects. ACM Trans. Prog. Lang. Syst., 12: 463--492, July 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. A. Kaminsky. Parallel Java: A Unified API for Shared Memory and Cluster Parallel Programming in 100% Java. In Parallel and Distributed Processing Symposium (IPDPS), March 2007.Google ScholarGoogle Scholar
  21. M. Kulkarni, K. Pingali, B. Walter, G. Ramanarayanan, K. Bala, and L. P. Chew. Optimistic parallelism requires abstractions. In Programming Language Design and Implementation (PLDI), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. M. Kulkarni, M. Burtscher, C. Cascaval, and K. Pingali. Lonestar: A suite of parallel irregular programs. In International Symposium on Performance Analysis of Systems and Software, (ISPASS), April 2009.Google ScholarGoogle ScholarCross RefCross Ref
  23. Z. Lai, S. C. Cheung, and W. K. Chan. Detecting atomic-set serializability violations in multithreaded programs through active randomized testing. In International Conference on Software Engineering (ICSE), pages 235--244, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. R. J. Lipton. Reduction: A method of proving properties of parallel programs. Communications of the ACM, 18 (12): 717--721, 1975. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. S. Lu, J. Tucek, F. Qin, and Y. Zhou. AVIO: Detecting atomicity violations via access interleaving invariants. In Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. M. M. Michael and M. L. Scott. Simple, fast, and practical non-blocking and blocking concurrent queue algorithms. In Principles of Distributed Computing (PDOC), 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. R. H. B. Netzer and B. P. Miller. What are race conditions?: Some issues and formalizations. ACM Lett. Prog. Lang. Syst., 1 (1): 74--88, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. M. Olszewski, J. Ansel, and S. Amarasinghe. Kendo: Efficient deterministic multithreading in software. In Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 97--108, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. C. Papadimitriou. The theory of database concurrency control. Computer Science Press, Inc., 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. P. Prabhu, G. Ramalingam, and K. Vaswani. Safe programmable speculative parallelism. In Programming Language Design and Implementation (PLDI), pages 50--61, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. G. Ramalingam. Context-sensitive synchronization-sensitive analysis is undecidable. ACM Trans. Prog. Lang. Syst., 22 (2): 416--430, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. L. Rauchwerger and D. Padua. The lrpd test: speculative run-time parallelization of loops with privatization and reduction parallelization. In Programming Language Design and Implementation (PLDI), pages 218--232, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. M. C. Rinard and P. C. Diniz. Commutativity analysis: A new analysis framework for parallelizing compilers. In Programming Language Design and Implementation (PLDI), pages 54--67, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. C. Sadowski, S. Freund, and C. Flanagan. SingleTrack: A Dynamic Determinism Checker for Multithreaded Programs. In European Symposium on Programming (ESOP), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. J. Saltz, R. Mirchandaney, and K. Crowley. Run-time parallelization and scheduling of loops. Computers, IEEE Transactions on, 40 (5): 603 --612, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. K. Sen. Race directed random testing of concurrent programs. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'08), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. N. Shavit and D. Touitou. Software transactional memory. In Principles of Distributed Computing (PODC), pages 204--213, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. L. A. Smith, J. M. Bull, and J. Obdrzálek. A parallel Java Grande benchmark suite. In Supercomputing (SC), 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. R. K. Treiber. Systems programming: Coping with parallelism. Technical Report RJ 5118, IBM Almaden Research Center, Apr. 1986.Google ScholarGoogle Scholar
  40. V. Vafeiadis. Shape-value abstraction for verifying linearizability. In Verification, Model Checking, and Abstract Interpretation (VMCAI), pages 335--348, 2009. Google ScholarGoogle Scholar
  41. V. Vafeiadis, M. Herlihy, T. Hoare, and M. Shapiro. Proving correctness of highly-concurrent linearisable objects. In Principles and Practice of Parallel Programming (PPOPP), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. R. Vallée-Rai, P. Co, E. Gagnon, L. Hendren, P. Lam, and V. Sundaresan. Soot - a Java bytecode optimization framework. In Centre for Advanced Studies on Collaborative Research (CASCON), pages 125--135, 1999.Google ScholarGoogle Scholar
  43. M. Vaziri, F. Tip, and J. Dolby. Associating synchronization constraints with data in an object-oriented language. In Principles of Programming Languages (POPL), pages 334--345, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. M. Vechev, E. Yahav, and G. Yorsh. Experience with model checking linearizability. In SPIN Workshop on Model Checking Software, pages 261--278, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. M. Vechev, E. Yahav, R. Raman, and V. Sarkar. Verifying determinism of structured parallel programs. In Static Analysis Symposium (SAS), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. C. von Praun and T. R. Gross. Object race detection. In Object Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 70--82, 2001. Google ScholarGoogle Scholar
  47. C. von Praun, L. Ceze, and C. Caşcaval. Implicit parallelism with ordered transactions. In Principles and Practice of Parallel Programming (PPoPP), pages 79--89, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. L. Wang and S. D. Stoller. Runtime analysis of atomicity for multithreaded programs. IEEE Trans. Softw. Eng., 32: 93--110, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. J. M. Wing and C. Gong. Testing and verifying concurrent objects. J. Parallel Distrib. Comput., 17 (1--2): 164--182, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. NDSeq: runtime checking for nondeterministic sequential specifications of parallel correctness

                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 46, Issue 6
                  PLDI '11
                  June 2011
                  652 pages
                  ISSN:0362-1340
                  EISSN:1558-1160
                  DOI:10.1145/1993316
                  Issue’s Table of Contents
                  • cover image ACM Conferences
                    PLDI '11: Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation
                    June 2011
                    668 pages
                    ISBN:9781450306638
                    DOI:10.1145/1993498
                    • General Chair:
                    • Mary Hall,
                    • Program Chair:
                    • David Padua

                  Copyright © 2011 ACM

                  Publisher

                  Association for Computing Machinery

                  New York, NY, United States

                  Publication History

                  • Published: 4 June 2011

                  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!