节点文献
一个编译器的测试用例自动生成系统
An Automatic System of Generating Test Cases for Compiler
【摘要】 本文简要地介绍了一个对JOVIAL编译器进行系统测试的测试用例自动生成系统.在设计此生成系统时,作者吸收了Purdom算法的某些思想,并通过在系统中引入多级文法及设置功能模块等途径,较好地消除了Purdom算法无法解决程序生成过程中前后文相关的局限性。本系统还提供了一种自动修改输入文法的功能,以便能产生一些含有典型语法错误的测试用例。程序的生成按自顶向下、逐步细化的方式进行,且能保证系统的输出是最短JOVIAL程序的最小集合。此外,由于在系统内部处理上采取了一些措施,使算法的执行速度得到了提高。
【Abstract】 In the automatic system of generating test cases of compiler that is based on Purdomalgorithm [6], only context-free grammars can be dealt with. Such a limitation, in the au-thors opinion, severely limits the usefulness of Purdom algorithm. This paper presents a system that eliminates the above-mentioned limitation. Besides,our algorithm enjoys higher executing speed than Purdom algorithm. The input of the sys-tem is JOVIAL grammar, and its output is a set of JOVIAL programs that can be used totest JOVIAL compiler. The generating system has following features: 1. The concept of multi-level grammar is introduced into the system and a series offunctional modules is set up to sove the context-sensitive problem in program generatingprocesses. 2. Programs are generated in a top-down, step-by-step refinement way. 3. The generating algorithm guarantees that the output of system is a smallest set ofshortest JOVIAL programs. 4. The system provides a function of automatically modifying grammar, so that a setof JOVIAL programs that have typical syntax errors can be generated. These programs arenecessary for the complete testing of JOVIAL compiler. The structure, working principles and implementation of the system are described inthis paper.
【Key words】 complier test; test cases generating; Purdom algorithm;
- 【文献出处】 西北工业大学学报 ,Journal of Northwestern Polytechnical University , 编辑部邮箱 ,1992年02期
- 【被引频次】1
- 【下载频次】80