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 条
  • [21] How Weak Reference is Used in Java']Java Projects?
    Higo, Yoshiki
    Matsumoto, Shinsuke
    Kim, Taeyoung
    Kusumoto, Shinji
    [J]. 2020 27TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC 2020), 2020, : 445 - 449
  • [22] Not whether Java']Java but how Java']Java
    Wallace, C
    Martin, P
    [J]. ASIA PACIFIC SOFTWARE ENGINEERING CONFERENCE AND INTERNATIONAL COMPUTER SCIENCE CONFERENCE, PROCEEDINGS, 1997, : 517 - 518
  • [23] Java']Java/A - Taking components into Java']Java
    Hacklinger, F
    [J]. INTELLIGENT AND ADAPTIVE SYSTEMS AND SOFTWARE ENGINEERING, 2004, : 163 - 168
  • [24] Adding examples into Java documents
    Kim, Jinhan
    Lee, Sanghoon
    Hwang, Seung-Won
    Kim, Sunghun
    [J]. ASE2009 - 24th IEEE/ACM International Conference on Automated Software Engineering, 2009, : 540 - 544
  • [25] Formalizing the safety of Java']Java, the Java']Java virtual machine, and Java']Java card
    Hartel, PH
    Moreau, L
    [J]. ACM COMPUTING SURVEYS, 2001, 33 (04) : 517 - 558
  • [26] Combined static and dynamic immutability analysis of java program
    Yu, Li-Qian
    Wang, Lin-Zhang
    Lei, Bin
    Zhao, Jian-Hua
    Li, Xuan-Dong
    [J]. Jisuanji Xuebao/Chinese Journal of Computers, 2010, 33 (04): : 736 - 746
  • [27] Java']Java: Coordination and communication for Java']Java agents
    Ciancarini, P
    Rossi, D
    [J]. MOBILE OBJECT SYSTEMS: TOWARDS THE PROGRAMMABLE INTERNET, 1997, 1222 : 213 - 226
  • [28] Flow Java']Java: Declarative concurrency for Java']Java
    Drejhammar, F
    Schulte, C
    Brand, P
    Haridi, S
    [J]. LOGIC PROGRAMMING, PROCEEDINGS, 2003, 2916 : 346 - 360
  • [29] A dualthreaded Java']Java processor for Java']Java multithreading
    Chung, CM
    Kim, SD
    [J]. 1998 INTERNATIONAL CONFERENCE ON PARALLEL AND DISTRIBUTED SYSTEMS, PROCEEDINGS, 1998, : 693 - 700
  • [30] A Java']Java reference model of Transacted Memory for smart cards
    Poll, E
    Hartel, P
    de Jong, E
    [J]. USENIX ASSOCIATION AND IFIP WG 8.8 (SMART CARDS) PROCEEDINGS OF CARDIS '02 FIFTH SMART CARD RESEARCH AND ADVANCED APPLICATION CONFERENCE, 2002, : 75 - 86