Automated Planning for Resolving Model Inconsistencies - A Scalability Study

  • 438 views
Uploaded on

Various approaches have been explored to detect and resolve software model inconsistencies. In this talk, we outline our research that uses the technique of automated planning for the purpose of …

Various approaches have been explored to detect and resolve software model inconsistencies. In this talk, we outline our research that uses the technique of automated planning for the purpose of resolving software model inconsistencies. We discuss the feasibility and scalability of a progression planner, and provide initial results of using a regression planner to improve the scalability.

More in: Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
438
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
5
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Automated Planning for Resolving Model Inconsistencies A Scalability Study Jorge Pinna Puissant Ragnhild Van Der Straeten Tom Mens October 2010
  • 2. What kind of model(s) do you consider in your work? • Meta-Model Independent • Currently focus in UML What kind(s) of evolution challenges are addressed • Inconsistency Management
  • 3. Model Inconsistency • In a model-driven development approach, inconsistencies inevitably arise. • Techniques to detect and resolve model inconsistencies are required.
  • 4. DETECTION RESOLUTION Inconsistency Management - Mens et. al. Process et. al. - Mens - Blanc et. al. - Nentwich et. al. - Easterbrook et. al. - Xiong et. al. - Van Der Straeten et. al.Inconsistency Detection Rules - Almeida da Silva et. al. Inconsistency Resolution Strategies - Egyed et. al. ? - Egyed et. al. ? - Engels et. al. Model Detect Model Select Inconsistency Choose Resolution Apply Resolution Inconsistencies to be Resolved Strategy Strategies annotate model with detected inconsistencies modify model by selected resolution strategies (may give rise to new problems)
  • 5. Knowledge representation and Deduction, reasoning, Commonsense knowledge problem solving Computational creativity Machine perception, Computer vision, and Speech recognition Machine learning Artificial intelligence Robotics Automated planning and scheduling Natural language processing Affective computing
  • 6. Automated Planning and Scheduling Initial State Desired Goal Plan Put Down y Stack x Set of Actions Rotate
  • 7. Automated Planning and Scheduling ModelState Initial with Model without Desired Goal Inconsistencies Inconsistencies Plan Put Down y Stack Model elementary x Set of Actions Operations Rotate
  • 8. Classical Planning • Progression Planning • Regression Planning
  • 9. Progression Planning • Forward state-space search • Starts with the Initial State Initial State
  • 10. Progression Planning Initial State h
  • 11. Progression Planning Initial State h Desired Goal
  • 12. Regression Planning • Backwards state-space search • Starts with the Desired Goal Desired Goal
  • 13. Regression Planning Initial State Desired Goal
  • 14. Example Vehicle Aircraft Bicycle Motorcycle Boat Car Amphibious Helicopter Airplane Vehicle 1..* Class diagram with 4 inconsistency occurrences
  • 15. Class diagram with 4 inconsistency occurrences • Inherited cyclic composition : 2 occurrences • Cyclic inheritance: 2 occurrences Vehicle Aircraft Bicycle Motorcycle Boat Car Amphibious Helicopter Airplane Vehicle 1..* Generated resolution plan 1. Delete generalisation Vehicle ➔ Amphibious Vehicle 2. Modify multiplicity of Amphibious Vehicle from 1..* to 0..*
  • 16. FF : The Fast-Forward Planning System • Progression Planner • PDDL language • Outstanding Performance at the 2nd International Planning Competition • Top Performer at the 3rd International Planning Competition • Disjunction and Negation in Goal
  • 17. FB : Fast Backward Planning • Regression Planner • Prolog • Prototype (custom built) • Based on regression planner in the “Prolog programming for artificial intelligence” book (Ivan Bratko) • Recursive best-first search algorithm • Disjunction and Negation in Goal
  • 18. actions and a desired goal. Because planning requires logic conditions as in- 1. ∃ att ∈ the whole type(att) ∈ (CM ∪ PT). put, AttCM : model environment (e.g. model, meta-model, detection rules) is / The Metamodel translated into a conjunction of logic literals. For instance the metamodel for 2. ∃ op =simple example, , iskgiven1below.rm )) ∈ that Ceach (∃i ∈ {1, . . . k} : pi ∈ by M ∪ PT) our (n, c, (p1 , . . . p ), (r , . . . , (Note Op M : element is represented (C ∨ ∃j ∈unique .id through (CM ∪ it can be referred. Cardinal is a strictly positive an {1, . . m} : rj ∈ which PT)). / / integer including inþnity.) Example 23 Consider the UML model only consisting of the class diagram in Figure 2.6. FF : (Class ?id - id ?name - String) Several occurrences of this typeid ?label - Stringcan be found in class_id (Generalisation ?id - of inconsistency ?child_class - the model. Due to the fact that the class Cash is not?parent_classthe class_id) type of the attribute cash is not known, included in - model, the also the type of the parameter- amount of -the dispenseCash String (Association_End ?id id ?class class_id ?role - operation of the class ATM is ?upper_mult - Cardinal ?lower_mult - Cardinal not known to this model. ?composite - Boolean) (Association ?id - id ?name - String ?ass_end_1 - ae_id 3.3.3 Connector ?ass_end_2 - ae_id) Specification Missing T he initial state is a state represented as a conjunction of literals, and Connector specification missing represents a the initial state will be the inconsistent kinds of represent the current world. In our case category of inconsistencies. Three inconsistencies can can differentiated. model. We be use either The Complete Model or The elements of the model that compose the inconsistency as initial state. T he main advantage of only use the el- • classless connectable element: that it makes the initial state signiþcantlysequence diagram ements of the inconsistency is there is a connectable element in a smaller. FB : class(Id,Name) whose generalisation(Id,Child_class,Parent_class) the elements of T his is a class does not in terms of performance. For instance base big advantage exist in the model. inconsistency_1 is given below. ! generalisation_label(Id,Label) association_end(Id,Class_id,Role) (Class c1 "ATM") ! association_end_upper(Id,Upper_Mult) (Class c2 "WithDrawATM") ! association_end_lower(Id,Lower_Mult) (Class c4 "WithdrawPrintingATM") ! association_end_composite(Id,Composite) (Generalisation g1 "Label1" c2 c1) association(Id,Assend1,Assend2) (Generalisation g3 "Label3" c4 c2) ! association_name(Id,Name) (Association_End ae1 c1 "role1" one one yes) (Association_End ae2 c4 "role2" infinity one non) (Association a1 "assocname" ae1 ae2)
  • 19. The Model FF : (Class c1 Vehicle ) (Class c2 Aircraft ) (Class c3 Bicycle ) (Class c4 Motorcycle ) (Class c5 Boat ) (Class c6 Car ) (Class c7 Helicopter ) (Class c8 Airplane ) (Class c9 Amphibious_Vehicle ) ... (Generalisation g5 label5 c6 c1 ) ... (Generalisation g9 label9 c9 c6 ) ... (Association_End ae1 c9 role1 star one_l non ) (Association_End ae2 c1 role2 one_u one_l yes ) (Association a1 ass1 ae1 ae2 )
  • 20. The Model FB : class(c1,vehicle), class(c2,aircraft), class(c3,bicycle), class(c4,motorcycle), class(c5,boat), class(c6,car), class(c7,helicopter), class(c8,airplane), class(c9,amphibious_vehicle), ... generalisation(g5,c6,c1), generalisation_label(g5, label5), ... generalisation(g9,c9,c6), generalisation_label(g9, label9), ... association_end(ae1,c9,role1), association_end_upper(ae1, star), association_end_lower(ae1, one_l), association_end_composite(ae1, non), association_end(ae2,c1,role2), association_end_upper(ae2, one_u), association_end_lower(ae2, one_l), association_end_composite(ae2, yes), association(a1,ae1,ae2), association_name(a1, ass1)
  • 21. Automated Planning and Scheduling ModelState Initial with Model without Desired Goal Inconsistencies Inconsistencies Plan Put Down y Stack Model elementary x Set of Actions Operations Rotate
  • 22. Initial State: Model with Inconsistencies 1. The complete model. 2. Partial model that contains all those elements that are involved in one or more inconsistency occurrences.
  • 23. Initial State: Model with Inconsistencies Vehicle Aircraft Bicycle Motorcycle Boat Car Amphibious Helicopter Airplane Vehicle 1..*
  • 24. Automated Planning and Scheduling ModelState Initial with Model without Desired Goal Inconsistencies Inconsistencies Plan Put Down y Stack Model elementary x Set of Actions Operations Rotate
  • 25. Set of Actions: Model elementary Operations Metamodel elements Possible Actions create Class Class delete Class create Generalisation Generalisation modify Generalisation Label delete Generalisation create Association End modify Association End Upper Multiplicity Association End modify Association End Lower Multiplicity modify Association End Composition Type delete Association End create Association Association modify Association Name delete Association Table 1: Set of actions derived from the metamodel.
  • 26. Automated Planning and Scheduling ModelState Initial with Model without Desired Goal Inconsistencies Inconsistencies Plan Put Down y Stack Model elementary x Set of Actions Operations Rotate
  • 27. Desired Goal: Model without Inconsistencies 1. The negation of the inconsistency detection rules. 2. The negation of the inconsistency occurrences.
  • 28. Model without Inconsistencies Inconsistency Detection Inconsistency Resolution Rules Strategies ? ? The negation of the Model Detect Model inconsistency detection rules. Resolution Select Inconsistency Choose Resolution Apply Inconsistencies to be Resolved Strategy Strategies annotate model with detected inconsistencies modify model by selected resolution strategies (may give rise to new problems)
  • 29. Desired Goal: Model without Inconsistencies 1. The negation of the inconsistency detection rules. ?c1 (:goal ?c2 (not (and (exists ( ?c1 - c_id ?c2 - c_id ?c3 - c_id) (and ?c3 (exists (?g - g_id ?Label - g_label) (Generalisation ?g ?Label ?c2 ?c1)) 1..* (exists (?g - g_id ?Label - g_label) (Generalisation ?g ?Label ?c3 ?c2)) (exists (?ae - ae_id ?role - ae_role ?upper - upper_cardinal ?lower - lower_cardinal) (Association_End ?ae ?c1 ?role ?upper ?lower yes)) (exists (?ae - ae_id ?role - ae_role ?upper - upper_cardinal ?composite - boolean) (Association_End ?ae ?c3 ?role ?upper one_l ?composite)) )) )) )
  • 30. Desired Goal: Model without Inconsistencies 2. The negation of the inconsistency occurrences. Vehicle (Class c1 Vehicle ) (Class c6 Car ) (Class c9 Amphibious_Vehicle ) Car (:goal (not (and Amphibious (exists (?g - g_id ?Label - g_label) (Generalisation ?g ?Label c6 c1)) Vehicle 1..* (exists (?g - g_id ?Label - g_label) (Generalisation ?g ?Label c9 c6)) (exists (?ae - ae_id ?role - ae_role ?upper - upper_cardinal ?lower - lower_cardinal) (Association_End ?ae c1 ?role ?upper ?lower yes)) (exists (?ae - ae_id ?role - ae_role ?upper - upper_cardinal ?composite - boolean) (Association_End ?ae c9 ?role ?upper one_l ?composite)) )) )
  • 31. Feasibility Study Desired Goal: FF Time FB Time Initial state Negation of (in seconds) (in seconds) complete model inconsistency rules out of memory N/A partial model inconsistency rules out of memory N/A inconsistency complete model 14.84 0.181 ocurrences inconsistency partial model 0.268 0.051 ocurrences
  • 32. Scalability Study 1. Adding isolated classes. 2. Increasing the inheritance chain. 3. Size of the goal.
  • 33. Scalability Study 1. Adding isolated classes to complete model. #!!!!" '&!!!" 5 hours '%!!!" '$!!!" '#!!!" Exponential function !"#$%&'(% '!!!!" &!!!" R² = 0.982 )*" %!!!" ))" $!!!" #!!!" 15 !" seconds !" (" '!" '(" #!" )*#+$,%-.%"'-/01$2%3/0''$'%022$2%1-%14$%#-2$/%
  • 34. Scalability Study 1. Adding isolated classes to complete model. #!!!!" '&!!!" Polynomial function '%!!!" '$!!!" y = 0.001x² + 0.20x + 0.191 '#!!!" R² = 0.999 !"#$%&'(% '!!!!" &!!!" )*" %!!!" 1.21 ))" $!!!" seconds #!!!" 0.19 !" seconds !" (" '!" '(" #!" )*#+$,%-.%"'-/01$2%3/0''$'%022$2%1-%14$%#-2$/%
  • 35. Scalability Study 1. Adding isolated classes to complete model. #!!!!!$ #!!!!$ #!!!$ !"#$%&'(% #!!$ '($ #!$ ''$ #$ !"#$ !$ %$ #!$ #%$ &!$ )*#+$,%-.%"'-/01$2%3/0''$'%022$2%1-%14$%#-2$/%
  • 36. Scalability Study 2. Increasing the inheritance chain to the partial model. #!!" 10 '#!" minutes '!!" &#!" &!!" Exponential function !"#$%&'(% %#!" R² = 0.995 %!!" +," $#!" ++" $!!" #!" 0.3 !" seconds !" $" %" &" '" #" (" )" *" )*#+$,%-.%,$/01$2%3/0''$'%022$2%1-%14$%#-2$/%
  • 37. Scalability Study 2. Increasing the inheritance chain to the partial model. #!!" '#!" '!!" Polynomial function &#!" y = 0.007x² + 0.057 &!!" !"#$%&'(% %#!" R² = 0.999 %!!" +," $#!" ++" 0.56 $!!" seconds #!" 0.06 !" seconds !" $" %" &" '" #" (" )" *" )*#+$,%-.%,$/01$2%3/0''$'%022$2%1-%14$%#-2$/%
  • 38. Scalability Study 2. Increasing the inheritance chain to the partial model. #!!$ #!$ !"#$%&'(% #$ ,-$ ,,$ !"#$ !"!#$ !$ #$ %$ &$ '$ ($ )$ *$ +$ )*#+$,%-.%,$/01$2%3/0''$'%022$2%1-%14$%#-2$/%
  • 39. Scalability Study 3. Size of the Goal #!!" '#!" '!!" *+"'",-./-0,012-.,20" &#!" *+"&",-./-0,012-.,20" &!!" !"#$%&'(% *+"%",-./-0,012-.,20" %#!" %!!" *+"$",-./-0,012-.,20" $#!" **"'",-./-0,012-.,20" $!!" **"&",-./-0,012-.,20" #!" **"%",-./-0,012-.,20" !" **"$",-./-0,012-.,20" !" %" '" (" )" )*#+$,%-.%,$/01$2%3/0''$'%022$2%1-%14$%#-2$/%
  • 40. Scalability Study 3. Size of the Goal #!!$ )*$&$+,-.,/+/01,-+1/$ )*$2$+,-.,/+/01,-+1/$ #!$ )*$%$+,-.,/+/01,-+1/$ )*$#$+,-.,/+/01,-+1/$ #$ ))$&$+,-.,/+/01,-+1/$ ))$2$+,-.,/+/01,-+1/$ !"#$ ))$%$+,-.,/+/01,-+1/$ ))$#$+,-.,/+/01,-+1/$ !"!#$ !$ %$ &$ '$ ($
  • 41. Scalability Study 3. Size of the Goal FF #!!$ )*$&$+,-.,/+/01,-+1/$ )*$2$+,-.,/+/01,-+1/$ #!$ )*$%$+,-.,/+/01,-+1/$ )*$#$+,-.,/+/01,-+1/$ #$ ))$&$+,-.,/+/01,-+1/$ ))$2$+,-.,/+/01,-+1/$ !"#$ ))$%$+,-.,/+/01,-+1/$ ))$#$+,-.,/+/01,-+1/$ !"!#$ !$ %$ &$ '$ ($
  • 42. Scalability Study 3. Size of the Goal #!!$ )*$&$+,-.,/+/01,-+1/$ )*$2$+,-.,/+/01,-+1/$ #!$ )*$%$+,-.,/+/01,-+1/$ FB )*$#$+,-.,/+/01,-+1/$ #$ ))$&$+,-.,/+/01,-+1/$ ))$2$+,-.,/+/01,-+1/$ !"#$ ))$%$+,-.,/+/01,-+1/$ ))$#$+,-.,/+/01,-+1/$ !"!#$ !$ %$ &$ '$ ($
  • 43. Conclusion & Future Work • We are going to use FB for future work. • Because it better fits the problem we are addressing • FF performs better for other types of problems • Study and classify inconsistency rules by their “complexity”. • Integrate into a modeling tool • Come up with a benchmark
  • 44. Open question • Given multiple resolution plans, which one is the most appropriate? • Are there other techniques that may be better suited for resolving model inconsistencies? • Partial-order planning, search-based approaches (e.g., local variable neighborhood search)
  • 45. Automated Planning for Resolving Model Inconsistencies A Scalability Study Jorge Pinna Puissant Ragnhild Van Der Straeten Tom Mens October 2010