Lifted Java: A Minimal Calculus for Translation Polymorphism

  • Matthias Diehn Ingesman
  • Erik Ernst
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6705)

Abstract

To support roles and similar notions involving multiple views on an object, languages like Object Teams and CaesarJ include mechanisms known as lifting and lowering. These mechanisms connect pairs of objects of otherwise unrelated types, and enables programmers to consider such a pair almost as a single object which has both types. In the terminology of Object Teams this is called translation polymorphism. In both Object Teams and CaesarJ the type system of the Java programming language has been extended to support this through the use of advanced language features. However, so far the soundness of translation polymorphism has not been proved.

This paper presents a simple model that extends Featherweight Java with the core operations of translation polymorphism, provides a Coq proof that its type system is sound, and shows that the ambiguity problem associated with the so-called smart lifting mechanism can be eliminated by a very simple semantics for lifting.

Keywords

Formal foundations language design lifting/lowering Translation Polymorphism type systems 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Aracic, I., Gasiunas, V., Awasthi, P., 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)CrossRefGoogle Scholar
  2. 2.
    Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development — Coq’Art: The Calculus of Inductive Constructions, Texts in Theoretical Computer Science, vol. XXV. Springer, Heidelberg (2004)CrossRefMATHGoogle Scholar
  3. 3.
    De Fraine, B.: Language Facilities for the Deployment of Reusable Aspects. Ph.D. thesis, Vrije Universiteit Brussel (2009), http://soft.vub.ac.be/soft/_media/members/brunodefraine/phd.pdf
  4. 4.
    De Fraine, B., Ernst, E., Südholt, M.: Essential AOP: The A calculus. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 101–125. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  5. 5.
    Ernst, E.: Family polymorphism. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 303–326. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  6. 6.
    Ernst, E., Ingesman, M.D.: Coq source for Lifted Java (2011), available at http://users-cs.au.dk/mdi/liftedJavaCoq.tar.gz
  7. 7.
    Ernst, E., Ostermann, K., Cook, W.R.: A virtual class calculus. In: Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, POPL 2006, pp. 270–282. ACM, New York (2006)CrossRefGoogle Scholar
  8. 8.
    Gosling, J., Joy, B., Steele, G., Bracha, G.: Java(TM) Language Specification, 3rd edn. Addison-Wesley, Reading (2005)MATHGoogle Scholar
  9. 9.
    Herrmann, S.: A precise model for contextual roles: The programming language Object Teams/Java. Appl. Ontol. 2, 181–207 (2007)Google Scholar
  10. 10.
    Herrmann, S., Hundt, C., Mehner, K.: Translation polymorphism in Object Teams. Tech. rep., Technical University Berlin (2004)Google Scholar
  11. 11.
    Herrmann, S., Hundt, C., Mosconi, M.: OT/J Language Definition, version 1.3 edn. (2010)Google Scholar
  12. 12.
    Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight Java: a minimal core calculus for Java and GJ. ACM Trans. Program. Lang. Syst. 23, 396–450 (2001)CrossRefGoogle Scholar
  13. 13.
    Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An overview of aspectJ. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–353. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  14. 14.
    Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C.V., Loingtier, J.-M., Irwin, J.: Aspect-oriented programming. In: Aksit, M., Auletta, V. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  15. 15.
    Mezini, M., Lieberherr, K.: Adaptive plug-and-play components for evolutionary software development. In: Proceedings of the 13th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications, OOPSLA 1998, pp. 97–116. ACM, New York (1998)Google Scholar
  16. 16.
    Mezini, M., Seiter, L., Lieberherr, K.: Component integration with pluggable composite adapters. In: Software Architectures and Component Technology: The State of the Art in Research and Practice, Kluwer Academic Publishers, Dordrecht (2000)Google Scholar
  17. 17.
    Ostermann, K.: Dynamically composable collaborations with delegation layers. In: Magnusson, B. (ed.) ECOOP 2002. LNCS, vol. 2374, pp. 89–110. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  18. 18.
    Wright, A.K., Felleisen, M.: A syntactic approach to type soundness. Inf. Comput. 115, 38–94 (1994)MathSciNetCrossRefMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Matthias Diehn Ingesman
    • 1
  • Erik Ernst
    • 1
  1. 1.Department of Computer ScienceAarhus UniversityDenmark

Personalised recommendations