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.
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Automated Planning for Resolving Model Inconsistencies - A Scalability Study
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
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)
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)
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
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