Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/1111037.1111067acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article

Associating synchronization constraints with data in an object-oriented language

Published: 11 January 2006 Publication History

Abstract

Concurrency-related bugs may happen when multiple threads access shared data and interleave in ways that do not correspond to any sequential execution. Their absence is not guaranteed by the traditional notion of "data race" freedom. We present a new definition of data races in terms of 11 problematic interleaving scenarios, and prove that it is complete by showing that any execution not exhibiting these scenarios is serializable for a chosen set of locations. Our definition subsumes the traditional definition of a data race as well as high-level data races such as stale-value errors and inconsistent views. We also propose a language feature called atomic sets of locations, which lets programmers specify the existence of consistency properties between fields in objects, without specifying the properties themselves. We use static analysis to automatically infer those points in the code where synchronization is needed to avoid data races under our new definition. An important benefit of this approach is that, in general, far fewer annotations are required than is the case with existing approaches such as synchronized blocks or atomic sections. Our implementation successfully inferred the appropriate synchronization for a significant subset of Java's Standard Collections framework.

References

[1]
Gul Agha. An overview of actor languages. In Proceedings of the 1986 SIGPLAN workshop on Object-oriented programming, pages 58--67, New York, NY, USA, 1986.
[2]
C. S. Ananian and M. Rinard. Language-level transactions. In High-Performance Embedded Computing (HPEC), 2004.
[3]
C. Artho, K. Havelund, and A. Biere. High-level data races. In Proc. NDDL/VVEIS'03, pages 82--93, 2003.
[4]
C. Artho, K. Havelund, and A. Biere. Using block-local atomicity to detect stale-value concurrency errors. In ATVA'04, pages 150--164, 2004.
[5]
D. F. Bacon, R. E. Strom, and A. Tarafdar. Guava: A dialect of Java without data races. In Proc. OOPSLA'00, pages 382--400, 2000.
[6]
D. Bäumer, E. Gamma, and Adam Kieÿ zun. Integrating refactoring support into a Java development tool. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) Companion, October 2001.
[7]
H. Berenson, P. Bernstein, J. Gray, J. Melton, E. O'Neil, and P. O'Neil. A critique of ANSI SQL isolation levels. In Proc. ACM SIGMOD Conf., pages 1--10, 1995.
[8]
P. Bernstein, V. Hadzilacos, and N. Goodman. Concurrency Control and Recovery in Database Systems. Addison-Wesley, 1987.
[9]
C. Boyapati and M. Rinard. A parameterized type system for race-free Java programs. In Proc. OOPSLA'01, October 2001.
[10]
M. Burrows and K. R. M. Leino. Finding stale-value errors in concurrent programs. Technical Report 2002-004, SRC, May 2002.
[11]
Philippe Charles, Christopher Donawa, Kemal Ebcioglu, Christian Grothoff, Allan Kielstra, Vijay Saraswat, Vivek Sarkar, and Christoph von Praun. X10: An object-oriented approach to non-uniform cluster computing. In Proc. OOPSLA'05, San Diego, CA, 2005. To appear.
[12]
A. Chien, U. Reddy, J. Plevyak, and J. Dolby. ICC++ - A C++ dialect for high performance parallel computing. Lecture Notes in Computer Science, 1049:76--95, 1996.
[13]
Andrew A. Chien and William J. Dally. Concurrent aggregates (ca). In Proc. PPoPP '90, pages 187--196, 1990.
[14]
X. Deng, M. Dwyer, J. Hatcliff, and M. Mizuno. Invariant-based specification, synthesis, and verification of synchronization in concurrent programs. In Proc. ICSE'02, May 2002.
[15]
D. Engler and K. Ashcraft. Racerx: Effective, static detection of race conditions and deadlocks. In Proc. SOSP'03, pages 237--252, October 2003.
[16]
S. Fink, J. Dolby, and L. Colby. Semi-automatic J2EE transaction configuration. Technical Report RC23326, IBM T.J. Watson Research Center, March 2004.
[17]
C. Flanagan. Verifying commit-atomicity using model checking. In Proc. SPIN'04, pages 252--266, 2004.
[18]
C. Flanagan, S. Freund, and M. Lifshin. Type inference for atomicity. In Proc. TLDI'05, pages 47--58, 2005.
[19]
C. Flanagan and S. N. Freund. Type-based race detection for Java. In Proc. PLDI'00, pages 219--232, 2000.
[20]
C. Flanagan and S. N. Freund. Atomizer: A dynamic atomicity checker for multithreaded programs. In Proc. POPL'04, pages 256--267, 2004.
[21]
C. Flanagan and S. Qadeer. A type and effect system for atomicity. In Proc. PLDI'03, pages 338--349, 2003.
[22]
C. Flanagan and S. Qadeer. Types for atomicity. In Proc. TLDI'03, pages 1--12, 2003.
[23]
T. Harris and K. Fraser. Language support for lightweight transactions. In Proc. OOPSLA'03, pages 388--402, 2003.
[24]
T. Harris, S. Marlow, S. Peyton-Jones, and M. Herlihy. Composable memory transactions. In Proc. PPoPP'05, 2005.
[25]
J. Hatcliff, Robby, and M. B. Dwyer. Verifying atomicity specifications for concurrent object-oriented software using model checking. In Proc. VMCAI'04, pages 175--190, 2004.
[26]
Gary A. Kildall. A unified approach to global program optimization. In Proc. POPL'73, pages 194--206, 1973.
[27]
K. R. M. Leino. Data groups: Specifying the modification of extended state. In Proc. OOPSLA'98, pages 144--153, 1998.
[28]
K. R. M. Leino, J. B. Saxe, and R. Stata. Checking Java programs via guarded commands. Technical Report 002, Compaq SRC, 1999.
[29]
R. J. Lipton. Reduction: A method of proving properties of parallel programs. CACM, 18(12), 1975.
[30]
R. O'Callahan and J.-D. Choi. Hybrid dynamic data race detection. In Proc. PPoPP'03, pages 167--178, 2003.
[31]
Java Community Process. JSR 166: Concurrency utilities. See http://gee.cs.oswego.edu/dl/concurrency-interest/index.html., September 2004.
[32]
A. Sasturkar, R. Agarwal, L. Wang, and S. Stoller. Automated type-based analysis of data races and atomicity. In Proc. PPoPP'05, 2005.
[33]
S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: a dynamic data race detector for multi-threaded programs. In Proc. SOSP'97, pages 27--37, October 1997.
[34]
C. von Praun and T. Gross. Static detection of atomicity violations in object-oriented programs. Journal of Object Technology, 3(2), 2004.
[35]
Liqiang Wang and Scott D. Stoller. Runtime analysis for atomicity for multi-threaded programs. Technical Report DAR-04-14, State University of New York At Stony Brook, May 2005.
[36]
A. Welc, S. Jagannathan, and A. Hosking. Transactional monitors for concurrent objects. In Proc. ECOOP'04, pages 519--542, 2004.
[37]
ANSI X3.135-1992. In American National Standard for Information Systems -- Database Language -- SQL, November 1992.
[38]
M. Xu, R. Bodik, and M. Hill. A serializability violation detector for shared-memory server programs. In Proc. PLDI'05, pages 1--14, 2005.

