Example #1
0
 @Override
 public VarUsage count(final Var var) {
   return ts.count(var).plus(VarUsage.maximum(var, cases));
 }
Example #2
0
 @Override
 public VarUsage count(final Var var) {
   final VarUsage inRoot = root == null ? VarUsage.NEVER : root.count(var);
   return VarUsage.sum(var, steps) == VarUsage.NEVER ? inRoot : VarUsage.MORE_THAN_ONCE;
 }
Example #3
0
 @Override
 public VarUsage count(final Var var) {
   return occ != null ? VarUsage.sum(var, occ).plus(query.count(var)) : query.count(var);
 }
Example #4
0
 @Override
 public int count(final Var v) {
   int c = ts.count(v);
   for (final TypeCase t : cases) c += t.count(v);
   return c;
 }
Example #5
0
 @Override
 public boolean removable(final Var v) {
   for (final Expr p : pred) if (p.count(v) != 0) return false;
   return true;
 }
Example #6
0
 @Override
 public int count(final Var v) {
   int c = 0;
   for (final Expr p : pred) c += p.count(v);
   return c;
 }