节点文献
基于知识的系统面向对象测试方法研究
A Study on the Object-Oriented Testing Method for KBS
【作者】 刘刚;
【导师】 刘群;
【作者基本信息】 哈尔滨工程大学 , 计算机应用技术, 2004, 硕士
【摘要】 目前计算机软件的规模越来越大,复杂度也不断提高,软件错误造成的后果也就越来越严重,软件的质量和可靠性己引起人们的高度重视。软件测试成为软件质量保障的关键环节。本文是关于软件确认和质量保障技术在基于知识的系统上的应用。 知识库是智能系统的核心部分。知识库的不一致导致整个推理求解过程的不确定性,引起一系列错误和冲突。针对这个问题目前已有各种方法如用经典逻辑、真值维护等技术解决此类问题。本文主要针对基于知识的系统介绍基于Petri网的知识库一致性检查系统的实现和特点,对知识库在一致性和完备性方面存在的问题进行了分析,给出了循环规则、冲突规则、冗余规则、从属规则、遗漏规则、不可达子句和闭塞子句的定义。在知识库维护方面,提出了基于规则知识库的循环检测,不可达子句、闭塞子句检测,冗余、从属、冲突规则集检测等三个知识库维护算法。这些技术和方法可以帮助知识工程师有效地建立和维护知识库,并为系统的自动知识获取提供了基础。最后,给出了在Windows环境下,基于Visual C++的编程实现。 OO范型强调的可重用性对测试工作提出了更高的要求,为了保证该类是可重用的,一个类必须在各种使用上下文中接受测试。文献中提出了称为方法序列规范(Method Sequence Specification,MtSS)的OO软件规范方法,一个类的MtSS明确定义调用该类中方法的合法顺序。作者发现MtSS能直接支持测试用例的生成,提出了基于MtSS的测试用例生成方法。为了从数量极大的可用测试用例中选取有效的测试用例,本文提出了基于划分的测试用例生成策略,并给出了3种有效的划分准则。通过分析结果,得出如下结论:采用基于Petri网的方法实现知识库一致性检查是可行的、可靠的;对于面向对象的知识系统,基于MtSS的测试用例生成方法比其他方法具有更好的性能。
【Abstract】 Now, scale of software systems is larger and larger, an increasing number of complexity. Results are more serious because of software errors. Quality and reliability of software have been recognized. In modern software engineering, software should be made strict quality valuation and testing in every phase of software developing. Software testing has become key phase for guaranteeing quality.This dissertation is concerned with the application of software quality and assurance techniques to KBS.Knowledge base is a kernel part in an intelligent system. Uncertainty in reasoning and problem solving procedure suffers from inconsistency in knowledge base, and the latter causes a series of faults and conflicts. To this problem, there are different kinds of solutions currently such as classical logic and truth maintenance techniques. This dissertation focuses attention on the implementation and characteristics of Petri Net based consistency checking system in a KBS, the problems occurring on the cosistency and integrality of the knowledge base are analysed, and the definitions of the circulation rule, conflict rule, equivalence rule, sub-rule, omission rule, inaccessible clause and dead clause are given. As to knowledge-base maintenance, three algorithms including rule circle detection algorithm, inaccessible selectors and dead selectors detection algorithm, and equivalence rule set, appurtenant rule set and conflict rule set detection algorithm are put forward. They help engineers to construct and maintain knowledge base effectively and lay the foundation of automatic knowledge acquisition. Finally, the programs based on Visual C++ is provided.While performing class testing, it is necessary and important to test all the method interactions within a class other than testing the methods separately. Since the OO paradigm promotes reuse, it can be argued that the need for meticulously tested components is even more important for OO software than for traditionalsoftware. Only if a class has been tested in all possible usage context, we can say the class can work correctly and it is reusable. MtSS, a specification technique for 00 software, is proposed in the literature. The MtSS of a class specifies the valid sequence in which its methods can be invoked for the correct behavior of instances of the class. The author of this thesis found that MtSS can directly support test case generation for class testing and develop a test case generation technique using MtSS. To generate less number of test cases that are effective in identifying most of the bugs in a program, partition-based strategy for test case generation is suggested and some partition criteria is given. By practical experiment, it gets the conclusion that it is feasible and reliable to the implementation of consistency checking system by Petri Net method; for OO-KBS, the performance of a test case generation technique using MtSS is better than others.
【Key words】 KBS; software testing; object-oriented; knowledge-base; consistency verification;
- 【网络出版投稿人】 哈尔滨工程大学 【网络出版年期】2005年 01期
- 【分类号】TP311.52
- 【被引频次】3
- 【下载频次】204