@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; }
@Override public VarUsage count(final Var var) { return occ != null ? VarUsage.sum(var, occ).plus(query.count(var)) : query.count(var); }
@Override public int count(final Var v) { return weight.count(v) + super.count(v); }
@Override public final int count(final Var v) { int c = 0; for (final Expr s : steps) c += s.count(v); return c + super.count(v); }