True Modules for Java-like Languages

  • Authors:
  • Davide Ancona;Elena Zucca

  • Affiliations:
  • -;-

  • Venue:
  • ECOOP '01 Proceedings of the 15th European Conference on Object-Oriented Programming
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present JAVAMOD, a true module system constructed on top of a Java-like language. More in detail, this means that basic modules are collections of Java classes and specify in their interface the imported and exported classes with their types; furthermore, it is possible to write structured module expressions by means of a set of module operators and a type system at the module level ensures type safety.In designing such a type system, one has to face non trivial problems, notably the fact that a module M which extends an imported class C can be correctly combined only with modules exporting a class C which, besides providing the expected services, causes no interferences with its subclasses defined in M.What we obtain is a module language which is extremely flexible and allows to express (without any need of enriching the syntax of the core level, that is, the Java language), for instance, generic types as in Pizza and GJ, mixin classes (that is, subclasses parametric in the direct superclass) and mutually recursive class definitions split in independent modules.