feature model synthesis
play

Feature Model Synthesis Steven She Generative Software Development - PowerPoint PPT Presentation

Feature Model Synthesis Steven She Generative Software Development Lab What is Variability in Software? Variability in a software system is its ability for a system to adapt and customize for a particular context. van Gurp et al., 2001


  1. Feature Model Synthesis Steven She Generative Software Development Lab

  2. What is Variability in Software? Variability in a software system is its ability for a system to adapt and customize for a particular context. —van Gurp et al., 2001

  3. Why Variability Modeling? Large software systems contain variability scattered over documentation , design and implementation . e.g.,

  4. Documentation STACK enables the stack(9) facility… stack(9) will also be compiled in automatically if DDB(4) is compiled into the kernel . Source Code #ifdef DDB #ifndef KDB #error KDB must be enabled for DDB to work! #endif #endif

  5. Configuring FreeBSD options SCHED_ULE #ULE scheduler options PREEMPTION #Enable kernel thread preemption options INET #InterNETworking options INET6 #IPv6 communications protocols FreeBSD is configured by setting values to config options. Features and dependencies are scattered over documentation and code. Difficult to get an overview of the variability .

  6. Variability Models Explicit model of a system's variability. Benefits include Graphical Configurators and Automated Analysis .

  7. Feature Models Feature models describe the common and variable characteristics of products in a product line. First introduced by Kang et al. Describe a set of legal configurations .

  8. Feature Model Syntax powersave ∧ acpi → cpu_hotplug

  9. Configuration Semantics Feature models describe a set of legal configurations . [ [ ] ] ↦ { { OS, staging, net, dst} } { OS, staging }, { OS, staging, net}, Represented as a propositional formula, . φ Satisfying assignments are the legal configurations.

  10. What is Feature Model Synthesis? Feature model synthesis is the construction and design of a feature model given a set of features and legal combinations of features .

  11. Applicable Synthesis Scenarios 1. Synthesis From Product Configurations 2. Tool-Assisted Reverse Engineering from Code 3. Feature Model Merge Operations

  12. From Product Configurations Input consists of variants describing a product line. e.g., model variants, products developed by cloning code. Variants are compared and Variation Points (VPs) identified. VPs and VP configurations used as input for synthesis.

  13. Tool-Assisted Reverse Engineering from Code Input consists of source code containing variability. e.g., FreeBSD with #ifdef annotated code. Static analysis of #ifdef statements identifies code fragments as VPs and dependencies between VPs.

  14. Feature Model Operations Input consists of feature models. Feature models translated to a prop. formula by configuration semantics. Operation applied to formula then used as input to synthesis.

  15. Requirements for FM Synthesis Input Support input as either Configurations or Dependencies. Sound and Complete Derive an exact feature model describing the input. Scalable Support 10 to 1000's of features (e.g., Linux, FreeBSD). Hierarchy Selection Use user input or heuristics to select a distinct feature hierarchy.

  16. Thesis Statement We efficiently synthesize large scale feature models with algorithms that use SAT-based reasoning on propositional formulas and that suggest a feature hierarchy with textual similarity heuristics .

  17. Contributions 1. Feature Graph Extraction She , Ryssel, Andersen, Wasowski, Czarnecki, “Efficient synthesis of feature models,” submitted for review in Journal of Information and Software Technology, 2013. She , Czarnecki, and Wasowski, “Usage scenarios for feature model synthesis,” in VARY Workshop, 2012. Andersen, Czarnecki, She , Wasowski, “Efficient synthesis of feature models,” in SPLC, 2012.

  18. Contributions (cont.) 2. Feature Tree Synthesis She , Lotufo, Berger, Wąsowski, Czarnecki, “Reverse engineering feature models,” in ICSE, 2011. 3. Kconfig & the Linux Variability Model She , Lotufo, Berger, Wąsowski, Czarnecki. “The variability model of the linux kernel,” in VaMoS Workshop, 2010. Berger, She , Lotufo, Wasowski, Czarnecki, “Variability modeling in the real: a perspective from the operating systems domain,” in ASE, 2010. Berger, She , Lotufo, Wąsowski, Czarnecki. “A Study of Variability Models and Languages in the Systems Software Domain,” accepted in Transaction of Software Engineering, 2013.

  19. How the Algorithms Relate

  20. Feature Graph Extraction

  21. Requirements for FM Synthesis Input Support input as either Configurations or Dependencies. Sound and Complete Derive an exact feature model describing the input. Scalable Support 10 to 1000's of features (e.g., Linux, FreeBSD). Hierarchy Selection Use user input or heuristics to select a distinct feature hierarchy.

  22. Soundness and Completeness { { OS, staging, net, dst} } { OS, staging }, { OS, staging, net}, Less configs (sound) More configs (complete) Arbitrary

  23. Sound and Complete Synthesis { { OS, staging, net, dst} } { OS, staging }, { OS, staging, net}, Sound and dst → net Complete FD Complete FD

  24. Maximal Feature Diagram { { OS, staging, net, dst} } { OS, staging }, { OS, staging, net}, Non- dst → net maximal FD Maximal FD

  25. Same Configs, Diff. Hierarchies { { OS, staging, net, dst} } { OS, staging }, { OS, staging, net}, FD1 FD2 FD3

  26. Feature Graph { { OS, staging, net, dst} } { OS, staging }, { OS, staging, net}, Encapsulates all feature diagrams that are complete. DAG as hierarchy, and overlapping feature groups.

  27. Requirements for FM Synthesis Input Support input as either Configurations or Dependencies. Sound and Complete Derive an exact feature model describing the input. Scalable Support 10 to 1000's of features (e.g., Linux, FreeBSD). Hierarchy Selection Use user input or heuristics to select a distinct feature hierarchy.

  28. Input as Configuration { { OS, staging, net, dst} } ↦ { OS, staging }, ( OS ∧ staging ∧ ¬ net ∧ ¬ dst ) ∨ { OS, staging, net}, ( OS ∧ staging ∧ net ∧ ¬ dst ) ∨ ( OS ∧ staging ∧ net ∧ dst ) Configurations represented as DNF formula. Input as Dependencies { } (¬ staging ∨ OS ) ∧ (¬ net ∨ OS ) ∧ staging ∨ net → OS (¬ dst ∨ net ) ∧ dst → net ↦ OS → staging (¬ OS ∨ staging ) Dependencies represented as a CNF Formula.

  29. Feature Graph Extraction (Fge) FGE( ) φ CNF,DNF ↦ Fully automatic algorithm for extracting feature graphs. Algorithm uses a SAT solver.

  30. DAG Hierarchy Recovery DAG( φ ) ↦ Given a formula, , build an Implication Graph . φ Each edge is an implication such that ( u , v ) φ ∧ u → v Describes all possible hierarchies as a DAG.

  31. Group and CTC Recovery Mutex Groups [0..1] Find maximal cliques in the mutex graph where an edge ( u , v ) exists if . φ ∧ u → ¬ v Or Groups [1.. n ] Given a parent , find prime implicates of with the form p φ ∧ p . f 1 ∨ f 2 ∨ … ∨ f k Xor Groups [1..1] Groups that are both Mutex and Or groups.

  32. Requirements for FM Synthesis Input Support input as either Configurations or Dependencies. Sound and Complete Derive an exact feature model describing the input. Scalable Support 10 to 1000's of features (e.g., Linux, FreeBSD). Hierarchy Selection Use user input or heuristics to select a distinct feature hierarchy.

  33. Experimental Evaluation Purpose Evaluate performance of our algorithms by comparing to other algorithms that build a feature graph. Dataset Input representative of synthesis scenarios . Derive input from FMs in a FM repository, generated FMs, and the Linux variability model. Measure Time needed to compute each part of a feature graph. Quality does not need to evaluated. Feature graph encapsulates all complete feature diagrams.

  34. Evaluation Algorithms Fge-CNF Evaluation Fge-CNF BDD-Based [Czarnecki and Wąsowski] Input Dependencies Dependencies Technique SAT Solver Binary Decision Diagrams (BDDs) Fge-DNF Evaluation Fge-DNF FCA-Based [Ryssel et al.] Input Configurations Configurations Technique SAT Formal Concept Analysis and Set Cover

  35. Dataset Characteristics SPLOT Model Repository Generated Models Largest, public repository of 20 generated FMs with difficult feature models. cross-tree constraints. 267 FMs gathered from Linux Variability Model academic papers, experience 5426 features. reports, by volunteers.

  36. Experiment Setup Null Hypothesis For each component of Fge, (i.e., implication graph, mutex graph, OR-groups) there is no difference in the mean computation times for Fge-CNF and Fge-BDD.

  37. Fge-CNF vs. Fge-BDD Results SPLOT Dataset Component Mean Difference (ms) p-value Implications -16 0.63 Mutual Exclusions -20 0.38 -10,854 1.13 x 10-9 Or Groups Fge-CNF is significantly faster than the BDD-based algorithm for computing OR-Groups on the SPLOT dataset. Linux Generated Dataset Fge-CNF completed in 7 hours. Fge-CNF completed 12 models. The BDD-based algorithm The BDD-based algorithm ran out of memory . timed out on all models .

  38. Fge-DNF vs. FCA-Based Results SPLOT Dataset Component Mean Difference (ms) p-value Implications 320 0.0059 Mutual Exclusions 166 0.0012 Or Groups -3,904 0.1214 Performance of Fge-DNF is similar to that of the FCA-based algorithm, except for 5 models where Fge-DNF was significantly faster.

  39. Fge-DNF vs. FCA-Based (cont.) Models had a large number of sibling features at the root. Large search space for groups for FCA-based algorithm.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend