Original Publication Date: 1973-Nov-01
Included in the Prior Art Database: 2005-Feb-27
Bridges, B: AUTHOR [+2]
The Testcase Breeder is a program designed to produce executable test-cases for high-level language compilers and similar processors.
The Testcase Breeder is a program designed to produce executable test- cases for high-level language compilers and similar processors.
There are other testcase generators, such as the Syntax Machine, which will produce syntactically correct programs, but not executable ones. Although these random testcases can be executed, there is no simple way to verify the results.
Most testcases for high-level language processors are written by hand. As long as testcases are the principle means for evaluating programs, there will be no complete substitute for hand-coded test-cases. They are, however, quite expensive to produce, and there is no way of rapidly increasing their number, when the need arises.
The Testcase Breeder is a bridge between these two processes. Beginning with a working testcase, the Breeder applies "equivalence transformations" to modify the code of this testcase without changing its results at execution time. The modified testcase is effectively a new testcase with predictable results.
This approach can be used to produce "self-checking" testcases automatically. An existing nonself-checking testcase can be transformed to produce a new testcase, and the two sets of results compared automatically. The programmer need not inspect the results himself unless the two sets of results are different.
The principle of an equivalence transformation can be illustrated by a trivial example in PL/I. If the statement A = B; is changed to the more complex form:
IF NOT (`1'B) THEN SIGNAL ERROR;
ELSE A = B; it is known the language specifies the same result. However, the flow of control through the compiler is changed and a new testcase is produced.
The Testcase Breeder requires a language definition, a set of transformations, program control data and a stream of existing testcases.
The "language definition" is a description of the syntax of...