Skip to main content

Fine-Grained Function Visibility for Multiple Dispatch with Multiple Inheritance

  • Conference paper
Programming Languages and Systems (APLAS 2013)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 8301))

Included in the following conference series:

Abstract

Object-oriented languages with multiple dispatch and multiple inheritance provide rich expressiveness but statically and modularly checking programs in such languages to guarantee that no ambiguous calls can occur at run time has been a difficult problem. We present a core calculus for Fortress, which provides various language features-notably functional methods and components- and solves the problem. Functional methods are declared within traits and may be inherited but are invoked by ordinary function calls, and therefore compete in overloading resolution with ordinary function declarations. A novel component system governs “visibility” of types and functions, and allows fine-grained control over the import of overloaded functions. We formally define the type system of Fortress with a set of static rules to guarantee no ambiguous calls at run time, and mechanize the calculus and its type safety proof in Coq.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Allen, E., Chase, D., Hallett, J.J., Luchangco, V., Maessen, J.-W., Ryu, S., Steele Jr., G.L., Tobin-Hochstadt, S.: The Fortress Language Specification Version 1.0 (March 2008)

    Google Scholar 

  2. Allen, E., Hallett, J.J., Luchangco, V., Ryu, S., Steele, G.: Modular multiple dispatch with multiple inheritance. In: Proc. ACM Symposium on Applied Computing (2007)

    Google Scholar 

  3. Allen, E., Hilburn, J., Kilpatrick, S., Luchangco, V., Ryu, S., Chase, D., Steele Jr., G.L.: Type-checking Modular Multiple Dispatch with Parametric Polymorphism and Multiple Inheritance. In: OOPSLA (2011)

    Google Scholar 

  4. Castagna, G., Ghelli, G., Longo, G.: A calculus for overloaded functions with subtyping. In: LFP (1992)

    Google Scholar 

  5. Chambers, C.: Object-oriented multi-methods in Cecil. In: Madsen, O.L. (ed.) ECOOP 1992. LNCS, vol. 615, pp. 33–56. Springer, Heidelberg (1992)

    Chapter  Google Scholar 

  6. Chambers, C., Leavens, G.T.: Bececil, a core object-oriented language with block structure and multimethods: Semantics and typing. In: Proceedings of the 4th International Workshop on Foundations of Object Oriented Languages (1997)

    Google Scholar 

  7. Clifton, C., Millstein, T., Leavens, G.T., Chambers, C.: MultiJava: Design rationale, compiler implementation, and applications. ACM TOPLAS 28(3), 517–575 (2006)

    Article  Google Scholar 

  8. The COQ Development Team. The COQ Proof Assistant, http://coq.inria.fr/

  9. De Fraine, B., Ernst, E., Südholt, M.: Cast-Free Featherweight Java (2008), http://soft.vub.ac.be/~bdefrain/featherj

  10. Kim, J.: MFFMM in COQ (2012), http://plrg.kaist.ac.kr/_media/research/software/mffmm_in_coq.tar.gz

  11. Kim, J., Ryu, S.: COQ mechanization of Featherweight Fortress with multiple dispatch and multiple inheritance. In: Proceedings of the First International Conference on Certified Programs and Proofs (2011)

    Google Scholar 

  12. Kim, J., Ryu, S.: MFFMM : Modular Featherweight Fortress with Multiple Dispatch and Multiple Inheritance (June 2013), http://plrg.kaist.ac.kr/_media/research/publications/mffmm_calculus.pdf

  13. Millstein, T., Bleckner, C., Chambers, C.: Modular typechecking for hierarchically extensible datatypes and functions. ACM TOPLAS 26(5), 836–889 (2004)

    Article  Google Scholar 

  14. Millstein, T., Chambers, C.: Modular statically typed multimethods. Information and Computation 175(1), 76–118 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  15. Millstein, T.D., Reay, M., Chambers, C.: Relaxed MultiJava: balancing extensibility and modular typechecking. In: OOPSLA (2003)

    Google Scholar 

  16. Nipkow, T., Paulson, L.C., Wenzel, M.T.: Isabelle/HOL. LNCS, vol. 2283. Springer, Heidelberg (2002)

    Book  MATH  Google Scholar 

  17. Odersky, M., Wadler, P., Wehr, M.: A second look at overloading. In: FPCA, pp. 135–146 (1995)

    Google Scholar 

  18. Oliveira, B.C.D.S., Moors, A., Odersky, M.: Type classes as objects and implicits. In: OOPSLA (2010)

    Google Scholar 

  19. 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)

    Chapter  Google Scholar 

  20. Strniša, R., Sewell, P., Parkinson, M.: The Java module system: Core design and semantic definition. In: OOPSLA (2007)

    Google Scholar 

  21. Stroustrup, B.: The C++ Programming Language. Addison-Wesley, Reading (1986)

    MATH  Google Scholar 

  22. Szypersky, C., Omohundro, S., Murer, S.: Engineering a programming language: The type and class system of Sather. In: Gutknecht, J. (ed.) Programming Languages and System Architectures. LNCS, vol. 782, pp. 208–227. Springer, Heidelberg (1994)

    Chapter  Google Scholar 

  23. Wadler, P., Blott, S.: How to make ad-hoc polymorphism less ad hoc. In: POPL (1989)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer International Publishing Switzerland

About this paper

Cite this paper

Kim, J., Ryu, S., Luchangco, V., Steele, G.L. (2013). Fine-Grained Function Visibility for Multiple Dispatch with Multiple Inheritance. In: Shan, Cc. (eds) Programming Languages and Systems. APLAS 2013. Lecture Notes in Computer Science, vol 8301. Springer, Cham. https://doi.org/10.1007/978-3-319-03542-0_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-03542-0_11

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-03541-3

  • Online ISBN: 978-3-319-03542-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics