12345678910111213141516171819 |
- .sp 2
- .NH
- Testing the compiler
- .nh
- .sp
- .LP
- Although it is practically impossible to prove the correctness of a compiler,
- a systematic method of testing the compiler is used to increase the confidence
- that it will work satisfactorily in practice. The first step was to see if
- the lexical analysis was performed correctly. For this purpose, the routine
- LexScan() was used (see also the \-l option). Next we tested the parser
- generated by LLgen, to see whether correct Pascal programs were accepted and
- garbage was dealed with gracefully. The biggest test involved was the
- validation of the semantic analysis. Simultaneously we tested the code
- generation. First some small Pascal test programs were translated and
- executed. When these programs work correctly, the Pascal validation suite
- and a large set of Pascal test programs were compiled to see whether they
- behaved in the manner the standard specifies. For more details about the
- Pascal validation suite, the reader is referred to [PCV].
|