public void allLits(int arity, List result, boolean b) { Exp e; Iterator<Exp> i = exps.iterator(); while (i.hasNext()) { e = i.next(); e.allLits(arity, result, b); } }
public int hashCode() { int ret = 0; Iterator i = exps.iterator(); while (i.hasNext()) { ret += i.next().hashCode(); } return ret; }
public void extractPTypeExps(List l) { Exp e; Iterator<Exp> i = exps.iterator(); while (i.hasNext()) { e = i.next(); e.extractPTypeExps(l); } }
public void allPreds(int arity, List result) { Exp e; Iterator<Exp> i = exps.iterator(); while (i.hasNext()) { e = i.next(); e.allPreds(arity, result); } }
public double complexity() { Iterator<Exp> i = exps.iterator(); double result = 0.0; while (i.hasNext()) { result += i.next().complexity(); } return result; }
void getOuterRefs(Exp e, List<Exp> refs) { // now, recurse Iterator<Exp> i = exps.iterator(); while (i.hasNext()) { Exp ex = i.next(); ex.getOuterRefs(e, refs); } }
public Exp copy() { IntSet result = new IntSet(); Iterator<Exp> i = exps.iterator(); while (i.hasNext()) { result.exps.add(i.next().copy()); } return result; }
public boolean removeUnscoped(List vars) { Iterator<Exp> i = exps.iterator(); while (i.hasNext()) { Exp e = i.next(); if (e.removeUnscoped(vars)) i.remove(); } return false; }
public double varPenalty(List varNames) { double result = 0.0; Iterator<Exp> i = exps.iterator(); while (i.hasNext()) { result += i.next().varPenalty(varNames); } return result; }
public void allSubExps(Type type, List result) { if (type == null || type().equals(type)) result.add(this); Exp e; Iterator<Exp> i = exps.iterator(); while (i.hasNext()) { e = i.next(); e.allSubExps(type, result); } }
public void allSubExps(String type, List result) { Exp e; Iterator<Exp> i = exps.iterator(); while (i.hasNext()) { e = i.next(); if (e.getClass().getName().equals(type)) result.add(e); e.allSubExps(type, result); } }
public void allSubExps(List result) { result.add(this); Exp e; Iterator<Exp> i = exps.iterator(); while (i.hasNext()) { e = i.next(); e.allSubExps(result); } }
public Exp deleteExp(Exp l) { IntSet result = new IntSet(); Iterator<Exp> i = exps.iterator(); while (i.hasNext()) { Exp e = i.next(); if (e != l) result.exps.add(e.deleteExp(l)); } return result; }
public String toString(List varNames) { StringBuffer result = new StringBuffer(); result.append("(intset"); Iterator<Exp> i = exps.iterator(); while (i.hasNext()) { result.append(" ").append(i.next().toString(varNames)); } result.append(")"); return result.toString(); }
public int predCount(Object p) { int result = 0; Exp e; Iterator<Exp> i = exps.iterator(); while (i.hasNext()) { e = i.next(); result += e.predCount(p); } return result; }
public int expCount(int eq, Exp e) { int count = 0; if (equals(eq, e)) count++; Iterator<Exp> i = exps.iterator(); while (i.hasNext()) { Exp ex = i.next(); count += ex.expCount(eq, e); } return count; }
public int expCount(int id) { int result = 0; Exp ex; Iterator<Exp> i; i = exps.iterator(); while (i.hasNext()) { ex = i.next(); result += ex.expCount(id); } return result; }
public int repeatExpCount(int t, Exp e) { int result = 0; Exp ex; Iterator<Exp> i; i = exps.iterator(); while (i.hasNext()) { ex = i.next(); result += ex.repeatExpCount(t, e); } return result; }
public int repeatPredCount(int t, Object p) { int result = 0; Exp e; Iterator<Exp> i; i = exps.iterator(); while (i.hasNext()) { e = i.next(); result += e.repeatPredCount(t, p); } return result; }
public boolean wellTyped() { Iterator<Exp> i = exps.iterator(); Exp e; while (i.hasNext()) { e = i.next(); if (e == null || !e.wellTyped()) { // System.out.println("not well typed:"+e); return false; } // only allow sets of Integers if (!PType.I.matches(e.type())) { System.out.println("not type T:" + e); return false; } // System.out.println("well typed: "+e); } // System.out.println("conj well typed"); return true; }
public void freeVars(List bound, List free) { Iterator<Exp> i = exps.iterator(); while (i.hasNext()) { i.next().freeVars(bound, free); } }