Abstract
Typically, an object is a monolithic entity with a fixed interface. To increase flexibility in this area, this paper presents first-class object sets as a language construct. An object set offers an interface which is a disjoint union of the interfaces of its member objects. It may also be used for a special kind of method invocation involving multiple objects in a dynamic lookup process. With support for feature access and late-bound method calls, object sets are similar to ordinary objects, only more flexible. Object sets are particularly convenient as a lightweight primitive which may be added to a mainstream virtual machine in order to improve on the support for family polymorphism. The approach is made precise by means of a small calculus, and the soundness of its type system has been shown by a mechanically checked proof in Coq.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Ernst, E.: gbeta – A Language with Virtual Attributes, Block Structure, and Propagating, Dynamic Inheritance. PhD thesis, Devise, Department of Computer Science, University of Aarhus, Aarhus, Denmark (June 1999)
Ernst, E.: Higher-order hierarchies. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 303–329. Springer, Heidelberg (2003)
Ernst, E., Ostermann, K., Cook, W.R.: A virtual class calculus. In: Proceedings POPL 2006, Charleston, SC, USA, pp. 270–282. ACM, New York (2006)
Ernst, E.: Family polymorphism. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 303–326. Springer, Heidelberg (2001)
Ernst, E.: Coq proof of soundness for the FJ\(_{\mbox{\scriptsize set}}\) calculus (October 2008), http://www.cs.au.dk/~eernst/papers/objsetproof.tgz
Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development. Coq’Art: The Calculus of Inductive Constructions. Texts in Theoretical Computer Science. Springer, Heidelberg (2004)
Igarashi, A., Pierce, B., Wadler, P.: Featherweight Java: A minimal core calculus for Java and GJ. TOPLAS 23(3), 396–459 (2001)
Aydemir, B., Bohannon, A., Pierce, B., Vaughan, J., Vytiniotis, D., Weirich, S., Zdancewic, S.: Using proof assistants for programming language research (January 2008), http://www.cis.upenn.edu/~plclub/popl08-tutorial/
Bracha, G., Cook, W.R.: Mixin-based inheritance. In: Proceedings OOPSLA/ECOOP, pp. 303–311 (1990)
Schärli, N., Ducasse, S., Nierstrasz, O., Black, A.P.: Traits: Composable units of behaviour. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 248–274. Springer, Heidelberg (2003)
Ducasse, S., Nierstrasz, O., Schärli, N., Wuyts, R., Black, A.P.: Traits: A mechanism for fine-grained reuse. ACM Transactions on Programming Languages and Systems 28(2), 331–388 (2006)
Stroustrup, B.: The C++ Programming Language: Special edn. Addison Wesley, Reading (2000)
Meyer, B.: Eiffel: The Language. Prentice-Hall, Englewood Cliffs (1991)
Ungar, D., Smith, R.B.: Self: The power of simplicity. In: Proceedings OOPSLA 1987, Orlando, FL, October 1987, pp. 227–242 (1987)
Agesen, O., Bak, L., Chambers, C., Chang, B.W., Hölzle, U., Maloney, J., Smith, R.B., Ungar, D., Wolczko, M.: The Self 4.0 Programmer’s Reference Manual. Sun Microsystems, Inc., Mountain View (1995)
Kristensen, B.B., Østerbye, K.: Roles: Conceptual abstraction theory and practical language issues. TAPOS 2(3), 143–160 (1996)
Gottlob, G., Schrefl, M., Röck, B.: Extending object-oriented systems with roles. ACM Transactions on Information Systems 14(3), 268–296 (1996)
Kniesel, G.: Type-safe delegation for dynamic component adaptation. In: Demeyer, S., Bosch, J. (eds.) ECOOP 1998 Workshops. LNCS, vol. 1543, pp. 136–137. Springer, Heidelberg (1998)
Drossopoulou, S., Damiani, F., Dezani-Ciancaglini, M., Giannini, P.: Fickle: Dynamic object re-classification. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 130–149. Springer, Heidelberg (2001)
Bettini, L., Capecchi, S., Giachino, E.: Featherweight wrap java: Wrapping objects and methods. Journal of Object Technology 7(2), 5–29 (2008)
Gaster, B.R., Jones, M.P.: A polymorphic type system for extensible records and variants. Technical Report NOTTCS-TR-96-3, Department of Computer Science, University of Nottingham (November 1996)
Kiselyov, O., Lammel, R., Schupke, K.: Strongly typed heterogeneous collections. In: Haskell Workshop, pp. 96–107 (2004)
Odersky, M.: The Scala Language Specification. EPFL, Switzerland. Version 2.7 edn. (January 2009), http://www.scala-lang.org/docu/files/ScalaReference.pdf
Aracic, I., Gasiunas, V., Mezini, M., Ostermann, K.: An overview of CaesarJ. In: Rashid, A., Aksit, M. (eds.) Transactions on Aspect-Oriented Software Development I. LNCS, vol. 3880, pp. 135–173. Springer, Heidelberg (2006)
Herrmann, S.: A precise model for contextual roles: The programming language ObjectTeams/Java. Applied Ontology 2(2), 181–207 (2007)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2009 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ernst, E. (2009). First-Class Object Sets. In: Berardi, S., Damiani, F., de’Liguoro, U. (eds) Types for Proofs and Programs. TYPES 2008. Lecture Notes in Computer Science, vol 5497. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-02444-3_6
Download citation
DOI: https://doi.org/10.1007/978-3-642-02444-3_6
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-02443-6
Online ISBN: 978-3-642-02444-3
eBook Packages: Computer ScienceComputer Science (R0)