}
@Override
public Op transform(OpFilter opFilter, Op subOp)
{
ExprList exprs = opFilter.getExprs() ;
if ( ! safeToTransform(exprs, subOp) )
return super.transform(opFilter, subOp) ;
Op op = subOp ;
// Variables set
Set<Var> patternVars = OpVars.patternVars(op) ;
// Any assignments must go inside filters so the filters see the assignments.
// For each filter in the expr list ...
ExprList exprs2 = new ExprList() ; // Unchanged filters. Put around the result.
for ( Expr e : exprs.getList() )
{
Op op2 = processFilterWorker(e, op, patternVars) ;
if ( op2 == null )
exprs2.add(e) ;
else
op = op2 ;
}
// Place any filter expressions around the processed sub op.
if ( exprs2.size() > 0 )
op = OpFilter.filter(exprs2, op) ;
return op ;
}