Features in product lines eventually share elements between them, which might break feature modularization, since modifications in a feature result in problems for another. The concept of Emergent Interfaces aims to establish contracts between features, to prevent developers from breaking other features when performing a maintenance task. Emergo is an Eclipse plug-in that automates the computation of feature dependencies in preprocessor-based product lines.


Main functionalities

Emergo's main functionality is the automatic computation of emergent interfaces, which establish contracts between features and make developers aware of feature dependencies. Supporting this main functionality, Emergo provides the following facilities:
  • Provides two views to show emergent interfaces: one based on table and one based on graph;
  • Better navigation on the source code: from both table and graph views, developers can find feature dependencies in source code through mouse clicks;
  • Takes the feature model product line into consideration;

Download and Installing

We tested Emergo in Eclipse 3.6 SR2. Before installing Emergo, please install the Zest plugin. Zest contains a graph layout package which we use to generate emergent interfaces based on graphs. Afterwards, all you need to do is to place the Emergo jar file into the plugins folder of your Eclipse.

Getting started

After installing, open a Java project. The project must contain an ifdef.txt file in the root folder. This file contains the list of features and the feature model of the product line. Here is an example of a product line that you can use to test Emergo.


Emergent interfaces can be visualized by using two views: based on a table or on a graph. Before trying to generate emergent interfaces, open these views. To do so, Window -> Show View -> Other -> Emergo Views. Open the Emergo Table View and the Emergo Graph View.

Emergo views


After opening the views, select the type of analysis that will be used for generating the interfaces. There are two types of analyses available: intraprocedural and interprocedural. Open the project properties (right click on the project, Properties -> Emergo).

The Intraprocedural analysis computes feature dependencies exclusively within the method where the selection occurred. Interprocedural analysis computes dependencies from the method where the selection occurred and other methods. Depending on the product line size (number of lines of code, number of methods, number of features etc), when computing emergent interfaces using the Interprocedural analysis, Emergo can take several minutes to finish the computation.

Emergo views

Generating Emergent Interfaces

To generate emergent interfaces, the first step consists of selecting the maintenance point. After selecting, you can either press Ctrl+9 or right click on the editor, then Emergo -> Generate Interface. The results will appear in both Emergo Table View and Emergo Graph View.

Emergo menu

Selecting more than one maintenance point

To generate interfaces based on more than one maintenance point, you should select the source lines that represent the maintenance points. To do so, select each line at a time, right click on the editor, then Emergo -> Select Line. The selected lines will appear in the Selected Lines view. Then, right click on the editor, Emergo -> Generate Interface from Selected Lines.

Emergo view for the selected lines


-- MarcioRibeiro - 05 Feb 2012 -- MarcioRibeiro - 22 Sep 2011

Edit | Attach | Print version | History: r8 | r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r4 - 2012-02-05 - MarcioRibeiro
This site is powered by the TWiki collaboration platformCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback

mersin escort bayan adana escort bayan izmit escort ankara escort bursa escort