Java']Javari: Adding reference immutability to Java']Java

被引:12
|
作者
Tschantz, MS [1 ]
Ernst, MD [1 ]
机构
[1] MIT, CSAIL, Cambridge, MA 02139 USA
关键词
languages; theory; experimentation; assignable; immutability; !text type='Java']Java[!/text; !text type='Java']Java[!/text]ri; mutable; readonly; type system; verification;
D O I
10.1145/1103845.1094828
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
This paper describes a type system that is capable of expressing and enforcing immutability constraints. The specific constraint expressed is that the abstract state of the object to which an immutable reference refers cannot be modified using that reference. The abstract state is (part of) the transitively reachable state: that is, the state of the object and all state reachable from it by following references. The type system permits explicitly excluding fields from the abstract state of an object. For a statically type-safe language, the type system guarantees reference immutability. If the language is extended with immutability downcasts, then run-time checks enforce the reference immutability constraints. This research builds upon previous research in language support for reference immutability. Improvements that are now in this paper include distinguishing the notions of assignability kind mutability; integration with Java 5's generic types and with multi-dimensional arrays; a mutability polymorphism approach to avoiding code duplication-, type-safe support for reflection and serialization; and formal type rules and type soundness proof for a core calculus. Furthermore, it retains the valuable features of the previous dialect, including usability by humans (as evidenced by experience with 160,000 lines of Javari code) and interoperability with Java and existing JVMs.
引用
收藏
页码:211 / 230
页数:20
相关论文
共 50 条
  • [1] Ownership and Immutability in Generic Java']Java
    Zibin, Yoav
    Potanin, Alex
    Li, Paley
    Ali, Mahmood
    Ernst, Michael D.
    [J]. ACM SIGPLAN NOTICES, 2010, 45 (10) : 598 - 617
  • [2] Glacier: Transitive Class Immutability for Java']Java
    Coblenz, Michael
    Nelson, Whitney
    Aldrich, Jonathan
    Myers, Brad
    Sunshine, Joshua
    [J]. 2017 IEEE/ACM 39TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2017, : 496 - 506
  • [3] Adding contracts to Java']Java
    Newmarch, J
    [J]. TOOLS 27: TECHNOLOGY OF OBJECT-ORIENTED LANGUAGES, PROCEEDINGS, 1998, : 2 - 7
  • [4] Adding Examples into Java']Java Documents
    Kim, Jinhan
    Lee, Sanghoon
    Hwang, Seung-won
    Kim, Sunghun
    [J]. 2009 IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING, PROCEEDINGS, 2009, : 540 - 544
  • [5] Java']Java Power Reference
    Flanagan, D
    [J]. IEEE MICRO, 1999, 19 (05) : 10 - 11
  • [6] Adding Type Constructor Parameterization to Java']Java
    Cremet, Vincent k
    Altherr, Philippe
    [J]. JOURNAL OF OBJECT TECHNOLOGY, 2008, 7 (05): : 25 - 65
  • [7] Adding real-time capabilities to Java']Java
    Nilsen, K
    [J]. COMMUNICATIONS OF THE ACM, 1998, 41 (06) : 49 - 56
  • [8] Adding type parameterization to the Java']Java(TM) language
    Agesen, O
    Freund, SN
    Mitchell, JC
    [J]. ACM SIGPLAN NOTICES, 1997, 32 (10) : 49 - 65
  • [9] Java']Java, Java']Java, Java']Java and more
    Makulowich, JS
    [J]. DATABASE, 1997, 20 (01): : 74 - 75
  • [10] A Survey of the Forms of Java']Java Reference Names
    Butler, Simon
    Wermelinger, Michel
    Yu, Yijun
    [J]. 2015 IEEE 23RD INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION ICPC 2015, 2015, : 196 - 206