Presentation is loading. Please wait.

Presentation is loading. Please wait.

SPLGraph: Towards a Formalism for Software Product Lines Itay Maman IBM Research – Haifa Goetz Botterweck Lero – The Irish software Engineering Research.

Similar presentations


Presentation on theme: "SPLGraph: Towards a Formalism for Software Product Lines Itay Maman IBM Research – Haifa Goetz Botterweck Lero – The Irish software Engineering Research."— Presentation transcript:

1 SPLGraph: Towards a Formalism for Software Product Lines Itay Maman IBM Research – Haifa Goetz Botterweck Lero – The Irish software Engineering Research Centre May 2 nd 2010, PLEASE 2010

2 2/23 Modern Software Systems Heterogonous artifacts –Source code: C, Java, DSLs, … –Design documents –User manuals –Licenses –Presentations Heterogonous artifact-specific tools/editors

3 3/23 …IDE/Compiler Design Tool Requirements Tool Multi Product Tool Stack Variability RequirementsDesignTests… Feature Model P1 configuration Variability Requirements Design Tests Code … … P1 Artifacts Review\Edit File Repository

4 4/23 Difficulties Rework: Implementing variability in each tool Lack of system wide traceability Viewers cannot be used without the editors –E.g., Lint cannot be used without a variability-enabled IDE Features are a special construct

5 5/23 Tool Stack: Centralized Variability Feature Model + Materializer P1 configuration …IDE/Compiler Design Tool Requirements Tool Variability UI RequirementsDesignTests… Requirements Design Tests Code … … P1 Artifacts Review\Edit File Repository

6 6/23 QA Scenario Feature Model + Materializer P1 configuration Compiler DesignTests Design Requirements Tests Code P1 Artifacts P1 can now be tested Plain compiler – no variability support File Repository Requirements Tool

7 7/23 Can Materialization be Centralized? Vision: a dedicated, generic, product line tool –Handles a wide range of artifacts –Relieve tool vendors from implementing variability mechanisms Similar to source control –IDEs do not try to roll out their own source control mechanism –(Other than UI support) –Variability is more difficult – finer granularity

8 8/23 Striking a balance High Level Representations (E.g., UML) –Operations: deleteClass, replaceClass, deleteRequirement, … –Representation is too Specific => Operations are not generic –(Too many operations to implement) Low Level Representations: Stream of bits –Only three operations: deleteBit(offset), insertBit(offset, value), replaceBit(offset, value) –Sensitivity to changes: when content changes all offsets must be recalculated –(Impractical)

9 9/23 Wish List Insensitivity to changes –Local changes in content => local changes in representation Generic: A small number of variability operations –Work on all artifacts Self sustainable: Variability can be defined on variability Decidable Solution: A directed, labeled, graph –Requires: A translation scheme (bi directional)

10 10/23 SPLGraph A directed graph –Defined as a 7-tuple Label function: L(x) : V E String A set of mutation vertices: M A set of decision vertices: D Three special vertices: T, F, X (Formalization & Patterns are in the paper)

11 11/23 Simple Example: class a extends b (no variability) ab extends s e0

12 12/23 Mutation Vertex g a g e1 b c subject key target a g e1 b c key target subject apply(g)

13 13/23 Decision vertex h h a b s f t e1 T condition y x e2 e3

14 14/23 Traversal from vertex s h a b s f t e1 T condition y x e2 e3

15 15/23 Algorithm: Materialize Inputs: G, N, P, s – G : An SPLGraph – N, P : Sets of decision vertices (disjoint) – s : A vertex Steps: –Set the decision of all vertices in N to be F (Add a condition edge) –Set the decision of all vertices in P to be T (Ditto) – Q = All vertices reachable from s (respecting the traversal semantics of decision vertices) –For each mutation vertex q in Q do apply(q)

16 16/23 Example: class a extends b h a g extends b c s f t subject key target e1 materialize(G,{},{h},s) h a g extends b c s f t subject key target e1 T condition

17 17/23 Everything is a Vertex! h1a g f extends b c s f t subject key target s1g1 condition key e1 e3 target subject h2 e2 d f …

18 18/23 Prototype Tool Can Import existing Java Code Program elements can be marked as optional –Field, Method, Class, Package Materialize => Generates a new program –Some of the optional elements are excluded –Determined by a user decision –The algorithm has no Java knowledge! –Can be extended by writing new translators

19 19/23 Performance: Graph Construction

20 20/23 Scalability

21 21/23 Future Product line support in IBM/Rational Jazz platform –First steps: Rhapsody 7.5.2 Source Control vs. Product Lines Graph-oriented Database Streamlining the translation schemes API

22 22/23 Summary Simplicity: A single kind of transformation –Namely: Edge rerouting Self-sustainability: Everything is a vertex –The model can define variability on itself –Similar to the Object-model of object-oriented languages –(See: Smalltalk) Decoupling materialization from artifacts

23 23/23 Questions ? imaman@il.ibm.com twitter.com/pembleton imaman@il.ibm.com


Download ppt "SPLGraph: Towards a Formalism for Software Product Lines Itay Maman IBM Research – Haifa Goetz Botterweck Lero – The Irish software Engineering Research."

Similar presentations


Ads by Google