Skip to main content
Log in

A semantic model of confinement and Locality theorem

  • Research Article
  • Published:
Frontiers of Computer Science in China Aims and scope Submit manuscript

Abstract

Confinement is required in object-oriented programming in order to protect sensitive object references. Recently a range of confinement schemes have been proposed to achieve object encapsulation by defining static type systems, but unavoidably, with strong restrictions. On the other hand, no similarity in concepts makes assessing of these schemes a difficulty. We build in this paper a semantic model for confinement in μJava, a subset of sequential Java that offers most object-oriented features. This model has limited restriction for programs. From a semantic view, confinement is defined with respect to a given context that specifies partition of the object pool and confinement constraint among them. Moreover, we present the main Locality theorem for checking well confinement of programs locally. By applying this theorem, we have solved a security breach problem from Java JDK 1.1.1, and furthermore, proved the soundness of two widely used confinement schemes: confined types and ownership types.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Hogg J. Islands: aliasing protection in object-oriented languages. In: Proceedings of OOPSLA’91. ACM Press, 1991

  2. Almeida P S. Balloon types: controlling sharing of state in data types. In: Proceedings of ECOOP’97. Springer, 1997

  3. Clarke D, Potter J, Noble J. Ownership types for flexible alias protection. In: Proceedings of OOPSLA’98. ACM Press, 1998

  4. Vitek J, Bokowski B. Confined types in Java. Software Practice and Experience, 2000, 31: 507–532

    Article  Google Scholar 

  5. Müller P. Modular Specification and Verification of Objectoriented Programs. PhD thesis, Fern University at Hagen. Springer, 2002, LNCS, 2262

  6. Grothoff C, Palsberg J, Vitek J. Encapsulating objects with confined types. In: Proceedings of OOPSLA’01. ACM Press, 2001

  7. Boyland J. Alias burying: unique variables without reads. Software Practice and Experience, 2001, 31(6): 533–553

    Article  MATH  Google Scholar 

  8. Clarke D, Wrigstrad T. External uniqueness. In: Foundations of Object-Oriented Languages (FOOL). 2003

  9. Banerjee A, Naumann D A. Representation independence, confinement and access control (extended abstract). In: Proceedings of POPL’02. ACM Press, 2002

  10. Banerjee A, Naumann D A. Ownership confinement ensures representation independence for object-oriented programs. JACM, 2005, 52(6): 894–960

    Article  MathSciNet  Google Scholar 

  11. Noble J, Biddle R, Tempero E, Potanin A, Clarke D. Towards a model of encapsulation. In: Proceedings of IWACO’03, Darmstadt, Germany, 2003

  12. Wang S L, Qiu Z Y. A generic model for confinement and its application. In: Proceedings of 2nd IEEE Symposium on Theoretical Aspects of Software Engineering. 2008, 57–64

  13. Qiu Z Y, Wang S L, Long Q. Sequential μJava: formal foundations. In: Proceedings of AWSF07, 2007. Avaliable at: www.math.pku.edu.cn:8000/en/preindex.php.

  14. Reynolds J C. Separation logic: a logic for shared mutable data structures. In: Proceedings of LICS’02. IEEE CS, 2002

  15. Parkinson M. Local reasoning for Java. PhD thesis, Churchill College, 2005

  16. Zhao T, Palsberg J, Vitek J. Lightweight confinement for featherweight Java. In: Proceedings of OOPSLA’03. ACM Press, 2003

  17. Clarke D, Noble J, Potter J. Simple ownership types for object containment. In: Proceedings of ECOOP’01. Springer, 2001

  18. Cameron N R, Noble J, Smith M J. Multiple ownership. In: Proceedings of OOPSLAŠ. 07, ACM SIGPLAN Notices. 2007, volume 42

  19. Aldrich J, Chambers C. Ownership domains: separating alias policy from mechanism. In: Proceedings of ECOOP’04. Springer, 2004

  20. Boyland J, Noble J, Retert W. Capabilities for sharing: a generalisation of uniqueness and read-only. In: Proceedings of ECOOP’01. Springer, 2001

  21. Clarke D, Wrigstrad T. External uniqueness is unique enough. In: Proceedings of ECOOP’03. Springer, 2003

  22. Noble J, Vitek J, Potter J. Flexible alias protection. In: Proceedings of ECOOP’98. Springer, 1998

  23. Banerjee A, Naumann D A. Ownership: transfer, sharing, and encapsulation. In: ECOOP Workshop on Formal Techniques for Java-like Programs (FTfJP). 2003

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Shuling Wang.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Wang, S., Shu, Q., Liu, Y. et al. A semantic model of confinement and Locality theorem. Front. Comput. Sci. China 4, 28–46 (2010). https://doi.org/10.1007/s11704-009-0075-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11704-009-0075-6

Keywords

Navigation