International Journal Peer-reviewed

Detecting Architectural Violations Using Responsibility and Dependency Constraints of Components

Shinpei Hayashi, Fumiki Minami, Motoshi Saeki

IEICE Transactions on Information and Systems, vol. E101-D, no. 7, pp. 1780–1789, July 2018.

Published by the IEICE: IEICE Transactions Online.

Abstract

Utilizing software architecture patterns is important for reducing maintenance costs. However, maintaining code according to the constraints defined by the architecture patterns is time-consuming work. As described herein, we propose a technique to detect code fragments that are incompliant to the architecture as fine-grained architectural violations. For this technique, the dependence graph among code fragments extracted from the source code and the inference rules according to the architecture are the inputs. A set of candidate components to which a code fragment can be affiliated is attached to each node of the graph and is updated step-by-step. The inference rules express the components' responsibilities and dependency constraints. They remove candidate components of each node that do not satisfy the constraints from the current estimated state of the surrounding code fragment. If the inferred role of a code fragment does not include the component that the code fragment currently belongs to, then it is detected as a violation. We have implemented our technique for the Model-View-Controller for Web Application architecture pattern. By applying the technique to web applications implemented using Play Framework, we obtained accurate detection results. We also investigated how much does each inference rule contribute to the detection of violations.

Related papers

This work builds on

BibTeX

@article{hayashi-ieicet201807,
    author = {Shinpei Hayashi and Fumiki Minami and Motoshi Saeki},
    title = {Detecting Architectural Violations Using Responsibility and Dependency Constraints of Components},
    journal = {IEICE Transactions on Information and Systems},
    volume = {E101-D},
    number = 7,
    pages = {1780--1789},
    doi = {10.1587/transinf.2017KBP0023},
    year = 2018,
}
Type
International Journal
Published
July 2018
Volume / Pages
vol. E101-D, no. 7, pp. 1780–1789
DOI
10.1587/transinf.2017KBP0023