// will ensure that we get at least one input tuple, which in turns ensures that we output at least one tuple
} else if (spec instanceof FilterSpec) {
FilterSpec fSpec = (FilterSpec) spec;
Cond filterCond = fSpec.cond;
// if necessary, insert one or more positive examples (i.e. tuples that pass the filter)
if (outputConstraints.cardinality() > 0) { // there's one or more output constraints; generate corresponding input constraints
for (Iterator<Tuple> it = outputConstraints.iterator(); it.hasNext(); ) {
Tuple outputConstraint = it.next();