Skip to main content

Type Inference for Parameterized Race-Free Java

  • Conference paper
Verification, Model Checking, and Abstract Interpretation (VMCAI 2004)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2937))

Abstract

We study the type system introduced by Boyapati and Rinard in their paper “A Parameterized Type System for Race-Free Java Programs” and try to infer the type annotations (“lock types”) needed by their type checker to show that a program is free of race conditions. Boyapati and Rinard automatically generate some of these annotations using default types and static inference of lock types for local variables, but in practice, the programmer still needs to annotate on the order of 1 in every 25 lines of code. We use run-time techniques, based on the lockset algorithm, in conjunction with some static analysis to automatically infer most or all of the annotations.

This work was supported in part by NSF under Grant CCR-9876058 and ONR under Grants N00014-01-1-0109 and N00014-02-1-0363. Authors’ Email:{ragarwal,stoller}@cs.sunysb.edu Web: http://www.cs.sunysb.edu/~ragarwal http://www.cs.sunysb.edu/~stoller

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aldrich, J., Kostadinov, V., Chambers, C.: Alias annotations for program understanding. In: Proc. 17th ACM Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), ACM Press, New York (2002)

    Google Scholar 

  2. Agarwal, R., Stoller, S.D.: Type inference for parameterized racefree Java. Technical Report DAR 03–10, Computer Science Department, SUNY at Stony Brook (October 2003)

    Google Scholar 

  3. Boyapati, C., Rinard, M.C.: A parameterized type system for race-free Java programs. In: Proc. 16th ACM Conference on Object- Oriented Programming, Systems, Languages and Applications (OOPSLA). SIGPLAN Notices, vol. 36(11), pp. 56–69. ACM Press, New York (2001)

    Chapter  Google Scholar 

  4. Cousot, P., Cousot, R.: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Conference Record of the Fourth Annual ACM Symposium on Principles of Programming Languages, pp. 238–252 (1977)

    Google Scholar 

  5. Ernst, M.D.: Dynamically Discovering Likely Program Invariants. PhD thesis, University of Washington, Department of Computer Science and Engineering (2000)

    Google Scholar 

  6. Flanagan, C., Freund, S.: Type-based race detection for Java. In: Proc. ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pp. 219–232. ACM Press, New York (2000)

    Chapter  Google Scholar 

  7. Flanagan, C., Freund, S.: Detecting race conditions in large programs. In: Workshop on Program Analysis for Software Tools and Engineering (PASTE), June 2001, pp. 90–96. ACM Press, New York (2001)

    Chapter  Google Scholar 

  8. Foster, J.S., Terauchi, T., Aiken, A.: Flow-sensitive type qualifiers. In: Proc. ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), ACM Press, New York (2002)

    Google Scholar 

  9. Grossman, D.: Type-safe multithreading in Cyclone. In: Proc. ACM SIGPLAN International Workshop on Types in Languages Design and Implementation (TLDI), pp. 13–25. ACM Press, New York (2003)

    Chapter  Google Scholar 

  10. Hallem, S., Chelf, B., Xie, Y., Engler, D.: A system and language for building system-specific, static analyses. In: Proc. ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pp. 69–82. ACM Press, New York (2002)

    Google Scholar 

  11. Naik, M., Palsberg, J.: A type system equivalent to a model checker. Master’s thesis, Purdue University (2003)

    Google Scholar 

  12. Savage, S., Burrows, M., Nelson, G., Sobalvarro, P., Anderson, T.E.: Eraser: A dynamic data race detector for multithreaded programs. ACM Transactions on Computer Systems 15(4), 391–411 (1997)

    Article  Google Scholar 

  13. von Praun, C., Gross, T.R.: Object race detection. In: Proc. 16th ACM Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), October 2001. SIGPLAN Notices, vol. 36(11), pp. 70–82. ACM Press, New York (2001)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Agarwal, R., Stoller, S.D. (2004). Type Inference for Parameterized Race-Free Java. In: Steffen, B., Levi, G. (eds) Verification, Model Checking, and Abstract Interpretation. VMCAI 2004. Lecture Notes in Computer Science, vol 2937. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24622-0_14

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-24622-0_14

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-20803-7

  • Online ISBN: 978-3-540-24622-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics