Detecting Design Level Anti-patterns; Structure and Semantics in UML Class Diagrams

Eman K. Elsayed
2018 Journal of Computers  
Nowadays generation of reliable patterns is a challenge in the software engineering field, so determination of the anti-patterns becomes an effective and objective concept to evaluate any design. This paper proposes a general method to detect anti-patterns; structure and semantics in case of UML(Unified modeling language) class diagram. The proposed method is classified as a hybrid between mathematical and meta-model approaches. Its four phases merge between OWL(Web Ontology Language)
more » ... sed and event B for detection many anti-patterns; semantic and structure in UML class diagram components (attributes, classes, operations, and associations). The paper proves the proposed method in two ways; the first way is theoretical by coupling UML components with OWL and Event-B. The second way is experimental by applying the method on a sample of nine famous UML class diagrams used as templates. The method detects and corrects the anti-patterns which appeared 519 times. integrating the advantages of using event-B and OWL ontology-based, then coupling the UML class diagram components with event-B and OWL ontology-based. This mapping is classified into four phases for offering a systematic detection. The proposed method covers all UML class diagram components; attributes, operations, classes, and association. Journal of Computers Journal of Computers 644 Volume 13, Number 6, June 2018 Fig. 2. The phases of the proposed method. The correction phase Case Study This section presents the experimental case "Hospital UML class diagram" for applying the proposed method. That is by using the Rodin platform and its plugins [20] in the second phase and Protégé platform and its plugins [12] in the third phase. We apply the proposed method on a sample of nine UML class diagrams which were uploaded as UML templates to be used as patterns in references [21]. The Hospital UML class diagram contains six classes "Hospital, Booking, Doctor, Patient, Continuous and not Continuous ". Class "Booking" has five attributes and three operations, class "Doctor" has five attributes and no operations, class "Patient" has no attributes and four operations, class "Hospital" has two attributes and no operations, class "Continuous" has two attributes and no operations and finally, class "Not Continuous" has two attributes and no operations. The model also has seven associations, some of them with known multiplicity and some with unknown one.
doi:10.17706/jcp.13.6.638-654 fatcat:nywgtzbqlzh5zkum2wvky4iloq