Next: Program Instrumentation
Up: Design of a Test
Previous: Design of a Test
This is the most important and crucial phase of the whole test coverage
analysis process. It accepts the grammar specifications for the source
language and generates the instrumented grammar specifications along with some
supporting modules that are used for instrumenting the source programs. The
grammar specifications are in the form of yacc specifications for
the language. The instrumentation of grammar involves three steps that
are usually carried out manually.
- Identifying places for inserting probe actions: This activity
depends on the coverage measures that the Test Coverage Analyzer
incorporates. For example, for branch coverage the probe actions
should be inserted in the production rules of those constructs in the
language that transfer the control, like if statement,
switch statement etc. In order to insert the probe actions, the
yacc production rules for these constructs must be identified along
with the position in the rules where the probe actions should be inserted.
- Inserting probes actions: This process deals with inserting
probe actions in the selected production rules. The probe actions that are
to be inserted depend on the coverage measures incorporated by the Test
Coverage Analyzer. These probe actions are responsible for instrumenting
the source programs and for generating the data structures required for
program instrumentation.
- Generating supporting modules: This process involves the writing
of supporting modules for source program instrumentation. The supporting
modules include routines that: read the source program, manipulate the
data structures used for instrumentation, and generate the supporting
routines for probes in the instrumented programs.
At the end of the Grammar Instrumentation phase, the instrumented
grammar specifications and supporting routines are obtained. These are
compiled to generate the ``Program Instrumenter", which is used
to instrument the source programs.
Next: Program Instrumentation
Up: Design of a Test
Previous: Design of a Test
Rahul Jain
2000-03-13