@Test public void testToString() { assertEquals("probSubstituteFreeVariable: 80\n" + "probDonateDeadCodeAtStmt: 5\n" + "probDonateLiveCodeAtStmt: 5\n" + "probInjectJumpAtStmt: 5\n" + "probWrapStmtInConditional: 5\n" + "probMutatePoint: 3\n" + "probVectorizeStmts: 3\n" + "probSplitLoops: 5\n" + "probStructify: 3\n" + "probOutline: 5\n" + "probAddLiveFragColorWrites: 5\n" + "probAddDeadFragColorWrites: 5\n" + "probSwitchify: 5\n" + "probInjectDeadBarrierAtStmt: 5\n", TransformationProbabilities.SMALL_PROBABILITIES.toString()); }
@Override public String toString() { String result = ""; for (Field field : this.getClass().getDeclaredFields()) { if (java.lang.reflect.Modifier.isStatic(field.getModifiers())) { continue; } Object value = null; try { value = field.get(this); result += field.getName() + ": " + value.toString() + "\n"; } catch (IllegalAccessException exception) { result += exception.getMessage(); } } return result; }
TransformationProbabilities { @Override public String toString() { String result = ""; for (Field field : this.getClass().getDeclaredFields()) { if (java.lang.reflect.Modifier.isStatic(field.getModifiers())) { continue; } Object value = null; try { value = field.get(this); result += field.getName() + ": " + value.toString() + "\n"; } catch (IllegalAccessException exception) { result += exception.getMessage(); } } return result; } }
TransformationProbabilities { @Override public String toString() { String result = ""; for (Field field : this.getClass().getDeclaredFields()) { if (java.lang.reflect.Modifier.isStatic(field.getModifiers())) { continue; } Object value = null; try { value = field.get(this); result += field.getName() + ": " + value.toString() + "\n"; } catch (IllegalAccessException exception) { result += exception.getMessage(); } } return result; } private  TransformationProbabilities(int probSubstituteFreeVariable, int probDonateDeadCodeAtStmt,
      int probDonateLiveCodeAtStmt, int probInjectJumpAtStmt, int probWrapStmtInConditional,
      int probMutatePoint, int probVectorizeStmts, int probSplitLoops, int probStructify,
      int probOutline,
      int probAddLiveFragColorWrites,
      int probAddDeadFragColorWrites,
      int probSwitchify,
      int probInjectDeadBarrierAtStmt); }
TransformationProbabilities { @Override public String toString() { String result = ""; for (Field field : this.getClass().getDeclaredFields()) { if (java.lang.reflect.Modifier.isStatic(field.getModifiers())) { continue; } Object value = null; try { value = field.get(this); result += field.getName() + ": " + value.toString() + "\n"; } catch (IllegalAccessException exception) { result += exception.getMessage(); } } return result; } private  TransformationProbabilities(int probSubstituteFreeVariable, int probDonateDeadCodeAtStmt,
      int probDonateLiveCodeAtStmt, int probInjectJumpAtStmt, int probWrapStmtInConditional,
      int probMutatePoint, int probVectorizeStmts, int probSplitLoops, int probStructify,
      int probOutline,
      int probAddLiveFragColorWrites,
      int probAddDeadFragColorWrites,
      int probSwitchify,
      int probInjectDeadBarrierAtStmt); static TransformationProbabilities onlySplitLoops(); static TransformationProbabilities onlyStructify(); static TransformationProbabilities onlyVectorize(); static TransformationProbabilities onlyVectorizeAndMutate(); static TransformationProbabilities onlyOutlineStatements(); static TransformationProbabilities onlyMutateExpressions(); static TransformationProbabilities onlyWrap(); static TransformationProbabilities onlyAddJumps(); static TransformationProbabilities onlyAddDeadFragColorWrites(); static TransformationProbabilities onlyAddLiveFragColorWrites(); static TransformationProbabilities onlyLiveCodeAlwaysSubstitute(); static TransformationProbabilities onlyLiveCode(); static TransformationProbabilities closeToDefaultProbabilities(IRandom generator); static TransformationProbabilities likelyDonateDeadCode(); static TransformationProbabilities likelyDonateLiveCode(); static TransformationProbabilities randomProbabilitiesSinglePass(IRandom generator); static TransformationProbabilities randomProbabilitiesMultiPass(IRandom generator); static TransformationProbabilities closeTo(IRandom generator,
      TransformationProbabilities probabilities); boolean substituteFreeVariable(IRandom generator); boolean donateDeadCodeAtStmt(IRandom generator); boolean donateLiveCodeAtStmt(IRandom generator); boolean injectJumpAtStmt(IRandom generator); boolean wrapStmtInConditional(IRandom generator); boolean mutatePoint(IRandom generator); boolean vectorizeStmts(IRandom generator); boolean splitLoops(IRandom generator); boolean structify(IRandom generator); boolean outlineStatements(IRandom generator); boolean addLiveFragColorWrites(IRandom generator); boolean addDeadFragColorWrites(IRandom generator); boolean switchify(IRandom generator); boolean injectDeadBarrierAtStmt(IRandom generator); @Override String toString(); }
