摘要
基于形式概念分析提出构建面向对象程序中类及类体系结构新方法。利用形式概念分析重要性质:给定对象和属性的二元关系,形式概念分析能把所有由相关的对象集合和属性集合组成的概念构成概念格;在概念格上,高层的概念表示共性而低层的概念表示个性。通过对现有面向对象应用程序的分析,可以得到新的类及类体系。这样做的好处是:所得到的类体系不仅等价于应用程序最初的类体系,而且在新体系中对象只包含它真正需要的成员,没有冗余成员。自然地,该方法可以用来发现类体系设计的不足之处,也可为类体系重建提供重要的参考建议。
A new approach is presented in this article for constructing class and class hierarchies in object-oriented program based on formal concept analysis. The important property of formal concept analysis is utilised in the article : with binary relationship between objects and attributes given, formal concept analysis is a powerful technique to organise all of the related sets of objects and attributes into a concept lattice, on which the higher level concepts represent general features shared by many objects, while lower lever concepts represent the objectspecific features, in the approach, new class and class hierarchies could be acquired along with the analysis on existing object-oriented application programs. The benefit of this analysis is, a class hierarchy obtained is guaranteed to be behaviourally equivalent to the original hierarchy of the application program, and in new hierarchy the object only contains the members really required but no redundancies. Naturally, the approach is regarded as a tool for finding imperfections in the design of class hierarchies, and can also provide valuable insights in hierarchy restructuring proposals.
出处
《计算机应用与软件》
CSCD
2009年第5期113-116,共4页
Computer Applications and Software
关键词
形式概念
面向对象语言
类体系
Formal concept Analysis Object-oriented programming Class hierarchy