Refined Ownership:

Fine-Grained Controlled Internal Sharing
  • Elias Castegren
  • Johan ÖstlundEmail author
  • Tobias Wrigstad
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9104)


Ownership type systems give a strong notion of separation between aggregates. Objects belonging to different owners cannot be aliased, and thus a mutating operation internal to one object is guaranteed to be invisible to another. This naturally facilitates reasoning about correctness on a local scale, but also proves beneficial for coarse-grained parallelism as noninterference between statements touching differentobjects is easily established. For fine-grained parallelism, ownership types fall short as owner-based disjointness only allows separation of the innards of different aggregates, which is very coarse-grained. Concretely: ownership types can reason about the disjointness of two different data structures, but cannot reason about the internal structure or disjointness within the data structure, without resorting to static and overly constraining measures. For similar reasons, ownership fails to determine internal disjointness of external pointers to objects that share a common owner.

In this paper, we introduce the novel notion of refined ownership which overcomes these limitations by allowing precise local reasoning about a group of objects even though they belong to the same external owner. Using refined ownership, we can statically check determinism of parallel operations on tree-shaped substructures of a data structure, including operations on values external to the structure, without imposing any non-local alias restrictions.


Parallel Programming Active Object External Region Parallel Operation Object Graph 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    Aldrich, J., Chambers, C.: Ownership domains: separating aliasing policy from mechanism. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 1–25. Springer, Heidelberg (2004) CrossRefGoogle Scholar
  2. 2.
    Bocchino, R.: An effect system and language for deterministic-by-default parallel programming, 2010. Ph.D. thesis, University of Illinois at Urbana-Champaign (2010)Google Scholar
  3. 3.
    Bocchino Jr., R.L., Adve, V.S.: Types, regions, and effects for safe programming with object-oriented parallel frameworks. In: Mezini, M. (ed.) ECOOP 2011. LNCS, vol. 6813, pp. 306–332. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  4. 4.
    Bocchino, R., Adve, V.S., Dig, D., Adve, S.V., Heumann, S., Komuravelli, R., Overbey, J., Simmons, P., Sung, H., Vakilian, M.: A type and effect system for deterministic parallel Java. In: OOPSLA, pp. 97–116 (2009)Google Scholar
  5. 5.
    Bocchino, R., Aldrich, J.: Reference groups for local uniqueness. Technical report, CMU (to appear)Google Scholar
  6. 6.
    Boyland, J.: Alias burying: unique variables without destructive reads. Softw. Pract. Exp. 31(6), 533–553 (2001)CrossRefzbMATHGoogle Scholar
  7. 7.
    Boyland, J.T., Retert, W.: Connecting effects and uniqueness with adoption. In: POPL, pp. 283–295 (2005)Google Scholar
  8. 8.
    Castegren. E.: Laps : a general framework for modeling alias management using access permission sets, Master thesis (2012)Google Scholar
  9. 9.
    Cavé, V., Zhao, J., Shirako, J., Sarkar, V.: Habanero-java: the new adventures of old x10. In: Proceedings of the 9th International Conference on Principles and Practice of Programming in Java, PPPJ 2011, pp. 51–61. ACM, New York (2011)Google Scholar
  10. 10.
    Clarke, D.: Object ownership and containment. Ph.D. thesis, School of Computer Science and Engineering, University of New South Wales, Australia (2002)Google Scholar
  11. 11.
    Clarke, D., Wrigstad, T.: External uniqueness is unique enough. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 176–200. Springer, Heidelberg (2003) CrossRefGoogle Scholar
  12. 12.
    Clarke, D., Wrigstad, T., Östlund, J., Johnsen, E.B.: Minimal ownership for active objects. In: Ramalingam, G. (ed.) APLAS 2008. LNCS, vol. 5356, pp. 139–154. Springer, Heidelberg (2008) CrossRefGoogle Scholar
  13. 13.
    Clarke, D., Östlund, J., Sergey, I., Wrigstad, T.: Ownership types: a survey. In: Clarke, D., Noble, J., Wrigstad, T. (eds.) Aliasing in Object-Oriented Programming. LNCS, vol. 7850, pp. 15–58. Springer, Heidelberg (2013) Google Scholar
  14. 14.
    Clarke, D.G., Drossopoulou, S.: Ownership, encapsulation and the disjointness of type and effect. In: OOPSLA, pp. 292–310 (2002)Google Scholar
  15. 15.
    Clarke, D.G., Potter, J., Noble, J.: Ownership types for flexible alias protection. In: OOPSLA, pp. 48–64 (1998)Google Scholar
  16. 16.
    Craik, A., Kelly, W.: Using ownership to reason about inherent parallelism in object-oriented programs. In: Gupta, R. (ed.) CC 2010. LNCS, vol. 6011, pp. 145–164. Springer, Heidelberg (2010) CrossRefGoogle Scholar
  17. 17.
    Cunningham, D., Drossopoulou, S., Eisenbach, S.: Universes for Race Safety (2007)Google Scholar
  18. 18.
    Dietl, W.M.: Universe Types: Topology, Encapsulation, Genericity, and Tools. Ph.D., Department of Computer Science, ETH Zurich, Doctoral Thesis ETH No. 18522, December 2009Google Scholar
  19. 19.
    Fähndrich, M., DeLine, R.: Adoption and focus: practical linear types for imperative programming. In: PLDI, pp. 13–24 (2002)Google Scholar
  20. 20.
    Gordon, C.S., Parkinson, M.J., Parsons, J., Bromfield, A., Duffy, J.: Uniqueness and reference immutability for safe parallelism. In: OOPSLA, pp. 21–40 (2012)Google Scholar
  21. 21.
    Greenhouse, A., Boyland, J.: An object-oriented effects system. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, pp. 205–229. Springer, Heidelberg (1999)Google Scholar
  22. 22.
    Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight java: a minimal core calculus for Java and GJ. ACM Trans. Program. Lang. Syst. 23(3), 396–450 (2001)CrossRefGoogle Scholar
  23. 23.
    Lee, J.K., Palsberg, J.: Featherweight x10: a core calculus for async-finish parallelism. In: PPOPP, pp. 25–36 (2010)Google Scholar
  24. 24.
    Lu, Y.: A type system for reachability and acyclicity. In: Gao, X.-X. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 479–503. Springer, Heidelberg (2005) CrossRefGoogle Scholar
  25. 25.
    Lu, Y., Potter, J., Xue, J.: Ownership types for object synchronisation. In: Jhala, R., Igarashi, A. (eds.) APLAS 2012. LNCS, vol. 7705, pp. 18–33. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  26. 26.
    Lu, Y., Potter, J., Xue, J.: Structural lock correlation with ownership types. In: Felleisen, M., Gardner, P. (eds.) ESOP 2013. LNCS, vol. 7792, pp. 391–410. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  27. 27.
    Lu, Y., Potter, J., Zhang, C., Xue, J.: A type and effect system for determinism in multithreaded programs. In: Seidl, H. (ed.) ESOP 2012. LNCS, vol. 7211, pp. 518–538. Springer, Heidelberg (2012) Google Scholar
  28. 28.
    Milanova, A., Huang, W.: Static object race detection. In: Yang, H. (ed.) APLAS 2011. LNCS, vol. 7078, pp. 255–271. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  29. 29.
    Müller, P., Poetzsch-Heffter, A.: Universes: a type system for controlling representation exposure. In.Fernuniversität Hagen Programming Languages and Fundamentals of Programming (1999)Google Scholar
  30. 30.
    Nystrom, N., Clarkson, M.R., Myers, A.C.: Polyglot: an extensible compiler framework for java. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 138–152. Springer, Heidelberg (2003) CrossRefGoogle Scholar
  31. 31.
    Östlund, J., Brandauer, S., Wrigstad, T.: The joelle programming language : evolving java programs along two axes of parallel eval. In: LaME 2012 (2012)Google Scholar
  32. 32.
    Östlund, J., Wrigstad, T.: Regions as owners - a discussion on ownership-based effects in practice. In: IWACO 2011, International Workshop on Aliasing, Confinement and Ownership in Object-Oriented Programming (2011)Google Scholar
  33. 33.
    Östlund, J., Wrigstad, T.: Multiple aggregate entry points for ownership types. In: Noble, J. (ed.) ECOOP 2012. LNCS, vol. 7313, pp. 156–180. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  34. 34.
    Östlund, J., Wrigstad, T., Clarke, D., Åkerblom, B.: Ownership, uniqueness, and immutability. In: Paige, R.F., Meyer, B. (eds.) TOOLS. LNCS, pp. 178–197. Springer, Heidelberg (2008) CrossRefGoogle Scholar
  35. 35.
    Potanin, A., Noble, J., Clarke, D., Biddle, R.: Generic ownership for generic Java. In OOPSLA, pp. 311–324 (2006)Google Scholar
  36. 36.
    Servetto, M., Pearce, D. J., Groves, L., Potanin, A.: Balloon types for safe parallelisation over arbitrary object graphs. In: 4th Workshop on Determinism and Correctness in Parallel Programming (2013)Google Scholar
  37. 37.
    Strnisa, R., Parkinson, M.J.: Lightweight java. In: Archive of Formal Proofs (2011)Google Scholar
  38. 38.
    Wrigstad, T.: Ownership-Based Alias Management. Ph.D. thesis, Royal Institute of Technology, Kista, Stockholm, May 2006Google Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Elias Castegren
    • 1
  • Johan Östlund
    • 1
    Email author
  • Tobias Wrigstad
    • 1
  1. 1.Uppsala UniversityUppsalaSweden

Personalised recommendations