a feature-oriented composer for Java bytecode


Modularization of features in source code is the main goal of feature-oriented programming. Features are functionalities of a sofware system that satisfy requirements, represent design decisions and provide potential configuration options. Those features may add new program functionalities or extend and refine an already existing program element. A transaction system is a popular example. It must introduce new data structures and new routines for enabling transactions in a database system that have to integrate into the already existing system.
For further information on feature orientation, please refer to a survey paper.

FeatureBite is a composer that composes feature-oriented Java bytecode files. In contrast to, e.g., FeatureHouse or Fuji, FeatureBite needs to work on already compiled features. The tool produces Java bytecode files as output and performs bytecode verification routines on them.
The composition of features and refinement of classes are implemented via superimposition. For more details on this, we refer the reader to the FeatureHouse website.
FeatureBite is technically based on the ASM bytecode manipulation framework and the BCEL JustIce bytecode verifier.


Before composing features with FeatureBite, the features have to be compiled to bytecode independently. This step is supported by the tool FeatureStubber and Fuji.
First, the introductions and references of all features have to be dumped using Fuji, so that FeatureStubber can work on this information. (NOTE: Only use the Fuji version available for download below! Newer versions does not work with FeatureStubber due to a change to the format used for the introduction and references information!)

cd EPL
java -jar fuji.jar -fopRefs EPLAll.features > refs
java -jar fuji.jar -fopIntroduces EPLAll.features > intros

After this, the lacking type information for each feature can be determined and generated by FeatureStubber. The tool produces so-called stubs that consists of this lacking type-information and puts them in a new feature module called *_stubfix. Combined with the orginal feature, the stubs enable independent compilation for each feature. FeatureStubber automatically generates .features files for each feature, so that composing features with their stubs with Fuji is accelerated.

cd EPL
java -jar fsg.jar -intros intros -refs refs #compute introductions and references

for F in $(ls *_stubfix.features); do
    FEATURE=$(basename ${F} _stubfix.features)
    java -jar fuji.jar -d "${DESTDIR}" "${F}"

The resulting compiled features – combined with their stubs – are now located in the folders *_stubfix_classes. These bytecode feature-modules can be composed by FeatureBite using a standard .features files (e.g., the same files used with Fuji). The specific product specified by the feature selection from the EPLComp.features file is generated within the folder named classes by using following command.

java -jar featurebite.jar -d "classes" EPlComp.features



Fuji has been developed at the University of Passau, Germany. For more information, please contact the developers: