next up previous
Next: Program Execution and Coverage Up: Design of a Test Previous: Grammar Instrumentation

Program Instrumentation

In order to monitor the test run of a program, software probes are inserted in its source code by the Test Coverage Analyzer. The Program Instrumenter generated by the Grammar Instrumentation phase is used to insert these probes in the source program. As the Program Instrumenter is generated from the instrumented grammar specifications for the language, it is basically a parser for the language with special semantic actions for probe insertion.

The Program Instrumenter works in the following manner. It accepts a source program and parses it. When a construct is encountered in the program that needs to be monitored for determining the coverage measure, the instrumenter inserts a small piece of code, called a probe, in the program. The instrumenter also appends supporting routines for coverage reporting in the program.



Rahul Jain
2000-03-13