1. A method of generating a terminating instruction stream including test instruction streams, 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 such as to guarantee termination of said loop as appropriate, 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.