Method, system, and computer program product to generate test instruction streams while guaranteeing loop termination
First Claim
1. A method of generating a terminating instruction stream including at least one backward branching instruction, said method comprising:
- generating a first instruction stream, said first instruction stream including at least one backward branching instruction and a plurality of loop components, each of said at least one backward branching instructions being preceded by one or more of said loop components, said loop components including;
one or more branch initialization instructions; and
one or more forward branching instructions;
determining a set of target addresses for each of said one or more forward branching instructions;
producing the terminating instruction stream from the first instruction stream, by selecting a target address from said set of target addresses for each of said one or more forward branching instructions.
1 Assignment
0 Petitions
Accused Products
Abstract
A method, system, and computer program product for generating terminating, pseudo-random test instruction streams, including forward and backward branching instructions. A first instruction stream is generated, including at least one backward branching instruction and at least one forward branching instruction. Each backward branching instruction is preceded by at least one forward branching instruction, which is used to guarantee termination of the loop formed by the backward branching instruction. Backward branching targets are resolved when the backward branching instruction is inserted into the first instruction stream. Forward branching targets remain unresolved in the first instruction stream. A set of potential branch targets is determined for each forward branching instruction. For each forward branching instruction, a branch target is randomly selected from the set of potential branch targets for that forward branching instruction. The final terminating instruction stream consists of the first stream, with all forward branch targets resolved.
36 Citations
20 Claims
-
1. A method of generating a terminating instruction stream including at least one backward branching instruction, said method comprising:
-
generating a first instruction stream, said first instruction stream including at least one backward branching instruction and a plurality of loop components, each of said at least one backward branching instructions being preceded by one or more of said loop components, said loop components including;
one or more branch initialization instructions; and
one or more forward branching instructions;
determining a set of target addresses for each of said one or more forward branching instructions;
producing the terminating instruction stream from the first instruction stream, by selecting a target address from said set of target addresses for each of said one or more forward branching instructions. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. At least one program storage device readable by a machine, tangibly embodying at least one program of instructions executable by the machine to perform a method of generating a terminating instruction stream including at least one backward branching instruction, said method comprising:
-
generating a first instruction stream, said first instruction stream including at least one backward branching instruction and a plurality of loop components, each of said at least one backward branching instructions being preceded by one or more of said loop components, said loop components including;
one or more branch initialization instructions; and
one or more forward branching instructions;
determining a set of target addresses for each of said one or more forward branching instructions;
producing the terminating instruction stream from the first instruction stream, by selecting a target address from said set of target addresses for each of said one or more forward branching instructions. - View Dependent Claims (17, 18, 19)
-
-
20. A data processing system for generating a terminating instruction stream including at least one backward branching instruction, said data processing system including a memory, said memory containing program code for performing the steps of:
-
generating a first instruction stream, said first instruction stream including at least one backward branching instruction and a plurality of loop components, each of said at least one backward branching instructions being preceded by one or more of said loop components, said loop components including;
one or more branch initialization instructions; and
one or more forward branching instructions;
determining a set of target addresses for each of said one or more forward branching instructions;
producing the terminating instruction stream from the first instruction stream, by selecting a target address from said set of target addresses for each of said one or more forward branching instructions.
-
Specification