What is Java binary compatibility?

  • Authors:
  • Sophia Drossopoulou;David Wragg;Susan Eisenbach

  • Affiliations:
  • Department of Computing, Imperial College;Department of Computing, Imperial College;Department of Computing, Imperial College

  • Venue:
  • Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
  • Year:
  • 1998

Quantified Score

Hi-index 0.00

Visualization

Abstract

Separate compilation allows the decomposition of programs into units that may be compiled separately, and linked into an executable. Traditionally, separate compilation was equivalent to the compilation of all units together, and modification and re-compilation of one unit required re-compilation of all importing units.Java suggests a more flexible framework, in which the linker checks the integrity of the binaries to be combined. Certain source code modifications, such as addition of methods to classes, are defined as binary compatible. The language description guarantees that binaries of types (i.e. classes or interfaces) modified in binary compatible ways may be re-compiled and linked with the binaries of types that imported and were compiled using the earlier versions of the modified types.However, this is not always the case: some of the changes considered by Java as binary compatible do not guarantee successful linking and execution. In this paper we study the concepts around binary compatibility. We suggest a formalization of the requirement of safe linking and execution without re-compilation, investigate alternatives, demonstrate several of its properties, and propose a more restricted definition of binary compatible changes. Finally, we prove for a substantial subset of Java, that this restricted definition guarantees error-free linking and execution.