MultiJava']Java: Modular open classes and symmetric multiple dispatch for Java']Java

被引:107
|
作者
Clifton, C [1 ]
Leavens, GT [1 ]
Chambers, C [1 ]
Millstein, T [1 ]
机构
[1] Iowa State Univ, Dept Comp Sci, Ames, IA 50011 USA
关键词
D O I
10.1145/354222.353181
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present MultiJava, a backward-compatible extension to Java supporting open classes and symmetric multiple dispatch. Open classes allow one to add to the set of methods that an existing class supports without creating distinct subclasses or editing existing code. Unlike the "Visitor" design pattern, open classes do not require advance planning, and open classes preserve the ability to add new subclasses modularly and safely. Multiple dispatch offers several well-known advantages over the single dispatching of conventional object-oriented languages, including a simple solution to some kinds of "binary method" problems. MultiJava's multiple dispatch retains Java's existing class-based encapsulation properties. We adapt previous theoretical work to allow compilation units to be statically typechecked modularly and safely, ruling out any link-time or run-time type errors. We also present a novel compilation scheme that operates modularly and incurs performance overhead only where open classes or multiple dispatching are actually used.
引用
收藏
页码:130 / 145
页数:16
相关论文
共 50 条
  • [31] Simulating multiple inheritance in Java']Java
    Tempero, E
    Biddle, R
    [J]. JOURNAL OF SYSTEMS AND SOFTWARE, 2000, 55 (01) : 87 - 100
  • [32] Simulating multiple inheritance in Java']Java
    Lyon, D
    [J]. CONCURRENCY AND COMPUTATION-PRACTICE & EXPERIENCE, 2002, 14 (12): : 987 - 1008
  • [33] Representing Java']Java classes in a typed intermediate language
    League, C
    Zhong, S
    Trifonov, V
    [J]. ACM SIGPLAN NOTICES, 1999, 34 (09) : 183 - 196
  • [34] Discovering algebraic specifications from Java']Java classes
    Henkel, J
    Diwan, A
    [J]. ECOOP 2003 - OBJECT-ORIENTED PROGRAMMING, PROCEEDINGS, 2003, 2743 : 431 - 456
  • [35] Measuring Strength of Coupling between Java']Java Classes
    Lee, Jonathan
    Lee, Shin-Jie
    Hung, Dong-Sheng
    Hung, Pei-Yuan
    Chin, Ray
    Wu, Chia-Chih
    [J]. INTELLIGENT SYSTEMS AND APPLICATIONS (ICS 2014), 2015, 274 : 1805 - 1814
  • [36] How can I test Java']Java classes?
    Rangaraajan, K
    [J]. DR DOBBS JOURNAL, 1999, 24 (07): : 107 - 110
  • [37] Preventing Composition Problems in Modular Java']Java Applications
    Jezek, Kamil
    Holy, Lukas
    Danek, Jakub
    [J]. SOFTWARE QUALITY: THE FUTURE OF SYSTEMS- AND SOFTWARE DEVELOPMENT, 2016, 238 : 125 - 143
  • [38] Modular Transformation of Java']Java Exceptions Modulo Errors
    Rubbens, Robert
    Lathouwers, Sophie
    Huisman, Marieke
    [J]. FORMAL METHODS FOR INDUSTRIAL CRITICAL SYSTEMS, FMICS 2021, 2021, 12863 : 67 - 84
  • [39] Modular name analysis for Java']Java using JastAdd
    Ekman, Torbjorn
    Hedin, Gorel
    [J]. GENERATIVE AND TRANSFORMATIONAL TECHNIQUES IN SOFTWARE ENGINEERING, 2006, 4143 : 422 - 436
  • [40] Cibai: An abstract interpretation-based static analyzer for modular analysis and verification of Java']Java classes
    Logozzo, Francesco
    [J]. VERIFICATION, MODEL CHECKING, AND ABSTRACT INTERPRETATION, PROCEEDINGS, 2007, 4349 : 283 - 298