generating range fixes for
play

Generating Range Fixes for Software Configuration Yingfei Xiong * - PowerPoint PPT Presentation

Generating Range Fixes for Software Configuration Yingfei Xiong * Arnaud Hubaux Steven She Krzysztof Czarnecki Peking University of University of University Namur Waterloo China Belgium Canada * The work was done when Yingfei was at


  1. Generating Range Fixes for Software Configuration Yingfei Xiong * Arnaud Hubaux Steven She Krzysztof Czarnecki Peking University of University of University Namur Waterloo China Belgium Canada * The work was done when Yingfei was at University of Waterloo 1

  2. Variability Models & Configurators Configuration Linux Kconfig, eCos CDL, pure::variants, … Variability Models Variability Models Variability Models 2

  3. eCos Configurator - Errors 3

  4. eCos Configurator - Inactive Options disabled Error resolution and option activation both need to resolve violation of constraint. 4

  5. Survey • 97 Linux users and 9 eCos users • Resolving a violation is hard – 20% Linux users need "a few dozen minutes" to activate an option in average – 56% eCos users consider activation to be a problem 5

  6. eCos Configurator Essentially, fixes work for both resolving errors and activating options 6

  7. Fix Incompleteness Increase to any value >= 10 Further decrease to any value <= 8 Disable 78% eCos users have ecountered situations where the proposed fix is not useful 7

  8. How to complete fixes PreloadSize = 8 PreloadSize = 7 PreloadSize = 6 PreloadSize = 5 … PoolSize = 10 PoolSize = 11 PoolSize = 12 PoolSize = 13 … Preload = false 8

  9. Our Solution – Range Fixes [PreloadSize <= 8] [PoolSize >= 10] [Preload = false] 9

  10. Our Contributions • Defining the range fix generation problem – Three desirable properties of range fixes • Proposing a range fix generation algorithm • Exploring the constraint interaction problem – Summarizing and adapting three strategies used in existing work – Comparing the strategies empirically 10

  11. Fix Generation Problem – a General Definition Preload:Bool PreloadSize:Int Typed Variables PoolSize:Int [PreloadSize <= 8] Preload = true [PoolSize >= 10] PreloadSize = 10 [Preload = false] PoolSize = 8 A complete set of Assigned Values Fix Generator desirable fixes A logic constraint Preload → PreloadSize <= PoolSize 11

  12. Desired Properties of Fixes Correctness Minimality of Maximality of variables ranges Any change There is no way A range fix represented by a to change a represents the range fix will subset of maximal ranges satisfy the variables to over the constraint satisfy the variables constraint A desirable one : [PreloadSize <=8] Undesirable ones [PreloadSize <= 9] [PreloadSize <=8, [PreloadSize <=7] Preload = false] 12

  13. Algorithm • Based on Reiter’s theory of diagnosis • Please check the paper for the details 13

  14. Constraint Interaction [PreloadSize <= 8] [PoolSize >= 10] [Preload = false] 14

  15. Constraint Interaction Causing another error Increase Interacting constraint PoolSize 15

  16. Ignorance Ignore the interaction [PreloadSize <= 8] [PoolSize >= 10] [Preload = false] 16

  17. Elimination Eliminate all changes that will violate other constraints [PreloadSize <= 8] [PoolSize >= 10] [Preload = false] 17

  18. Propagation Propagate the change along other constraints [PreloadSize <= 8] [PoolSize >= 10 & BufferSize = PoolSize / 2] [PoolSize >= 10 & ObjectSize = 4096 / PoolSize] [Preload = false] 18

  19. Comparison of Strategies Ignorance Elimination Propagtion Execution time Shortest Short Possbily long Complexity of fix Simple Simplest Possibly complex lists Introduction of new Possible Never Never errors Complete Complete Fix completeness Incomplete (for one constraint) (for all constraints) 19

  20. Experiments • Source – Version histories from 5 open source projects • Steps – Compare each pair of consecutive versions – Replay the user changes in different orders – Generate fixes for the violations and compare with user changes 20

  21. Execution Time Ignorance Elimination Propagtion Average: 17ms Average: 20ms Average: 50ms Execution time Maximum: 20ms Maximum: 30ms Maximum: 250ms Complexity of fix Simple Simplest Possibly complex lists Introduction of new Possible Never Never errors Complete Complete Fix completeness Incomplete (for one constraint) (for all constraints) Our algorithm is sufficiently fast for each strategy 21

  22. Complexity of fix lists Ignorance Elimination Propagtion Average: 17ms Average: 20ms Average: 50ms Execution time Maximum: 20ms Maximum: 30ms Maximum: 250ms Max: 4 Max: 4 Max: 58 Complexity of fix lists (Number of Median: 2 Median: 2 Median: 2 variables in a list) Average: 2.2 Average: 1.64 Average: 8.0 Introduction of new Possible Never Never errors Complete Complete Fix completeness Incomplete (for one constraint) (for all constraints) In propagation, 83% of the fix lists contain less than 10 variables 22

  23. Introduction of new errors Ignorance Elimination Propagtion Average: 17ms Average: 20ms Average: 50ms Execution time Maximum: 20ms Maximum: 30ms Maximum: 250ms Max: 4 Max: 4 Max: 58 Complexity of fix lists (Number of Median: 2 Median: 2 Median: 2 variables in a list) Average: 2.2 Average: 1.64 Average: 8.0 Introduction of new 44% of all violations Never Never errors Complete Complete Fix completeness Incomplete (for one constraint) (for all constraints) 23

  24. Fix completeness Ignorance Elimination Propagtion Average: 17ms Average: 20ms Average: 50ms Execution time Maximum: 20ms Maximum: 30ms Maximum: 250ms Max: 4 Max: 4 Max: 58 Complexity of fix lists (Number of Median: 2 Median: 2 Median: 2 variables in a list) Average: 2.2 Average: 1.64 Average: 8.0 Introduction of new 44% of all violations Never Never errors Fix completeness 100% 57% 100% (coverage of user changes) eCos configurator: 73% 24

  25. Conclusion • Fix completenss can be achieved by organzing them into range fixes • Range fixes can be generated automatically and efficiently • Three strategies for constraint interaction – No absolutely best solution – Propagation strategy gives relatively better results than the other two 25

  26. Thank you for your attention! EccFixer: http://gsd.uwaterloo.ca/eccfixer 26

Recommend


More recommend