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.
- }}http://intervals.inf.ethz.ch.Google Scholar
- }}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 Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}Z. Anderson, D. Gay, R. Ennals, and E. Brewer. SharC: checking data sharing strategies for multithreaded C. In phPLDI. ACM, 2008. Google Scholar
Digital Library
- }}N. E. Beckman, K. Bierhoff, and J. Aldrich. Verifying correct usage of atomic blocks and typestate. phSIGPLAN Not., 43 (10), 2008. Google Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}J. Boyland. Checking Interference with Fractional Permissions. In R. Cousot, editor, phStatic Analysis: 10th International Symposium, volume 2694 of phLNCS. Springer, 2003. Google Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}J. Dean and S. Ghemawat. MapReduce: simplified data processing on large clusters. In phOSDI. USENIX Association, 2004. Google Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}drich and Xia(2007)}delayedtypesM. F\"ahndrich and S. Xia. Establishing object invariants with delayed types. In phOOPSLA. ACM, 2007. Google Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}A. Greenhouse and W. L. Scherlis. Assuring and evolving concurrent programs: annotations and policy. In phICSE. ACM, 2002. Google Scholar
Digital Library
- }}D. Grossman. Type-safe Multithreading in Cyclone. In phTLDI. ACM, 2003. Google Scholar
Digital Library
- }}R. H. Halstead, Jr. MULTILISP: a language for concurrent symbolic computation. phACM Trans. Program. Lang. Syst., 7 (4), 1985. ISSN 0164-0925. Google Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}J. M. Lucassen and D. K. Gifford. Polymorphic effect systems. In phPOPL. ACM, 1988. Google Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}N. D. Matsakis and T. R. Gross. Thread Safety through Partitions and Effect Agreements. In phLCPC, 2008. Google Scholar
Digital Library
- }}N. D. Matsakis and T. R. Gross. Programming with Intervals. In phLCPC, 2009. Google Scholar
Digital Library
- }}}hips2010N. D. Matsakis and T. R. Gross. Handling Errors in Parallel Programs Based on Happens Before Relations. In phHIPS, 2010\natexlaba.Google Scholar
- }}}hotpar2010N. D. Matsakis and T. R. Gross. Reflective Parallel Programming. In phHotPar, 2010\natexlabb. Google Scholar
Digital Library
- }}M. Naik, A. Aiken, and J. Whaley. Effective static race detection for java. phSIGPLAN Not., 41 (6): 308--319, 2006. ISSN 0362--1340. Google Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}N. Nystrom, V. Saraswat, J. Palsberg, and C. Grothoff. Constrained types for object-oriented languages. In phOOPSLA. ACM, 2008. Google Scholar
Digital Library
- }}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 Scholar
- }}M. Odersky, L. Spoon, and B. Venners. phProgramming in Scala: A Comprehensive Step-by-step Guide. Artima Incorporation, USA, 2008. Google Scholar
Digital Library
- }}M. Rinard. phThe Design, Implementation and Evaluation of Jade, a Portable, Implicitly Parallel Programming Language. PhD thesis, Dept. of CS, Stanford University, 1994. Google Scholar
Digital Library
- }}T. Terauchi. Checking race freedom via linear programming. In phPLDI. ACM, 2008. Google Scholar
Digital Library
- }}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 Scholar
Digital Library
Index Terms
A time-aware type system for data-race protection and guaranteed initialization
Recommendations
A time-aware type system for data-race protection and guaranteed initialization
OOPSLA '10: Proceedings of the ACM international conference on Object oriented programming systems languages and applicationsWe 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 ...
Type-safe concurrent resource sharing
Concurrent systems often have many processes sharing a common set of resources, both memory regions and hardware devices. Among the many challenges in producing safe concurrent software are single access, atomic transactions, starvation, and deadlock. ...
Kard: lightweight data race detection with per-thread memory protection
ASPLOS '21: Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating SystemsFinding data race bugs in multi-threaded programs has proven challenging. A promising direction is to use dynamic detectors that monitor the program’s execution for data races. However, despite extensive work on dynamic data race detection, most ...







Comments