TransformationProbabilities { @Override public String toString() { String result = ""; for (Field field : this.getClass().getDeclaredFields()) { if (java.lang.reflect.Modifier.isStatic(field.getModifiers())) { continue; } Object value = null; try { value = field.get(this); result += field.getName() + ": " + value.toString() + "\n"; } catch (IllegalAccessException exception) { result += exception.getMessage(); } } return result; } private  TransformationProbabilities(int probSubstituteFreeVariable, int probDonateDeadCodeAtStmt,
      int probDonateLiveCodeAtStmt, int probInjectJumpAtStmt, int probWrapStmtInConditional,
      int probMutatePoint, int probVectorizeStmts, int probSplitLoops, int probStructify,
      int probOutline,
      int probAddLiveFragColorWrites,
      int probAddDeadFragColorWrites,
      int probSwitchify,
      int probInjectDeadBarrierAtStmt); static TransformationProbabilities onlySplitLoops(); static TransformationProbabilities onlyStructify(); static TransformationProbabilities onlyVectorize(); static TransformationProbabilities onlyVectorizeAndMutate(); static TransformationProbabilities onlyOutlineStatements(); static TransformationProbabilities onlyMutateExpressions(); static TransformationProbabilities onlyWrap(); static TransformationProbabilities onlyAddJumps(); static TransformationProbabilities onlyAddDeadFragColorWrites(); static TransformationProbabilities onlyAddLiveFragColorWrites(); static TransformationProbabilities onlyLiveCodeAlwaysSubstitute(); static TransformationProbabilities onlyLiveCode(); static TransformationProbabilities closeToDefaultProbabilities(IRandom generator); static TransformationProbabilities likelyDonateDeadCode(); static TransformationProbabilities likelyDonateLiveCode(); static TransformationProbabilities randomProbabilitiesSinglePass(IRandom generator); static TransformationProbabilities randomProbabilitiesMultiPass(IRandom generator); static TransformationProbabilities closeTo(IRandom generator,
      TransformationProbabilities probabilities); boolean substituteFreeVariable(IRandom generator); boolean donateDeadCodeAtStmt(IRandom generator); boolean donateLiveCodeAtStmt(IRandom generator); boolean injectJumpAtStmt(IRandom generator); boolean wrapStmtInConditional(IRandom generator); boolean mutatePoint(IRandom generator); boolean vectorizeStmts(IRandom generator); boolean splitLoops(IRandom generator); boolean structify(IRandom generator); boolean outlineStatements(IRandom generator); boolean addLiveFragColorWrites(IRandom generator); boolean addDeadFragColorWrites(IRandom generator); boolean switchify(IRandom generator); boolean injectDeadBarrierAtStmt(IRandom generator); @Override String toString(); static TransformationProbabilities DEFAULT_PROBABILITIES; static TransformationProbabilities SMALL_PROBABILITIES; static TransformationProbabilities AGGRESSIVE_CONTROL_FLOW; static TransformationProbabilities ZERO; static TransformationProbabilities ALWAYS; }