A mechanism for flexible dynamic trait replacement

Dynamic trait replacement is a programming language feature for changing the objects' behavior at runtime by replacing some of the objects' methods. In previous work on dynamic trait replacement for JAVA-like languages, the object's methods that may be replaced must correspond exactly to a named trait used in the object's class definition. In this paper we propose the notion of replaceable: a programming language feature that decouples trait replacement operation code and class declaration code, thus making it possible refactoring classes and/or performing unanticipated trait replacement operations without invalidating existing code.

[1]  Aaron Turon,et al.  Metaprogramming with Traits , 2007, ECOOP.

[2]  Oscar Nierstrasz,et al.  Traits: Composable Units of Behaviour , 2002, ECOOP.

[3]  Martín Abadi,et al.  An Imperative Object Calculus , 1995, TAPSOFT.

[4]  SOPHIA DROSSOPOULOU More Dynamic Object Reclassification : F ickleII , 2011 .

[5]  Viviana Bono,et al.  Type safe dynamic object delegation in class-based languages , 2008, PPPJ '08.

[6]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 1999, OOPSLA '99.

[7]  Viviana Bono,et al.  On Traits and Types in a Java-like Setting , 2008, IFIP TCS.

[8]  Sophia Drossopoulou,et al.  Chai: Traits for Java-Like Languages , 2005, ECOOP.

[9]  Victor Luchangco,et al.  The Fortress Language Specification Version 1.0 , 2007 .

[10]  Randall B. Smith,et al.  Self: The power of simplicity , 1987, OOPSLA 1987.

[11]  William R. Cook,et al.  Mixin-based inheritance , 1990, OOPSLA/ECOOP '90.

[12]  Marc V An L I Mbe R Ghen Encapsulation and composition as orthogonal operators on mixins: a solution to multiple inheritance problems , 1996 .

[13]  Viviana Bono,et al.  Separating Type, Behavior, and State to Achieve Very Fine-grained Reuse , 2007 .

[14]  Matthias Felleisen,et al.  Classes and mixins , 1998, POPL '98.

[15]  Klaus Ostermann,et al.  Nominal and Structural Subtyping in Component-Based Programming , 2008, J. Object Technol..

[16]  Craig Chambers,et al.  Organizing programs without classes , 1991, LISP Symb. Comput..

[17]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[18]  Sophia Drossopoulou,et al.  Refined Effects for Unanticipated Object Re-classification: Fickle3 , 2003, ICTCS.

[19]  Davide Ancona,et al.  Jam---designing a Java extension with mixins , 2003, TOPL.

[20]  Itay Maman,et al.  Whiteoak: introducing structural typing into java , 2008, OOPSLA.

[21]  Jonathan Aldrich,et al.  Integrating Nominal and Structural Subtyping , 2008, ECOOP.

[22]  V. Žd’́ara Dynamic Traits , 2007 .

[23]  Sophia Drossopoulou,et al.  More dynamic object reclassification: Fickle∥ , 2002, TOPL.

[24]  Craig Chambers,et al.  A debate on language and tool support for design patterns , 2000, POPL '00.

[25]  Luigi Liquori,et al.  FeatherTrait: A modest extension of Featherweight Java , 2008, TOPL.

[26]  C. H. Flood,et al.  The Fortress Language Specification , 2007 .

[27]  Oscar Nierstrasz,et al.  Flattening Traits , 2006, J. Object Technol..

[28]  Oscar Nierstrasz,et al.  Traits: A mechanism for fine-grained reuse , 2006, TOPL.