modeling variability v ariete dff s apere a ude andrzej w
play

Modeling Variability V ARIETE , DFF S APERE A UDE Andrzej W - PowerPoint PPT Presentation

DSM-TP 2016 Modeling Variability V ARIETE , DFF S APERE A UDE Andrzej W asowski PROCESS AND SYSTEM MODELS GROUP Drowning in Clone-And-Own blue.cc blue.cc blue.cc ? CHANGE BUG FOUND INDEPENDENT INDEPENDENTLY BUG FIXES blue.cc


  1. DSM-TP 2016 — Modeling Variability V ARIETE , DFF S APERE A UDE Andrzej W ˛ asowski PROCESS AND SYSTEM MODELS GROUP

  2. Drowning in Clone-And-Own blue.cc blue.cc blue.cc ? CHANGE BUG FOUND INDEPENDENT INDEPENDENTLY BUG FIXES blue.cc green.cc green.cc green.cc asowski, IT University of Copenhagen 2 � Andrzej W ˛ c

  3. Opportunistic Reuse Does Not Work ◮ Common scenario: version the code, reuse when opportunity appears ◮ If the file to be reused needs change, copy it You clone-and-own it ◮ Benefit from quickly available functionality ◮ But have to test, debug, change and product build code system evolve the file yourself ◮ Product specific code grows product build ◮ Platform code diminishes code system shared and degrades platform code product build code system product build code system asowski, IT University of Copenhagen 3 � Andrzej W ˛ c

  4. SUCCESSFUL REUSE IS PROACTIVE PLANNED MANAGED asowski, IT University of Copenhagen 4 � Andrzej W ˛ c

  5. ◮ SPL Method, Architecture ◮ Variability Implementation Spectrum ◮ Variability Abstraction: Feature Modeling ◮ Variability Modeling in Practice ◮ Variability Realization AGENDA asowski, IT University of Copenhagen 5 � Andrzej W ˛ c

  6. Domain vs Application Processes Pohl et. al. Software Product Line Engineering asowski, IT University of Copenhagen 6 � Andrzej W ˛ c

  7. A Simple Product Line Architecture abstraction configured against variability conforms # # CPUFreq processor drivers # CONFIG_X86_PCC_CPUFREQ=m CONFIG_X86_ACPI_CPUFREQ=y variability CONFIG_X86_POWERNOW_K6=y resolution CONFIG_X86_POWERNOW_K7=y CONFIG_X86_POWERNOW_K7_ACPI=y CONFIG_X86_POWERNOW_K8=y CONFIG_X86_GX_SUSPMOD=y CONFIG_X86_SPEEDSTEP_CENTRINO=y CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y CONFIG_X86_SPEEDSTEP_ICH=y CONFIG_X86_SPEEDSTEP_SMI=y CONFIG_X86_P4_CLOCKMOD=m CONFIG_X86_CPUFREQ_NFORCE2=y CONFIG_X86_LONGRUN=y CONFIG_X86_LONGHAUL=y build CONFIG_X86_E_POWERSAVER=m system variability realization core assets platform product specific assets ◮ Less product specific = more reuse: development/tests/debugging/build ◮ Model of commonality and variability . ◮ Scope under control. Explicit feature life cycle asowski, IT University of Copenhagen 7 � Andrzej W ˛ c

  8. Exploit commonality Manage variability asowski, IT University of Copenhagen 8 � Andrzej W ˛ c

  9. ◮ SPL Method, Architecture ◮ Variability Implementation Spectrum ◮ Variability Abstraction: Feature Modeling ◮ Variability Modeling in Practice ◮ Variability Realization AGENDA asowski, IT University of Copenhagen 9 � Andrzej W ˛ c

  10. Spectrum of Variability Architectures Stay as close to the left as possible only product specific code (no reuse) frameworks + framework completion code domain specific languages + code generation feature models + product specific code feature models + build system property & configuration files + build system asowski, IT University of Copenhagen 10 � Andrzej W ˛ c

  11. Implementation Technologies ◮ Variability abstraction: FMs, DSLs, or none ◮ Variability resolution: XML property file FM configuration Domain specific model (DSM) ◮ Variability realization: general purpose code w/ variability techniques code generators abstraction configured against variability model transformers conforms parts may use DSLs etc. # # CPUFreq processor drivers # CONFIG_X86_PCC_CPUFREQ=m CONFIG_X86_ACPI_CPUFREQ=y variability resolution CONFIG_X86_POWERNOW_K6=y CONFIG_X86_POWERNOW_K7=y CONFIG_X86_POWERNOW_K7_ACPI=y CONFIG_X86_POWERNOW_K8=y CONFIG_X86_GX_SUSPMOD=y CONFIG_X86_SPEEDSTEP_CENTRINO=y CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y CONFIG_X86_SPEEDSTEP_ICH=y CONFIG_X86_SPEEDSTEP_SMI=y CONFIG_X86_P4_CLOCKMOD=m CONFIG_X86_CPUFREQ_NFORCE2=y CONFIG_X86_LONGRUN=y CONFIG_X86_LONGHAUL=y CONFIG_X86_E_POWERSAVER=m build system variability realization core assets platform asowski, IT University of Copenhagen 11 � Andrzej W ˛ c

  12. ◮ SPL Method, Architecture ◮ Variability Implementation Spectrum ◮ Variability Abstraction: Feature Modeling ◮ Variability Modeling in Practice ◮ Variability Realization AGENDA asowski, IT University of Copenhagen 12 � Andrzej W ˛ c

  13. Problem Space Solution Space features variation points SMS notification on transaction SMSLoggerAspect paid services Phone No. in data model invoice code.cs int sort (int[] A, comp ope) { if (A == null) return -1; for (int i = 0; i < A.size(); I++) { print (A[i].toString()); } } asowski, IT University of Copenhagen 13 � Andrzej W ˛ c

  14. CVL Architecture for Dummies The degree of coupling can be controlled by moving the mapping Variability Abstraction Feature/Decision Models Variability Realization Feature Mapping Base (model) Source Code CVL submitters. Common Variability Language, OMG Revised Submission . 2012 asowski, IT University of Copenhagen 14 � Andrzej W ˛ c

  15. Feature Modeling (I) feature: a single variability increment in the problem domain (decision) variation point: a single variability increment in the solution space asowski, IT University of Copenhagen 15 � Andrzej W ˛ c

  16. Feature Modeling (II) Example from Czarnecki’02 car mandatory optional body engine transmission pulls trailer exclusive choice inclusive choice electric gasoline automatic manual ◮ Hierarchy constraints, for example: manual requires transmission (each child node requires its parent node) ◮ Groups constraints: engine is electric or gas driven or both ◮ Not all constraints in hierarchy & groups, cross-tree constraints in text: electric requires automatic ◮ Attributes are added like to classes (eg. engine volume) asowski, IT University of Copenhagen 16 � Andrzej W ˛ c

  17. Feature Modeling (III) Configuration car mandatory optional body engine transmission pulls trailer exclusive choice inclusive choice electric gasoline automatic manual electric requires automatic + + + + + + + asowski, IT University of Copenhagen 17 � Andrzej W ˛ c

  18. Feature Models (IV) An example meta-model from Janota’08 meta-model (abstract syntax) 0..* 1 is sub-feature 1 Sub-feature Group Feature 1 Relation Type 0..* Grouped Solitary Mandatory Optional OR-group XOR-group Root Feature 2..* Feature Feature Sub-feature Sub-feature ◮ Note a single generic kind of relations: subfeature ◮ No distinction between kind-of (inheritance) and part-of (containment), like class modeling does ◮ A characteristic feature of configuration and constraint languages (as opposed to structural modeling languages) ◮ Clafer (as a structural modeling langauge) supports the distinction, but so do other feature modeling languages asowski, IT University of Copenhagen 18 � Andrzej W ˛ c

  19. Feature Modeling and FODA Feature Oriented Design and Analysis by Kang et al. 1990 ◮ FODA succeeds for its simplicity ◮ Probably best intro in Czarnecki’s Generative Programming (Chpt. 4) ◮ 3950+ citations, never formally published asowski, IT University of Copenhagen 19 � Andrzej W ˛ c

  20. Feature Modeling vs Class Modeling A feature model in Product Variant Master Notation (Hvam) A feature model A roughly equivalent class diagram More on this: B ˛ ak. Czarnecki. W ˛ asowski. Feature and Meta-Models in Clafer: Mixed, Specialized, and Coupled . SLE 2010 Above models from: Haug. Degn. Poulsen. Hvam. Creating a documentation system to support the development and maintenance of product configuration systems asowski, IT University of Copenhagen 20 � Andrzej W ˛ c

  21. Applications of Feature Models Design & Management domain product line scoping modeling product line mngmt code generation driving driving build system testing Development & Test asowski, IT University of Copenhagen 21 � Andrzej W ˛ c

  22. How To Build Feature Models? Two strategies, but only one good :) top-down bottom-up ◮ Identify a cloned component ◮ Big-bang adoption ◮ Find the patches that describe ◮ Perform careful domain differences analysis ◮ Translate diffs to variation ◮ Document concepts, points abstractions and relations ◮ Organize variation points into between them in a FM features , and a hierarchy ◮ Works well with incremental adoption ◮ See SPLC07 paper by Danfoss Hans Peter Jepsen, Jan Gaardsted Dall, Danilo Beuche. Minimally Invasive Migration to Software Product Lines. SPLC 2007 asowski, IT University of Copenhagen 22 � Andrzej W ˛ c

  23. ◮ SPL Method, Architecture ◮ Variability Implementation Spectrum ◮ Variability Abstraction: Feature Modeling ◮ Variability Modeling in Practice ◮ Variability Realization AGENDA asowski, IT University of Copenhagen 23 � Andrzej W ˛ c

  24. Variability Modeling is The Success Story of Modeling asowski, IT University of Copenhagen 24 � Andrzej W ˛ c

  25. A Laboratory Feature Model Czarnecki, W ˛ asowski. Feature Diagrams and Logics: There and Back Again. In: 11th International Software Product Line Conference (SPLC 2007) Kyoto, Japan, 10-14 September, 2007 c � IEEE Press. asowski, IT University of Copenhagen 27 � Andrzej W ˛ c

Recommend


More recommend