Refactoring object-oriented frameworks
Refactoring object-oriented frameworks
Design patterns: elements of reusable object-oriented software
Design patterns: elements of reusable object-oriented software
Refactoring: improving the design of existing code
Refactoring: improving the design of existing code
Featherweight Java: a minimal core calculus for Java and GJ
ACM Transactions on Programming Languages and Systems (TOPLAS)
Proceedings of the 25th International Conference on Software Engineering
Classbox/J: controlling the scope of change in Java
OOPSLA '05 Proceedings of the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Statically scoped object adaptation with expanders
Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
The jastadd extensible java compiler
Proceedings of the 22nd annual ACM SIGPLAN conference on Object-oriented programming systems and applications
Expressive and safe static reflection with MorphJ
Proceedings of the 2008 ACM SIGPLAN conference on Programming language design and implementation
Refactoring Tools: Fitness for Purpose
IEEE Software
Sound and extensible renaming for java
Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications
Feature featherweight java: a calculus for feature-oriented programming and stepwise refinement
GPCE '08 Proceedings of the 7th international conference on Generative programming and component engineering
A reusable observer pattern implementation using package templates
Proceedings of the 8th workshop on Aspects, components, and patterns for infrastructure software
FEATUREHOUSE: Language-independent, automated software composition
ICSE '09 Proceedings of the 31st International Conference on Software Engineering
How we refactor, and how we know it
ICSE '09 Proceedings of the 31st International Conference on Software Engineering
JavaGI in the battlefield: practical experience with generalized interfaces
GPCE '09 Proceedings of the eighth international conference on Generative programming and component engineering
Groovy package templates: supporting reuse and runtime adaption of class hierarchies
DLS '09 Proceedings of the 5th symposium on Dynamic languages
Polyglot: an extensible compiler framework for Java
CC'03 Proceedings of the 12th international conference on Compiler construction
Superimposition: a language-independent approach to software composition
SC'08 Proceedings of the 7th international conference on Software composition
Controlling dynamic module composition through an extensible meta-level API
Proceedings of the 6th symposium on Dynamic languages
Adaptable generic programming with required type specifications and package templates
Proceedings of the 11th annual international conference on Aspect-oriented Software Development
A tutorial on feature oriented programming and the AHEAD tool suite
GTTSE'05 Proceedings of the 2005 international conference on Generative and Transformational Techniques in Software Engineering
JavaGI: generalized interfaces for java
ECOOP'07 Proceedings of the 21st European conference on Object-Oriented Programming
The Java Language Specification, Java SE 7 Edition
The Java Language Specification, Java SE 7 Edition
Type-Safe symmetric composition of metamodels using templates
SAM'12 Proceedings of the 7th international conference on System Analysis and Modeling: theory and practice
Hi-index | 0.00 |
Package Templates (PT) is a mechanism designed for writing reusable modules, called templates, each consisting of a set of classes that can be adapted to their use in a program through compile-time specialization. A template must be instantiated in a program before its classes can be used. The mechanism supports type-safe renaming, merging, type parameterization and refinement in the form of static additions and overrides that are orthogonal to the corresponding concepts of ordinary inheritance. In this paper, we consider PT as an extension to Java, and a PT program will then consist of a number of Java packages and templates, where templates are instantiated in packages or other templates. Our aim and main contribution is to define the meaning of such a program, and to show that this definition is consistent. We first show this for a core subset of PT, C-PT, and define a set of source-to-source transformations for converting C-PT programs to plain Java programs using semantics we have described informally in previous papers. We can then define the meaning of a C-PT program in terms of the resulting Java program. Thus, we have to verify that the transformations will always convert a legal C-PT program to a legal Java program. Finally, we briefly discuss how this approach can be extended to full PT. A main challenge is to preserve externally visible names (for classes, methods and fields), and at the same time prevent unwanted subsequent rebindings caused e.g. by over-load resolution in the Java compiler. Names that are bound to declarations in a template should not be rebound to different declarations by subsequent compositions or adaptions. In addition to defining the runtime semantics of PT constructs in terms of their translation to Java, the transformation rules can also be seen as a high-level approach to how a compiler for this language might be implemented.