Document Open Access Logo

A Theory of Tagged Objects

Authors Joseph Lee, Jonathan Aldrich, Troy Shaw, Alex Potanin



PDF
Thumbnail PDF

File

LIPIcs.ECOOP.2015.174.pdf
  • Filesize: 0.59 MB
  • 24 pages

Document Identifiers

Author Details

Joseph Lee
Jonathan Aldrich
Troy Shaw
Alex Potanin

Cite AsGet BibTex

Joseph Lee, Jonathan Aldrich, Troy Shaw, and Alex Potanin. A Theory of Tagged Objects. In 29th European Conference on Object-Oriented Programming (ECOOP 2015). Leibniz International Proceedings in Informatics (LIPIcs), Volume 37, pp. 174-197, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2015)
https://doi.org/10.4230/LIPIcs.ECOOP.2015.174

Abstract

Foundational models of object-oriented constructs typically model objects as records with a structural type. However, many object-oriented languages are class-based; statically-typed formal models of these languages tend to sacrifice the foundational nature of the record-based models, and in addition cannot express dynamic class loading or creation. In this paper, we explore how to model statically-typed object-oriented languages that support dynamic class creation using foundational constructs of type theory. We start with an extensible tag construct motivated by type theory, and adapt it to support static reasoning about class hierarchy and the tags supported by each object. The result is a model that better explains the relationship between object-oriented and functional programming paradigms, suggests a useful enhancement to functional programming languages, and paves the way for more expressive statically typed object-oriented languages. In that vein, we describe the design and implementation of the Wyvern language, which leverages our theory.
Keywords
  • objects
  • classes
  • tags
  • nominal and structural types

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. Martin Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a statically-typed language. Transactions on Programming Languages and Systems, 13(2):237-268, April 1991. Google Scholar
  2. Viviana Bono, Amit Patel, and Vitaly Shmatikov. A core calculus of classes and mixins. In European Conference on Object-Oriented Programming, 1999. Google Scholar
  3. François Bourdoncle and Stephan Merz. Type checking higher-order polymorphic multi-methods. In Principles of Programming Languages, 1997. Google Scholar
  4. Gilad Bracha and William Cook. Mixin-based inheritance. In Object-Oriented Programmming, Systems, Languages, and Applications, 1990. Google Scholar
  5. Kim Bruce, Luca Cardelli, and Benjamin Pierce. Comparing object encodings. Information and Computation, 155(1/2):108-133, 1999. Google Scholar
  6. Luca Cardelli. Amber. In Combinators and Functional Programming Languages, 1986. Google Scholar
  7. David Clarke, James Noble, and John Potter. Simple ownership types for object confinement. In European Conference on Object-Oriented Programming, 2001. Google Scholar
  8. Burak Emir, Martin Odersky, and John Williams. Matching objects with patterns. In European Conference on Object-Oriented Programming, 2007. Google Scholar
  9. Matthew Flatt, Robert Bruce Findler, and Matthias Felleisen. Scheme with classes, mixins, and traits. In Asian Symposium on Programming Languages and Systems, 2006. Google Scholar
  10. Matthew Flatt, Shriram Krishnamurthi, and Mattias Felleisen. Classes and mixins. In Principles of Programming Languages, 1998. Google Scholar
  11. Tim Freeman and Frank Pfenning. Refinement types for ML. In Programming Language Design and Implementation, June 1991. Google Scholar
  12. Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1995. Google Scholar
  13. Neal Glew. Typed dispatch for named hierarchical types. In International Conference on Functional Programming, 1999. Google Scholar
  14. Robert Harper. Practical Foundations for Programming Languages. Cambridge University Press, 2013. Google Scholar
  15. Robert Harper and Benjamin C. Pierce. Advanced Topics in Types and Programming Languages (Edited by Benjamin C. Pierce), chapter Design Considerations for ML-Style Module Systems. MIT Press, 2005. Google Scholar
  16. Robert Harper and Chris Stone. An interpretation of Standard ML in type theory. Technical Report CMU-CS-97-147, Carnegie Mellon University, 1997. Google Scholar
  17. Susumu Hayashi. Singleton, union and intersection types for program extraction. In Theoretical Aspects of Computer Software, 1991. Google Scholar
  18. Atsushi Igarashi, Benjamin C. Pierce, and Philip Wadler. Featherweight Java: a minimal core calculus for Java and GJ. Transactions on Programming Languages and Systems, 23(3):396-450, May 2001. Google Scholar
  19. Timothy Jones, Michael Homer, and James Noble. Brand objects for nominal typing. In European Conference on Object-Oriented Programming, 2015. Google Scholar
  20. Joseph Lee, Jonathan Aldrich, Troy Shaw, and Alex Potanin. A theory of tagged objects (with supplementary material). Technical Report 15-03, ECS, VUW, 2015. URL: http://ecs.victoria.ac.nz/Main/TechnicalReportSeries.
  21. Donna Malayeri and Jonathan Aldrich. Integrating nominal and structural subtyping. In European Conference on Object-Oriented Programming, 2008. Google Scholar
  22. Donna Malayeri and Jonathan Aldrich. CZ: Multiple inheritance without diamonds. In Object-Oriented Programmming, Systems, Languages, and Applications, 2009. Google Scholar
  23. Todd Millstein, Colin Bleckner, and Craig Chambers. Modular typechecking for hierarchically extensible datatypes and functions. Transactions on Programming Languages and Systems, 26(5):836-889, 2004. Google Scholar
  24. Ligia Nistor, Darya Kurilova, Stephanie Balzer, Benjamin Chung, Alex Potanin, and Jonathan Aldrich. Wyvern: A simple, typed, and pure object-oriented language. In Mechanisms for Specialization, Generalization, and Inheritance (MASPEGHI), 2002. Google Scholar
  25. Benjamin C. Pierce. Types and Programming Languages. MIT Press, 2002. Google Scholar
  26. John Reppy and Jon Riecke. Simple objects for Standard ML. In Programming Language Design and Implementation, 1996. Google Scholar
  27. Asumu Takikawa, T. Stephen Strickland, Christos Dimoulas, Sam Tobin-Hochstadt, and Mattias Felleisen. Gradual typing for first-class classes. In Object-Oriented Programmming, Systems, Languages, and Applications, 2012. Google Scholar
  28. Dimitrios Vytiniotis, Geoffrey Washburn, and Stephanie Weirich. An open and shut typecase. In Programming Language Design and Implementation, 2005. Google Scholar
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail