You are on page 1of 15

FeatureIDE: Background

Thomas Th um, Jens Meinicke


January 25, 2013

Feature-Oriented Programming (FOP)

Introduced 1997 by Christian Prehofer Based on Object-Oriented Programming Features realize functionalities Features are cross-cutting to objects Features modularize fragments from certain classes Fragment contains some methods/elds of a class belonging to one functionality Goals: code traceability, software customization

Thomas Th um, Jens Meinicke

FeatureIDE: Background

Kstner, Apel, Saake

EPMD Folie 6-48

Komposition durch FOP Example berlagerung von Bumen


package util; class Calc { void add() { e0 = e1 + e0; e1 = e2; } }

feature: Add

package util; class Calc { int e0 = 0, e1 = 0, e2 = 0; void enter(int val) { e2 = e1; e1 = e0; e0 = val; } void clear() { e0 = e1 = e2 = 0; } String top() { return String. valueOf(e0); } }

feature: CalcBase
util util

feature: CalcAdd

package util; class Calc { int e0 = 0, e1 = 0, e2 = 0; void enter(int val) { e2 = e1; e1 = e0; e0 = val; } void clear() { e0 = e1 = e2 = 0; } String top() { //... } void add() { e0 = e1 + e0; e1 = e2; } }
util

Calc add e0 e1 e2

Calc top enter clear

=
e0 e1 e2

Calc top enter clear add

http://wwwiti.cs.uni-magdeburg.de/iti_db/lehre/epmd/2009/slides/06_FOP.pdf Thomas Th um, Jens Meinicke FeatureIDE: Background 3

Composition Engines
Feature Orientated Command-line tools used to compose les within FeatureIDE: AHEAD (mixin): .jak (Java 1.4) http://userweb.cs.utexas.edu/schwartz/ATS.html FeatureC++: .cpp (C++) http://www.fosd.de/fcpp FeatureHouse: .java (Java 1.5), .cs (C#), .c/.h (C), .hs (Haskell), .jj (JavaCC), .als (Alloy), .xmi (UML) http://www.fosd.de/fh

Thomas Th um, Jens Meinicke

FeatureIDE: Background

Composition Engines
Non Feature Orientated Command-line tools used to compose les within FeatureIDE: AspectJ(Aspectorientated Java): .aj(Aspect File), .java http://www.eclipse.org/aspectj/ DeltaJ(Deltaoriantated Java): .dj(Core and Delta Modules) http://sourceforge.net/projects/deltaj/ Munge: Preprocessor http://sonatype.github.com/munge-maven-plugin/ Antenna: Preprocessor http://antenna.sourceforge.net/

Thomas Th um, Jens Meinicke

FeatureIDE: Background

Conguration

Selection of features Composition of features results in a program variant Not all combinations are useful
Thomas Th um, Jens Meinicke FeatureIDE: Background 6

Feature Model
Species valid combinations of features Graphically represented by a feature diagram Created for a particular domain Describes a software product line (SPL)
GraphLibrary

Edges

Algorithms

NewCompound1 NewCompound1 And-group NewCompound1 NewCompound1 Or-group Layer1 Layer2 NewCompound1 Alternative-group Layer1 Layer2 Layer1 Layer2 Layer1 Layer2 Layer1 Layer2

Directed

Undirected

Number

Cycle

Cycle Directed

Mandatory Optional

Thomas Th um, Jens Meinicke

FeatureIDE: Background

Feature Model
Species valid combinations of features Graphically represented by a feature diagram Created for a particular domain Describes a software product line (SPL)
And-group
Edges GraphLibrary

Algorithms

NewCompound1 NewCompound1 And-group NewCompound1 NewCompound1 Or-group Layer1 Layer2 NewCompound1 Alternative-group Layer1 Layer2 Layer1 Layer2 Layer1 Layer2 Layer1 Layer2

Directed

Undirected

Number

Cycle

Cycle Directed

Mandatory Optional

Thomas Th um, Jens Meinicke

FeatureIDE: Background

Feature Model
Species valid combinations of features Graphically represented by a feature diagram Created for a particular domain Describes a software product line (SPL)
GraphLibrary

Mandatory
Edges Algorithms
NewCompound1 NewCompound1 And-group NewCompound1 NewCompound1 Or-group Layer1 Layer2 NewCompound1 Alternative-group Layer1 Layer2 Layer1 Layer2 Layer1 Layer2 Layer1 Layer2

Directed

Undirected

Number

Cycle

Cycle Directed

Mandatory Optional

Thomas Th um, Jens Meinicke

FeatureIDE: Background

Feature Model
Species valid combinations of features Graphically represented by a feature diagram Created for a particular domain Describes a software product line (SPL)
GraphLibrary

Optional
NewCompound1 NewCompound1 And-group NewCompound1 NewCompound1 Or-group Layer1 Layer2 NewCompound1 Alternative-group Layer1 Layer2 Layer1 Layer2 Layer1 Layer2 Layer1 Layer2

Edges

Algorithms

Directed

Undirected

Number

Cycle

Cycle Directed

Mandatory Optional

Thomas Th um, Jens Meinicke

FeatureIDE: Background

Feature Model
Species valid combinations of features Graphically represented by a feature diagram Created for a particular domain Describes a software product line (SPL)
GraphLibrary

Edges

Algorithms

NewCompound1 NewCompound1 And-group NewCompound1 NewCompound1 Or-group Layer1 Layer2 NewCompound1 Alternative-group Layer1 Layer2 Layer1 Layer2 Layer1 Layer2 Layer1 Layer2

Alternative-group
Directed Undirected Number Cycle Cycle Directed

Mandatory Optional

Thomas Th um, Jens Meinicke

FeatureIDE: Background

Feature Model
Species valid combinations of features Graphically represented by a feature diagram Created for a particular domain Describes a software product line (SPL)
GraphLibrary

Edges

Algorithms

Or-group NewCompound1
NewCompound1 And-group NewCompound1 NewCompound1 Or-group Layer1 Layer2 NewCompound1 Alternative-group Layer1 Layer2 Layer1 Layer2 Layer1 Layer2 Layer1 Layer2

Directed

Undirected

Number

Cycle

Cycle Directed

Mandatory Optional

Thomas Th um, Jens Meinicke

FeatureIDE: Background

Feature Model
Species valid combinations of features Graphically represented by a feature diagram Created for a particular domain Describes a software product line (SPL)
GraphLibrary

Edges

Algorithms

NewCompound1 NewCompound1 And-group NewCompound1 NewCompound1 Or-group Layer1 Layer2 NewCompound1 Alternative-group Layer1 Layer2 Layer1 Layer2 Layer1 Layer2 Layer1 Layer2

Directed

Undirected

Number

Cycle

Cross-tree constraints

Cycle Directed

Mandatory Optional

Thomas Th um, Jens Meinicke

FeatureIDE: Background

Feature Model
Species valid combinations of features Graphically represented by a feature diagram Created for a particular domain Describes a software product line (SPL)
GraphLibrary

Edges

Algorithms

NewCompound1 NewCompound1 And-group NewCompound1 NewCompound1 Or-group Layer1 Layer2 NewCompound1 Alternative-group Layer1 Layer2 Layer1 Layer2 Layer1 Layer2 Layer1 Layer2

Directed

Undirected

Number

Cycle

Cycle Directed

Mandatory Optional

Thomas Th um, Jens Meinicke

FeatureIDE: Background

Feature-Oriented Software Development (FOSD)

GraphLibrary

Edges

Algorithms

Directed

Undirected

Number

Cycle

Cycle Directed

Feature Model

Feature Modules

Congurations

Composer

Program Variants

Thomas Th um, Jens Meinicke

FeatureIDE: Background

You might also like