Results 1 - 10
of
46
LOOJ: Weaving LOOM into Java
- IN ECOOP’04 - OBJECT-ORIENTED PROGRAMMING, NUMBER 3086 IN LECTURE NOTES IN COMPUTER SCIENCE
, 2004
"... LOOJ is an extension of Java obtained by adding bounded parametric polymorphism and new type expressions ThisClass and ThisType, which are similar to MyType in LOOM. Through examples we demonstrate the utility of this language even over very expressive extensions such as GJ. The LOOJ compiler ge ..."
Abstract
-
Cited by 21 (1 self)
- Add to MetaCart
LOOJ is an extension of Java obtained by adding bounded parametric polymorphism and new type expressions ThisClass and ThisType, which are similar to MyType in LOOM. Through examples we demonstrate the utility of this language even over very expressive extensions such as GJ. The LOOJ compiler generates standard JVML code and supports instanceof and casts for all types including type variables and the other new type expressions. The core of the LOOJ type system is sound, as demonstrated by a soundness proof for an extension of Featherweight GJ. This paper also highlights difficulties that arise from the use of both classes and interfaces as types in Java.
B.C.: On decidability of nominal subtyping with variance
"... or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must ..."
Abstract
-
Cited by 17 (0 self)
- Add to MetaCart
or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior
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 16 (5 self)
- Add to MetaCart
(Show Context)
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
Objectoriented units of measurement
- ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM
, 2004
"... Programs that manipulate physical quantities typically represent these quantities as raw numbers corresponding to the quantities ’ measurements in particular units (e.g., a length represented as a number of meters). This approach eliminates the possibility of catching errors resulting from adding or ..."
Abstract
-
Cited by 15 (0 self)
- Add to MetaCart
(Show Context)
Programs that manipulate physical quantities typically represent these quantities as raw numbers corresponding to the quantities ’ measurements in particular units (e.g., a length represented as a number of meters). This approach eliminates the possibility of catching errors resulting from adding or comparing quantities expressed in different units (as in the Mars Climate Orbiter error [11]), and does not support the safe comparison and addition of quantities of the same dimension. We show how to formulate dimensions and units as classes in a nominally typed object-oriented language through the use of statically typed metaclasses. Our formulation allows both parametric and inheritance polymorphism with respect to both dimension and unit types. It also allows for integration of encapsulated measurement systems, dynamic conversion factors, declarations of scales (including nonlinear scales) with defined zeros, and nonconstant exponents on dimension types. We also show how to encapsulate most of the “magic machinery ” that handles the algebraic nature of dimensions and units in a single metaclass that allows us to treat select static types as generators of a free abelian group.
AspectJ2EE = AOP J2EE: Towards An Aspect Based, Programmable and Extensible Middleware Framework
- In Proc. ECOOP ’04, volume 3086 of LNCS
, 2004
"... J2EE is a middleware architecture augmented with supporting tools for developing large scale client/server and multi-tier applications. J2EE uses Enterprise JavaBeans as its component model. The realization of these components by a J2EE application server can be conceptually decomposed into distinct ..."
Abstract
-
Cited by 15 (1 self)
- Add to MetaCart
(Show Context)
J2EE is a middleware architecture augmented with supporting tools for developing large scale client/server and multi-tier applications. J2EE uses Enterprise JavaBeans as its component model. The realization of these components by a J2EE application server can be conceptually decomposed into distinct aspects such as persistence, transaction management, security, and load balancing. However, current servers do not employ aspect-oriented programming in their implementation. In this paper, we describe a new aspect language, AspectJ2EE, geared towards the generalized implementation of J2EE application servers, and applications within this framework. AspectJ2EE can be easily employed to extend the fixed set of services that these servers provide with new services such as logging and performance monitoring. Even tier-cutting concerns like encryption, data compression, and memoization can be added while avoiding the drags of cross-cutting and scattered code. AspectJ2EE is less general (and hence less complicated) than AspectJ, yet demonstrably powerful enough for the systematic development of large scale (and distributed) applications. The introduction of parameterized aspects makes aspects in AspectJ2EE more flexible and reusable than aspects in AspectJ. AspectJ2EE also generalizes the process of binding services to user applications in the application server into a novel deploy-time weaving of aspects. Deploytime weaving is superior to traditional weaving mechanisms, in that it preserves the object model, has a better management of aspect scope, and presents a more understandable and maintainable semantic model.
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 su ..."
Abstract
-
Cited by 15 (5 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.
Expressive and safe static reflection with MorphJ
- In PLDI 2008: Proceedings of the ACM SIGPLAN 2008 Conference on Programming Language Design and Implementation
"... Recently, language extensions have been proposed for Java and C# to support pattern-based reflective declaration. These extensions introduce a disciplined form of meta-programming and aspectoriented programming to mainstream languages: They allow members of a class (i.e., fields and methods) to be d ..."
Abstract
-
Cited by 12 (2 self)
- Add to MetaCart
(Show Context)
Recently, language extensions have been proposed for Java and C# to support pattern-based reflective declaration. These extensions introduce a disciplined form of meta-programming and aspectoriented programming to mainstream languages: They allow members of a class (i.e., fields and methods) to be declared by statically iterating over and pattern-matching on members of other classes. Such techniques, however, have been unable to safely express simple, but common, idioms such as declaring getter and setter methods for fields. In this paper, we present a mechanism that addresses the lack of expressiveness in past work without sacrificing safety. Our technique is based on the idea of nested patterns that elaborate the outer-most pattern with blocking or enabling conditions. We implemented this mechanism in a language, MorphJ. We demonstrate the expressiveness of MorphJ with real-world applications. In particular, the MorphJ reimplementation of DSTM2, a software transactional memory library, reduces 1,107 lines of Java reflection and bytecode engineering library calls to just 374 lines of MorphJ code. At the same time, the MorphJ solution is both high level and safer, as MorphJ can separately type check generic classes and catch errors early. We present and formalize the MorphJ type system, and offer a type-checking algorithm.
Morphing: Safely shaping a class in the image of others
- Appear: Proc. of the European Conf. on Object-Oriented Programming (ECOOP), LNCS
, 2007
"... Abstract. We present MJ: a language for specifying general classes whose members are produced by iterating over members of other classes. We call this technique “class morphing ” or just “morphing”. Morphing extends the notion of genericity so that not only types of methods and fields, but also the ..."
Abstract
-
Cited by 11 (4 self)
- Add to MetaCart
(Show Context)
Abstract. We present MJ: a language for specifying general classes whose members are produced by iterating over members of other classes. We call this technique “class morphing ” or just “morphing”. Morphing extends the notion of genericity so that not only types of methods and fields, but also the structure of a class can vary according to type variables. This offers the ability to express common programming patterns in a highly generic way that is otherwise not supported by conventional techniques. For instance, morphing lets us write generic proxies (i.e., classes that can be parameterized with another class and export the same public methods as that class); default implementations (e.g., a generic do-nothing type, configurable for any interface); semantic extensions (e.g., specialized behavior for methods that declare a certain annotation); and more. MJ’s hallmark feature is that, despite its emphasis on generality, it allows modular type checking: an MJ class can be checked independently of its uses. Thus, the possibility of supplying a type parameter that will lead to invalid code is detected early—an invaluable feature for highly general components that will be statically instantiated by other programmers. 1
Contracts for First-Class Classes
"... First-class classes add expressive power to class-based object-oriented over common scenarios with first-class classes. The addition of behavioral software contracts to a language with first-class classes poses significant challenges, however. In this paper, we present the first contract system for ..."
Abstract
-
Cited by 10 (4 self)
- Add to MetaCart
First-class classes add expressive power to class-based object-oriented over common scenarios with first-class classes. The addition of behavioral software contracts to a language with first-class classes poses significant challenges, however. In this paper, we present the first contract system for a programming language with first-class classes. The design has been implemented for PLT Scheme, which supports first-class classes and which implements mixins and traits as syntactic sugar. We therefore expect that our experience is also useful for languages with native mixins and/or traits.