On adequate testing of context-free grammars
-
摘要: 讨论了文法测试的基本概念,分析了文法测试的特点、应用场景及其与一般软件测试的异同.形式化地定义了上下文无关文法的测试充分性准则,提出了一个上下文无关文法的测试充分性准则族.分析了该准则族中各准则之间的包含关系,以及这种包含关系与揭示文法所特有的2类缺陷的能力之间的关系. 计算和比较了准则族中各准则的测试集规模复杂性.为了评价文法的测试开销,定义了一个上下文无关文法的测试复杂性度量,该度量能够从测试充分性的角度反映测试一个文法的难易程度和测试开销的大小.Abstract: Grammar testing was discussed, including related concepts, its characteristics, application scenarios, and a comparison with traditional software testing. Test adequacy criterion of context-free grammar was formally defined and a family of grammar testing criteria was proposed. A formal analysis of the subsume relation between test adequacy criteria in the family was presented, and how the subsume relation between adequacy criteria guarantees a better fault detecting in the context of two classes of faults specific to grammar was also proved. Size complexity of the test adequacy criteria in the family was computed and compared. A grammar testing complexity metric was also developed, which can reflect the difficulty and effort to testing a grammar from the view of test adequacy.
-
Key words:
- context-free grammar /
- grammar testing /
- test adequacy criterion /
- test complexity
-
[1] Malloy B A, Power J F. An interpretation of purdom's algorithm for automatic generation of test tases . Proceedings of 1st Annual International Conference on Computer and Information Science . Orlando, Florida,USA, 2001 [2] 高仲仪, 金茂忠. 编译原理及编译程序构造[M]. 北京:北京航空航天大学出版社, 1990.14~41 Gao Zhongyi, Jin Maozhong. The theory and costruction of compilers[M]. Beijing:Beijing University of Aeronautics and Astronautics Press, 1990. 14~41 (in Chinese) [3] Zhu H. A formal analysis of the subsume relation between software test adequacy criteria[J]. IEEE Transaction on Software Engineering,1996, 22 (4):248~254 [4] 朱 鸿, 金凌紫. 软件质量保障与测试[M]. 北京:科学出版社, 1997. 158~161 Zhu Hong, Jin Lingzi. Software quality assurance and testing[M]. Beijing:Science Press, 1997. 158~161 (in Chinese) [5] Power J F, Malloy B A. Metric-based analysis of context-free grammars . Proceedings of the International Workshop on Program Comprehension . USA,2000
点击查看大图
计量
- 文章访问数: 2501
- HTML全文浏览量: 128
- PDF下载量: 8
- 被引次数: 0