Patent attributes
A system and method for generating random permutations of elements (e.g., integers) in a test generation tool by providing one or more ordered ranges (110-170), each represented by a low and high value. Initially a single range is provided corresponding to the entire set of integer to be permuted. A random integer is then selected within this range, and this selected integer is removed by excluding the selected element. This exclusion is achieved by either splitting the range (110) into two ranges (120, 130), or, if the selected integer is the lowest or highest value of an existing range, adapting the end of the range. Subsequently, one of the ranges in the list of ranges is selected randomly and an element within the selected range is selected randomly and excluded, and so on. In this way a random permutation of all the elements in the original range is generated in the test generation tool.