1
Software Components Compatibility
Verification Based on Static Byte-Code
Analysis
Kamil Jezek, Lukas Holy, Premek Brada
...
2
Agenda
● Compatibility problems
● Dependencies reconstruction
● Classification of incompatibilities
● Implementation
● L...
3
Problem
Source
code
Early compile
time checks
Late runtime
checks
LinkageError in Java
● NoSuchMethodError
● ClassNotFou...
4
Proposed Solution
● Dependencies reconstruction from binaries
● “as if compiled by compiler” but working with
binaries
5
Proposed Solution
● Dependencies reconstruction from binaries
● “as if compiled by compiler” but working with
binaries
6
Incompatibilities Classification
● Missing dependencies (1)
● Inconsistent dependencies (2)
● Redundant dependencies (3)...
7
Dependency reconstruction
Component API (e.g. CGlib)
public class Enhancer {
public static void
registerCallbacks(
Class...
8
Dependency Evaluation
Component API API invocation
>
≥
<
≤
=
≠
Added in v2.2
9
Limitations
● Limited to permanent byte-code
– Analyses also death code
– Byte-code generated at runtime, Java Reflectio...
10
Conclusion
● Static incompatibilities not detected by
compilers in current software
● Proposed byte-code analyser to fi...
Upcoming SlideShare
Loading in …5
×

Software Components Compatibility Verification Based on Static Byte-Code Analysis

218 views

Published on

Current enterprise systems are widely implemented using statically typed languages such as Java. One of the reasons are strong type checks at compile time that help prevent runtime errors. The static type checks are also well integrated into current development tools. One of the less explored area are, however, static type checks of binary software components. Since current software usually contains a large amount of third-party components, the compilers can no longer cover the static type checks of the final product, especially the inter-dependencies of the components are out of their reach. In this work, we propose an approach that analyses the byte-code of Java classes
to reconstruct the mutual dependencies of respective components first. Then, the dependencies are examined to find any type inconsistencies. As a result, this approach detects dependency problems early in the development phase and prevents undesirable run time product failures caused by them.

Published in: Software, Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
218
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Software Components Compatibility Verification Based on Static Byte-Code Analysis

  1. 1. 1 Software Components Compatibility Verification Based on Static Byte-Code Analysis Kamil Jezek, Lukas Holy, Premek Brada University of West Bohemia kjezek@ntis.zcu.cz
  2. 2. 2 Agenda ● Compatibility problems ● Dependencies reconstruction ● Classification of incompatibilities ● Implementation ● Limitations
  3. 3. 3 Problem Source code Early compile time checks Late runtime checks LinkageError in Java ● NoSuchMethodError ● ClassNotFoundException ● ...
  4. 4. 4 Proposed Solution ● Dependencies reconstruction from binaries ● “as if compiled by compiler” but working with binaries
  5. 5. 5 Proposed Solution ● Dependencies reconstruction from binaries ● “as if compiled by compiler” but working with binaries
  6. 6. 6 Incompatibilities Classification ● Missing dependencies (1) ● Inconsistent dependencies (2) ● Redundant dependencies (3) ● Duplicated dependencies (4) Source code (1) (2) (4) (3)
  7. 7. 7 Dependency reconstruction Component API (e.g. CGlib) public class Enhancer { public static void registerCallbacks( Class generatedClass, Callback[] callbacks) { … } public static void registerStaticCallbacks( Class generatedClass, Callback[] callbacks) { … } } class ConfigurationClassEnhancer { private Class<?> createClass( Enhancer enhancer) { Class<?> subclass = enhancer.createClass(); Enhancer.registerStaticCallbacks( subclass, this.callbackInstances); return subclass; } } API invocation (e.g. Spring) Added in v2.2
  8. 8. 8 Dependency Evaluation Component API API invocation > ≥ < ≤ = ≠ Added in v2.2
  9. 9. 9 Limitations ● Limited to permanent byte-code – Analyses also death code – Byte-code generated at runtime, Java Reflection ignored
  10. 10. 10 Conclusion ● Static incompatibilities not detected by compilers in current software ● Proposed byte-code analyser to fill this gap ● Implemented as Maven plugin

×