Virtual classes: a powerful mechanism in object-oriented programming
OOPSLA '89 Conference proceedings on Object-oriented programming systems, languages and applications
F-bounded polymorphism for object-oriented programming
FPCA '89 Proceedings of the fourth international conference on Functional programming languages and computer architecture
A syntactic approach to type soundness
Information and Computation
Theory and Practice of Object Systems - Special issue: type systems
POPL '98 Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Making the future safe for the past: adding genericity to the Java programming language
Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
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
A Statically Safe Alternative to Virtual Types
ECCOP '98 Proceedings of the 12th European Conference on Object-Oriented Programming
ECOOP '01 Proceedings of the 15th European Conference on Object-Oriented Programming
Scalable extensibility via nested inheritance
OOPSLA '04 Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Tribe: a simple virtual class calculus
Proceedings of the 6th international conference on Aspect-oriented software development
Variant path types for scalable extensibility
Proceedings of the 22nd annual ACM SIGPLAN conference on Object-oriented programming systems and applications
Lightweight family polymorphism
APLAS'05 Proceedings of the Third Asian conference on Programming Languages and Systems
Lightweight scalable components
GPCE '07 Proceedings of the 6th international conference on Generative programming and component engineering
GPCE '08 Proceedings of the 7th international conference on Generative programming and component engineering
Matching ThisType to subtyping
Proceedings of the 2009 ACM symposium on Applied Computing
Safer typing of complex API usage through Java generics
PPPJ '09 Proceedings of the 7th International Conference on Principles and Practice of Programming in Java
Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications
Proceedings of the ACM international conference on Object oriented programming systems languages and applications
Revisiting parametric types and virtual classes
TOOLS'10 Proceedings of the 48th international conference on Objects, models, components, patterns
JavaGI: The Interaction of Type Classes with Interfaces and Inheritance
ACM Transactions on Programming Languages and Systems (TOPLAS)
Separating ownership topology and encapsulation with generic universe types
ACM Transactions on Programming Languages and Systems (TOPLAS)
DeepFJig: modular composition of nested classes
Proceedings of the 9th International Conference on Principles and Practice of Programming in Java
Feature-oriented programming with family polymorphism
Proceedings of the 3rd international workshop on Variability & Composition
A meta-circular language for active libraries
PEPM '13 Proceedings of the ACM SIGPLAN 2013 workshop on Partial evaluation and program manipulation
Challenges in the design of the package template mechanism
Transactions on Aspect-Oriented Software Development IX
Science of Computer Programming
Hi-index | 0.00 |
Family polymorphism has been proposed for object-oriented languages as a solution to supporting reusable yet type-safe mutually recursive classes. A key idea of family polymorphism is the notion of families, which are used to group mutually recursive classes. In the original proposal, due to the design decision that families are represented by objects, dependent types had to be introduced, resulting in a rather complex type system. In this article, we propose a simpler solution of lightweight family polymorphism, based on the idea that families are represented by classes rather than by objects. This change makes the type system significantly simpler without losing much expressive power of the language. Moreover, “family-polymorphic” methods now take a form of parametric methods; thus, it is easy to apply method type argument inference as in Java 5.0. To rigorously show that our approach is safe, we formalize the set of language features on top of Featherweight Java and prove that the type system is sound. An algorithm for type inference for family-polymorphic method invocations is also formalized and proved to be correct. Finally, a formal translation by erasure to Featherweight Java is presented; it is proved to preserve typing and execution results, showing that our new language features can be implemented in Java by simply extending the compiler.