Example #1
0
 @Override
 public VarUsage count(final Var v) {
   final VarUsage inPreds = super.count(v), inRoot = root.count(v);
   if (inPreds == VarUsage.NEVER) return inRoot;
   final long sz = root.size();
   return sz >= 0 && sz <= 1 || root.type().zeroOrOne()
       ? inRoot.plus(inPreds)
       : VarUsage.MORE_THAN_ONCE;
 }
Example #2
0
 @Override
 public VarUsage count(final Var var) {
   return ts.count(var).plus(VarUsage.maximum(var, cases));
 }
Example #3
0
 @Override
 public VarUsage count(final Var var) {
   return VarUsage.sum(var, specs).plus(VarUsage.sum(var, preExpr));
 }
Example #4
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 #5
0
 @Override
 public VarUsage count(final Var var) {
   return VarUsage.sum(var, exprs);
 }
Example #6
0
 @Override
 public VarUsage count(final Var var) {
   return occ != null ? VarUsage.sum(var, occ).plus(query.count(var)) : query.count(var);
 }
Example #7
0
 @Override
 public VarUsage count(final Var v) {
   return VarUsage.sum(v, copies).plus(super.count(v));
 }
Example #8
0
 @Override
 public VarUsage count(final Var var) {
   return VarUsage.maximum(var, catches).plus(expr.count(var));
 }