Hostname: page-component-cd9895bd7-fscjk Total loading time: 0 Render date: 2024-12-29T06:06:40.261Z Has data issue: false hasContentIssue false

Dynamic overloading with copy semantics in object-oriented languages: a formal account

Published online by Cambridge University Press:  12 March 2009

Lorenzo Bettini
Affiliation:
Dipartimento di Informatica, Università di Torino, Italy; [email protected];[email protected]
Sara Capecchi
Affiliation:
Dipartimento di Informatica, Università di Torino, Italy; [email protected];[email protected]
Betti Venneri
Affiliation:
Dipartimento di Sistemi e Informatica, Università di Firenze, Italy; [email protected]
Get access

Abstract

Mainstream object-oriented languages often fail to provide complete powerful features altogether, such as, multiple inheritance, dynamic overloading and copy semantics of inheritance. In this paper we present a core object-oriented imperative language that integrates all these features in a formal framework. We define a static type system and a translation of the language into the meta-language λ_object,, in order to account for semantic issues and prove type safety of our proposal.

Type
Research Article
Copyright
© EDP Sciences, 2009

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

M. Abadi and L. Cardelli, A Theory of Objects. Springer (1996).
E. Allen, D. Chase, J. Hallett, V. Luchangco, J.W. Maessen, S. Ryu, G.L. Steele and S. Tobin-Hochstadt, The Fortress language specification Version 1.0 (2006). Sun Microsystems, available on line.
D. Ancona, S. Drossopoulou and E. Zucca, Overloading and Inheritance. In FOOL 8 (2001).
K. Arnold, J. Gosling and D. Holmes, The Java Programming Language. Addison-Wesley, 3rd edition (2000).
A. Alexandrescu, Modern C++ Design, Generic Programming and Design Patterns Applied. Addison Wesley (2001).
J. Boyland and G. Castagna, Parasitic methods: an implementation of multi-methods for Java, In OOPSLA '97: Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications ACM Press, New York, NY, USA (1997) 66–76.
Bruce, K.B., Cardelli, L., Castagna, G., The Hopkins Object Group, edited by G. Leavens and B.C. Pierce, On binary methods. Theory and Practice of Object Systems 1 (1995) 217238.
Bettini, L., Capecchi, S. and Venneri, B., Double dispatch in C++. Software – Practice and Experience 36 (2006) 581613. CrossRef
Bobrow, D., Demichiel, L., Gabriel, R., Keene, S. and Kiczales, G., Common Lisp Object System Specification. Lisp and Symbolic Computation 1 (1989) 245394.
Building an Object-Oriented Database System, The Story of O2. edited by F. Bancilhon, C. Delobel and P. Kanellakis. Morgan Kaufmann (1992).
D. Beyer, C. Lewerentz and F. Simon, Impact of Inheritance on Metrics for Size, Coupling, and Cohesion in Object-Oriented Systems. In IWSM '00: Proceedings of the 10th International Workshop on New Approaches in Software Measurement, Springer (2000) 1–17.
K.B. Bruce, Foundations of Object-Oriented Languages: Types and Semantics. MIT Press (2002).
Cardelli, L., A semantics of multiple inheritance. Inform. Comput. 76 (1988) 138164. CrossRef
P. Carbonetto, An implementation for multiple dispatch in Java using the elide framework. citeseer.nj.nec.com/575037.html (2002).
Castagna, G., A meta-language for typed object-oriented languages. Theoretical Computer Science 151 (1995) 297352. CrossRef
G. Castagna, Object-oriented programming: a unified foundation. Birkhauser Boston Inc., Cambridge, MA, USA (1997).
G. Castagna, G. Ghelli and G. Longo, in A semantics for λ-early: a calculus with overloading and early binding. edited by M. Bezem and J.F. Groote, International Conference on Typed Lambda Calculi and Applications. Lect. Notes Comput. Sci. 664 (1993) 107–123.
Castagna, G., Ghelli, G. and Longo, G., A calculus for overloaded functions with subtyping. Inform. Comput. 117 (1995) 115135. CrossRef
Chambers, C. and Leavens, G.T., Typechecking and modules for multimethods. ACM Trans. Program. Lang. Syst. 17 (1995) 805843. CrossRef
C. Chambers and G.T. Leavens, BeCecil, A Core Object-Oriented Language with Block Structure and Multimethods: Semantics and Typing. In The 4th Int. Workshop on Foundations of Object-Oriented Languages, FOOL 4 (1996).
C. Clifton, G.T. Leavens, C. Chambers and T. Millstein, MultiJava: modular open classes and symmetric multiple dispatch for Java, In OOPSLA '00: Proceedings of the 15th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications. ACM Press New York, NY, USA (2000) 130–145.
Cardelli, L. and Wegner, P., On understanding types, data abstraction, and polymorphism. ACM Comput. Surv. 17 (1985) 471523. CrossRef
L.G. DeMichiel and R.P. Gabriel, The Common Lisp Object System: An Overview, In Proc. ECOOP. Lect. Notes Comput. Sci. 276 (1987) 151–170.
C. Dutchyn, P. Lu, D. Szafron, S. Bromling and W. Holst, Multi-dispatch in the Java virtual machine: Design and implementation. In COOTS (2001) 77–92.
Ducasse, S., Nierstrasz, O., Schärli, N., Wuyts, R. and Black, A.P., Traits: A mechanism for fine-grained reuse. ACM Transactions on Programming Languages and Systems 28 (2006) 331388. CrossRef
R. Forax, E. Duris and G. Roussel, Java multi-method framework, In International Conference on Technology of Object-Oriented Languages and Systems (TOOLS '00), Sydney, Australia, Los Alamitos, California (2000). IEEE Computer Society Press.
E. Gamma, R. Helm, R. Johnson and J.M. Vlissides, Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley (1995).
D.H.H. Ingalls, A simple technique for handling multiple polymorphism, In OOPLSA '86: Conference proceedings on Object-oriented programming systems, languages and applications. ACM Press New York, NY, USA (1986) 347–349.
Igarashi, A., Pierce, B.C. and Wadler, P., Featherweight Java: a minimal core calculus for Java and GJ. ACM Trans. Program. Lang. Syst. 23 (2001) 396450. CrossRef
S. Keene, Object-Oriented Programming in Common Lisp. Addison-Wesley (1989).
S.B. Lippman, Inside the C++ Object Model. Addison-Wesley (1996).
G.T. Leavens and T.D. Millstein, Multiple dispatch as dispatch on tuples, In OOPSLA '98: Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications. ACM Press New York, NY, USA (1998) 374–387.
Millstein, T.D. and Chambers, C., Modular statically typed multimethods. Inform. Comput. 175 (2002) 76118. CrossRef
B. Meyer, Eiffel: The Language. Prentice-Hall (1991).
B. Meyer, Overloading vs. Object Technology. J. Object-Oriented Programming (2001) 3–7.
W.B. Mugridge, J. Hamer and J.G. Hosking, Multi-Methods in a Statically-Typed Programming Language, In Proc. ECOOP '91. Lect. Notes Comput. Sci. 512 (1991) 307–324.
N. Schärli, S. Ducasse, O. Nierstrasz and A. Black, Traits: Composable Units of Behavior, In Proceedings of European Conference on Object-Oriented Programming (ECOOP'03). Lect. Notes Comput. Sci. 2743 (2003) 248–274.
A. Shalit, The Dylan Reference Manual: The Definitive Guide to the New Object-Oriented Dynamic Language. Addison-Wesley, Reading, Mass (1997).
J. Smith, Cmm - C++ with Multimethods (2003). http://www.op59.net/cmm/readme.html.
B. Stroustrup, The C++ Programming Language. Addison-Wesley, 3rd edn. (1997).
A. Wright and M. Felleisen, A syntactic approach to type soundness. Inform. Comput. 115(1) (1994) 38–94.