skip to main content
research-article

A time-aware type system for data-race protection and guaranteed initialization

Published:17 October 2010Publication History
Skip Abstract Section

Abstract

We introduce a type system based on intervals, objects representing the time in which a block of code will execute. The type system can verify time-based properties such as when a field will be accessed or a method will be invoked.

One concrete application of our type system is data-race protection: For fields which are initialized during one phase of the program and constant thereafter, users can designate the interval during which the field is mutable. Code which happens after this initialization interval can safely read the field in parallel. We also support fields guarded by a lock and even the use of dynamic race detectors.

Another use for intervals is to designate different phases in the object's lifetime, such as a constructor phase. The type system then ensures that only appropriate methods are invoked in each phase.

References

  1. }}http://intervals.inf.ethz.ch.Google ScholarGoogle Scholar
  2. }}M. Abadi, C. Flanagan, and S. N. Freund. Types for safe locking: Static race detection for Java. phACM Trans. Program. Lang. Syst., 28 (2), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. }}M. D. Allen, S. Sridharan, and G. S. Sohi. Serialization sets: a dynamic dependence-based parallel execution model. In phPPoPP. ACM, 2009. ISBN 978--1--60558--397--6. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. }}Z. Anderson, D. Gay, R. Ennals, and E. Brewer. SharC: checking data sharing strategies for multithreaded C. In phPLDI. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. }}N. E. Beckman, K. Bierhoff, and J. Aldrich. Verifying correct usage of atomic blocks and typestate. phSIGPLAN Not., 43 (10), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. }}R. L. Bocchino, Jr., V. S. Adve, D. Dig, S. V. Adve, S. Heumann, R. Komuravelli, J. Overbey, P. Simmons, H. Sung, and M. Vakilian. A type and effect system for deterministic parallel java. In phOOPSLA. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. }}C. Boyapati, R. Lee, and M. Rinard. Ownership types for safe programming: preventing data races and deadlocks. In phOOPSLA. ACM, 2002. ISBN 1--58113--471--1. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. }}J. Boyland. Checking Interference with Fractional Permissions. In R. Cousot, editor, phStatic Analysis: 10th International Symposium, volume 2694 of phLNCS. Springer, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. }}val, Montesinos, and Torrellas}1353525L. Ceze, C. von Praun, C. Caşcaval, P. Montesinos, and J. Torrellas. Concurrency control with data coloring. In phMSPC. ACM, 2008. ISBN 978--1--60558-049--4. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. }}J. Dean and S. Ghemawat. MapReduce: simplified data processing on large clusters. In phOSDI. USENIX Association, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. }}D. Engler and K. Ashcraft. Racerx: effective, static detection of race conditions and deadlocks. phSIGOPS Oper. Syst. Rev., 37 (5): 237--252, 2003. ISSN 0163--5980. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. }}drich and Xia(2007)}delayedtypesM. F\"ahndrich and S. Xia. Establishing object invariants with delayed types. In phOOPSLA. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. }}C. Flanagan, S. N. Freund, M. Lifshin, and S. Qadeer. Types for atomicity: Static checking and inference for Java. phACM Trans. Program. Lang. Syst., 30 (4), 2008. ISSN 0164-0925. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. }}A. Greenhouse and W. L. Scherlis. Assuring and evolving concurrent programs: annotations and policy. In phICSE. ACM, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. }}D. Grossman. Type-safe Multithreading in Cyclone. In phTLDI. ACM, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. }}R. H. Halstead, Jr. MULTILISP: a language for concurrent symbolic computation. phACM Trans. Program. Lang. Syst., 7 (4), 1985. ISSN 0164-0925. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. }}B. Jacobs, F. Piessens, K. R. M. Leino, and W. Schulte. Safe Concurrency for Aggregate Objects with Invariants. In phSEFM. IEEE Computer Society, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. }}J. M. Lucassen and D. K. Gifford. Polymorphic effect systems. In phPOPL. ACM, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. }}er-Pedersen(1989)}virtualclassesO. L. Madsen and B. Møller-Pedersen. Virtual classes: a powerful mechanism in object-oriented programming. In phOOPSLA. ACM, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. }}N. D. Matsakis and T. R. Gross. Thread Safety through Partitions and Effect Agreements. In phLCPC, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. }}N. D. Matsakis and T. R. Gross. Programming with Intervals. In phLCPC, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. }}}hips2010N. D. Matsakis and T. R. Gross. Handling Errors in Parallel Programs Based on Happens Before Relations. In phHIPS, 2010\natexlaba.Google ScholarGoogle Scholar
  23. }}}hotpar2010N. D. Matsakis and T. R. Gross. Reflective Parallel Programming. In phHotPar, 2010\natexlabb. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. }}M. Naik, A. Aiken, and J. Whaley. Effective static race detection for java. phSIGPLAN Not., 41 (6): 308--319, 2006. ISSN 0362--1340. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. }}I. Neamtiu, M. Hicks, J. S. Foster, and P. Pratikakis. Contextual effects for version-consistent dynamic software updating and safe concurrent programming. phSIGPLAN Not., 43 (1), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. }}N. Nystrom, V. Saraswat, J. Palsberg, and C. Grothoff. Constrained types for object-oriented languages. In phOOPSLA. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. }}M. Odersky, V. Cremet, C. Röckl, and M. Zenger. A nominal theory of objects with dependent types. In phProc. FOOL 10, Jan. 2003.Google ScholarGoogle Scholar
  28. }}M. Odersky, L. Spoon, and B. Venners. phProgramming in Scala: A Comprehensive Step-by-step Guide. Artima Incorporation, USA, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. }}M. Rinard. phThe Design, Implementation and Evaluation of Jade, a Portable, Implicitly Parallel Programming Language. PhD thesis, Dept. of CS, Stanford University, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. }}T. Terauchi. Checking race freedom via linear programming. In phPLDI. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. }}M. Vaziri, F. Tip, and J. Dolby. Associating synchronization constraints with data in an object-oriented language. In phPOPL. ACM, 2006. ISBN 1--59593-027--2. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A time-aware type system for data-race protection and guaranteed initialization

      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

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!