共查询到20条相似文献,搜索用时 15 毫秒
1.
Jehad Al Dallal 《Information and Software Technology》2011,53(9):914-928
Context
Class cohesion is an important object-oriented quality attribute. It refers to the degree of relatedness between the methods and attributes of a class. Several metrics have been proposed to measure the extent to which the class members are related. Most of these metrics have undefined values for a relatively high percentage of classes, which limits their applicability. The classes that have undefined values lack methods, attributes, or parameter types, or they include only a single method.Objective
We improve the applicability of the class cohesion metrics by defining their values for such special classes. In addition, we theoretically and empirically validate the improved metrics.Method
We theoretically examine whether the defined values satisfy the key cohesion properties. In addition, we empirically validate the metrics before and after the improvements to test whether the defined values improve the ability of the metrics to evaluate class cohesion. We also explore the correlation between the metrics and the presence of faulty classes to indirectly determine the strength or weakness of the metrics in indicating class quality.Results
The results show that our assigned values for the undefined cases do not violate the key cohesion properties and considerably improve the ability of the metrics to explain the presence of faulty classes and may therefore improve their ability to indicate the quality of the class design.Conclusions
Having the class cohesion metrics defined for all possible cases improves the applicability of the metrics and potentially increases their precision in indicating class quality. 相似文献2.
Mel Ó Cinnéide Iman Hemati Moghadam Mark Harman Steve Counsell Laurence Tratt 《Empirical Software Engineering》2017,22(1):292-329
In spite of several decades of software metrics research and practice, there is little understanding of how software metrics relate to one another, nor is there any established methodology for comparing them. We propose a novel experimental technique, based on search-based refactoring, to ‘animate’ metrics and observe their behaviour in a practical setting. Our aim is to promote metrics to the level of active, opinionated objects that can be compared experimentally to uncover where they conflict, and to understand better the underlying cause of the conflict. Our experimental approaches include semi-random refactoring, refactoring for increased metric agreement/disagreement, refactoring to increase/decrease the gap between a pair of metrics, and targeted hypothesis testing. We apply our approach to five popular cohesion metrics using ten real-world Java systems, involving 330,000 lines of code and the application of over 78,000 refactorings. Our results demonstrate that cohesion metrics disagree with each other in a remarkable 55 % of cases, that Low-level Similarity-based Class Cohesion (LSCC) is the best representative of the set of metrics we investigate while Sensitive Class Cohesion (SCOM) is the least representative, and we discover several hitherto unknown differences between the examined metrics. We also use our approach to investigate the impact of including inheritance in a cohesion metric definition and find that doing so dramatically changes the metric. 相似文献
3.
Fault prediction and the discriminative powers of connectivity-based object-oriented class cohesion metrics 总被引:1,自引:0,他引:1
Jehad Al Dallal 《Information and Software Technology》2012,54(4):396-416
Context
Several metrics have been proposed to measure the extent to which class members are related. Connectivity-based class cohesion metrics measure the degree of connectivity among the class members.Objective
We propose a new class cohesion metric that has higher discriminative power than any of the existing cohesion metrics. In addition, we empirically compare the connectivity and non-connectivity-based cohesion metrics.Method
The proposed class cohesion metric is based on counting the number of possible paths in a graph that represents the connectivity pattern of the class members. We theoretically and empirically validate this path connectivity class cohesion (PCCC) metric. The empirical validation compares seven connectivity-based metrics, including PCCC, and 11 non-connectivity-based metrics in terms of discriminative and fault detection powers. The discriminative-power study explores the probability that a cohesion metric will incorrectly determine classes to be cohesively equal when they have different connectivity patterns. The fault detection study investigates whether connectivity-based metrics, including PCCC, better explain the presence of faults from a statistical standpoint in comparison to other non-connectivity-based cohesion metrics, considered individually or in combination.Results
The theoretical validation demonstrates that PCCC satisfies the key cohesion properties. The results of the empirical studies indicate that, in contrast to other connectivity-based cohesion metrics, PCCC is much better than any comparable cohesion metric in terms of its discriminative power. In addition, the results also indicate that PCCC measures cohesion aspects that are not captured by other metrics, wherein it is considerably better than other connectivity-based metrics but slightly worse than some other non-connectivity-based cohesion metrics in terms of its ability to predict faulty classes.Conclusion
PCCC is more useful in practice for the applications in which practitioners need to distinguish between the quality of different classes or the quality of different implementations of the same class. 相似文献4.
Keith E. Gorlen 《Software》1987,17(12):899-922
The Object-Oriented Program Support (OOPS) class library is a portable collection of classes similar to those of Smalltalk-80 that has been developed using the C++ programming language under the UNIX operating system. The OOPS library includes generally useful data types, such as String, Date and Time, and most of the Smalltalk-80 collection classes such as OrderedCtn (indexed arrays), LinkedList (singly linked lists), Set (hash tables), and Dictionary (associative arrays). Arbitrarily complex data structures comprised of OOPS and user-defined objects can be stored on disk files or moved between UNIX processes by means of an object I/O facility. The classes Process, Scheduler, Semaphore and SharedQueue provide multiprogramming with coroutines. This paper gives a brief introduction to object-oriented programming and how it is supported by the C+ + programming language. An overview of the OOPS library is also presented, followed by a programming example. The implementation details of two of the class library's more interesting features, object I/O and processes, are described. The paper concludes with a discussion of the differences between the OOPS library and Smalltalk-80 and some observations based on our programming experience with C++ and OOPS. 相似文献
5.
A new reusability metric for object-oriented software 总被引:1,自引:0,他引:1
Software Quality Journal - Software reuse is big business. Managers of software houses know that reuse can bring financial rewards to their company, so long as effective reuse procedures are in... 相似文献
6.
Robert J. Colvin 《Formal Aspects of Computing》2014,26(3):491-535
The formalisation of object-oriented languages is essential for describing the implementation details of specific programming languages or for developing program verification techniques. However there has been relatively little formalisation work aimed at abstractly describing the fundamental concepts of object-oriented programming, separate from specific language considerations or suitability for a particular verification style. In this paper we address this issue by formalising a language that includes the core object-oriented programming language concepts of field tests and updates, methods, constructors, subclassing, multithreading, and synchronisation, built on top of standard sequential programming constructs. The abstract syntax is relatively close to the core of typical object-oriented programming languages such as Java. A novel aspect of the syntax is that objects and classes are encapsulated within a single syntactic term, including their fields and methods. Furthermore, class terms are structured according to the class hierarchy, and objects appear as subterms of their class (and method instances as subterms of the relevant object). This helps to narrow the gap between how a programmer thinks about their code and the underlying mathematical objects in the semantics. The semantics is defined operationally, so that all actions a program may take, such as testing or setting local variables and fields, or invoking methods on other objects, appear on the labels of the transitions. A process-algebraic style of interprocess communication is used for object and class interactions. A benefit of this label-based approach to the semantics is that a separation of concerns can be made when defining the rules of the different constructs, and the rules tend to be more concise. The basic rules for individual commands may be composed into more powerful rules that operate at the level of classes and objects. The traces generated by the operational semantics are used as the basis for establishing equivalence between classes. 相似文献
7.
Jehad Al Dallal 《Journal of Systems and Software》2012,85(5):1042-1057
Class cohesion is a key attribute that is used to assess the design quality of a class, and it refers to the extent to which the attributes and methods of the class are related. Typically, classes contain special types of methods, such as constructors, destructors, and access methods. Each of these special methods has its own characteristics, which can artificially affect the class cohesion measurement. Several metrics have been proposed in the literature to indicate class cohesion during high- or low-level design phases. The impact of accounting for special methods in cohesion measurement has not been addressed for most of these metrics. This paper empirically explores the impact of including or excluding special methods on cohesion measurements that were performed using 20 existing class cohesion metrics. The empirical study applies the metrics that were considered to five open-source systems under four different scenarios, including (1) considering all special methods, (2) ignoring only constructors, (3) ignoring only access methods, and (4) ignoring all special methods. This study empirically explores the impact of including special methods in cohesion measurement for two applications of interest to software practitioners, including refactoring and predicting faulty classes. The results of the empirical studies show that the cohesion values for most of the metrics considered differ significantly across the four scenarios and that this difference significantly affects the refactoring decisions, but does not significantly affect the abilities of the metrics to predict faulty classes. 相似文献
8.
An evaluation of vertical class partitioning for query processing in object-oriented databases 总被引:1,自引:0,他引:1
Chi-wai Fung Karlapalem K. Qing Li 《Knowledge and Data Engineering, IEEE Transactions on》2002,14(5):1095-1118
Vertical partitioning is a design technique for reducing the number of disk accesses to execute a given set of queries by minimizing the number of irrelevant instance variables accessed. This is accomplished by grouping the frequently accessed instance variables as vertical class fragments. The complexity of object-oriented database models due to subclass hierarchy and class composition hierarchy complicates the definition and representation of vertical partitioning of the classes, which makes the problem of vertical partitioning in OODBs very challenging. In this paper, we develop a comprehensive analytical cost model for processing of queries on vertically partitioned OODB classes. A set of analytical evaluation results is presented to show the effect of vertical partitioning, and to study the trade-off between the projection ratio versus selectivity factor vis-a-vis sequential versus index access. Furthermore, an empirical experimental prototype supporting vertical class partitioning has been implemented on a commercial OODB tool kit to validate our analytical cost model. 相似文献
9.
10.
简要分析了已有的几种面向对象软件复杂性度量方法,指出了这些方法在反映类复杂性方面存在的不足,运用软件复杂性分解的思想,提出了一种新的类复杂性度量方法。该方法将类复杂性分解为类成员复杂性、类成员关系复杂性和封装复杂性三个复杂性分量,对各分量分别度量,进而得出总复杂性。其中,类成员复杂性采用类所实现的成员的复杂性SIMC、类接口复杂性之和SCIC反映;类成员关系复杂性通过对文中提出的伪二部图进行分析反映;封装复杂性采用成员可见率反映。最后,通过实例验证了该方法的有效性和可行性。 相似文献
11.
Gu Junzhong 《计算机科学技术学报》1993,8(4):3-20
In object-oriented database systems(OOBSs),the traditional transaction models are no longer suitable because of the difference between the object-oriented data model(OODM)and the conventional data models(e.g.relational data model).In this paper,transction models for advanced database applications are reviewed and their shortcomings are analyzed.Exchangeability of operations is proposed instead of commuativity and recoverability for using more semantics in transaction management.As a result,an object-oriented transaction model(in short,OOTM)is presented.It is not modeled for some special application,but directly based on object-oriented paradigms.A transaction is regarded as an interpretation of a metho.Each transaction(even subtransactions)keeps relative ACID(Atomicity,Consistency,Isolation,Durability)properties,therefore the special problems appearing in OOBSs such as“long transactions”,“visibility of inconsistent database state”can be solved. 相似文献
12.
Yves Caseau 《Annals of Mathematics and Artificial Intelligence》1991,3(2-4):211-258
We propose a logic for objects that captures the knowledge represented with the LAURE object-oriented language. The work is oriented toward efficient implementation and compilation of queries. A data model for object-oriented databases is presented, with a declarative logic language used to perform queries and positive updates on the database. The expressiveness of this language is reduced, compared to other propositions in the same field, by the use of purely Horn clauses. An equivalent relational algebra is given, from which a formal technique for performing positive updates, called differentiation, is obtained. Two algorithms are proposed that achieve a sound and complete resolution, either for a bottom-up evaluation or a top-down resolution. An efficient implementation of constraint resolution is presented in this framework. 相似文献
13.
Zhen-QiangChen Bao-WenXu Yu-MingZhou 《计算机科学技术学报》2004,19(6):0-0
Classes are the basic modules in object-oriented (OO) software, which consist of attributes and methods. Thus, in OO environment, the cohesion is mainly about the tightness of the attributes and methods of classes. This paper discusses the relationships between attributes and attributes, attributes and methods,methods and methods of a class based on dependence analysis. Then the paper presents methods to compute these dependencies. Based on these, the paper proposes a method to measure the class cohesion, which satisfies the properties that a good measurement should have. The approach overcomes the limitations of previous class cohesion measures, which consider only one or two of the three relationships in a class. 相似文献
14.
El Emam K. Benlarbi S. Goel N. Melo W. Lounis H. Rai S.N. 《IEEE transactions on pattern analysis and machine intelligence》2002,28(5):494-509
A growing body of literature suggests that there is an optimal size for software components. This means that components that are too small or too big will have a higher defect content (i.e., there is a U-shaped curve relating defect content to size). The U-shaped curve has become known as the "Goldilocks Conjecture." Recently, a cognitive theory has been proposed to explain this phenomenon and it has been expanded to characterize object-oriented software. This conjecture has wide implications for software engineering practice. It suggests 1) that designers should deliberately strive to design classes that are of the optimal size, 2) that program decomposition is harmful, and 3) that there exists a maximum (threshold) class size that should not be exceeded to ensure fewer faults in the software. The purpose of the current paper is to evaluate this conjecture for object-oriented systems. We first demonstrate that the claims of an optimal component/class size (1) above) and of smaller components/classes having a greater defect content (2) above) are due to a mathematical artifact in the analyses performed previously. We then empirically test the threshold effect claims of this conjecture (3) above). To our knowledge, the empirical test of size threshold effects for object-oriented systems has not been performed thus far. We performed an initial study with an industrial C++ system and repeated it twice on another C++ system and on a commercial Java application. Our results provide unambiguous evidence that there is no threshold effect of class size. We obtained the same result for three systems using four different size measures. These findings suggest that there is a simple continuous relationship between class size and faults, and that, optimal class size, smaller classes are better and threshold effects conjectures have no sound theoretical nor empirical basis 相似文献
15.
Progress in the field of structural optimization naturally leads to an increasing number of structural models and optimization algorithms that need to be considered for design. Software architecture is of central importance in the ability to account for the complex links tying new structural models and optimizers. An object-oriented programming pattern for interfacing simulation and optimization codes is described in this article. The concepts of optimization variable, criteria, optimizers and simulation environment are the building blocks of the pattern. The resulting interface is logical, flexible and extensive. It encompasses constrained single or multiple objective formulations with continuous, discrete or mixed design variables. Applications are given for composite laminate design. 相似文献
16.
An extension of a hierarchical model of automaton programs is proposed. New elements help shorten the transition graphs of automata, without complicating the logic of automata-based programs. 相似文献
17.
基于OOR的基础类库的研究及其应用 总被引:2,自引:0,他引:2
基于面向对象复用技术的基础类库有力地支持了RAD软件开发模式,大大提高了软件开发中的资源再利用率和共享性。怎样才能快速高效地开发出一个高可复用和高可维护的基础类库呢?在面向对象及软件复用技术基础上,介绍了基于OOR的基础类库技术,分析和例举了当前主流基础类库设计架构以及功能模块,阐述了基础类库的开发思想以及具体设计步骤,在具体应用中加以实现和验证,最后提出了FCL技术热点问题以及研究展望。 相似文献
18.
面向对象软件测试是面向对象软件开发的一个重要阶段,是保证软件质量、提高软件可靠性的关键,而类测试又是面向对象软件测试的关键。文章针对面向对象程序的特性对软件测试的影响,研究了一种基于状态的类测试方法,从而能够更有效地对面向对象软件进行测试,提高了软件的质量。 相似文献
19.
面向对象软件类测试研究新进展 总被引:3,自引:0,他引:3
张雪萍 《计算机工程与设计》2006,27(11):1954-1956,1969
软件测试是软件开发过程中不可缺少的一环,是保证软件质量和提高软件可靠性的关键.近年来,随着面向对象软件开发方法应用的更加广泛和研究的不断深入,面向对象软件测试已成为软件工程领域的一个重要研究课题.类是面向对象软件的基本构成单元,类测试是面向对象软件测试的关键.从基于状态、基于规范、基于UML、基于方法序列、基于数据流等6方面论述了类测试的目前研究成果,分析了研究现状,探讨了进一步工作的方向. 相似文献
20.
Class reuse-proneness is the likelihood that a class can be reused and is a key quality characteristic in object-oriented design. Because it is clearly impossible to know with certainty when, where, how, and how often a class will be reused, this likelihood can only be estimated when a class is developed. At that stage, the internal quality attributes of a class such as cohesion, coupling, and size can be measured. In this paper, we empirically study the ability of 29 internal class quality measures, individually and in combination, to estimate class reuse-proneness. Specifically, we take into account both class inheritance and class instantiation, which are two ways in which a class can be reused. Our results show that most of the considered measures are predictors for the considered reuse-proneness attributes to some degree. The capability of the considered internal quality measures to predict class reuse-proneness is enhanced when the measures are combined using an optimized multivariate statistical model. The results also show that the size and coupling attributes of a class have positive impacts on its reuse-proneness via inheritance and instantiation. The cohesion of a class has a negative impact on its inheritance reuse-proneness and a positive impact on its instantiation reuse-proneness. The overall results of the empirical study show that software developers can use a number of predictors to assess the reuse-proneness of classes and possibly improve the reuse-proneness of the classes by controlling their internal quality attributes. Our results contribute to the evaluation of the quality of a class, but a comprehensive evaluation of the quality of a class should take into account many more qualities. Also, not all classes in a software system are built with reuse-proneness in mind, so our results should be applied only to those that are designed and implemented to be reusable. 相似文献