Home
last modified time | relevance | path

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

/art/tools/dexfuzz/src/dexfuzz/program/
DProgram.java76 private Random rng; field in Program
153 rng = new Random(); in Program()
155 rng.setSeed(Options.rngSeed); in Program()
160 rng.setSeed(seed); in Program()
191 registerMutator(new ArithOpChanger(rng, mutationStats, mutations)); in Program()
192 registerMutator(new BranchShifter(rng, mutationStats, mutations)); in Program()
193 registerMutator(new CmpBiasChanger(rng, mutationStats, mutations)); in Program()
194 registerMutator(new ConstantValueChanger(rng, mutationStats, mutations)); in Program()
195 registerMutator(new ConversionRepeater(rng, mutationStats, mutations)); in Program()
196 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()
95 int tryIdx = rng.nextInt(mutatableCode.triesSize); in generateMutation()
98 boolean shiftingTryBlock = rng.nextBoolean(); in generateMutation()
105 shiftingStart = rng.nextBoolean(); in generateMutation()
113 shiftingHandlerCatchall = rng.nextBoolean(); in generateMutation()
118 shiftingHandlerIdx = rng.nextInt(tryBlock.handlers.size()); in generateMutation()
149 delta = (rng.nextInt(5) - 2); in generateMutation()
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()
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()
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()
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()
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()
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()
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()
DArithOpChanger.java67 public ArithOpChanger(Random rng, MutationStats stats, List<Mutation> mutations) { in ArithOpChanger() argument
68 super(rng, stats, mutations); in ArithOpChanger()
107 int arithmeticInsnIdx = rng.nextInt(arithmeticInsns.size()); in generateMutation()
165 int newOpcodeIdx = rng.nextInt(opcodeList.size()); in getLegalDifferentOpcode()
DValuePrinter.java60 public ValuePrinter(Random rng, MutationStats stats, List<Mutation> mutations) { in ValuePrinter() argument
61 super(rng, stats, mutations); in ValuePrinter()
84 printedOutputIdx = rng.nextInt(mutatableCode.getInstructionCount()); in generateMutation()
/art/runtime/
Dutils.h388 RNG rng; in GetRandomNumber() local
389 return dist(rng); in GetRandomNumber()