skip to main content
10.1145/1040305.1040308acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article

Polymorphic bytecode: compositional compilation for Java-like languages

Published: 12 January 2005 Publication History

Abstract

We define compositional compilation as the ability to typecheck source code fragments in isolation, generate corresponding binaries,and link together fragments whose mutual assumptions are satisfied, without reinspecting the code. Even though compositional compilation is a highly desirable feature, in Java-like languages it can hardly be achieved. This is due to the fact that the bytecode generated for a fragment (say, a class) is not uniquely determined by its source code, but also depends on the compilation context.We propose a way to obtain compositional compilation for Java, by introducing a polymorphic form of bytecode containing type variables (ranging over class names) and equipped with a set of constraints involving type variables. Thus, polymorphic bytecode provides a representation for all the (standard) bytecode that can be obtained by replacing type variables with classes satisfying the associated constraints.We illustrate our proposal by developing a typing and a linking algorithm. The typing algorithm compiles a class in isolation generating the corresponding polymorphic bytecode fragment and constraints on the classes it depends on. The linking algorithm takes a collection of polymorphic bytecode fragments, checks their mutual consistency, and possibly simplifies and specializes them. In particular, linking a self-contained collection of fragments either fails, or produces standard bytecode (the same as would have been produced by standard compilation of all fragments).

References

