private void addPredicateOptimizationIlScript(SDField field, BooleanIndexDefinition booleanIndexDefiniton) {
        Expression script = field.getIndexingScript();
        if (script == null) return;

        script = new StatementExpression(makeSetPredicateVariablesScript(booleanIndexDefiniton), script);

        ExpressionConverter converter = new PredicateOutputTransformer(schema);
        field.setIndexingScript(schema.getName(), new ScriptExpression((StatementExpression)converter.convert(script)));
    }
Validates the predicate fields.

@author Lester Solbakken
config-model/src/main/java/com/yahoo/schema/processing/PredicateProcessor.java