Please wait a minute...
Frontiers of Computer Science

ISSN 2095-2228

ISSN 2095-2236(Online)

CN 10-1014/TP

Postal Subscription Code 80-970

2018 Impact Factor: 1.129

Front Comput Sci    2013, Vol. 7 Issue (2) : 236-256    https://doi.org/10.1007/s11704-013-1259-7
RESEARCH ARTICLE
Confinement framework for encapsulating objects
Qin SHU1(), Zongyan QIU1, Shuling WANG2
1. LMAM and Department of Informatics, School of Mathematical Sciences, Peking University, Beijing 100871, China; 2. State Key Laboratory of Computer Science, Institute of Software, Chinese Academy of Sciences, Beijing 100190, China
 Download: PDF(1234 KB)   HTML
 Export: BibTeX | EndNote | Reference Manager | ProCite | RefWorks
Abstract

Confinement is used to prohibit safety-critical objects from unintended access. Approaches for specifying and verifying confinement have been proposed in the last twenty years but their application has been help back. We develop a novel framework for specifying and verifying object confinement in object-oriented (OO) programs. Instead of expressing the confinement requirements within a class for possible future usage, as with ownership types, we specify confinement requirements of the class in its usage class which actually intends to confine the parts, i.e., internal representations. Syntactically, an optional conf clause is introduced in class declarations for annotating the confined attribute-paths. A “same type and confinement” notation is introduced for expressing type and confinement dependence among variables, parameters, and return values of methods. Based on the extension to a Java-like language and existing techniques of alias analysis, we define a sound type-system for checking the wellconfinedness of OO programswith respect to the confinement specifications.

Keywords object-oriented      aliasing      confinement      ownership      type system      well-confined program     
Corresponding Author(s): SHU Qin,Email:shuqin@pku.edu.cn   
Issue Date: 01 April 2013
 Cite this article:   
Qin SHU,Zongyan QIU,Shuling WANG. Confinement framework for encapsulating objects[J]. Front Comput Sci, 2013, 7(2): 236-256.
 URL:  
