Abstract
We propose a type system to guarantee safe resource deallocation for shared-memory concurrent programs by extending the previous type system based on fractional ownerships. Here, safe resource deallocation means that memory cells, locks, or threads are not left allocated when a program terminates. Our framework supports (1) fork/join parallelism, (2) synchronization with locks, and (3) dynamically allocated memory cells and locks. The type system is proved to be sound. We also provide a type inference algorithm for the type system and a prototype implementation of the algorithm.
- M. Abadi, C. Flanagan, and S. N. Freund. Types for safe locking: Static race detection for Java. ACM Trans. Prog. Lang. Syst., 28(2):207--255, Mar. 2006. Google Scholar
Digital Library
- R. Bornat, C. Calcagno, P. W. O'Hearn, and M. J. Parkinson. Permission accounting in separation logic. In Proc. of POPL, pages 259--270. ACM Press, Jan. 2005. Google Scholar
Digital Library
- J. Boyland. Checking interference with fractional permissions. In Proceedings of SAS 2003, volume 2694 of LNCS, pages 55--72. Springer-Verlag, 2003. Google Scholar
Digital Library
- C. Calcagno, D. Distefano, and V. Vafeiadis. Bi-abductive resource invariant synthesis. In Proceedings of APLAS 2009, pages 259--274, 2009. Google Scholar
Digital Library
- L. De Moura and N. Bjørner. Z3: an efficient SMT solver. In Proceedings of the Theory and practice of software, 14th international conference on Tools and algorithms for the construction and analysis of systems, TACAS'08/ETAPS'08, pages 337--340. Springer-Verlag, 2008. Google Scholar
Digital Library
- A. Gotsman, J. Berdine, B. Cook, N. Rinetzky, and M. Sagiv. Local reasoning for storable locks and threads. Technical Report MSR-TR-2007-39, Microsoft Research, 2007.Google Scholar
Cross Ref
- C. Haack, M. Huisman, and C. Hurlinc. Permission-based separation logic for multithreaded Java programs. http://fmt.cs.utwente.nl/files/projects/VerCors.p1.pdf.Google Scholar
- D. L. Heine and M. S. Lam. A practical flow-sensitive and context-sensitive C and C++ memory leak detector. In Proc. of PLDI, pages 168--181, 2003. Google Scholar
Digital Library
- IEEE. The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition, 2004. http://pubs.opengroup.org/onlinepubs/000095399/basedefs/pthread.h.html.Google Scholar
- P. W. O'Hearn. Resources, concurrency, and local reasoning. Theor. Comput. Sci., 375(1-3):271--307, 2007. Google Scholar
Digital Library
- B. C. Pierce. Types and Programming Languages. MIT Press, 2002. Google Scholar
Digital Library
- K. Suenaga. Type-based deadlock-freedom verification for non-block-structured lock primitives and mutable references. In G. Ramalingam, editor, Programming Languages and Systems, 6th Asian Symposium, APLAS 2008, Bangalore, India, volume 5536 of LNCS, pages 155--170. Springer, Dec. 2008. Google Scholar
Digital Library
- K. Suenaga and N. Kobayashi. Fractional ownerships for safe memory deallocation. In Z. Hu, editor, Programming Languages and Systems, 7th Asian Symposium, APLAS 2009, volume 5904 of Lecture Notes in Computer Science, pages 128--143. Springer-Verlag, Dec. 2009. Google Scholar
Digital Library
- N. Swamy, M. W. Hicks, G. Morrisett, D. Grossman, and T. Jim. Safe manual memory management in Cyclone. Sci. Comput. Program., 62(2):122--144, 2006. Google Scholar
Digital Library
- T. Terauchi. Checking race freedom via linear programming. In Proc. of PLDI, pages 1--10, 2008. Google Scholar
Digital Library
- M. Tofte and J.-P. Talpin. Region-based memory manage-ment. Info. Comput., 132(2):109--176, 1997. Google Scholar
Digital Library
- K. Ueda. Resource-passing concurrent programs. In Proceedings of 4th International Symposium on Theoretical Aspects of Computer Science (TACS2001), volume 2215 of LNCS, pages 95--126. Springer-Verlag, 2001. Google Scholar
Digital Library
- D. Walker, K. Crary, and J. G. Morrisett. Typed memory management via static capabilities. ACM Trans. Prog. Lang. Syst., 22(4):701--771, 2000. Google Scholar
Digital Library
Index Terms
Type-based safe resource deallocation for shared-memory concurrency
Recommendations
Type-based safe resource deallocation for shared-memory concurrency
OOPSLA '12: Proceedings of the ACM international conference on Object oriented programming systems languages and applicationsWe propose a type system to guarantee safe resource deallocation for shared-memory concurrent programs by extending the previous type system based on fractional ownerships. Here, safe resource deallocation means that memory cells, locks, or threads are ...
Types for atomicity: Static checking and inference for Java
Atomicity is a fundamental correctness property in multithreaded programs. A method is atomic if, for every execution, there is an equivalent serial execution in which the actions of the method are not interleaved with actions of other threads. Atomic ...
Safe privatization in transactional memory
PPoPP '18Transactional memory (TM) facilitates the development of concurrent applications by letting the programmer designate certain code blocks as atomic. Programmers using a TM often would like to access the same data both inside and outside transactions, ...







Comments