Results 1 - 10
of
35
Jiazzi: New-Age Components for Old-Fashioned Java
, 2001
"... We present Jiazzi, a system that enables the construction of largescale binary components in Java. Jiazzi components can be thought of as generalizations of Java packages with added support for external linking and separate compilation. Jiazzi components are practical because they are constructed ou ..."
Abstract
-
Cited by 99 (10 self)
- Add to MetaCart
We present Jiazzi, a system that enables the construction of largescale binary components in Java. Jiazzi components can be thought of as generalizations of Java packages with added support for external linking and separate compilation. Jiazzi components are practical because they are constructed out of standard Java source code. Jiazzi requires neither extensions to the Java language nor special conventions for writing Java source code that will go inside a component. Our components are expressive because Jiazzi supports cyclic component linking and mixins, which are used together in an open class pattern that enables the modular addition of new features to existing classes. This paper describes Jiazzi, how it enhances Java with components, its implementation, and how type checking works. An implementation of Jiazzi is available for download.
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.
Scalable extensibility via nested inheritance
, 2004
"... Inheritance is a useful mechanism for factoring and reusing code. However, it has limitations for building extensible systems. We describe nested inheritance, a mechanism that addresses some of the limitations of ordinary inheritance and other code reuse mechanisms. Using our experience with an exte ..."
Abstract
-
Cited by 52 (3 self)
- Add to MetaCart
Inheritance is a useful mechanism for factoring and reusing code. However, it has limitations for building extensible systems. We describe nested inheritance, a mechanism that addresses some of the limitations of ordinary inheritance and other code reuse mechanisms. Using our experience with an extensible compiler framework, we show how nested inheritance can be used to construct highly extensible software frameworks. The essential aspects of nested inheritance are formalized in a simple object-oriented language with an operational semantics and type system. The type system of this language is sound, so no run-time type checking is required to implement it and no run-time type errors can occur. We describe our implementation of nested inheritance as an unobtrusive extension of the Java language, called Jx. Our prototype implementation translates Jx code to ordinary Java code, without duplicating inherited code.
Traits: Composable units of behaviour
- In Proc. European Conference on Object-Oriented Programming
, 2003
"... Abstract. Despite the undisputed prominence of inheritance as the fundamental reuse mechanism in object-oriented programming languages, the main variants — single inheritance, multiple inheritance, and mixin inheritance — all suffer from conceptual and practical problems. In the first part of this p ..."
Abstract
-
Cited by 32 (0 self)
- Add to MetaCart
Abstract. Despite the undisputed prominence of inheritance as the fundamental reuse mechanism in object-oriented programming languages, the main variants — single inheritance, multiple inheritance, and mixin inheritance — all suffer from conceptual and practical problems. In the first part of this paper, we identify and illustrate these problems. We then present traits, a simple compositional model for structuring object-oriented programs. A trait is essentially a group of pure methods that serves as a building block for classes and is a primitive unit of code reuse. In this model, classes are composed from a set of traits by specifying glue code that connects the traits together and accesses the necessary state. We demonstrate how traits overcome the problems arising from the different variants of inheritance, we discuss how traits can be implemented effectively, and we summarize our experience applying traits to refactor an existing class hierarchy.
Object-Oriented Composition Untangled
- In Proceedings OOPSLA ’01
, 2001
"... Object-oriented languages come with pre-defined composition mechanisms, such as inheritance, object composition, or delegation, each characterized by a certain set of composition properties, which do not themselves individually exist as abstractions at the language level. However, often non-standard ..."
Abstract
-
Cited by 18 (4 self)
- Add to MetaCart
Object-oriented languages come with pre-defined composition mechanisms, such as inheritance, object composition, or delegation, each characterized by a certain set of composition properties, which do not themselves individually exist as abstractions at the language level. However, often non-standard composition semantics is needed, with a mixture of composition properties, which is not provided as such by any of the standard composition mechanisms. Such non-standard semantics are simulated by complicated architectures that are sensitive to requirement changes and cannot easily be adapted without invalidating existing clients. In this paper, we propose compound references, a new abstraction for object references, that allows us to provide explicit linguistic means for expressing and combining individual composition properties on-demand. The model is statically typed and allows the programmer to express a seamless spectrum of composition semantics in the interval between object composition and inheritance. The resulting programs are better understandable, due to explicitly expressed design decisions, and less sensitive to requirement changes.
A core calculus for Java exceptions
- In ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA 2001), SIGPLAN Notices
, 2000
"... In this paper we present a simple calculus (called CJE) in order to fully investigate the exception mechanism of Java (in particular its interaction with inheritance). We first define a type system for the calculus, called Full, directly driven by the Java Language Specification; then, we show that ..."
Abstract
-
Cited by 16 (8 self)
- Add to MetaCart
In this paper we present a simple calculus (called CJE) in order to fully investigate the exception mechanism of Java (in particular its interaction with inheritance). We first define a type system for the calculus, called Full, directly driven by the Java Language Specification; then, we show that this type system uses too many types, in the sense that there are different types which turn out to be equivalent, since they provide exactly the same type information. Hence, we obtain from Full a simplified type system called Min where equivalent types have been identified. We show, in particular, that both Full and Min are equivalent and can be obtained as instantiations of a type system parametric in a number of operations on types used in the typing rules. Such operations form a pair of algebras whose properties are useful both for type-checking optimization and for clarifying the static semantics of the language. The two type systems are proved to satisfy the subject reduction property.
A Core Calculus of Mixin-Based Incomplete Objects (Extended Abstract)
- In Procs. of FOOL Workshop
, 2004
"... We design a calculus that combines class-based features with object-based ones, with the aim of fitting into a unifying setting the "best of both worlds". In a mixin-based approach, mixins are seen as incomplete classes from which incomplete objects can be instantiated. In turn, incomplete object ..."
Abstract
-
Cited by 13 (5 self)
- Add to MetaCart
We design a calculus that combines class-based features with object-based ones, with the aim of fitting into a unifying setting the "best of both worlds". In a mixin-based approach, mixins are seen as incomplete classes from which incomplete objects can be instantiated. In turn, incomplete objects can be completed in an object-based fashion. Our hybrid calculus is shown to be useful in some real world scenarios that we present as examples.
MoMi - A Calculus for Mobile Mixins
- Acta Informatica
, 2004
"... MoMi (Mobile Mixins) is a coordination language for mobile processes that communicate and exchange object-oriented code in a distributed context. MoMi's key idea is structuring mobile object-oriented code by using mixin-based inheritance. Mobile code is compiled and typed locally, and can success ..."
Abstract
-
Cited by 12 (3 self)
- Add to MetaCart
MoMi (Mobile Mixins) is a coordination language for mobile processes that communicate and exchange object-oriented code in a distributed context. MoMi's key idea is structuring mobile object-oriented code by using mixin-based inheritance. Mobile code is compiled and typed locally, and can successfully interact with code present on foreign sites only if its type is subtyping-compliant with the type of what is expected by the receiving site. The key feature of the paper is the definition of this subtyping relation on classes and mixins that enables a significantly flexible, yet still simple, communication pattern. We show that communication by subtyping is type safe in that exchanged code is merged into local code without requiring further type analysis and recompilation.
McJava – a design and implementation of Java with mixin-types
- In Programming Languages and Systems: Second Asian Symposium, APLAS 2004
"... Abstract. A programming construct mixin was invented to implement uniform extensions and modifications to classes. Although mixin-based programming has been extensively studied both on the methodological and theoretical point of views, relatively few attempts have been made on designing real program ..."
Abstract
-
Cited by 9 (2 self)
- Add to MetaCart
Abstract. A programming construct mixin was invented to implement uniform extensions and modifications to classes. Although mixin-based programming has been extensively studied both on the methodological and theoretical point of views, relatively few attempts have been made on designing real programming languages that support mixins. In this paper, we address the issue of how to introduce a feature of declaring a mixin that may also be used as a type to nominally typed object-oriented languages like Java. We propose a programming language McJava, an extension of Java with mixin-types. To study type-soundness of McJava, we have formulated the core of McJava with typing and reduction rules, and proved its type-soundness. We also describe a compilation strategy of McJava that translates McJava programs to Java programs thus eventually making it runnable on standard Java virtual machines. 1
True Modules for Java Classes
"... We present JavaMod, a module language where components of modules are Java classes. The operators for composing modules are a slightly adapted version of those of CMS, a simple and powerful calculus of modules previously dened by the authors which is generic w.r.t. the underlying core calculus. Th ..."
Abstract
-
Cited by 9 (4 self)
- Add to MetaCart
We present JavaMod, a module language where components of modules are Java classes. The operators for composing modules are a slightly adapted version of those of CMS, a simple and powerful calculus of modules previously dened by the authors which is generic w.r.t. the underlying core calculus. The challenge we wanted to face was to apply this very general framework for module composition to the difficult case where module components are Java classes. The result is that we are able to obtain a true module language which is extremely flexible and allows to express (without enriching the core level, that is, the Java language), for instance, generic types as in Pizza and GJ, mixin classes (that is, heir classes parametric in the superclass) and mutually recursive class definitions split in independent modules.

