Title: An approach to automatically enforce object-oriented constraints

Authors: Maen Hammad; Mustafa Hammad; Mohammad Bsoul

Addresses: Department of Software Engineering, The Hashemite University, P.O. Box 150459, Zarqa 13115, Jordan ' Department of Information Technology, Mu'tah University, P.O. Box 7, Mu'tah – AL Karak 61710, Jordan ' Department of Computer Science and Applications, The Hashemite University, P.O. Box 150459, Zarqa 13115, Jordan

Abstract: This paper presents an approach to automatically enforce object-oriented constraints during incremental C++ code changes. The approach is realised as a tool to keep track on code changes and to notify developers with violations of predefined OO constraints. The OO constraints under consideration are taken from object-oriented design metrics. The object-oriented metrics mainly cover class size, coupling between classes, number of subclasses and inheritance tree. The goal of this work is to help designers to monitor design during incremental code changes. Object-oriented design metrics are automatically extracted from source code. The extracted metrics are used by designers to define the constraints. The tool supports defining and managing these OO constraints. After a code change is committed, design changes are identified and predefined constraints are checked for possible violations. The evaluation of the tool shows that it helps in detecting violations of design constraints, and it saves time and efforts of developers.

Keywords: object-oriented constraints; OO metrics; software evolution; software maintenance; automatic enforcement; incremental code changes; C++; object-oriented design; design constraints; software development.

DOI: 10.1504/IJCAT.2014.059095

International Journal of Computer Applications in Technology, 2014 Vol.49 No.1, pp.50 - 59

Published online: 11 Jul 2014 *

Full-text access for editors Full-text access for subscribers Purchase this article Comment on this article