Flexible type-safe linking of components for java-like languages

  • Authors:
  • Davide Ancona;Giovanni Lagorio;Elena Zucca

  • Affiliations:
  • DISI, Univ. of Genova, Genova, Italy;DISI, Univ. of Genova, Genova, Italy;DISI, Univ. of Genova, Genova, Italy

  • Venue:
  • JMLC'06 Proceedings of the 7th joint conference on Modular Programming Languages
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

We define a framework of components based on Java-like languages, where components are binary mixin modules. Basic components can be obtained from a collection of classes by compiling such classes in isolation; for allowing that, requirements in the form of type constraints are associated with each class. Requirements are specified by the user who, however, is assisted by the compiler which can generate missing constraints essential to guarantee type safety. Basic components can be composed together by using a set of expressive typed operators; thanks to soundness results, such a composition is always type safe. The framework is designed as a separate layer which can be instantiated on top of any Java-like language; a prototype implementation is available for a small Java subset. Besides safety, the approach achieves great flexibility in reusing components for two reasons: (1) type constraints generated for a single component exactly capture all possible contexts where it can be safely used; (2) composition of components is not limited to conventional linking, but is achieved by means of a set of powerful operators typical of mixin modules.