Results 1 - 10
of
12
Traits: A mechanism for fine-grained reuse
- Transactions on Programming Languages and Systems
, 2006
"... Inheritance is well-known and accepted as a mechanism for reuse in object-oriented languages. Unfortunately, due to the coarse granularity of inheritance, it may be difficult to decompose an application into an optimal class hierarchy that maximizes software reuse. Existing schemes based on single i ..."
Abstract
-
Cited by 60 (18 self)
- Add to MetaCart
Inheritance is well-known and accepted as a mechanism for reuse in object-oriented languages. Unfortunately, due to the coarse granularity of inheritance, it may be difficult to decompose an application into an optimal class hierarchy that maximizes software reuse. Existing schemes based on single inheritance, multiple inheritance, or mixins, all pose numerous problems for reuse. To overcome these problems we propose traits, pure units of reuse consisting only of methods. We develop a formal model of traits that establishes how traits can be composed, either to form other traits, or to form classes. We also outline an experimental validation in which we apply traits to refactor a non-trivial application into composable units.
Flattening Traits
- Journal of Object Technology
, 2006
"... Traits are fine-grained components that can be used to compose classes, while avoiding many of the problems of multiple inheritance and mixin-based approaches. Since most implementations of traits have focused on dynamically-typed languages, the question naturally arises, how can one best introduce ..."
Abstract
-
Cited by 16 (5 self)
- Add to MetaCart
Traits are fine-grained components that can be used to compose classes, while avoiding many of the problems of multiple inheritance and mixin-based approaches. Since most implementations of traits have focused on dynamically-typed languages, the question naturally arises, how can one best introduce traits to statically-typed languages, like Java and C#? In this paper we argue that the flattening property of traits should be used as a guiding principle for any attempt to add traits to statically-typed languages. This property essentially states that, semantically, traits can be compiled away. We demonstrate how this principle applies to Featherweight-Trait Java, a conservative extension to Featherweight Java.
Scheme with classes, mixins, and traits
- In Asian Symposium on Programming Languages and Systems (APLAS) 2006
, 2006
"... Abstract. The Scheme language report advocates language design as the composition of a small set of orthogonal constructs, instead of a large accumulation of features. In this paper, we demonstrate how such a design scales with the addition of a class system to Scheme. Specifically, the PLT Scheme c ..."
Abstract
-
Cited by 14 (4 self)
- Add to MetaCart
Abstract. The Scheme language report advocates language design as the composition of a small set of orthogonal constructs, instead of a large accumulation of features. In this paper, we demonstrate how such a design scales with the addition of a class system to Scheme. Specifically, the PLT Scheme class system is a collection of orthogonal linguistic constructs for creating classes in arbitrary lexical scopes and for manipulating them as first-class values. Due to the smooth integration of classes and the core language, programmers can express mixins and traits, two major recent innovations in the object-oriented world. The class system is implemented as a macro in terms of procedures and a record-type generator; the mixin and trait patterns, in turn, are naturally codified as macros over the class system. 1 Growing a Language The Revised 5 Report on the Scheme programming language [20] starts with the famous proclamation that “[p]rogramming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional
A Pattern Language for Extensible Program Representation
, 2007
"... For the last 15 years, implementors of multiple view programming environments have sought a single code model that would form a suitable basis for all of the program analyses and tools that might be applied to the code. They have been unsuccessful. The consequences are a tendency to build monolithic ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
For the last 15 years, implementors of multiple view programming environments have sought a single code model that would form a suitable basis for all of the program analyses and tools that might be applied to the code. They have been unsuccessful. The consequences are a tendency to build monolithic, single-purpose tools, each of which implements its own specialized analyses and optimized representation. This restricts the availability of the analyses, and also limits the reusability of the representation by other tools. Unintegrated tools also produce inconsistent views, which reduce the value of multiple views. This paper describes an architecture that allows a single, minimal representation of program code to be extended as required to support new tools and program analyses, while still maintaining a simple and uniform interface to program properties. We present architectural patterns that address efficiency, correctness and the integration of multiple analyses and tools in a modular fashion.
Run-Time Evolution through Explicit Meta-Objects ⋆
"... Abstract. Software must be constantly adapted due to evolving domain knowledge and unanticipated requirements changes. To adapt a system at run-time we need to reflect on its structure and its behavior. Objectoriented languages introduced reflection to deal with this issue, however, no reflective ap ..."
Abstract
-
Cited by 4 (4 self)
- Add to MetaCart
Abstract. Software must be constantly adapted due to evolving domain knowledge and unanticipated requirements changes. To adapt a system at run-time we need to reflect on its structure and its behavior. Objectoriented languages introduced reflection to deal with this issue, however, no reflective approach up to now has tried to provide a unified solution to both structural and behavioral reflection. This paper describes Albedo 1, a unified approach to structural and behavioral reflection. Albedo is a model of fined-grained unanticipated dynamic structural and behavioral adaptation. Instead of providing reflective capabilities as an external mechanism we integrate them deeply in the environment. We show how explicit meta-objects allow us to provide a range of reflective features and thereby evolve both application models and environments at run-time. 1
Customizable composition operators for Java-like classes (extended abstract)
"... Abstract. We propose a formal framework for extending a class-based language, equipped with a given class composition mechanism, to allow programmers to define their own derived composition operators. These definitions can exploit the full expressive power of the underlying computational language. T ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
Abstract. We propose a formal framework for extending a class-based language, equipped with a given class composition mechanism, to allow programmers to define their own derived composition operators. These definitions can exploit the full expressive power of the underlying computational language. The extension is obtained by adding meta-expressions, that is, (expressions denoting) class expressions, to conventional expressions. Such meta-expressions can appear as class definitions in the class table. Extended class tables are reduced to conventional ones by a process that we call compile-time execution, which evaluates these meta-expressions. This mechanism poses the non-trivial problem of guaranteeing soundness, that is, ensuring that the conventional class table, obtained by compile-time execution, is welltyped in the conventional sense. This problem can be tackled in many ways. In this paper, we illustrate a lightweight solution which enriches compile-time execution by partial typechecking steps.
Adding Traits to (Statically Typed) Languages
, 2005
"... Traits offer a fine-grained mechanism for composing classes in object-oriented languages from reusable components, while avoiding the fragility problems introduced by multiple inheritance and mixins. Although traits were developed in the context of dynamically typed languages, they would also offer ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
Traits offer a fine-grained mechanism for composing classes in object-oriented languages from reusable components, while avoiding the fragility problems introduced by multiple inheritance and mixins. Although traits were developed in the context of dynamically typed languages, they would also offer clear benefits for statically typed languages like Java and C#. This report summarizes the issues raised when integrating traits into such languages. We examine traits in the context of the statically typed languages Featherweight Java, C # and C++.
Steps Toward The Reinvention of Programming -- A Compact and Practical Model of Personal Computing as a Self-Exploratorium
-
, 2006
"... ..."
FACULTÉ INFORMATIQUE ET COMMUNICATION ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE
"... J’aimerais tout d’abord remercier mon directeur de thèse Prof. Martin Odersky de m’avoir offert la possibilité de réaliser cette thèse. Travailler au sein de son laboratoire fut particulièrement intéressant et enthousiasment. Je le remercie de m’avoir accorder sa confiance même dans les moments les ..."
Abstract
- Add to MetaCart
J’aimerais tout d’abord remercier mon directeur de thèse Prof. Martin Odersky de m’avoir offert la possibilité de réaliser cette thèse. Travailler au sein de son laboratoire fut particulièrement intéressant et enthousiasment. Je le remercie de m’avoir accorder sa confiance même dans les moments les plus difficiles. Je le remercie en particulier de n’avoir jamais hésiter à faire le nécessaire afin de prolonger les différents délais que je m’entêtais à ne jamais tenir. Je remercie Vincent Cremet avec qui j’ai beaucoup travaillé, particulièrement durant les dernières années. Beaucoup d’idées présentées dans cette thèse ont en fait été développées en étroite collaboration avec lui. J’aime à penser que dans une certaine mesure nous nous sommes mutuellement supervisés durant nos thèses. Je remercie aussi Michel Schinz avec qui j’ai partagé mon bureau durant de nombreuses années et avec qui j’ai eu d’innombrables et intéressantes discussions sur des sujets aussi divers que variés.
Replace
"... this file with prentcsmacro.sty for your meeting, or with entcsmacro.sty for your meeting. Both can be found at the ENTCS Macro Home Page. A lightweight approach to customizable composition operators for Java-like classes ..."
Abstract
- Add to MetaCart
this file with prentcsmacro.sty for your meeting, or with entcsmacro.sty for your meeting. Both can be found at the ENTCS Macro Home Page. A lightweight approach to customizable composition operators for Java-like classes

