Commentary on stripped implementations

mark.reinhold at oracle.com mark.reinhold at oracle.com
Mon Feb 18 15:19:07 PST 2013


Attached below is some explanatory text that could be added to the
"Stripping" section (§9) of the EDR draft.

Comments?

- Mark

----

This Specification neither mandates nor forbids any particular means of
creating stripped Implementations, so long as the above constraints are
satisfied.  At a high level, a stripped Implementation can be created in
two steps:

  1. Analyze the combined Implementation and application code to
     identify elements that are never used, either directly or
     indirectly.  Such elements may be Java code, in the form of
     packages, classes, interfaces, fields, or methods.  They may
     also be other kinds of implementation elements, in the form
     of static data files or native-code procedures, objects, or
     libraries.

  2. Remove the unused elements from the combined code and package
     all of the remaining code into a single binary image.

A precise answer for the first step cannot, in general, be computed
completely automatically since it is equivalent to solving the Halting
Problem.  Practical tools for creating stripped Implementations
therefore usually rely upon a combination of heuristics, manual
analysis, and automatic analysis to compute an approximate answer.
It is highly recommended that the binary image created in the second
step be fully tested, with the goal of achieving 100% coverage of the
remaining application code, in order to ensure that all required
elements of the Implementation are present.


More information about the java-se-8-spec-experts mailing list