Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

Detecting Read-Only Methods in Java

  • Conference paper
  • First Online:
Languages, Compilers, and Run-Time Systems for Scalable Computers (LCR 2000)

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

  • 287 Accesses

Abstract

One typically defines a read-only method as a method that does not perform any write operations; however, with respect to a multi-threaded program, we augment this interpretation and let a read-only method be one that does not write to a memory location visible to more than one thread. Such a method can execute concurrently with other read-only methods. With the relaxation of mutual exclusion in mind, we present a read-write analysis that employs the ideas of shape analysis and escape analysis to identify read- only methods in Java. Approximately 31% of the methods in the JDK 1.2 core libraries meets this definition of read-only-nearly 50% more than those that do not perform any write operations.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

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.

Similar content being viewed by others

References

  1. Jonathan Aldrich, Craig Chambers, Emin Gun Sirer, and Susan Eggers. Static Analyses for Eliminating Unnecessary Synchronization from Java Programs. In Proceedings of the Sixth International Static Analysis Symposium (SAS ’99), Venezia, Italy, September 1999.

    Google Scholar 

  2. Bruno Blanchet. Escape Analysis for Object-Oriented Languages. Application to Java. In Proceedings of Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA ’99), pages 20–34, Denver, Colorado, 1-5 November 1999.

    Google Scholar 

  3. Jeff Bogda and Urs Hölzle. Removing Unnecessary Synchronization in Java. In Proceedings of Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA ’99), pages 35–46, Denver, Colorado, 1-5 November 1999.

    Google Scholar 

  4. J.-D. Choi, M. Gupta, M. Serrano, V. C. Sreedhar, and S. Midkiff. Escape Analysis for Java. In Proceedings of Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA ’99), pages 1–19, Denver, Colorado, 1-5 November 1999.

    Google Scholar 

  5. James C. Corbett. Using Shape Analysis to Reduce Finite-State Models of Concurrent Java Programs. Technical Report ICS-TR-98-20, Department of Information and Computer Science, University of Hawaii, 14 October 1998.

    Google Scholar 

  6. Rakesh Ghiya and Laurie J. Hendren. Is it a Tree, a DAG, or a Cyclic Graph? A Shape Analysis for Heap-Directed Pointers in C. In Conference Record of the 23rd ACM SIGPLANSIGACT Symposium on Principles of Programming Languages (POPL ’96), pages 1–15, St. Petersburg Beach, Florida, 21-24 January 1996.

    Google Scholar 

  7. James Gosling, Bill Joy, and Guy Steele. The Java Language Specification. Addison-Wesley: Berkeley, California, 1996.

    Google Scholar 

  8. Ilya Lipkind, Igor Pechtchanski, and Vijay Karamcheti. Object Views: Language Support for Intelligent Object Caching in Parallel and Distributed Computations.In Proceedings of Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA ’99), pages 447–460, Denver, Colorado, 1-5 November 1999.

    Google Scholar 

  9. Martin C. Rinard and Pedro C. Diniz. Commutativity Analysis: A New Analysis Technique for Parallelizing Compilers. ACM Transactions on Programming Languages and Systems, pages 942–991, Volume 19, Number 6, November 1997.

    Article  Google Scholar 

  10. Mooly Sagiv, Thomas Reps, and Reinhard Wilhelm. Solving Shape-Analysis Problems in Languages with Destructive Updating. In Conference Record of the 23rd ACM Symposium on Principles of Programming Languages (POPL ’96), pages 16–31, St. Petersburg Beach, Florida, 21-24 January 1996.

    Google Scholar 

  11. Bjarne Stroustrup. The C ++ Programming Language, Third Edition. Addison-Wesley: Berkeley, California, 1997.

    Google Scholar 

  12. John Whaley and Martin Rinard. Compositional Pointer and Escape Analysis for Java Programs. In Proceedings of Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA ’99), pages 187–206, Denver, Colorado, 1-5 November 1999.

    Google Scholar 

  13. Reinhard Wilhelm, Mooly Sagiv, and Thomas Reps. Shape Analysis. In Proceedings of the Conference on Compiler Construction, Berlin, Germany, 27 March-2 April 2000.

    Google Scholar 

  14. Masahiro Yasugi, Shigeyuki Eguchi, and Kazuo Taki. Eliminating Bottlenecks on Parallel Systems using Adaptive Objects. In Proceedings of the International Conference on Parallel Architectures and Compilation Techniques (PACT ’98), pages 80–87, Paris, France, 12-18 October 1998.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2000 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bogda, J. (2000). Detecting Read-Only Methods in Java. In: Dwarkadas, S. (eds) Languages, Compilers, and Run-Time Systems for Scalable Computers. LCR 2000. Lecture Notes in Computer Science, vol 1915. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-40889-4_11

Download citation

  • DOI: https://doi.org/10.1007/3-540-40889-4_11

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

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

  • Online ISBN: 978-3-540-40889-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics