Location Types for Safe Distributed Object-Oriented Programming

  • Yannick Welsch
  • Jan Schäfer
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6705)

Abstract

In distributed object-oriented systems, objects belong to different locations. For example, in Java RMI, objects can be distributed over different JVM instances. Accessing a reference in RMI has crucial different semantics depending on whether the referred object is local or remote. Nevertheless, such references are not statically distinguished by the type system.

This paper presents location types, which statically distinguish far from near references. We present a formal type system for a minimal core language. In addition, we present a type inference system that gives optimal solutions. We implemented location types as a pluggable type system for the ABS language, an object-oriented language with a concurrency model based on concurrent object groups. An important contribution of this paper is the combination of the type system with the flexible inference system and a novel integration into an Eclipse-based IDE by presenting the inference results as overlays. This drastically reduces the annotation overhead while providing full static type information to the user. The IDE integration is a general approach of its own and can be applied to many other type system extensions.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Aldrich, J.: Ownership Domains: Separating Aliasing Policy from Mechanism. In: Vetta, A. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 1–25. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  2. 2.
    Andreae, C., Noble, J., Markstrum, S., Millstein, T.: A framework for implementing pluggable type systems. In: Tarr, P.L., Cook, W.R. (eds.) OOPSLA, pp. 57–74. ACM Press, New York (2006)Google Scholar
  3. 3.
    Boyapati, C., Liskov, B., Shrira, L.: Ownership types for object encapsulation. In: POPL, pp. 213–223. ACM Press, New York (2003)Google Scholar
  4. 4.
    Clarke, D., Potter, J., Noble, J.: Ownership Types for Flexible Alias Protection. In: OOPSLA, pp. 48–64. ACM Press, New York (1998)Google Scholar
  5. 5.
    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
  6. 6.
    Dietl, W.: Universe Types: Topology, Encapsulation, Genericity, and Tools. PhD thesis. ETH Zurich, Switzerland (2009)Google Scholar
  7. 7.
    Dietl, W., Gairing, M., Müller, P.: Generic Universe Types. In: Bateni, M. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 28–53. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  8. 8.
    Dietl, W., Ernst, M., Müller, P.: Tunable Universe Type Inference. Tech. rep. 659. Department of Computer Science, ETH Zurich (December 2009)Google Scholar
  9. 9.
    Ernst, M.D.: Type Annotations Specification (JSR 308) and The Checker Framework: Custom pluggable types for Java, http://types.cs.washington.edu/jsr308/
  10. 10.
    Fähndrich, M., Leino, K.R.M.: Declaring and checking non-null types in an objectoriented language. In: OOPSLA 2003, pp. 302–312. ACM Press, New York (2003)Google Scholar
  11. 11.
    Flanagan, C., Freund, S.N.: Type inference against races. Sci. Comput. Program. 64, 140–165 (2007)MathSciNetCrossRefMATHGoogle Scholar
  12. 12.
    Grothoff, C.: Expressive Type Systems for Object-Oriented Languages. PhD thesis. University of California, Los Angeles (2006)Google Scholar
  13. 13.
    Haller, P., Odersky, M.: Capabilities for Uniqueness and Borrowing. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 354–378. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  14. 14.
    Hubert, L., Jensen, T., Pichardie, D.: Semantic Foundations and Inference of Non-null Annotations. In: Barthe, G., de Boer, F.S. (eds.) FMOODS 2008. LNCS, vol. 5051, pp. 132–149. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  15. 15.
    Hähnle, R., et al.: Report on the Core ABS Language and Methodology: Part A. Report. The HATS Consortium (March 2010), http://www.hats-project.eu/
  16. 16.
    Le Berre, D., Parrain, A.: The SAT4J library, Release 2.2, System Description. Journal on Satisfiability, Boolean Modeling and Computation 7, 59–64 (2010)Google Scholar
  17. 17.
    Lu, Y.: On Ownership and Accessibility. In: Hu, Q. (ed.) ECOOP 2006. LNCS, vol. 4067, pp. 99–123. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  18. 18.
    Miller, M.S., Tribble, E.D., Shapiro, J.S.: Concurrency Among Strangers. In: De Nicola, R., Sangiorgi, D. (eds.) TGC 2005. LNCS, vol. 3705, pp. 195–229. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  19. 19.
    Oracle Corporation: Java SE 6 RMI documentation , http://download.oracle.com/javase/6/docs/technotes/guides/rmi/index.html
  20. 20.
    Östlund, J., Wrigstad, T.: Welterweight Java. In: Vitek, J. (ed.) TOOLS 2010. LNCS, vol. 6141, pp. 97–116. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  21. 21.
    Potanin, A., Noble, J., Clarke, D., Biddle, R.: Generic Ownership for Generic Java. In: Tarr, P.L., Cook, W.R. (eds.) OOPSLA, ACM Press, New York (2006)Google Scholar
  22. 22.
    Schäfer, J., Poetzsch-Heffter, A.: JCoBox: Generalizing Active Objects to Concurrent Components. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 275–299. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  23. 23.
    Tofte, M., Talpin, J.-P.: Region-based Memory Management. Inf. Comput. 2, 109–176 (1997)MathSciNetCrossRefMATHGoogle Scholar
  24. 24.
    Van Cutsem, T., Mostinckx, S., Boix, E.G., Dedecker, J., Meuter, W.D.: AmbientTalk: Object-oriented Event-driven Programming in Mobile Ad hoc Networks. In: SCCC, pp. 3–12. IEEE Computer Society Press, Los Alamitos (2007)Google Scholar
  25. 25.
    Welsch, Y., Schäfer, J.: Location Types for Safe Distributed Object-Oriented Programming. Tech. rep. 383/11. University of Kaiserslautern (April 2011)Google Scholar
  26. 26.
    Wrigstad, T., Pizlo, F., Meawad, F., Zhao, L., Vitek, J.: Loci: Simple Thread-Locality for Java. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 445–469. Springer, Heidelberg (2009)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Yannick Welsch
    • 1
  • Jan Schäfer
    • 1
  1. 1.University of KaiserslauternGermany

Personalised recommendations