Formal Refactoring for UML Class Diagrams

  • Tiago Massoni UFPE
  • Rohit Gheyi UFPE
  • Paulo Borba UFPE

Resumo


Refatorar modelos UML para evolução é normalmente uma atividade realizada de forma ad hoc. Estas transformações podem apresentar problemas, já que é difícil assegurar que a semâtica dos modelos é mantida. Desta forma, propomos um conjunto de transformações que preservam a semântica de diagramas de classe UML com OCL. Ao aplicar as transformações propostas, projetistas de software podem, de forma segura, definir transformações maiores, além de detectar problemas sutis ao refatorar modelos. Refatoração de modelos podem ser úteis tanto em MDA quanto para introduzir padrões de projeto. A corretude das transformações propostas é garantida através de um modelo semântico para UML baseado em Alloy, uma linguagem de modelagem formal. Como Alloy permite a realização de análises automáticas de modelos, nossa abordagem pode trazer benefícios similares para diagramas de classe.

Palavras-chave: refatoração de modelos, diagrama de classes, OCL, Alloy

Referências

Bourdeau, R. and Cheng, B. (1995). A Formal Semantics for Object Model Diagrams. IEEE Transactions on Soft. Engineering, 21(10):799-821.

Dennis, G. et al. (2004). Automating Commutativity Analysis at the Design Level. In Inter. Symposium on Software Testing and Analysis, pages 165-174.

Edwards, J. et al. (2004). A Type System for Object Models. In 12th Foundations of Software Engineering, pages 189-199. ACM Press.

Evans, A. et al. (1999). The UML as a formal modeling notation. In UML'98 First International Workshop, pages 336-348. Springer.

Evans, A. S. (1998). Reasoning with UML Class Diagrams. In 2nd IEEE Workshop on Industrial Strength Formal Specification Techniques, pages 102-113. IEEE CS Press.

Fowler, M. (1999). Refactoring"”Improving the Design of Existing Code. Addison Wesley.

Gheyi, R., Massoni, T., and Borba, P. (2004). Basic laws of object modeling. In Third Specification and Verification of Component-Based Systems (SAVCBS), affiliated with ACM SIGSOFT 2004/FSE-12, pages 18-25, Newport Beach, United States.

Gheyi, R., Massoni, T., and Borba, P. (2005a). A Rigorous Approach for Proving Model Refactorings. Submitted for publication.

Gheyi, R., Massoni, T., and Borba, P. (2005b). An Abstract Equivalence Notion for Object Models. In A. Mota, A. M., editor, Electronic Notes in Theoretical Computer Science, volume 130, pages 3-21. Elsevier.

Gogolla, M. and Richters, M. (1998). Equivalence Rules for UML Class Diagrams. In UML'98 First International Workshop, pages 87-96.

Greenfield, J. et al. (2004). Software Factories: Assembling Applications with Patterns, Models, Frameworks, and Tools. Wiley.

Jackson, D. (2005). Alloy 3.0 Reference Manual. http://alloy.mit.edu/beta/reference-manual.pdf.

Jackson, D. et al. (2000). Alcoa: the Alloy Constraint Analyzer. In 22nd International Conference on Software Engineering, pages 730-733. ACM Press.

Jackson, D. et al. (2001). A Micromodularity Mechanism. In 9th Foundations of Software Engineering, pages 62-73. ACM Press.

Lano, K. and Bicarregui, J. (1998). Semantics and Transformations for UML Models. In UML'98 First International Workshop, pages 107-119.

Larman, C. (2001). Applying UML and Patterns: An Introduction to ObjectOriented Analysis and Design and the Unified Process. Prentice Hall.

Massoni, T., Gheyi, R., and Borba, P. (2004). A UML Class Diagram Analyzer. In 3rd International Workshop on Critical Systems Development with UML, affiliated with 7th UML Conference, pages 143-153.

Massoni, T., Gheyi, R., and Borba, P. (2005). A Model-driven Approach to Program Refactoring. Submitted for publication.

Object Management Group (2001). XMI specification.

Object Management Group (2003). Unified Modeling Language Specification Version 1.5.

Owre, S. et al. (2005). PVS language and prover reference. At http://pvs.csl.sri.com.

Porres, I. (2003). Model refactorings as rule-based update transformations. In 6th UML Conference, volume 2863 of LNCS, pages 159-174. Springer.

Sampaio, A. et al. (2003). Class and Capsule Refinement in UML for Real Time. In 6th Brazilian Workshop on Formal Methods, pages 16-34.

Soley, R. (2000). Model Driven Architecture. OMG Document 2000-11-05.

Sunyé, G. et al. (2001). Refactoring UML Models. In 4th UML Conference, volume 2185 of LNCS, pages 134-148. Springer.

Warmer, J. et al. (2003). The Object Constraint Language: Getting Your Models Ready for MDA. Addison Wesley, 2nd edition.
Publicado
03/10/2005
Como Citar

Selecione um Formato
MASSONI, Tiago; GHEYI, Rohit; BORBA, Paulo. Formal Refactoring for UML Class Diagrams. In: SIMPÓSIO BRASILEIRO DE ENGENHARIA DE SOFTWARE (SBES), 19. , 2005, Uberlândia/MG. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2005 . p. 152-167. DOI: https://doi.org/10.5753/sbes.2005.23817.