摘要

The aim of this paper is to present the definition of the measures for the import-coupling of OCL expressions, along with the empirical validation of these as early indicators of the maintainability of OCL expressions. This empirical validation has been carried out by means of an experiment and its replica, conducted with undergraduate students of Spanish and Argentinean universities, respectively. To perform this experimental activity, we have followed a cognitive theory-based approach, since the understanding of the cognitive demands that OCL expressions place on software engineers will allow us to examine in greater depth the real influence of import-coupling on the maintainability of OCL expressions. The empirical results, obtained through the analysis of the data from the experiment and its replica, first of all separately and then together after a meta-analysis study, reveal evidence suggesting that import-coupling exerts a certain amount of influence on the comprehensibility and modifiability of OCL expressions. The measures that have most influence on OCL expression comprehensibility are those related to problem objects (Number of Navigated Relationships (NNR), Weighted Number of Navigations (WNN), Depth of Navigations (DN) and Number of Attributes referred through Navigations (NAN)), relationships between problem objects (Number of Navigated Classes (NNC) and Number of Explicit Iterator variables (NEI)), as well as reified objects (Weighted Number of Collections Operations (WNCO)). On the other hand, it is only measures related to relationships between problem objects that are the main influence on OCL expression modifiability. The influence of import-coupling on the comprehensibility and modifiability of OCL expressions was reaffirmed through the cognitive complexity (i.e. we show that import-coupling affects the cognitive complexity and that the latter influences the comprehension and modification of OCL expressions). These results may have educational implications, apart from what they might mean for practitioners in the industry, as is explained in the conclusions.

  • 出版日期2010-10-15