Abstract
We define a formal notion, called compilation schema, suitable for specifying different possibilities for performing the overall process of Java compilation, which includes typechecking of source fragments with generation of corresponding binary code, typechecking of binary fragments, extraction of type information from fragments and definition of dependencies among them. We consider three compilation schemata of interest for Java, that is, minimal, SDK and safe, which correspond to a minimal set of checks, the checks performed by the SDK implementation, and all the checks needed to prevent run-time linkage errors, respectively. In order to demonstrate our approach, we define a kernel model for Java separate compilation and execution, consisting in a small Java subset, and a simple corresponding binary language for which we provide an operational semantics including run-time verification. We define a safe compilation schema for this language and formally prove type safety.
Partially supported by DART - Dynamic Assembly, Reconfiguration and Typechecking, Murst NAPOLI - Network Aware Programming: Oggetti, Linguaggi, Implementazioni, and APPlied SEMantics - Esprit Working Group 26142.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
J. Alves-Foss, editor. Formal Syntax and Semantics of Java. Number 1523 in Lecture Notes in Computer Science. Springer, 1999.
D. Ancona and G. Lagorio. Supporting true separate compilation in Java: A modular approach. Technical report, Dipartimento di Informatica e Scienze dell’Informazione, Università di Genova, 2002. Submitted for publication.
D. Ancona, G. Lagorio, and E. Zucca. A core calculus for Java exceptions. In ACM Symp. on Object-Oriented Programming: Systems, Languages and Applications 2001. ACM Press, October 2001. SIGPLAN Notices.
D. Ancona, G. Lagorio, and E. Zucca. Java separate type checking is not safe. In 3th Intl. Workshop on Formal Techniques for Java Programs 2001, June 2001.
D. Ancona, G. Lagorio, and E. Zucca. Separate compilation in Java: Avoiding ambiguity via monotonicity. Technical Report, DISI, July 2001.
D. Ancona, G. Lagorio, and E. Zucca. True separate compilation of Java classes. Technical report, Dipartimento di Informatica e Scienze dell’Informazione, Univer-sità di Genova, 2002. Submitted for publication.
M. Blume. Dependency analysis for standard ML. ACM Transactions on Programming Languages and Systems, 21(4):790–812, 1999.
L. Cardelli. Program fragments, linking, and modularization. In ACM Symp. on Principles of Programming Languages 1997, pages 266–277. ACM Press, 1997.
S. Drossopoulou. Towards an abstract model of Java dynamic linking and verfi-cation. In R. Harper, editor, TIC’00-Third Workshop on Types in Compilation (Selected Papers), volume 2071 of Lecture Notes in Computer Science, pages 53–84. Springer, 2001.
S. Drossopoulou and S. Eisenbach. Describing the semantics of Java and proving type soundness. In J. Alves-Foss, editor, Formal Syntax and Semantics of Java, number 1523 in Lecture Notes in Computer Science, pages 41–82. Springer, 1999.
S. Drossopoulou, S. Eisenbach, and D. Wragg. A fragment calculus-towards a model of separate compilation, linking and binary compatibility. In Proc. 14th Ann. IEEE Symp. on Logic in Computer Science, July 1999.
S. Drossopoulou, T. Valkevych, and S. Eisenbach. Java type soundness revisited. Technical report, Dept. of Computing-Imperial College of Science, Technology and Medicine, September 2000.
S. Drossopoulou, D. Wragg, and S. Eisenbach. What is Java Binary Compatibility? In ACM Symp. on Object-Oriented Programming: Systems, Languages and Applications 1998, volume 33(10) of A CM SIGPLAN Notices, pages 341–358, October 1998.
J. Gosling, B. Joy, G. Steele, and G. Bracha. The Java™ Language Specification, Second Edition. Addison-Wesley, 2000.
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.
X. Leroy. Manifest types, modules and separate compilation. In ACM Symp. on Principles of Programming Languages 1994, pages 109–122. ACM Press, 1994.
Z. Shao and A.W. Appel. Smartest recompilation. In ACM Symp. on Principles of Programming Languages 1993, pages 439–450. ACM Press, 1993.
D. Syme. Proving Java type sound. In Jim Alves-Foss, editor, Formal Syntax and Semantics of Java, number 1523 in Lecture Notes in Computer Science, pages 83–118. Springer, 1999.
D. von Oheimb and T. Nipkow. Machine-checking the Java specification: Proving type-safety. In Jim Alves-Foss, editor, Formal Syntax and Semantics of Java, number 1523 in Lecture Notes in Computer Science, pages 119–156. Springer, 1999.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ancona, D., Lagorio, G., Zucca, E. (2002). A Formal Framework for Java Separate Compilation. In: Magnusson, B. (eds) ECOOP 2002 — Object-Oriented Programming. ECOOP 2002. Lecture Notes in Computer Science, vol 2374. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-47993-7_26
Download citation
DOI: https://doi.org/10.1007/3-540-47993-7_26
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-43759-8
Online ISBN: 978-3-540-47993-2
eBook Packages: Springer Book Archive