One important problem in software production is to control the functional correctness of programs. Such control is essential for complex, widely distributed programs, such as compilers. Many tools are available for ...
详细信息
One important problem in software production is to control the functional correctness of programs. Such control is essential for complex, widely distributed programs, such as compilers. Many tools are available for the automatic generation of compilers, but the end result must be tested as not all the components are realized automatically. Different methods have been studied and developed to test compilers, but none has solved the problem completely and efficiently. A new method for testing compilers is described in which the compiler is exercised by compilableprograms, automatically generated by a test generator. A tabular description of the source language drives the generator. The description is in a formalism which extends context-free grammars in a context-dependent direction, while still retaining the structure and readability of BNF. The generator produces a set of programs which cover all grammatical constructions of the source language, unless user supplied directives indicate otherwise. These programs can be used to evaluate the performance of different compilers of the same source language. Figures.
暂无评论