Software & Systems Modeling

, Volume 6, Issue 2, pp 139–162 | Cite as

A formal approach to model refactoring and model refinement

  • Ragnhild Van Der Straeten
  • Viviane Jonckers
  • Tom Mens
Special Issue Paper

Abstract

Model-driven engineering is an emerging software engineering approach that relies on model transformation. Typical kinds of model transformations are model refinement and model refactoring. Whenever such a transformation is applied to a consistent model, we would like to know whether the consistency is preserved by the transformation. Therefore, in this article, we formally define and explore the relation between behaviour inheritance consistency of a refined model with respect to the original model, and behaviour preservation of a refactored model with respect to the original model. As it turns out, there is a strong similarity between these notions of behaviour consistency and behaviour preservation. To illustrate this claim, we formalised the behaviour specified by UML 2.0 sequence and protocol state machine diagrams. We show how the reasoning capabilities of description logics, a decidable fragment of first-order logic, can be used in a natural way to detect behaviour inconsistencies. These reasoning capabilities can be used in exactly the same way to detect behaviour preservation violations during model refactoring. A prototype plug-in in a UML CASE tool has been developed to validate our claims.

Keywords

Model-driven engineering UML 2.0 Description logics Model refinement Model refactoring Behaviour preservation 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Astels, D. Refactoring with UML. In: Proceedings of the International Conference eXtreme Programming and Flexible Processes in Software Engineering, pp. 67–70, (2002)Google Scholar
  2. 2.
    Baader F., McGuinness D., Nardi D., Patel-Schneider P. (2003) The Description Logic Handbook: Theory, Implementation and Applications. Cambridge University Press, CambridgeMATHGoogle Scholar
  3. 3.
    Boger, M., Sturm, T., Fragemann, P. Refactoring browser for UML. In: Proceedings of the International Conference eXtreme Programming and Flexible Processes in Software Engineering, pp. 77–81, (2002)Google Scholar
  4. 4.
    Bunse, C., Atkinson, C. The normal object form: Bridging the gap from models to code. In Proc. Int’l Conf. UML’99, vol. 1723, pp. 691–705. Springer, Berlin Heidelberg New York (1999)Google Scholar
  5. 5.
    Calí, A., Calvanese, D., De Giacomo, G., Lenzerini, M. A formal framework for reasoning on UML class diagrams. In: Foundations of Intelligent Systems: 13th International Symposium, vol. 2366 of LNCS, pp. 503. Springer, Berlin Heidelberg New York (2002)Google Scholar
  6. 6.
    Calvanese, D., De Giacomo, G., Lenzerini, M. 2atas make dls easy. In: Proceedings of the International Workshop on Description Logics, vol. 53 of CEUR Electronic Workshop Proceedings, pp. 107–118 (2002)Google Scholar
  7. 7.
    Clarke E.M., Grumberg O., Peled D.A. (1999) Model Checking. MIT Press, CambridgeGoogle Scholar
  8. 8.
    Davies J., Crichton C. (2002). Concurrency and refinement in the UML. In: Derrick J., Boiten E., Woodcock J., von Wright J. (eds). Electronic Notes in Theoretical Computer Science, vol. 70. Elsevier, AmsterdamGoogle Scholar
  9. 9.
    D’Souza D., Wills A. (1998) Objects, Components and Frameworks with UML: the Catalysis Approach. Addison-Wesley, ReadingGoogle Scholar
  10. 10.
    Ebert, J., Engels, G. Specialization of object life cycle definitions. Fachbericht Informatik 19/95, Universität Koblenz-Landau, Fachbereich Informatik, Koblenz, (1995)Google Scholar
  11. 11.
    Emmerich W., Finkelstein A., Antonelli S., Armitage S., Stevens R. (1999) Managing standards compliance. IEEE Trans. Softw. Eng. 25(6): 836–851CrossRefGoogle Scholar
  12. 12.
    Engels, G., Hausmann, J., Heckel, R., Sauer, S. Testing the consistency of dynamic UML diagrams. In: Proceedings of the Sixth International Conference Integrated Design and Process Technology (IDPT 2002), June 2002Google Scholar
  13. 13.
    Engels, G., Heckel, R., Küster, J.M., Groenewegen, L. Consistency-preserving model evolution through transformations. In: Proceedings of the 5th International Conference UML 2002, vol. 2460 of LNCS, pp. 212–226. Springer, Berlin Heidelberg New York (2002)Google Scholar
  14. 14.
    Finkelstein, A., Gabbay, D.M., Hunter, A., Kramer, J., Nuseibeh, B. Inconsistency handling in multi-perspective specifications. In: European Software Engineering Conference, vol. 717 of LNCS, pp. 84–99. Springer, Berlin Heidelberg New York (1993)Google Scholar
  15. 15.
    Gentleware. Poseidon, http://www.gentleware.com/, 18 March 2004Google Scholar
  16. 16.
    Haarslev, V., Möller, R. RACER system description. In: Proceedings of the International’l Joint Conference Automated Reasoning (IJCAR 2001), vol. 2083 of LNCS, pp. 701–706. Springer, Berlin Heidelberg New York (2001)Google Scholar
  17. 17.
    Horrocks, I., Sattler, U., Tobies, S. Practical reasoning for expressive description logics. In: Proceedings of the 6th International Conference Logic for Programming and Automated Reasoning (LPAR’99), volume 1705 of LNAI, pp. 161–180. Springer, Berlin Heidelberg New York (1999)Google Scholar
  18. 18.
    Jürjens, J. Formal Semantics for Interacting UML subsystems. In: Proceedings of the 5th International Conference Formal Methods for Open Object-Based Distributed Systems (FMOODS 2002), pp. 29–44. Kluwer, Dordrecht (2002)Google Scholar
  19. 19.
    Latella D., Majzik I., Massink M. (1999) Automatic verification of a behavioural subset of UML statechart diagrams using the SPIN model-checker. Formal Aspects Comput. 11(6): 637–664MATHCrossRefGoogle Scholar
  20. 20.
    Liskov, B. Data abstraction and hierarchy. SIGPLAN Notices 23(5), 17–34 (1987). OOPSLA ’87 Keynote SpeechGoogle Scholar
  21. 21.
    Lutz, C., Sattler, U. Mary likes all cats. In: Baader, F., Sattler, U. (eds.) Proceedings of the International Workshop on Description Logics, vol. 33 of CEUR Electronic Workshop Proceedings, pp. 213–225, 2000Google Scholar
  22. 22.
    Mens, T., Demeyer, S., Janssens, D. Formalising behaviour preserving program transformations. In: Proceedings of the First International Conference on Graph Transformation, vol. 2505 of LNCS, pp. 286–301. Springer, Berlin Heidelberg New York (2002)Google Scholar
  23. 23.
    Meyer B. (1997) Object-Oriented Software Construction, 2nd edn. Prentice Hall, Englewood cliffsMATHGoogle Scholar
  24. 24.
    Nissen H., Jeusfeld M., Jarke M., Zemanek G., Guber H. (1996) Managing multiple requirements perspectives with metamodels, pp. 37–47. IEEE Software, Washigton DCGoogle Scholar
  25. 25.
    Nuseibeh B., Kramer J., Finkelstein A. (1994) A framework for expressing the relationship between multiple views in requirements specification. IEEE Trans. Softw. Eng. 20(10): 760–773CrossRefGoogle Scholar
  26. 26.
    Object Management Group. UML 2.0 Object Constraint Language Final Adopted Specification. ptc/03-10-14, January 2005Google Scholar
  27. 27.
    Object Management Group. Unified Modeling Language 2.0 Superstructure Draft Adopted Specification. ptc/03-08-02, January 2005Google Scholar
  28. 28.
    Object Management Group. Unified Modeling Language Version 1.5. formal/2003-03-01, January 2005Google Scholar
  29. 29.
    Porres, I. Model refactorings as rule-based update transformations. In: Proceedings of the International Conference UML 2003, vol. 2863 of LNCS, pp. 159. Springer, Berlin Heidelberg New York, 2003Google Scholar
  30. 30.
    Rasch, G., Wehrheim, H. Checking consistency in UML diagrams: Classes and state machines. In: Formal Methods for Open Object-based Distributed Systems, vol. 2884 of LNCS, pp. 229–243. Springer, Berlin Heidelberg New York (2003)Google Scholar
  31. 31.
    Schäfer T., Knapp A., Merz S. Model checking UML state machines and collaborations. Electronic Notes Theor. Comput. Sci. 55(3) (2001)Google Scholar
  32. 32.
    Schrefl M., Stumptner M. (2002) Behavior consistent specialization of object life cycles. ACM Trans. Softw. Eng. Method. 11(1): 92–148CrossRefGoogle Scholar
  33. 33.
    Sendall S., Kozaczynski W. (2003). Model transformation: The heart and soul of model-driven software development. IEEE Softw. 20(5): 42–45 Special Issue on Model-Driven Software DevelopmentCrossRefGoogle Scholar
  34. 34.
    Shen, W., Lu, Y., Low, W.L. Extending the UML metamodel to support software refinement. In: Consistency Problems in UML-based software development II: Workshop Materials, number 2003:06, 2003. Available at http://www.ipd.bth.se/consistencyUML/ Consistency_Problems_in_UML_II.pdf, October 2003Google Scholar
  35. 35.
    Simmonds, J., Bastarrica, M.C. Description logics for consistency checking of architectural features in UML 2.0 models. DCC Technical Report TR/DCC-2005-1, Departamento de Ciencias de la Computacion, Santiago, Chile, 2005Google Scholar
  36. 36.
    Simmonds J., Van Der Straeten R., Jonckers V. (2004) Maintaining consistency between uml models using description logic. Série L’objet - logiciel, base de données, réseaux 10(2–3): 231–244Google Scholar
  37. 37.
    Spanoudakis G., Zisman A. (2001) Inconsistency Management in Software Engineering: Survey and Open Research Issues, vol. 1, pp. 329–380. World Scientific Pub. Co., SingaporeGoogle Scholar
  38. 38.
    Stevens P., Tenzer J. (2003). Modelling recursive calls with UML state diagrams. In: Pezzé M. (eds). Proceedings of the Fundamental Approaches to Software Engineering (FASE 2003), vol. 2621 of LNCS, Springer, Berlin Heidelberg New York, pp. 135–149Google Scholar
  39. 39.
    Stumptner, M., Schrefl, M. Behavior Consistent Inheritance in UML. In: Proceedings of the 19th International Conference Conceptual Modeling (ER 2000), vol. 1920 of LNCS, pp. 527–542. Springer, Berlin Heidelberg New York (2000)Google Scholar
  40. 40.
    Sunyé, G., Pollet, D., LeTraon, Y., Jézéquel, J.-M. Refactoring UML Models. In: Proceedings of the International Conference UML 2001, vol. 2185 of LNCS, pp. 134–138. Springer, Berlin Heidelberg New York (2001)Google Scholar
  41. 41.
    van der Aalst, W. Inheritance of dynamic behaviour in UML. In: Proceedings of the 2nd International’l Workshop on Modelling of Objects, Components and Agents (MOCA’02), pp. 105–120, August 2002Google Scholar
  42. 42.
    Van Der Straeten, R. Inconsistency Management in Model-driven Engineering. An Approach using Description Logics. PhD Thesis, Vrije Universiteit BrusselGoogle Scholar
  43. 43.
    Van Der Straeten, R., Mens, T., Simmonds, J., Jonckers, V. Using description logic to maintain consistency between UML models. In: Proceedings of the International Conference UML 2003, vol. 2863 of LNCS, pp. 326–340. Springer, Berlin Heidelberg New York (2003)Google Scholar
  44. 44.
    Van Der Straeten, R., Simmonds, J., Mens, T. Detecting inconsistencies between UML models using description logic. In: Calvanese, D., Giacomo, G.D., Franconi, E. (eds.) Description Logics, vol. 81 of CEUR Workshop Proceedings (2003)Google Scholar
  45. 45.
    Whittle, J. Transformations and software modeling languages: Automating transformations in UML. In: Proceedings of the International Conference UML 2002, vol. 2460 of LNCS, pp. 227–242. Springer, Berlin Heidelberg New York (2002)Google Scholar

Copyright information

© Springer-Verlag 2006

Authors and Affiliations

  • Ragnhild Van Der Straeten
    • 1
  • Viviane Jonckers
    • 1
  • Tom Mens
    • 2
  1. 1.System and Software Engineering LabVrije Universiteit BrusselBrusselBelgium
  2. 2.Service de Génie LogicielUniversité de Mons-HainautMonsBelgium

Personalised recommendations