An Approach to Discovering Architectural Patterns in Software
Summary
In this master thesis, an approach to discovering architectural patterns within static modular architectures based on software dependencies is developed and investigated. Architectural patterns represent reusable design of software architecture at a high level of abstraction. They can be used to structure new applications and to recover the modular structure of existing systems. Techniques like Architecture Compliance Checking (ACC) focus on testing whether the realised artefacts adhere to the architecture. Typically, these techniques require a complete architecture as input.
In this thesis, we focus on defining architectural patterns in such a way that we can use ACC tools to recognise architectural pattern instances and on algorithms by which to discover them, for the purposes of Software Architecture Reconstruction (SAR). The central problem is that it is difficult to distinguish a \textit{possible} instance of an architectural pattern from a \textit{genuine} instance. Addressing this requires us to explicitly define architectural patterns in terms of allowed and disallowed software dependencies. We base ourselves on Semantically Rich Modular Architectures (SRMAs). Defining architectural patterns this way allows us to reason about them. For example, about how patterns should be interpreted as incomplete architectures and how different interpretations affect the pattern recognition process. Recognising architectural patterns using ACC techniques thus has great potential in architecture design, ACC and SAR.
Our way of finding potential patterns, what we call pattern candidates, is a two step process. The modular decomposition step establishes the modules of which a selection is used in the second step. There, we go through possible mappings of the found modules (referred to as \textit{software units}) to the modules of architectural patterns (called \textit{pattern modules}). The ACC tool we employ to do this is HUSACCT.
We have devised two main approaches to finding pattern candidates. There is the more cumbersome brute force approach and the more elegant genetic approach. Both algorithms require further development before they can be used in practice, but we manage to show that this is a promising line of research which may already result in several publications. Some preliminary evaluations provide a handful of lessons to be applied in any future work, which we envision as GEAR: Guided Evolutionary Architecture-Reconstruction. This vision is also described within the thesis, by means of providing a rudimentary illustration of a practical tool based on our work.
This master thesis is primarily about providing several proofs of concept, it is not intended as a specification for future realisations or as a formal analysis of the algorithms provided within. It also raises certain questions and discussion points, such as the nature of architectural patterns as open architectures within larger systems.