Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/2338967.2336810acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
Article

Using program closures to make an application programming interface (API) implementation thread safe

Published: 16 July 2012 Publication History

Abstract

Consider a set of methods implementing an Application Programming Interface (API) of a given library or program module that is to be used in a multithreaded setting. If those methods were not originally designed to be thread safe, races and deadlocks are expected to happen. This work introduces the novel concept of program closure and describes how it can be applied in a methodology used to make the library or module implementation thread safe, by identifying the high level data races introduced by interleaving the parallel execution of methods from the API. High-level data races result from the misspecification of the scope of an atomic block, by wrongly splitting it into two or more atomic blocks sharing a data dependency.
Roughly speaking, the closure of a program P, clos(P), is obtained by incrementally adding new threads to P in such a way that enables the identification of the potential high level data races that may result from running P in parallel with other programs.
Our model considers the methods implementing the API of a library of program module as concurrent programs and computes and analyses their closure in order to identify high level data races. These high level data races are inspected and removed to make the interface thread safe. We illustrate the application of this methodology with a simple use case.

References

[1]
Artho, C., Havelund, K., Biere, A.: High-level data races. Software Testing, Verification and Reliability 13(4), 207-227 (Dec 2003).
[2]
Lourenço, J., Sousa, D., Teixeira, B.C., Dias, R.J.: Detecting concurrency anomalies in transactional memory programs. Comput. Sci. Inf. Syst. 8(2), 533-548 (2011).
[3]
Pessanha, V., Dias, R.J., Lourenço, J.M., Farchi, E., Sousa, D.: Practical verification of high-level dataraces in transactional memory programs. In: Proceedings of the Workshop on Parallel and Distributed Systems: Testing, Analysis, and Debugging. pp. 26-34. PADTAD'11, ACM, New York, NY, USA (2011), http://doi.acm.org/10.1145/2002962.2002968
[4]
von Praun, C., Gross, T.R.: Static detection of atomicity violations in object-oriented programs. Journal of Object Technology 3(6), 103-122 (Jun 2004), http://www.jot.fm/contents/issue_2004_06/ article5.html, workshop on Formal Techniques for Java-like Programs (FTfJP), ECOOP 2003.
[5]
Shacham, O., Bronson, N., Aiken, A., Sagiv, M., Vechev, M., Yahav, E.: Testing atomicity of composed concurrent operations. In: Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications. pp. 51-64. OOPSLA'11, ACM, New York, NY, USA (2011), http://doi.acm.org/10.1145/2048066.2048073
[6]
Wang, L., Stoller, S.: Run-Time Analysis for Atomicity. Electronic Notes in Theoretical Computer Science 89(2), 191-209 (Oct 2003).

Cited By

View all
  • (2017)Verifying Concurrent Programs Using Contracts2017 IEEE International Conference on Software Testing, Verification and Validation (ICST)10.1109/ICST.2017.25(196-206)Online publication date: Mar-2017

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PADTAD 2012: Proceedings of the 2012 Workshop on Parallel and Distributed Systems: Testing, Analysis, and Debugging
July 2012
46 pages
ISBN:9781450314565
DOI:10.1145/2338967
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

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 16 July 2012

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Conference

ISSTA '12
Sponsor:

Upcoming Conference

ISSTA '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 08 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2017)Verifying Concurrent Programs Using Contracts2017 IEEE International Conference on Software Testing, Verification and Validation (ICST)10.1109/ICST.2017.25(196-206)Online publication date: Mar-2017

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