Автоматизоване виявлення вад архітектури програмного модуля з використанням графової моделі візуалізації
Loading...
Date
2025
Authors
Франків, Олександр
Journal Title
Journal ISSN
Volume Title
Publisher
Abstract
У цій статті описано новий підхід до автоматизованого виявлення вад проєктування програмного модуля з використанням моделі візуалізації архітектури у формі графа із застосуванням додаткових алгоритмів аналізу. Запропонований спосіб дозволяє виявити поширені вади та інформацію про них у легкому для сприйняття поданні з використанням лише вихідного коду програми. У статті розглянуто чотири ознаки наявності помилок при проєктуванні в контексті ООП, зокрема порушеної згуртованості, зв’язності і циклічних залежностей, а також способи їх виявлення та представлення у моделі архітектури. На реальних прикладах виконано автоматизоване виявлення вад із використанням розробленого інструменту для мови Swift з підтвердженням їх наявності у процесі детального аналізу кодової бази.
Description
This paper introduces a novel approach to the automated detection of software module design flaws through a graph-based architectural visualization model, enhanced with specialized analysis algorithms. The method is designed to identify common structural and logical issues in codebases, relying solely on static information derived from the source code. Unlike traditional approaches that require extensive runtime instrumentation or manual inspection, this solution produces a visual and interpretable model of the software architecture, highlighting problematic areas automatically. The visualization is not merely illustrative
— it serves as an analytical layer capable of surfacing critical design issues in a comprehensible and compact form. The proposed method extends the capabilities of architectural visualization by integrating algorithms that automatically detect signs of architectural degradation. This includes the ability to pinpoint segments of the code that demonstrate structural inefficiencies, making the analysis both accessible and actionable. As a result, developers and architects are provided with immediate feedback about design quality, which can be used to guide refactoring efforts and architectural improvements. The paper focuses on four specific indicators of poor design in the context of object-oriented programming: weakened cohesion, excessive coupling, the presence of cyclic dependencies, and architectural violations in module boundaries. Techniques for detecting and representing these patterns in the architectural model are discussed in detail. An anomaly detection-based approach is proposed to ensure the solution remains both performant and adaptable, allowing it to be applied across a diverse set of projects varying in size, domain, and technological stack. The approach has been validated on real-world Swift codebases using a custom-built analysis tool. The tool successfully identified structural flaws, which were confirmed through manual inspection and deeper analysis of the source code, demonstrating its effectiveness and practical utility.
Keywords
програмування, програмний модуль, архітектура програмного забезпечення (ПЗ), оцінювання якості ПЗ, візуалізація архітектури, автоматизований статичний аналіз, шаблони проєктування, метрики, зв’язність програмного коду, згуртованість програмного коду, стаття, programming, software module, software architecture, software quality assessment, architecture visualization, automated static analysis, design patterns, metrics, code coupling, code cohesion
Citation
111