Copied permutate feature from klee repo here