Cited By

View all
  • (2024)Predictive Monitoring against Pattern Regular LanguagesProceedings of the ACM on Programming Languages10.1145/36329158:POPL(2191-2225)Online publication date: 5-Jan-2024
  • (2023)When Concurrency Matters: Behaviour-Oriented ConcurrencyProceedings of the ACM on Programming Languages10.1145/36228527:OOPSLA2(1531-1560)Online publication date: 16-Oct-2023
  • (2023)AtomiS: Data-Centric Synchronization Made PracticalProceedings of the ACM on Programming Languages10.1145/36228017:OOPSLA2(116-145)Online publication date: 16-Oct-2023
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '06: Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
January 2006
432 pages
ISBN:1595930272
DOI:10.1145/1111037
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 41, Issue 1
    Proceedings of the 2006 POPL Conference
    January 2006
    421 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1111320
    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 January 2006

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. concurrent object-oriented programming
  2. data races
  3. programming model
  4. serializability

Qualifiers

  • Article

Conference

POPL06

Acceptance Rates

Overall Acceptance Rate 824 of 4,130 submissions, 20%

Upcoming Conference

POPL '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)18
  • Downloads (Last 6 weeks)1
Reflects downloads up to 14 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Predictive Monitoring against Pattern Regular LanguagesProceedings of the ACM on Programming Languages10.1145/36329158:POPL(2191-2225)Online publication date: 5-Jan-2024
  • (2023)When Concurrency Matters: Behaviour-Oriented ConcurrencyProceedings of the ACM on Programming Languages10.1145/36228527:OOPSLA2(1531-1560)Online publication date: 16-Oct-2023
  • (2023)AtomiS: Data-Centric Synchronization Made PracticalProceedings of the ACM on Programming Languages10.1145/36228017:OOPSLA2(116-145)Online publication date: 16-Oct-2023
  • (2023)Achieving High MAP-Coverage Through Pattern Constraint ReductionIEEE Transactions on Software Engineering10.1109/TSE.2022.314448049:1(99-112)Online publication date: 1-Jan-2023
  • (2023)Davida: A Decentralization Approach to Localizing Transaction Sequences for Debugging Transactional Atomicity ViolationsIEEE Transactions on Reliability10.1109/TR.2022.317668072:2(808-826)Online publication date: Jun-2023
  • (2021)Automatically enforcing fresh and consistent inputs in intermittent systemsProceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3453483.3454081(851-866)Online publication date: 19-Jun-2021
  • (2021)Statically driven generation of concurrent tests for thread‐safe classesSoftware Testing, Verification and Reliability10.1002/stvr.177431:4Online publication date: 4-May-2021
  • (2020)Interactive debugging of concurrent programs under relaxed memory modelsProceedings of the 18th ACM/IEEE International Symposium on Code Generation and Optimization10.1145/3368826.3377910(68-80)Online publication date: 22-Feb-2020
  • (2019)Disclosing and Locating Concurrency Bugs of Interrupt-Driven IoT ProgramsIEEE Internet of Things Journal10.1109/JIOT.2019.29252916:5(8945-8957)Online publication date: Oct-2019
  • (2019)Coverage-Driven Test Generation for Thread-Safe Classes via Parallel and Conflict Dependencies2019 12th IEEE Conference on Software Testing, Validation and Verification (ICST)10.1109/ICST.2019.00034(264-275)Online publication date: Apr-2019
  • 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

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media