Featherweight Java: a minimal core calculus for Java and GJ
Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
MetaML and multi-stage programming with explicit annotations
Theoretical Computer Science - Partial evaluation and semantics-based program manipulation
Types and programming languages
Types and programming languages
The C++ Programming Language
ECOOP'07 Proceedings of the 21st European conference on Object-Oriented Programming
Morphing: safely shaping a class in the image of others
ECOOP'07 Proceedings of the 21st European conference on Object-Oriented Programming
MetaFJig: a meta-circular composition language for Java-like classes
Proceedings of the ACM international conference on Object oriented programming systems languages and applications
Featherweight Jigsaw - Replacing inheritance by composition in Java-like languages
Information and Computation
Hi-index | 0.00 |
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 well-typed 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. Conventional typechecking of class expressions only takes place when they appear as class definitions in the class table. With this approach, it suffices to introduce a unique common type code for meta-expressions, at the price of a later error detection.