Browse Prior Art Database

Test and Debug of Device Process Control Code

IP.com Disclosure Number: IPCOM000086107D
Original Publication Date: 1976-Jul-01
Included in the Prior Art Database: 2005-Mar-03
Document File: 3 page(s) / 39K

Publishing Venue

IBM

Related People

Giaccone, LF: AUTHOR [+2]

Abstract

For a certain class of programs which are used to control external devices or processes, the choice of execution path through the program is o a large extent dependent on the state of the controlled device/process. Considered as a function, such a program has a domain consisting of two sets of inputs. One (A) accompanies the invocation of the program, and the other (B) arrives during execution. Input set B is indeterminate within the range of possible states for the external device/process.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 53% of the total text.

Page 1 of 3

Test and Debug of Device Process Control Code

For a certain class of programs which are used to control external devices or processes, the choice of execution path through the program is o a large extent dependent on the state of the controlled device/process. Considered as a function, such a program has a domain consisting of two sets of inputs. One (A) accompanies the invocation of the program, and the other (B) arrives during execution. Input set B is indeterminate within the range of possible states for the external device/process.

The test cases for such programs are the nontrivial combinations of the two sets of inputs. A path addressing each test case and conforming to the functional specification corresponds to a single, meaningful invocation of the program. In order to determine the presence of all such paths in the program, the actual paths in the program should be enumerated and evaluated. To this end, execution of the branches, in the machine, or in its representation (e.g., simulator), is altered so that the execution path is made totally independent of both sets of inputs, and the inputs are developed from the path instead.

The program prior to its modified execution is scanned from low address to high and is segmented according to the following rules: 1. A "branch to" point (labelled or otherwise) is included in and begins a segment (ending the previous).
2. A "branch" is included in and ends a segment beginning the next). 3. Segments are numbered in ascending sequence by displacement.

A branch, at the machine instruction level, is a binary decision which is either "taken" or "not taken". If a 0 means a "taken" or right branch, and a 1 means a "not taken" or left branch, then any ordered collection of bits describes a path in the program. The machine is supplied with a vector of bits V which is initially set to 0's and contains at least one bit less than the number of segments in the program.

Execution begins at the entry point, and because V is all 0's, the initial path through the program consists entirely of left branches except for unconditional branches which cause a 1 to be set in the corresponding bit of V. The machine continues the path trace until execution either leaves the program at an exit point, or a pr...