Implementation Accompanying "On the Modularity of Feature Interactions" (GPCE 2008)

This page serves as the documentation of the implementation accompanying the paper "On the Modularity of Feature Interactions" (GPCE 2008). The implementation is a prototype and therefore you may run into problems using it. If you have any question or concern, please contact Peter Kim.


Download

The implementation accompanying GPCE08 paper consists of an Eclipse plugin that is a modification of CIDE plugin. Please follow the link to become familiar with what CIDE is if you are not familiar with it. For latest developments regarding research related to CIDE, please visit Christian's home page. Note that programs developed using the plugin provided here is not compatible with those developed in the original version of CIDE. This is further explained in the paper. The implementation also consists of some utility tools to check well-formedness of product-lines written in AHEAD and to translate them into CIDE-gpce08 (the modified version) programs. To use these tools, you will need to first download AHEAD Tool Suite. Then download the implementation, gpce08-chpkim-implementation.zip [12,547 KB].


Installation

Exit Eclipse if it's already running. Copy the plugin .jar file in c:\eclipse\plugins or the appropriate directory. Run Eclipse. Select "Window > Preferences > General\Editors\File Associations (Left panel)". In the right panel, under "File types", select "*.java". Below "Associated editors", select "Colored Java Editor" and press "Default". Press "OK". Include ROOT\bin in your operating system's PATH variable.


Running the implementation

When performing operations for different projects (e.g. CIDE safe composition for Project 1 and then for Project 2), the Eclipse plugin should be restarted for each project as there is a problem with clean-up. Feature models should be named "model.m" because batch files for AHEAD expect this name. There are three operations you can perform through the implementation: safe composition of AHEAD programs, safe composition of CIDE programs, and incremental development of CIDE programs.

Safe composition of AHEAD programs

  • Note: this is actually not a new functionality, but this implementation provides some scripts to run it. Consult AHEAD safe composition documentation for more information.

  • Download the AHEAD version of one of the product-lines listed in section "Experiment Data and Results". Or use your own product-line developed in AHEAD.

  • CD to root of the project. E.g. c:\GPL-AHEAD.

  • Enter "doSafegen GPLFeatures", where "GPLFeatures" is the directory containing all the features. The features should be located in a single directory below the AHEAD project root directory.

  • Open AHEAD-safegen.txt to view the result. Ordering violations are output to console, not saved to the text file, for some reason.

Safe composition of CIDE programs

  • Download the CIDE version of one of the product-lines listed in section "Experiment Data and Results" (follow instructions in that section). Or use your own product-line developed in CIDE. Make sure that all code fragments are colored. If not, right-click on project, select "ColorIDE > Color base code". Ensure that feature names are single words.

  • In the menu bar, select "Window > Show view > Other... > ColoredIDE > Safegen View". Select "OK".

  • Follow the instructions.

  • The panel will show safe composition results. For large projects, the panel may not show all the results, so look at the output file.

Incremental development of CIDE programs

  • Download the CIDE version of one of the product-lines listed in section "Experiment Data and Results" (follow instructions in that section). Or use your own product-line developed in CIDE. Make sure that all code fragments are colored. If not, right-click on project, select "ColorIDE > Color base code". Ensure that feature names are single words. Make sure that all features are selected by right-clicking on the project, selecting "ColoredIDE > Edit Features..." and setting "Visible" column check marked for features whose names do not start with "Feature".

  • In the menu bar, select "Window > Show view > Other... > ColoredIDE > Incremental View". Select "OK".

  • Follow the instructions.


Experiment Data and Results

The implementation was evaluated on the product-lines below. Each product-line has an AHEAD version and a CIDE version. A translator (see next section) was used to convert from the AHEAD version to the CIDE version. There is a zip file for each version. The zip file contains both the source code and the results (*.txt). With the exception of BufferExample product-line, which is a toy example, documentation behind these product-lines can be found here. After unpacking a CIDE version, you will find a zip file (Eclipse project archive) that can be opened in Eclipse by right-clicking on the package explorer, selecting "Import... > General\Existing Projects into Workspace > Select archive file: > Browse to the downloaded .zip file > Finish".

Product-Line

AHEAD version

CIDE version

BufferExample

BufferExample-AHEAD.zip [19 KB]

[BufferExample-CIDE.zip [5 KB]

Graph Product Line (GPL)

GPL-AHEAD.zip [198 KB]

GPL-CIDE.zip [44 KB]

jak2java

jak2java-AHEAD.zip [3,789 KB]

jak2java-CIDE.zip [1,012 KB]

jampack

jampack-AHEAD.zip [3,815 KB]

jampack-CIDE.zip [947 KB]

mixin

mixin-AHEAD.zip [3,359 KB]

mixin-CIDE.zip [849 KB]

unmixin

unmixin-AHEAD.zip [3,249 KB]

unmixin-CIDE.zip [819 KB]

mmatrix

mmatrix-AHEAD.zip [3,344 KB]

mmatrix-CIDE.zip [843 KB]

bali2jak

bali2jak-AHEAD.zip [1,272 KB]

bali2jak-CIDE.zip [361 KB]

bali2javacc

bali2javacc-AHEAD.zip [1,346 KB]

bali2javacc-CIDE.zip [381 KB]

bali2layer

bali2layer-AHEAD.zip [1,338 KB]

bali2layer-CIDE.zip [369 KB]

balicomposer

balicomposer-AHEAD.zip [1,200 KB]

balicomposer-CIDE.zip [330 KB]


Automatically translating an AHEAD project into a CIDE project

  • Download and extract the AHEAD version of a project. In command line, change directory to the root of the project. E.g. Go to ROOT\casestudies\GPL. Features should be located in a directory under this directory, e.g. ROOT\casestudies\GPL\GPLFeatures. Also, in this "GPLFeatures" directory, a file called "everything.equation" should list all the features to be smashed together into a single, feature-annotated program that will be converted into a CIDE project.

  • Enter "smashInOne GPLFeatures". The directory ROOT\casestudies\GPL\smashed is created, with feature-annotated Java files inside.

  • Launch the Eclipse with the modified CIDE plugin installed.

  • Create a new Java project. Create a package, e.g., "smashed". Right-click on the package, select "Import". Select "File system". Browse to "c:\safegen\casestudies\GPL\smashed" and select "OK". Select "Filter Types..." and deselect all but "*.java". Select "Finish". Fix any compileerrors due to missing libraries. For example, for an AHEAD tool (everything except BufferExample and GPL), add all the libraries in the AHEAD build. Assuming AHEAD was installed in AHEADROOT, select "Project > Properties > Java Build Path (Left panel) > Add External JARS... > Open all AHEADROOT\build\lib\*.jar > OK."

  • Right-click on the project "GPL". Select "ColoredIDE > Automatically color AHEAD-produced files". This will take some time. Every ".java" file should have a corresponding ".color" file.

  • Restart and then open "Safegen View" or "Incremental View".