UML Model Refactoring Viktor Stojkovski University of Antwerpen, - - PowerPoint PPT Presentation

uml model refactoring
SMART_READER_LITE
LIVE PREVIEW

UML Model Refactoring Viktor Stojkovski University of Antwerpen, - - PowerPoint PPT Presentation

UML Model Refactoring Viktor Stojkovski University of Antwerpen, Faculty of Computer Science, Masters of Software Engineering January, 2013, Belgium Email: Viktor.Stojkovski@student.ua.ac.be Introduction to UML Model Refactoring Because of


slide-1
SLIDE 1

UML Model Refactoring

Viktor Stojkovski

University of Antwerpen, Faculty of Computer Science, Masters of Software Engineering January, 2013, Belgium Email: Viktor.Stojkovski@student.ua.ac.be

slide-2
SLIDE 2

Introduction to UML Model Refactoring

  • Because of constant evolution, systems

must be modified and evolve

  • There is no precise validation whether the

modifications won’t change the system behavior

  • Necessity of basic set of model

transformations (refactorings)

slide-3
SLIDE 3

Main goal of the project

  • Create UML Statechart refactoring rules

using the defined transformations in the article Refactoring UML Models

  • Define GraphGrammar rules using the

Meta-Modeling software AToM3

  • Sunye, G., Pollet, D., Traon, Y. L., Jezequel, J.-M., 2001. Refactoring UML Models. Springer.
  • http://atom3.cs.mcgill.ca/
slide-4
SLIDE 4

Working process(1)

  • 1. Reading and understanding the defined

rules and the OCL (Object Constraint Language) constraints

  • 2. Create a testing model in AToM3 using

the DCharts as formalism

Group States model example

Feng, H., 2004. Dcharts, a formalism for modeling and simulation based design of reactive software systems

slide-5
SLIDE 5

Working process(2)

  • 3. Specify the grammar by creating the rules

– LHS and RHS

Group States rule example

slide-6
SLIDE 6

Working process(3)

  • 4. Add conditions to the rules as pre-

conditions and actions as post-conditions

  • 5. Program the pre and post conditions in

Python

Precondition for the Fold Incoming Actions rule Acton for the FIA rule

slide-7
SLIDE 7

Working process(4)

  • 6. Organizing the rules in the grammar by

giving them priorities

– The order of the rules is very important (explanation!?)

Hierarchy of the rules in the GG

slide-8
SLIDE 8

Working process(5)

  • 7. Executing the grammar
  • 8. Analyzing the results:

– Does the execution of the grammar over the statechart give the expected results? – Is the model behavior preserved?

Example of the Group State rule execution

slide-9
SLIDE 9

Presentation of an example from the practical work of the project

  • Refactoring a Statechart diagram that is

modeling a phone call

  • Explanation of the refactoring process

through an examples

  • Comparing the results of the refactoring to

the theoretical results from the article

Sunye, G., Pollet, D., Traon, Y. L., Jezequel, J.-M., 2001. Refactoring UML Models

slide-10
SLIDE 10

Conclusion

  • After testing the refactoring grammar on a

number of UML Statechart models the results were satisfactory

  • Room for improvements:

– More wide-ranging pre and post conditions covering all of the states in which the model can be – Inventing new and expanding the already specified refactoring rules (example with the extension of the Move State out of Composite rule)

slide-11
SLIDE 11

References

  • Feng, H., 2004. Dcharts, a formalism for modeling and simulation

based design of reactive software systems. A Masters Thesis

  • OMG, 2009. OMG Object Constraint Language (OCL). OMG
  • Selic, B., 2009. Unified Modeling Language Specification (version

2.1). OMG

  • Sunye, G., Pollet, D., Traon, Y. L., Jezequel, J.-M., 2001.

Refactoring UML Models. Springer

  • Yang, M., Michaelson, G. J., Pooley, R. J., 2008. Formal action

semantics for a UML action language. Journal of Universal Computer Science

  • http://atom3.cs.mcgill.ca/
slide-12
SLIDE 12

Questions & Discussion