EMOF Bad Smells
Zur Navigation springen Zur Suche springen
The bad smells that are presented here were collected and transferred from object-oriented design in the scope of a master's thesis . They are named according to the classification system of Samarthyam .
- Missing Abstraction: Recurring information in a metamodel should be abstracted into a dedicated model element. However, if no dedicated abstraction is created, these information usually occur as clumps of data consisting of primitive types or strings, in multiple locations in the metamodel. Elements using these clumps often has a high coupling between each other. This comes into play when the generated code of a metamodel is used since every element using these data clumps have to manage the corresponding behavior on its own. Additionally, this brings the risk of different behaviors since the management of this data is done at different places in code.
- Multifaceted Abstraction: An element in a metamodel should only have a single responsibility it is created for and the representing abstraction should clearly cover the responsibility.
- Unutilized Abstraction: When an element in a metamodel is unused.
- Duplicate Abstraction: When duplications among elements are present in the metamodel. These duplications can be either an identical name, similar or the same attributes or both.
- Insufficient Modularization: When an element has a large size due to a missing decomposition of the described content.
- Cyclically-Dependent Modularization: When elements in a metamodel depend on each other leading to a cycle resulting that these elements can only be used together.
- Hub-like Modularization: When an element in a metamodel has many dependencies to other elements. These dependencies appear in both, incoming and outgoing dependencies.
- Missing Hierarchy: When variations of an element in a metamodel are realized by embedded elements and not by an hierarchy.
- Unnecessary Hierarchy: When inheritance is applied needlessly and the resulting elements in the metamodel do not provide any additional information.
- Unfactored Hierarchy: When a hierarchy contains duplications among elements, introducing redundancy.
- Wide Hierarchy: When a hierarchy in a metamodel is wide, commonalities between those hierarchy elements could be factored out to one or more intermediate elements.
- Speculative Hierarchy: When elements in a hierarchy are introduced on a speculative base instead of relying on specified requirements and needs.
- Deep Hierarchy: When a hierarchy in a metamodel is deep and the elements within the hierarchy are not providing useful further information, these elements are probably not required and could be merged.
- Multipath Hierarchy: When an element inherits at least in two or more ways from the same supertype over different and therefore unnecessary paths in the metamodel.
- Cyclic Hierarchy: When an element in a hierarchy either depends direct or indirect on one of its subtypes, a cycle between these elements is created.
- Late Hierarchy: An abstract element in the metamodel that has at least one direct or indirect non-abstract element as supertype.
- Container Relation: When an explicit container reference is used by utilizing the concept of opposite references instead of using the implicit one by the Eclipse Modeling Framework.
- Specialization Relation: When a relation between two elements in a metamodel is specialized by inherited elements, introducing redundancy.
-  René Hahn. "Bad Smells and Anti-Patterns in Metamodeling", Master's thesis, Karlsruhe Institute of Technology (KIT), November 2017.
-  Samarthyam Ganesh, Tushar Sharma, and Girish Suryanarayana. "Towards a Principle-based Classification of Structural Design Smells", Journal of Object Technology 12.2 2013.
- Capella: Home, Source, assessed versions: Capella 1.1.2, Kitalpha 1.1.1
- Palladio Component Model: Home, SVN, Git, assessed version: PCM_4.1 (metamodel version 5.2)
|Metamodel||Cyclic Dependent Modularization*||Deep Hierarchy||HubLike Modularization (Outgoing Dependencies)||Multipath Hierarchy*||Specialization Relation||Speculative Generality EClass||Cyclic Hierarchy||HubLike Modularization (Incoming Dependencies)||Container Relation||Container Relation (Obligatory)||Late Hierarchy||Missing Abstraction - Primitive Obsession Primitive Types||Unutilized Abstraction - Unused Classes||Wide Hierarchy|
- These two smells detection counts may contain duplicate detections