@Override protected Set<Set<Value>> entryInitialFlow() { // initially all values only alias themselves Set<Set<Value>> res = new HashSet<Set<Value>>(); for (ValueBox vb : body.getUseAndDefBoxes()) { res.add(Collections.singleton(vb.getValue())); } return res; }
@Override /** Verifies that a ValueBox is not used in more than one place. */ public void validate(Body body, List<ValidationException> exception) { Set<ValueBox> set = newSetFromMap(new IdentityHashMap<ValueBox, Boolean>()); for (ValueBox vb : body.getUseAndDefBoxes()) { if (set.add(vb)) { continue; } exception.add(new ValidationException(vb, "Aliased value box : " + vb + " in " + body.getMethod())); for (Unit u : body.getUnits()) { System.err.println(u); } } }
@Override protected Map<Value, Parity> newInitialFlow() { Map<Value, Parity> initMap = new HashMap<Value, Parity>(); for (Local l : g.getBody().getLocals()) { Type t = l.getType(); // System.out.println("next local: "+next); if ((t instanceof IntegerType) || (t instanceof LongType)) { initMap.put(l, BOTTOM); } } for (ValueBox vb : g.getBody().getUseAndDefBoxes()) { Value val = vb.getValue(); if (val instanceof ArithmeticConstant) { initMap.put(val, getParity(initMap, val)); } } if (Options.v().interactive_mode()) { updateBeforeFilterMap(); } return initMap; }
return; for (Iterator<ValueBox> bIt = m.retrieveActiveBody().getUseAndDefBoxes().iterator(); bIt.hasNext();) { final ValueBox b = bIt.next(); Value v = b.getValue();
List<ValueBox> vbList = b.getUseAndDefBoxes();
for (Iterator vbIt = body.getUseAndDefBoxes().iterator(); vbIt.hasNext();) { final ValueBox vb = (ValueBox) vbIt.next(); Value v = vb.getValue();
/** Verifies that a ValueBox is not used in more than one place. */ public void validateValueBoxes() { List<ValueBox> l = getUseAndDefBoxes(); for( int i = 0; i < l.size(); i++ ) { for( int j = 0; j < l.size(); j++ ) { if( i == j ) continue; if( l.get(i) == l.get(j) ) { System.err.println("Aliased value box : "+l.get(i)+" in "+getMethod()); for( Iterator<Unit> uIt = getUnits().iterator(); uIt.hasNext(); ) { final Unit u = uIt.next(); System.err.println(""+u); } throw new RuntimeException("Aliased value box : "+l.get(i)+" in "+getMethod()); } } } }
/** Verifies that a ValueBox is not used in more than one place. */ public void validateValueBoxes() { List<ValueBox> l = getUseAndDefBoxes(); for( int i = 0; i < l.size(); i++ ) { for( int j = 0; j < l.size(); j++ ) { if( i == j ) continue; if( l.get(i) == l.get(j) ) { System.err.println("Aliased value box : "+l.get(i)+" in "+getMethod()); for( Iterator<Unit> uIt = getUnits().iterator(); uIt.hasNext(); ) { final Unit u = uIt.next(); System.err.println(""+u); } throw new RuntimeException("Aliased value box : "+l.get(i)+" in "+getMethod()); } } } }
protected Object newInitialFlow() { HashMap<Value, String> initMap = new HashMap<Value, String>(); Chain locals = g.getBody().getLocals(); Iterator it = locals.iterator(); while (it.hasNext()) { Local next = (Local)it.next(); //System.out.println("next local: "+next); if ((next.getType() instanceof IntegerType) || (next.getType() instanceof LongType)){ initMap.put(next, BOTTOM); } } Iterator boxIt = g.getBody().getUseAndDefBoxes().iterator(); while (boxIt.hasNext()){ Value val = ((ValueBox)boxIt.next()).getValue(); if (val instanceof ArithmeticConstant) { initMap.put(val, getParity(initMap, val)); } } if (Options.v().interactive_mode()){ updateBeforeFilterMap(); } return initMap; }
protected Object newInitialFlow() { HashMap<Value, String> initMap = new HashMap<Value, String>(); Chain locals = g.getBody().getLocals(); Iterator it = locals.iterator(); while (it.hasNext()) { Local next = (Local)it.next(); //System.out.println("next local: "+next); if ((next.getType() instanceof IntegerType) || (next.getType() instanceof LongType)){ initMap.put(next, BOTTOM); } } Iterator boxIt = g.getBody().getUseAndDefBoxes().iterator(); while (boxIt.hasNext()){ Value val = ((ValueBox)boxIt.next()).getValue(); if (val instanceof ArithmeticConstant) { initMap.put(val, getParity(initMap, val)); } } if (Options.v().interactive_mode()){ updateBeforeFilterMap(); } return initMap; }
for( Iterator vbIt = body.getUseAndDefBoxes().iterator(); vbIt.hasNext(); ) { final ValueBox vb = (ValueBox) vbIt.next(); Value v = vb.getValue();
for( Iterator vbIt = body.getUseAndDefBoxes().iterator(); vbIt.hasNext(); ) { final ValueBox vb = (ValueBox) vbIt.next(); Value v = vb.getValue();