摘要:Nowadays generation of reliable patterns is a challenge in the software engineering field, sodetermination of the anti-patterns becomes an effective and objective concept to evaluate any design. Thispaper proposes a general method to detect anti-patterns; structure and semantics in case of UML(Unifiedmodeling language) class diagram. The proposed method is classified as a hybrid between mathematicaland meta-model approaches. Its four phases merge between OWL(Web Ontology Language) Ontologybasedand event B for detection many anti-patterns; semantic and structure in UML class diagramcomponents (attributes, classes, operations, and associations). The paper proves the proposed method intwo ways; the first way is theoretical by coupling UML components with OWL and Event-B. The second wayis 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.