Type-Based Component Compatibility

Any component framework has to ensure that its component-based applications work correctly as components are installed and wirings established; this holds also for their changes during application lifetime. We address the issue of maintaining consistency using type-based component interface comparison which ensures „anytime-anywhere“ safe component update and binding. This approach is used in two ways:

  • Component compatibility checking during component deployment/assembly or update step, ie when inter-component bindings are (re)established.
  • Automated generation of version identifiers for component features and/or the whole component, which then are used by the framework in the above step.

In our novel contextual compatibility we leverage the knowledge of deployed component’s context – the „environment“ consisting of other components running in the same framework and their actual links to the updated component. The key theoretical improvement is the definition of conditions for safe substitution in cases where the update component version is not subtype-compatible (contravariant) with the deployed version. This effectively extends the number of cases when an update can be approved, with clear practical advantages.

Component Type Representation

Performing static subtype checks on component interfaces — particularly in the case of comparing an “old“ against a “new“ version of a component -- entails two interesting low level challenges. The first is that the evaluation of subtype relation which backs the comparison has to be done at run time (normally it is done at compile time by the compiler). The second challenge is obtaining a representation of the component surface suitable for this subtyping evaluation: when only the distribution binary is available, language types visible on the surface need to be reconstructed from its contents before they can be compared.

We therefore investigate approaches to reconstruct complete representation of types that are visible on the component surface, on both its provided and required side, from binary component distribution packages. The result for the Java language uses bytecode analysis to extract information about classes, and convert that to a model which covers the complete Java 5 language with its typing rules.

Key Publications

  • Brada, P. Enhanced Type-based Component Compatibility Using Deployment Context Information. Electronic Notes on Theoretical Computer Science 01/2011; 279:17-31
  • Bauml, J., Brada, P. Automated Versioning in OSGi: a Mechanism for Component Software Consistency Guarantee. Proceedings of Euromicro SEAA, IEEE CS, 2009.
  • Brada, P. & Valenta, L. Practical Verification of Component Substitutability Using Subtype Relation. Proceedings of the 32nd Euromicro SEAA conference, IEEE Computer Society, 2006.