Home
last modified time | relevance | path

Searched refs:rng (Results 1 – 25 of 29) sorted by relevance

12

/art/tools/dexfuzz/src/dexfuzz/program/
DProgram.java83 private Random rng; field in Program
160 rng = new Random(); in Program()
162 rng.setSeed(Options.rngSeed); in Program()
167 rng.setSeed(seed); in Program()
198 registerMutator(new ArithOpChanger(rng, mutationStats, mutations)); in Program()
199 registerMutator(new BranchShifter(rng, mutationStats, mutations)); in Program()
200 registerMutator(new CmpBiasChanger(rng, mutationStats, mutations)); in Program()
201 registerMutator(new ConstantValueChanger(rng, mutationStats, mutations)); in Program()
202 registerMutator(new ConversionRepeater(rng, mutationStats, mutations)); in Program()
203 registerMutator(new FieldFlagChanger(rng, mutationStats, mutations)); in Program()
[all …]
/art/tools/dexfuzz/src/dexfuzz/program/mutators/
DCodeMutator.java35 protected Random rng; field in CodeMutator
66 public CodeMutator(Random rng, MutationStats stats, List<Mutation> mutations) { in CodeMutator() argument
67 this.rng = rng; in CodeMutator()
113 return ((rng.nextInt(100) < likelihood) && canMutate(mutatableCode)); in shouldMutate()
DTryBlockShifter.java77 public TryBlockShifter(Random rng, MutationStats stats, List<Mutation> mutations) { in TryBlockShifter() argument
78 super(rng, stats, mutations); in TryBlockShifter()
98 int tryIdx = rng.nextInt(mutatableCode.triesSize); in generateMutation()
101 boolean shiftingTryBlock = rng.nextBoolean(); in generateMutation()
108 shiftingStart = rng.nextBoolean(); in generateMutation()
116 shiftingHandlerCatchall = rng.nextBoolean(); in generateMutation()
121 shiftingHandlerIdx = rng.nextInt(tryBlock.handlers.size()); in generateMutation()
152 delta = (rng.nextInt(5) - 2); in generateMutation()
DRandomBranchChanger.java46 public RandomBranchChanger(Random rng, MutationStats stats, List<Mutation> mutations) { in RandomBranchChanger() argument
47 super(rng, stats, mutations); in RandomBranchChanger()
57 return EQUALITY_CMP_OP_LIST[(index + 1 + rng.nextInt(length - 1)) % length]; in getModifiedOpcode()
61 return ZERO_CMP_OP_LIST[(index + 1 + rng.nextInt(length - 1)) % length]; in getModifiedOpcode()
DRandomInstructionGenerator.java103 public RandomInstructionGenerator(Random rng, MutationStats stats, List<Mutation> mutations) { in RandomInstructionGenerator() argument
104 super(rng, stats, mutations); in RandomInstructionGenerator()
115 insertionIdx = rng.nextInt(mutatableCode.getInstructionCount()); in generateMutation()
131 newOpcode = Opcode.values()[rng.nextInt(opcodeCount)]; in generateMutation()
159 mutation.constValue = rng.nextLong() % ((ContainsConst)fmt).getConstRange(); in generateMutation()
167 mutation.poolIndexValue = rng.nextInt(maxPoolIndex); in generateMutation()
181 mutation.vregC = rng.nextInt(mutatableCode.registersSize); in generateMutation()
184 mutation.vregB = rng.nextInt(mutatableCode.registersSize); in generateMutation()
187 mutation.vregA = rng.nextInt(mutatableCode.registersSize); in generateMutation()
196 mutation.branchTargetIdx = rng.nextInt(mutatableCode.getInstructionCount()); in generateMutation()
DSwitchBranchShifter.java68 public SwitchBranchShifter(Random rng, MutationStats stats, List<Mutation> mutations) { in SwitchBranchShifter() argument
69 super(rng, stats, mutations); in SwitchBranchShifter()
109 int switchInsnIdx = rng.nextInt(switchInsns.size()); in generateMutation()
113 int switchTargetIdx = rng.nextInt(switchInsn.targets.size()); in generateMutation()
128 delta = (rng.nextInt(5) - 2); in generateMutation()
DInstructionSwapper.java63 public InstructionSwapper(Random rng, MutationStats stats, List<Mutation> mutations) { in InstructionSwapper() argument
64 super(rng, stats, mutations); in InstructionSwapper()
89 swapInsnIdx = rng.nextInt(mutatableCode.getInstructionCount()); in generateMutation()
100 int delta = rng.nextInt(5) - 1; in generateMutation()
DNonsenseStringPrinter.java65 public NonsenseStringPrinter(Random rng, MutationStats stats, List<Mutation> mutations) { in NonsenseStringPrinter() argument
66 super(rng, stats, mutations); in NonsenseStringPrinter()
77 insertionIdx = rng.nextInt(mutatableCode.getInstructionCount()); in generateMutation()
153 int size = rng.nextInt(10); in getRandomString()
158 builder.append((char) (rng.nextInt((end + 1) - start) + start)); in getRandomString()
DVRegChanger.java68 public VRegChanger(Random rng, MutationStats stats, List<Mutation> mutations) { in VRegChanger() argument
69 super(rng, stats, mutations); in VRegChanger()
112 int vregInsnIdx = rng.nextInt(vregInsns.size()); in generateMutation()
119 int mutatingVreg = rng.nextInt(numVregs); in generateMutation()
141 newVregValue = rng.nextInt(mutatableCode.registersSize); in generateMutation()
DInvokeChanger.java79 public InvokeChanger(Random rng, MutationStats stats, List<Mutation> mutations) { in InvokeChanger() argument
80 super(rng, stats, mutations); in InvokeChanger()
119 int invokeCallInsnIdx = rng.nextInt(invokeCallInsns.size()); in generateMutation()
156 return INVOKE_LIST[(index + 1 + rng.nextInt(length - 1)) % length]; in getDifferentInvokeCallOpcode()
160 return INVOKE_RANGE_LIST[(index + 1 + rng.nextInt(length - 1)) % length]; in getDifferentInvokeCallOpcode()
DBranchShifter.java65 public BranchShifter(Random rng, MutationStats stats, List<Mutation> mutations) { in BranchShifter() argument
66 super(rng, stats, mutations); in BranchShifter()
111 int branchInsnIdx = rng.nextInt(branchInsns.size()); in generateMutation()
127 delta = (rng.nextInt(5) - 2); in generateMutation()
DRegisterClobber.java62 public RegisterClobber(Random rng, MutationStats stats, List<Mutation> mutations) { in RegisterClobber() argument
63 super(rng, stats, mutations); in RegisterClobber()
74 int insertionIdx = rng.nextInt(mutatableCode.getInstructionCount()); in generateMutation()
DInstructionDuplicator.java59 public InstructionDuplicator(Random rng, MutationStats stats, List<Mutation> mutations) { in InstructionDuplicator() argument
60 super(rng, stats, mutations); in InstructionDuplicator()
71 insnIdx = rng.nextInt(mutatableCode.getInstructionCount()); in generateMutation()
DConstantValueChanger.java65 public ConstantValueChanger(Random rng, MutationStats stats, List<Mutation> mutations) { in ConstantValueChanger() argument
66 super(rng, stats, mutations); in ConstantValueChanger()
105 int constInsnIdx = rng.nextInt(constInsns.size()); in generateMutation()
115 newConstant = rng.nextLong() in generateMutation()
DNewArrayLengthChanger.java61 public NewArrayLengthChanger(Random rng, MutationStats stats, List<Mutation> mutations) { in NewArrayLengthChanger() argument
62 super(rng, stats, mutations); in NewArrayLengthChanger()
102 int newArrayIdx = rng.nextInt(newArrayLengthInsns.size()); in generateMutation()
136 newInsn.insn.vregB = rng.nextInt(100); in applyMutation()
DInstructionDeleter.java59 public InstructionDeleter(Random rng, MutationStats stats, List<Mutation> mutations) { in InstructionDeleter() argument
60 super(rng, stats, mutations); in InstructionDeleter()
78 int insnIdx = rng.nextInt(mutatableCode.getInstructionCount()); in generateMutation()
DPoolIndexChanger.java66 public PoolIndexChanger(Random rng, MutationStats stats, List<Mutation> mutations) { in PoolIndexChanger() argument
67 super(rng, stats, mutations); in PoolIndexChanger()
139 poolIndexInsnIdx = rng.nextInt(poolIndexInsns.size()); in generateMutation()
163 newPoolIndex = rng.nextInt(maxPoolIndex); in generateMutation()
DOppositeBranchChanger.java29 public OppositeBranchChanger(Random rng, MutationStats stats, List<Mutation> mutations) { in OppositeBranchChanger() argument
30 super(rng, stats, mutations); in OppositeBranchChanger()
DIfBranchChanger.java69 public IfBranchChanger(Random rng, MutationStats stats, List<Mutation> mutations) { in IfBranchChanger() argument
70 super(rng, stats, mutations); in IfBranchChanger()
108 int ifBranchInsnIdx = rng.nextInt(ifBranchInsns.size()); in generateMutation()
DCmpBiasChanger.java61 public CmpBiasChanger(Random rng, MutationStats stats, List<Mutation> mutations) { in CmpBiasChanger() argument
62 super(rng, stats, mutations); in CmpBiasChanger()
101 int cmpBiasInsnIdx = rng.nextInt(cmpBiasInsns.size()); in generateMutation()
DNewInstanceChanger.java72 public NewInstanceChanger(Random rng, MutationStats stats, List<Mutation> mutations) { in NewInstanceChanger() argument
73 super(rng, stats, mutations); in NewInstanceChanger()
117 int newInstanceIdxInCache = rng.nextInt(newInstanceCachedInsns.size()); in generateMutation()
127 newTypeIdx = rng.nextInt(totalPoolIndices); in generateMutation()
DConversionRepeater.java61 public ConversionRepeater(Random rng, MutationStats stats, List<Mutation> mutations) { in ConversionRepeater() argument
62 super(rng, stats, mutations); in ConversionRepeater()
100 int conversionInsnIdx = rng.nextInt(conversionInsns.size()); in generateMutation()
DFieldFlagChanger.java68 public FieldFlagChanger(Random rng, MutationStats stats, List<Mutation> mutations) { in FieldFlagChanger() argument
69 super(rng, stats, mutations); in FieldFlagChanger()
108 int fieldInsnIdx = rng.nextInt(fieldInsns.size()); in generateMutation()
DNewMethodCaller.java99 public NewMethodCaller(Random rng, MutationStats stats, List<Mutation> mutations) { in NewMethodCaller() argument
100 super(rng, stats, mutations); in NewMethodCaller()
111 insertionIdx = rng.nextInt(mutatableCode.getInstructionCount()); in generateMutation()
/art/libartbase/base/
Dutils.h109 RNG rng; in GetRandomNumber() local
110 return dist(rng); in GetRandomNumber()

12