Skip to main content

Abstract

Much recent work on proof-carrying code aims to build certifying compilers for single-inheritance object-oriented languages, such as Java or C#. Some modern object-oriented languages support compiling a derived class without complete information about its base class. This strategy—though necessary for supporting features such as mixins, traits, and first-class classes—is not well-supported by existing typed intermediate languages. We present a low-level IL with a type system based on the Calculus of Inductive Constructions. It is an appropriate target for efficient, type-preserving compilation of various forms of inheritance, even when the base class is unknown at compile time. Languages (such as Java) that do not require such flexibility are not penalized at run time.

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. Appel, A.W.: Foundational proof-carrying code. In: Proc. IEEE Symp. on Logic in Computer Science (LICS), June 2001, pp. 247–258 (2001)

    Google Scholar 

  2. Barendregt, H.: Typed lambda calculi. In: Abramsky, S., Gabbay, D., Maibaum, T. (eds.) Handbook of Logic in Computer Science, Oxford, vol. 2 (1992)

    Google Scholar 

  3. Bracha, G., Cook, W.: Mixin-based inheritance. In: Proc. Conf. on Object-Oriented Programming Systems, Languages, and Applications, October 1990, pp. 303–311 (1990)

    Google Scholar 

  4. Bruce, K.B., Fiech, A., Petersen, L.: Subtyping is not a good ‘Match’ for object-oriented languages. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 104–127. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  5. Bruce, K.B., Cardelli, L., Pierce, B.C.: Comparing object encodings. Information and Computation 155(1–2), 108–133 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  6. Cardelli, L., Leroy, X.: Abstract types and the dot notation. In: Proc. IFIP Working Conf. on Programming Concepts and Methods, Israel, April 1990, pp. 466–491 (1990)

    Google Scholar 

  7. Cardelli, L., Mitchell, J.C.: Operations on records. In: Gunter, C.A., Mitchell, J.C. (eds.) Theoretical Aspects of Object-Oriented Programming. Foundations of Computing Series. MIT Press, Cambridge (1994)

    Google Scholar 

  8. Chang, B.-Y.E., Chlipala, A., Necula, G.C., Schneck, R.R.: Type-based verification of assembly language for compiler debugging. In: Proc. ACMWorkshop on Types in Language Design and Implementation (TLDI), pp. 91–102 (2005)

    Google Scholar 

  9. Chen, J., Tarditi, D.: A simple typed intermediate language for object-oriented languages. In: Proc. Symp. on Principles of Programming Languages. ACM, New York (2005)

    Google Scholar 

  10. Ciaffaglione, A., Liquori, L., Miculan, M.: Imperative object-based calculi in coinductive type theories. In: Y. Vardi, M., Voronkov, A. (eds.) LPAR 2003. LNCS, vol. 2850, pp. 59–77. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  11. Colby, C., Lee, P., Necula, G.C., Blau, F., Cline, K., Plesko, M.: A certifying compiler for Java. In: Proc. Conf. on Programming Language Design and Implementation, Vancouver. ACM, New York (2000)

    Google Scholar 

  12. Coq Development Team. The Coq Proof Assistant Reference Manual. INRIA, version 8.0 edn. (June 2004)

    Google Scholar 

  13. Coquand, T., Huet, G.: The calculus of constructions. Information and Computation 76, 95–120 (1988)

    Article  MathSciNet  MATH  Google Scholar 

  14. Coquand, T., Paulin-Mohring, C.: Inductively defined types. In: Martin-Löf, P., Mints, G. (eds.) COLOG 1988. LNCS, vol. 417. Springer, Heidelberg (1990)

    Chapter  Google Scholar 

  15. Crary, K.: Typed compilation of inclusive subtyping. In: Proc. Int’l Conf. Functional Programming (September 2000)

    Google Scholar 

  16. Crary, K.: Simple, efficient object encoding using intersection types. Technical Report CMU-CS-99-100, Carnegie Mellon University, Pittsburgh (January 1999)

    Google Scholar 

  17. Fisher, K., Reppy, J.: A typed calculus for traits. In: Proc. Int’l Workshop on Foundations of Object-Oriented Languages (January 2004)

    Google Scholar 

  18. Fisher, K., Reppy, J.: Foundations for moby classes. Technical report, Bell Labs (December 1998)

    Google Scholar 

  19. Fisher, K., Reppy, J.: The design of a class mechanism for Moby. In: Proc. Conf. on Programming Language Design and Implementation. ACM, New York (1999)

    Google Scholar 

  20. Fisher, K., Reppy, J., Riecke, J.G.: A calculus for compiling and linking classes. In: Proc. European Symp. on Programming, pp. 135–149 (2000)

    Google Scholar 

  21. Flanagan, C., Sabry, A., Duba, B.F., Felleisen, M.: The essence of compiling with continuations. In: Proc. Conf. on Programming Language Design and Implementation, Albuquerque, June 1993, pp. 237–247 (1993)

    Google Scholar 

  22. Glew, N.: An efficient class and object encoding. In: Proc. Conf. on Object-Oriented Programming Systems, Languages, and Applications. ACM, New York (2000)

    Google Scholar 

  23. Howard, W.A.: The formulae-as-types notion of constructions. In: To, H.B. (ed.) Curry: Essays on Computational Logic, Lambda Calculus, and Formalism. Academic Press, London (1980)

    Google Scholar 

  24. League, C., Monnier, S.: Typed compilation against non-manifest base classes. Extended version, available from authors’ web sites (December 2005)

    Google Scholar 

  25. League, C., Shao, Z., Trifonov, V.: Type- preserving compilation of Featherweight Java. ACM Trans. on Programming Languages and Systems 24(2), 112–152 (2002)

    Article  Google Scholar 

  26. League, C., Shao, Z., Trifonov, V.: Precision in practice: A type-preserving Java compiler. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 106–120. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  27. Moon, D.A.: Object-oriented programming with Flavors. In: Proc. Conf. on Object- Oriented Programming Systems, Languages, and Applications, November 1986, pp. 1–8 (1986)

    Google Scholar 

  28. Morrisett, G., Walker, D., Crary, K., Glew, N.: From System F to typed assembly language. ACM Trans. on Programming Languages and Systems 21(3) (May 1999)

    Google Scholar 

  29. Necula, G.C.: Proof-carrying code. In: Proc. Symp. on Principles of Programming Languages, Paris, pp. 106–119. ACM, New York (1997)

    Google Scholar 

  30. Pfenning, F., Elliot, C.: Higher-order abstract syntax. In: Proc. Conf. on Programming Language Design and Implementation, pp. 199–208 (1988)

    Google Scholar 

  31. Rémy, D., Vouillon, J.: Objective ML: An effective object-oriented extension to ML. Theory and Practice of Object Systems 4 (1998)

    Google Scholar 

  32. Schärli, N., Ducasse, S., Nierstrasz, O., Black, A.P.: Traits: Composable units of behaviour. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743. Springer, Heidelberg (2003)

    Google Scholar 

  33. Shao, Z., Trifonov, V., Saha, B., Papaspyrou, N.: A type system for certified binarios. ACM Trans. on Programming Languages and Systems 27(1), 1–45 (2005)

    Article  Google Scholar 

  34. Stone, C.A.: Extensible objects without labels. ACM Trans. on Programming Languages and Systems 26(5), 805–835 (2004)

    Article  Google Scholar 

  35. Vanderwaart, J.C.: Typed intermediate representations for compiling object-oriented languages. Williams College Senior Honors Thesis (1999)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

League, C., Monnier, S. (2006). Typed Compilation Against Non-manifest Base Classes. In: Barthe, G., Grégoire, B., Huisman, M., Lanet, JL. (eds) Construction and Analysis of Safe, Secure, and Interoperable Smart Devices. CASSIS 2005. Lecture Notes in Computer Science, vol 3956. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11741060_5

Download citation

  • DOI: https://doi.org/10.1007/11741060_5

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-33689-1

  • Online ISBN: 978-3-540-33691-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics