Ontology driven cross language design smell detection through semantic reasoning
Abstract
Design smells are structural flaws that, if not detected early, can impair software quality and increase maintenance costs. Traditional detection approaches are language-specific and rely on low-level metrics, making them ineffective for heterogeneous, multilingual systems. This paper presents Ontology-Driven Design Detector (OD3), a language-agnostic framework for detecting design smells at the design stage. OD3 reverse-engineers source code from Java, C++, C#, Ruby, and Python into a unified semantic ontology and applies rule-based reasoning to identify violations of Object-Oriented (OO) design principles. Its key contributions are: (i) detecting design smells in multilingual software projects, (ii) defining semantic representations of smells to improve interpretability, (iii) reducing incorrect detections through context-aware reasoning, (iv) introducing a catalog of cross-language design smells, and (v) validating the approach on 10 multilingual systems, achieving a precision and recall of 0.91 and 0.92, respectively. These results support scalable, early-stage detection of design flaws across heterogeneous software systems while maintaining high semantic accuracy. The proposed framework is designed to operate efficiently within High-Performance Computing (HPC) environments, where parallel ontology reasoning and distributed semantic processing facilitate the analysis of large multilingual software repositories. Consequently, the framework contributes to Sustainable Development Goal (SDG) 9 by supporting intelligent, scalable software engineering infrastructure.