skip to main content
10.1145/353171.353197acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article
Free Access

Guava: a dialect of Java without data races

Authors Info & Claims
Published:01 October 2000Publication History

ABSTRACT

We introduce Guava, a dialect of Java whose rules statically guarantee that parallel threads access shared data only through synchronized methods. Our dialect distinguishes three categories of classes: (1) monitors, which may be referenced from multiple threads, but whose methods are accessed serially; (2) values, which cannot be referenced and therefore are never shared; and (3) objects, which can have multiple references but only from within one thread, and therefore do not need to be synchronized. Guava circumvents the problems associated with today's Java memory model, which must define behavior when concurrent threads access shared memory without synchronization.We present an overview of the syntax and the semantic rules of Guava. We discuss how implementations of Guava can exploit these rules to re-enable compiler optimizations inhibited by standard Java. We discuss how compilers for certain multiprocessor architectures can automatically generate certain programming idioms, such as double-check reads, as optimizations of serialized monitors.

References

  1. 1.ALPHA ARCHITECTURE COMMITTEE. Alpha Architecture Reference Manual, third ed. Digital Press, 1998.]]Google ScholarGoogle Scholar
  2. 2.BRINCH HANSEN, P. Structured multiprograxnming. Commun. ACM 15, 7 (July 1972), 574-578.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.BRINCH HANSEN, P. The programming language Concurrent Pascal. IEEE Trans. Softw. Eng. SE-1, 2 (June 1975), 199-207.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.BRINCH HANSEN, P. The Solo operating system. Software - Practice and Experience 6, 2 (Apr.-June 1976), 141-200.]]Google ScholarGoogle Scholar
  5. 5.BRINCH HANSEN, P. Java's insecure parallelism. SIG- PLAN Notices 34, 4 (Apr. 1999), 38-45.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.CARDELLI, L., DONAHUE, J., GLASSMAN, L., JORDAN, M., KALSOW, B., AND NELSON, G. Modula-3 report. Tech. Rep. ORC-1, Olivetti Research Center, 1988.]]Google ScholarGoogle Scholar
  7. 7.CHAN, E. C., BOYLAND, J. T., AND SCHERLIS, W. L. Promises: Limited specifications for analysis and manipulation. In Proceedings of the IEEE International Conference on Software Engineering (ICSE 98) (Apr. 1998), pp. 167-176.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8.DETLEFS, D. L., LEINO, K. R. M., NELSON, G., AND SAXE, J. B. Extended static checking. Tech. Rep. 159, Compaq Systems Research Center, http://www.resem'ch.digital.com/SRC, 1998.]]Google ScholarGoogle Scholar
  9. 9.FLANAGAN, C., AND ABADI, M. Object types against races. In CONCUR '99: Concurrency Theory, 10th International Conference (1999), Springer, pp. 288-303.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.FLANAGAN, C., AND ABADI, M. Types for safe locking. In Proceedings of the 8th European Symposium on Programming, ESOP '99 (Mar. 1999), Springer-Verlag, pp. 91-108.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11.FLANAGAN, C., AND FREUND, S. N. Type-based race detection for java. In Proceedings of the ACM SIG- PLAN 2000 Conference on Programming Language Design and hnplementation (June 2000).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12.GOSLING, J., JoY, B., AND STEELE, G. The Java Language Specification. Addison-Wesley, Reading, Mass., 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.HOARE, C. A. R. Monitors: An operating system structuring concept. Commun. ACM 17, 10 (Oct. 1974), 549-557.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14.HOARE, C. A. R. Communicating Sequential Processes. Prentice-Hall, Englewood Cliffs, New Jersey, 1985.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15.HOGG, J. Islands: Aliasing protection in objectoriented languages. In Proceedings of the 1991 ACM Conference on Object Oriented Programming @stems, Languages, and Applications (OOPSLA) (Phoenix, Arizona, Oct. 1991), ACM Press, New York, New York.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.HOLT, R. C. Concurrent Euclid, the Unix System, and Tunis. Addison-Wesley, Reading, Mass., 1983.]]Google ScholarGoogle Scholar
  17. 17.JONES, G. Programming in occam. Prentice-Hall, Englewood Cliffs, New Jersey, 1987.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 18.KUNG, H. T., AND ROBINSON, J. T. On optimistic methods for concurrency control. ACM Transactions on Database Systems 6, 2 (June 1981).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.LUCASSEN, J. M., AND GIFFORD, D. K. Polymorphic effect systems. In Conference Record of the Fifteenth Annual ACM Symposium on Principles of Programruing Languages (Jan. 1988), ACM SIGPLAN Notices, ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20.MAY, C., SILHA, E., SIMPSON, R., AND WARREN, H., Eds. The PowerPC Architecture. Morgan Kaufmann, 1994.]]Google ScholarGoogle Scholar
  21. 21.PUGH, W. Fixing the Java memory model. In Proceedings of the ACM Java Grande Conference (San Francisco, 1999).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. 22.REYNOLDS, J. C. Synactic control of interference. In Conference Record of the Fifth ACM Symposium on Principles of Programming Languages (Tucson, Arizona, Jan. 1978), ACM Press, New York, New York, pp. 39-46.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 23.SCHMIDT, D. C., AND HARRISON, T. Double-checked locking. In Pattern Languages of Program Design 3 (Reading, Mass., 1998), Addison-Wesley, pp. 363-375.]] Google ScholarGoogle Scholar
  24. 24.STROM, R. E., BACON, D. F., GOLDBERG, A., LOWRY, A., YELLIN, D., AND YEMINI, S. A. Hermes: A Language for Distributed Computing. Series in Innovative Technology. Prentice-Hall, Englewood Cliffs, New Jersey, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 25.WEAVER, D. L., AND GERMOND, T., Eds. The SPARC Architecture Manual, Version 9. Prentice Hall, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 26.WroTH, N. Design and implementation of Modula. Software - Practice and Experience 7, 1 (Jan.-Feb. 1977), 67-s4.]]Google ScholarGoogle Scholar
  27. 27.WroTH, N. Modula: a language for modular multiprogramming. Software - Practice and Experience 7, 1 (Jam-Feb. 1977), 3-35.]]Google ScholarGoogle Scholar

Index Terms

  1. Guava: a dialect of Java without data races

        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
        • Published in

          cover image ACM Conferences
          OOPSLA '00: Proceedings of the 15th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
          October 2000
          402 pages
          ISBN:158113200X
          DOI:10.1145/353171

          Copyright © 2000 ACM

          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]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 1 October 2000

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • Article

          Acceptance Rates

          Overall Acceptance Rate268of1,244submissions,22%

          Upcoming Conference

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader