Abstract

Background:The process of mapping a source code entity onto an architectural module is to a large degree a manual task. Automating this process could increase the use of static architecture conformance checking methods, such as reflexion modeling, in industry. Current techniques rely on user parameterization and a highly cohesive design. A machine learning approach would potentially require less parameters and better use of the available information to aid in automatic mapping. Aim:We investigate how a classifier can be trained to map from source code to architecture modules automatically. This classifier is trained with semantic and syntactic dependency information extracted from the source code and from architecture descriptions. The classifier is implemented using multinomial naive Bayes and evaluated. Method:We perform experiments and compare the classifier with three state-of-the-art mapping functions in eight open-source Java systems with known ground-truth-mappings. Results:We find that the classifier outperforms the state-of-the-art in all cases and that it provides a useful baseline for further research in the area of semi-automatic incremental clustering. Conclusions:We conclude that machine learning is a useful approach that performs better and with less need for parameterization compared to other approaches. Future work includes investigating problematic mappings and a more diverse set of subject systems.

Highlights

  • A software system’s architecture captures the fundamental, high-level design decisions that affect the system’s qualities

  • We previously investigated whether source code metrics could guide the composition of a small initial set and found that dependency-based metrics showed some promise for one of the original Human Guided clustering Method (HuGMe) attraction functions (Olsson et al, 2018)

  • We present a new attraction function for semi-automatic clustering of source code to architectural modules, NBAttract

Read more

Summary

Introduction

A software system’s architecture captures the fundamental, high-level design decisions that affect the system’s qualities. A popular approach is Reflexion modeling (De Silva and Balasubramaniam, 2012; Murphy et al, 1995), where dependencies in the architecture are checked against those found in the implementation. The process of mapping a source code entity onto an architectural module is to a large degree a manual task. Automating this process could increase the use of static architecture conformance checking methods, such as reflexion modeling, in industry. Aim: We investigate how a classifier can be trained to map from source code to architecture modules automatically. We need a mapping from the source code to the architecture to reason about how well an implementation conforms to the intended architecture using, for example, Reflexion modeling (Murphy et al, 1995). The directed MDs indicate how these modules are allowed to interact and depend on each other

Objectives
Methods
Results
Conclusion
Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.