presence condition simplification
play

Presence-Condition Simplification: Problem, Solutions, Applications - PowerPoint PPT Presentation

Presence-Condition Simplification: Problem, Solutions, Applications Alexander von Rhein, Alexander Grebhahn, Sven Apel, Norbert Siegmund, Dirk Beyer, and Thorsten Berger University of Passau, Germany Alexander von Rhein Presence-Condition


  1. Presence-Condition Simplification: Problem, Solutions, Applications Alexander von Rhein, Alexander Grebhahn, Sven Apel, Norbert Siegmund, Dirk Beyer, and Thorsten Berger University of Passau, Germany

  2. Alexander von Rhein Presence-Condition Simplification Simplification + Thermodynamics + Friction + Turbocharging + …  This picture would be  Imagine I will speak about much more focused. the pistons in a diesel engine. FOSD meeting 2014 2

  3. Alexander von Rhein Presence-Condition Simplification Presence Conditions  In analysis reports  Verification  Type checking  Dataflow analysis  In source code  #ifdefs  In internal code representations  Variability-aware AST in TypeChef FOSD meeting 2014 3

  4. Alexander von Rhein Presence-Condition Simplification Presence-Condition Simplification Presence Condition Context VariabilityModel = base ⋀ (decrypt ⇔ encrypt) ⋀ (sign ⇔ verify) ⋀ (encrypt ⇒ keys) ⋀ (sign ⇒ keys) simp (Presence Condition, Context) FOSD meeting 2014 4

  5. Alexander von Rhein Presence-Condition Simplification Scenario 2: Variability Model Synthesis Hierarchy Cross-tree constraints  VM synthesis [She, ICSE11] generates models from expressions  Problem: eliminating redundant facts from CTC  Solution:  Presence condition := cross-tree constraints  Context := hierarchy constraints FOSD meeting 2014 5

  6. Alexander von Rhein Presence-Condition Simplification Formal Problem Definition  Given a presence condition 𝑞 and its context 𝑛 : (both given as boolean expressions)  we seek x = simp( 𝑞 , 𝑛 ) such that 1. 𝑛 → (x ≡ 𝑞 ) If 𝑛 holds, we can replace 𝑞 by 𝑦 . 2. 𝑦 should be “smaller” than 𝑞 . We define the size of an expression as the number of its operators. FOSD meeting 2014 6

  7. Alexander von Rhein Presence-Condition Simplification Solutions  R ESTRICT (Coudert & Madre, 1989)  Based on binary decision diagrams  Heuristic to minimize the node count in the BDD  DAG traversal / comparison  Two-level logic minimization (1980s)  Input: an expression and a don’t care set DC  DC states for which variable assignments we don’t care about the value of x  Our don’t care set is ¬ 𝑛  Q UINE -M C C LUSKEY (1956)  E SPRESSO (1986) FOSD meeting 2014 7

  8. Alexander von Rhein Presence-Condition Simplification Experiments  E1 “Classification of Variants”  Presence conditions from Norbert’s ICSE12 paper  E2 “Defect-Location Reporting”  Presence conditions from Sven’s ICSE13 paper  E3 “Code Simplification”  21 #ifdef projects  Almost no condition-simplification potential  E4 “AST Simplification”  Presence conditions from T YPE C HEF AST for Linux kernel  E5 “Scaling” with VM synthesis  Generated variability models from SPLOT  Models with 20 to 90 options FOSD meeting 2014 8

  9. Alexander von Rhein Presence-Condition Simplification E1 “Classification of Variants” size ( simp 𝑞 , 𝑛 ) ReductionFactor = lower is better size ( p ) FOSD meeting 2014 9

  10. Alexander von Rhein Presence-Condition Simplification E5 “Scaling” Care-set: DNF-clauses needed to express p ∧ 𝑛 and ¬p ∧ 𝑛 Can increase with larger variability models FOSD meeting 2014 10

  11. Alexander von Rhein Presence-Condition Simplification Conclusion  Presence-condition simplification  has many application scenarios (reporting, code conditions, …)  is effective (can make conditions much smaller)  is efficient (fast as long as conditions/contexts can be expressed in BDDs)  Future work  Other application scenarios  Specialized algorithms? FOSD meeting 2014 11

  12. Alexander von Rhein Presence-Condition Simplification Christian’s Application? “Order of Feature Interactions” Presence Condition Context Bug-triggering condition (e.g. Linux) Variability model ⋀ other global conditions VariabilityModel = base ⋀ (decrypt ⇔ encrypt) ⋀ (sign ⇔ verify) ⋀ (encrypt ⇒ keys) ⋀ (sign ⇒ keys) simp (Presence Condition, Context) Heuristics! count variables in simplified condition 2 variables left -> 2-way interaction FOSD meeting 2014 12

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