[1]
D. Ancona, F. Damiani, S. Drossopoulou, and E. Zucca. Even more principal typings for Java-like languages. In 6th Intl. Workshop on Formal Techniques for Java Programs 2004, June 2004.
[2]
D. Ancona, F. Damiani, S. Drossopoulou, and E. Zucca. Polymorphic bytecode: Compositional compilation for Java-like languages. Technical report, Dipartimento di Informatica e Scienze dell'Informazione, Università di Genova, November 2004. Extended verson with proofs, available at ftp://ftp.disi.unige.it/pub/person/AnconaD/PBCCJL.pdf.
[3]
D. Ancona and G. Lagorio. Stronger Typings for Smarter Recompilation of Java-like Languages. Journal of Object Technology, 3(6):5--25, June 2004. Special issue: ECOOP 2003 workshop on Formal Techniques for Java-like Programs.
[4]
D. Ancona, G. Lagorio, and E. Zucca. True separate compilation of Java classes. In ACM SIGPLAN Conference on Principles and Practice of Declarative Programming (PPDP'02), pages 189--200. ACM Press, 2002.
[5]
D. Ancona and E. Zucca. Principal typings for Java-like languages. In ACM Symp. on Principles of Programming Languages 2004, pages 306--317. ACM Press, January 2004.
[6]
Alex Buckley and Sophia Drossopoulou. Flexible Dynamic Linking. In 6th Intl. Workshop on Formal Techniques for Java Programs 2004, June 2004.
[7]
L. Cardelli. Program fragments, linking, and modularization. In ACM Symp. on Principles of Programming Languages 1997, pages 266--277. ACM Press, 1997.
[8]
Sophia Drossopoulou and Susan Eisenbach. Is the Java Type System Sound? In 11th European Conference on Object Oriented Programming (ECOOP'97), volume 1241 of LNCS, pages 389--418. Springer-Verlag, June 1997.
[9]
A. Igarashi, B. Pierce, and P. Wadler. Featherweight Java: A minimal core calculus for Java and GJ. In ACM Symp. on Object-Oriented Programming: Systems, Languages and Applications 1999, pages 132--146, November 1999.
[10]
T. Jim. What are principal typings and what are they good for? In Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 42--53. ACM Press, 1996.
[11]
G. Lagorio. Towards a smart compilation manager for Java. In Blundo and Laneve, editors, Italian Conf. on Theoretical Computer Science 2003, number 2841 in Lecture Notes in Computer Science, pages 302--315. Springer, October 2003.
[12]
G. Lagorio. Another step towards a smart compilation manager for Java. In Hisham Haddad, Andrea Omicini, Roger L. Wainwright, and Lorie~M. Liebrock, editors, ACM Symp. on Applied Computing (SAC 2004), Special Track on Object-Oriented Programming Languages and Systems, pages 1275--1280. ACM Press, March 2004.
[13]
G. Lagorio. Capturing ghost dependencies in Java sources. Journal of Object Technology, 2004. To appear.
[14]
G. Lagorio. Type systems for Java separate compilation and selective recompilation. PhD thesis, Dipartimento di Informatica e Scienze dell'Informazione, Università di Genova, May 2004.
[15]
Robert Sebesta. Concepts of Programming Languages. Addison-Wesley, 2004. Seventh edition.
[16]
D. von Oheimb and T. Nipkow. Java is Type Safe - Definitely. In ACM Symp. on Principles of Programming Languages 1998, ACM Press, 1998.
[17]
J.B. Wells. The essence of principal typings. In International Colloquium on Automata, Languages and Programming 2002, number 2380 in Lecture Notes in Computer Science, pages 913--925. Springer, 2002.

Cited By

View all
  • (2015)A sound and optimal incremental build system with dynamic dependenciesACM SIGPLAN Notices10.1145/2858965.281431650:10(89-106)Online publication date: 23-Oct-2015
  • (2015)A co-contextual formulation of type rules and its application to incremental type checkingACM SIGPLAN Notices10.1145/2858965.281427750:10(880-897)Online publication date: 23-Oct-2015
  • (2015)A sound and optimal incremental build system with dynamic dependenciesProceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications10.1145/2814270.2814316(89-106)Online publication date: 23-Oct-2015
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '05: Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
January 2005
402 pages
ISBN:158113830X
DOI:10.1145/1040305
  • General Chair:
  • Jens Palsberg,
  • Program Chair:
  • Martín Abadi
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 40, Issue 1
    Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
    January 2005
    391 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1047659
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 12 January 2005

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. compositional analysis
  2. type systems

Qualifiers

  • Article

Conference

POPL05

Acceptance Rates

Overall Acceptance Rate 860 of 4,328 submissions, 20%

Upcoming Conference

POPL '26

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)0
Reflects downloads up to 05 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2015)A sound and optimal incremental build system with dynamic dependenciesACM SIGPLAN Notices10.1145/2858965.281431650:10(89-106)Online publication date: 23-Oct-2015
  • (2015)A co-contextual formulation of type rules and its application to incremental type checkingACM SIGPLAN Notices10.1145/2858965.281427750:10(880-897)Online publication date: 23-Oct-2015
  • (2015)A sound and optimal incremental build system with dynamic dependenciesProceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications10.1145/2814270.2814316(89-106)Online publication date: 23-Oct-2015
  • (2015)A co-contextual formulation of type rules and its application to incremental type checkingProceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications10.1145/2814270.2814277(880-897)Online publication date: 23-Oct-2015
  • (2015)A three-valued type system for true positives detection in Java-like languagesProceedings of the 17th Workshop on Formal Techniques for Java-like Programs10.1145/2786536.2786539(1-7)Online publication date: 7-Jul-2015
  • (2014)BackpackACM SIGPLAN Notices10.1145/2578855.253588449:1(19-31)Online publication date: 8-Jan-2014
  • (2014)BackpackProceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages10.1145/2535838.2535884(19-31)Online publication date: 11-Jan-2014
  • (2013)Class hierarchy complementationACM SIGPLAN Notices10.1145/2544173.250953048:10(515-532)Online publication date: 29-Oct-2013
  • (2013)Class hierarchy complementationProceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applications10.1145/2509136.2509530(515-532)Online publication date: 29-Oct-2013
  • (2013)Compositional type checking of delta-oriented software product linesActa Informatica10.1007/s00236-012-0173-z50:2(77-122)Online publication date: 1-Mar-2013
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media