automating model transformations and refactoring for goal-oriented models

21
Automating Model Transformations and Refactoring for Goal-oriented Models Antoine Cailliau June 25, 2010

Upload: antoine-cailliau

Post on 08-Jul-2015

777 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Automating Model Transformations and Refactoring for Goal-oriented Models

Automating Model Transformationsand Refactoring for Goal-oriented Models

Antoine Cailliau June 25, 2010

Page 2: Automating Model Transformations and Refactoring for Goal-oriented Models

1

Outline

ContextWhat motivates the work?

Illustrated approachHow is the problem addressed?

Known limitationsIs the approach viable?

Page 3: Automating Model Transformations and Refactoring for Goal-oriented Models

2

Well-structured requirementsare required

Goal-orientation use goalsas core abstraction to answer

What?

Why?

Who?

Page 4: Automating Model Transformations and Refactoring for Goal-oriented Models

3

KAOS is a goal-oriented method

EffectiveTransportation

RapidTransportation

SafeTransportationA goal

A refinement

Goal-model is theprimary focus

Refinementsinter-relate goals

Page 5: Automating Model Transformations and Refactoring for Goal-oriented Models

4

Generic specificationscapture a structure

matchesP ⇒ ◊ Q

DistanceBetweenTrainEstimated⇒ ◊AccelerationCommanded

Page 6: Automating Model Transformations and Refactoring for Goal-oriented Models

5

Refinement patterns alsocapture a structure

matches

matches

matches

P ⇒ ◊ Q

P ⇒ ◊ R

R ⇒ ◊ Q

DistanceBetweenTrainEstimated⇒ ◊AccelerationCommanded

DistanceBetweenTrainEstimated⇒ ◊AccelerationCommandSent

AccelerationCommandSent⇒ ◊AccelerationCommanded

Page 7: Automating Model Transformations and Refactoring for Goal-oriented Models

6

Code evolutionoverlooks requirements

Because requirements evolve, we need

Techniques supporting evolution

Tools supporting techniques

Page 8: Automating Model Transformations and Refactoring for Goal-oriented Models

7

Transformations preserveproperties on refinements

CompletenessSatisfying sub-goals is sufficient

MinimalityNo sub-goal is unnecessary

ConsistencyNo sub-goal conflicts with another

Page 9: Automating Model Transformations and Refactoring for Goal-oriented Models

8

The approach isconstructive

PrimitiveBasic operators

Macro-operatorsHigh-level operators

Page 10: Automating Model Transformations and Refactoring for Goal-oriented Models

9

Macro-operators supporthigh-level tasks

Construction of models

Edition of refinements

Propagation of changes

Restructuring refinements

Page 11: Automating Model Transformations and Refactoring for Goal-oriented Models

10

Propagation of changesuse refinement patterns

P ⇒ ◊ R R ⇒ ◊ Q

P ⇒ ◊ QMeta-variables are bound

Bounds express links

Links may preserve invariants

Page 12: Automating Model Transformations and Refactoring for Goal-oriented Models

11

Changes are propagatedaccording meta-variables

TrainsFollowing ⇒ ◊ SafeDistance

TrainsFollowing ⇒ ◊AccelerationCommanded

AccelerationCommanded ⇒ ◊SafeDistance

Page 13: Automating Model Transformations and Refactoring for Goal-oriented Models

12

Algorithm has 3 steps

P ⇒ ◊ R R ⇒ ◊ Q

P ⇒ ◊ Q

TrainsFollowing ∧ SameTrack ⇒ ◊ SafeDistance

1. Find meta-variable

2. Update Refinement

3. Propagate

Page 14: Automating Model Transformations and Refactoring for Goal-oriented Models

13

Algorithm has 3 steps

TrainsFollowing ∧ SameTrack ⇒ ◊ SafeDistance

TrainsFollowing ∧ SameTrack ⇒ ◊AccelerationCommanded

AccelerationCommanded ⇒ ◊SafeDistance

1. Find meta-variable

2. Update Refinement

3. Propagate

Page 15: Automating Model Transformations and Refactoring for Goal-oriented Models

14

Algorithm has 3 steps

TrainsFollowing ∧ SameTrack ⇒ ◊ SafeDistance

TrainsFollowing ∧ SameTrack ⇒ ◊AccelerationCommanded

AccelerationCommanded ⇒ ◊SafeDistance

1. Find meta-variable

2. Update Refinement

3. Propagate

Page 16: Automating Model Transformations and Refactoring for Goal-oriented Models

15

Restructuring operatorsdetect bad patterns

P ∧¬ C ⇒ ◊ R

P ∧ C ⇒ ◊ R

P ⇒ ◊ Q

R ⇒ ◊ Q

Require a catalogof “bad” patterns

Here, pattern is a mix oftwo known patterns

Page 17: Automating Model Transformations and Refactoring for Goal-oriented Models

16

Restructuring operatorsrefactor refinements

P ∧¬ C ⇒ ◊ Q

P ⇒ ◊ Q

P ∧ C ⇒ ◊ Q

P ⇒ ◊ Q

P ⇒ ◊ R R ⇒ ◊ Q

Easier to

Understand

Analyze

Modify

Page 18: Automating Model Transformations and Refactoring for Goal-oriented Models

17

Refinement patternsform the main limitations

Lack for abstractionProperties about patterns

Strict instantiationDiscover relaxed pattern

Page 19: Automating Model Transformations and Refactoring for Goal-oriented Models

18

Assumptions limit the approach

Tool-supported matching functionSyntactic matching only

Early formalizationSome goals are hard to formalize

Page 20: Automating Model Transformations and Refactoring for Goal-oriented Models

19

Conclusion

Requirements need to evolveto avoid disastrous consequencesNo silver bulletThere is a price to pay

Primitive operatorsBasic operatorsMacro-operatorsHigh-level operators

Page 21: Automating Model Transformations and Refactoring for Goal-oriented Models

Automating Model Transformationsand Refactoring for Goal-oriented Models

Questions?