POPL '98 Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Featherweight Java: a minimal core calculus for Java and GJ
ACM Transactions on Programming Languages and Systems (TOPLAS)
Foundations of object-oriented languages: types and semantics
Foundations of object-oriented languages: types and semantics
A Theory of Objects
A lambda calculus of objects and method specialization
Nordic Journal of Computing
A Delegation-based Object Calculus with Subtying
FCT '95 Proceedings of the 10th International Symposium on Fundamentals of Computation Theory
Implicit First Class Genericity
SC '09 Proceedings of the 8th International Conference on Software Composition
Magda: a new language for modularity
ECOOP'12 Proceedings of the 26th European conference on Object-Oriented Programming
Hi-index | 0.00 |
In most mainstream object-oriented languages, the object initialization protocol is based on constructors, where different constructors of the same class are, in fact, overloaded variants of the same method. This approach has some disadvantages: it forces an exponential growth of the code with respect to the number of properties, it may cause duplication of code, and it may create unnecessary code dependencies. To the best of our knowledge, the literature lacks formal proposals that model non-trivial object initialization protocols. In this paper we present a calculus (called FJMIP), which is an extension of the Igarashi-Pierce-Wadler Featherweight Java and models a novel object initialization protocol. Our calculus is reasonably simple, but it offers two benefits: (i) it formalizes a modular way of initializing objects that does not suffer from the previous mentioned flaws, while still being an expressive object initialization protocol; (ii) as a by-product, it allowed us to introduce a novel technique to prove that our object initialization process actually initializes all the fields of an object.