https://academic.hep.com.cn/fcs/EN/10.1007/s11704-013-1259-7
https://academic.hep.com.cn/fcs/EN/Y2013/V7/I2/236
1 Hogg J, Lea D, Wills A, Dechampeaux D, Holt R. The geneva convention on the treatment of object aliasing. ACM SIGPLAN OOPS Messenger , 1992, 3(2): 11-16
doi: 10.1145/130943.130947
2 Clarke D, Drossopoulou S, Noble J, Wrigstad T. Aliasing, confinement, and ownership in object-oriented programming. Lecture Notes in Computer Science , 2008, 4906: 40
doi: 10.1007/978-3-540-78195-0_5
3 Grothoff C, Palsberg J, Vitek J. Encapsulating objects with confined types. In: Proceedings of ACMSIGPLAN Notices , 2001, 36(11): 241-255
doi: 10.1145/504311.504300
4 Hogg J. Islands: aliasing protection in object-oriented languages. In: Proceedings of ACM SIGPLAN Notices . 1991, 271-285
5 Almeida P. Balloon types: controlling sharing of state in data types. In: Proceedings of ECOOP’97-Object-Oriented Programming . 1997, 32-59
6 Vitek J, Bokowski B. Confined types. In: Proceedings of ACM SIGPLAN Notices . 1999, 82-96
7 Vitek J, Bokowski B. Confined types in Java. Software: Practice and Experience , 2001, 31(6): 507-532
doi: 10.1002/spe.369
8 Zhao T, Palsberg J, Vitek J. Lightweight confinement for featherweight Java. In: Proceedings of ACM SIGPLAN Notices . 2003, 135-148
9 Clarke D, Potter J, Noble J. Ownership types for flexible alias protection. In: Proceedings of ACMSIGPLAN Notices , 1998, 33(10): 48-64
doi: 10.1145/286942.286947
10 Clarke D. Ownership types and containment. Dissertation for Doctoral Degree . Australia: University of New South Wales, 2001
11 Müller P, Poetzsch-Heffter A. Universes: a type system for controlling representation exposure. Technical Report 263, FernUniversitat Hagen . 1999
12 Müller P. Modular specification and verification of object-oriented programs. Lecture Notes in Computer Science 2262, Springer , 2002
doi: 10.1007/3-540-45651-1
13 Aldrich J, Chambers C. Ownership domains: separating aliasing policy from mechanism. In: Proceedings of ECOOP 2004 Object-Oriented Programming . 2004, 1-25
doi: 10.1007/978-3-540-24851-4_1
14 Meyer B. Eiffel: the language. Object-Oriented Series. New York: Prentice Hall, 1992
15 Wang S, Shu Q, Liu Y, Qiu Z. A semantic model of confinement and locality theorem. Frontiers of Computer Science in China , 2010, 4(1): 28-46
doi: 10.1007/s11704-009-0075-6
16 Boyapati C, Liskov B, Shrira L. Ownership types for object encapsulation. In: Proceedings of ACM SIGPLAN Notices , 2003, 38(1): 213-223
17 Qiu Z, Wang S, Long Q. Sequential Java: formal foundations. Technical Report, School of Mathematics, Peking University , 2007
18 Meyer B. Towards a theory and calculus of aliasing. Journal of Object Technology , 2010, 9(2): 37-74
doi: 10.5381/jot.2010.9.2.c5
19 Naeem N, Lhotàk O. Faster alias set analysis using summaries. Compiler Construction , 2011, 82-103
20 Clarke D, Noble J, Potter J. Simple ownership types for object containment. In: Proceedings of ECOOP 2001 Object-Oriented Programming . 2001, 53-76
doi: 10.1007/3-540-45337-7_4
21 Smith M, Drossopoulou S. Cheaper reasoning with ownership types. In: Proceedings of the 1st International Workshop on Aliasing, Confinement and Ownership in Object-oriented Programming (IWACO) . 2003
22 Clarke D, Drossopoulou S. Ownership, encapsulation and the disjointness of type and effect. In: Proceedings of ACM SIGPLAN Notices , 2002, 37(11): 292-310
23 Aldrich J, Kostadinov V, Chambers C. Alias annotations for program understanding. In: Proceedings of ACM SIGPLAN Notices , 2002, 311-330
24 Chin W, Khoo S, Qin S, Popeea C, Nguyen H. Verifying safety policies with size properties and alias controls. In: Proceedings of the 27th International Conference on Software Engineering . 2005, 186-195
25 Dietl W, Drossopoulou S, Müller P. Generic universe types. In: Proceedings of ECOOP 2007 Object-Oriented Programming . 2007, 28-53
doi: 10.1007/978-3-540-73589-2_3
26 Dietl W, Müller P. Universes: lightweight ownership for JML. Journal of Object Technology , 2005, 4-5-32
doi: 10.5381/jot.2005.4.8.a1
27 Dietl W, Ernst M, Müller P. Tunable static inference for generic universe types. In: Proceedings of ECOOP 2011 Object-Oriented Programming . 2011, 333-357
doi: 10.1007/978-3-642-22655-7_16
28 Cameron N, Drossopoulou S, Noble J, Smith M. Multiple ownership. In: Proceedings of ACM SIGPLAN Notices . 2007, 441-460
29 Potanin A, Noble J, Clarke D, Biddle R. Generic ownership for generic Java. In: Proceedings of SIGPLAN Notices , 2006, 41(10): 311-324
doi: 10.1145/1167515.1167500
[1] Ashish Kumar DWIVEDI, Anand TIRKEY, Santanu Kumar RATH. Software design pattern mining using classification-based techniques[J]. Front. Comput. Sci., 2018, 12(5): 908-922.
[2] Zhiyi MA. An approach to improve the quality of object-oriented models from novice modelers through project practice[J]. Front. Comput. Sci., 2017, 11(3): 485-498.
[3] Changpeng ZHU, Yinliang ZHAO, Bo HAN, Qinghua ZENG, Ying MA. Runtime support for type-safe and context-based behavior adaptation[J]. Front. Comput. Sci., 2014, 8(1): 17-32.
[4] Wei KE, Zhiming LIU, Shuling WANG, Liang ZHAO. A graph-based generic type system for object-oriented programs[J]. Front Comput Sci, 2013, 7(1): 109-134.
[5] Shaoying LIU. Pre-post notation is questionable in effectively specifying operations of object-oriented systems[J]. Front Comput Sci Chin, 2011, 5(3): 341-352.
[6] Baojian HUA. Static typing for a substructural lambda calculus[J]. Front Comput Sci Chin, 2011, 5(3): 369-380.
[7] Shuling WANG, Qin SHU, Yijing LIU, Zongyan QIU, . A semantic model of confinement and Locality Theorem[J]. Front. Comput. Sci., 2010, 4(1): 28-46.
[8] Weifeng PAN , Yutao MA , Jing LIU , Yeyi QIN , Bing LI , . Class structure refactoring of object-oriented softwares using community detection in dependency networks[J]. Front. Comput. Sci., 2009, 3(3): 396-404.
[9] LIANG Tielin, WANG Dongming, WANG Dongming. On the design and implementation of a geometric-object-oriented language[J]. Front. Comput. Sci., 2007, 1(2): 180-190.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed