Patent ID: 8850266

Claim:
A computer program product comprising a non-transitory computer readable storage medium having a computer readable program stored therein, wherein the computer readable program, when executed on a computing device, causes the computing device to: generate a branch test pattern for execution by an execution unit that is under validation testing, wherein the computer readable program generates the branch test pattern by causing the computing device to: copy a set of initial nodes (I) to a set of available nodes (N); randomly pick a node ‘n’ from the set of available nodes (N), wherein N is a set of nodes that still need to be processed; remove the node ‘n’ from the set of available nodes (N) to avoid picking the same node for a subsequent iteration; update a deadlock prevention table (DPT) of node ‘n’ to avoid picking another ode that leads to an infinite loop or deadlock; remove all nodes in the DPT of node ‘n’ from the set of available nodes I−‘n’ in order to create a candidate list (C) from which taken/not-taken nodes are randomly selected, determine Whether there are at least two nodes in the candidate list (C); responsive to at least two nodes being in the candidate list (C), randomly select two nodes {x, y} from the candidate list (C) for a taken path (x) and a not-taken path (y); add node ‘n’ to a deadlock prevention table (DPT) of node ‘x’ and a deadlock prevention table (DPT) of node ‘y’; determine whether the candidate list (C) contains only one element or less than one element; responsive to the candidate list (C) containing only element or less than one element, designate a last used node ‘n’ or remaining node ‘n’ as an end node; and generate the branch test pattern; for each execution pattern in a set of execution patterns: select an execution pattern from the set of execution patterns thereby forming a selected execution pattern; load the selected execution pattern into a condition register; execute the branch test pattern based on the selected execution pattern in the condition register using an execution unit; responsive to the branch test pattern ending, compare values output from the execution unit during execution of the branch test pattern to a set of expected results for the selected execution pattern; and determine whether there is a match of the comparison of the values output from the execution unit during execution of the branch test pattern to the set of expected results for the selected execution pattern; and responsive to a match of the comparison for each execution pattern in the set of execution patterns, validate the execution unit.