private List<Expression> orderExpressions(List<Expression> expressions) {
        List<Expression> result = new ArrayList<>();
        List<ToProcess> toProcess = expressions.stream().map(ToProcess::new).collect(Collectors.toList());
        for (var entry : toProcess) {
            if (entry.done)
                continue;
            for (String modifyingField : entry.modifiesSelf) {
                // NOTE: loops over same list for simplicity
                for (var checkUsing : toProcess) {
                    if (checkUsing.done || checkUsing == entry)
                        continue;
                    if (checkUsing.inputs.contains(modifyingField)) {
                        result.add(checkUsing.getExpression());
                    }
                }
            }
            result.add(entry.getExpression());
        }
        return result;
    }
An indexing language script derived from a schema. An indexing script contains a set of indexing
statements, organized in a composite structure of indexing code snippets.

@author bratseth
config-model/src/main/java/com/yahoo/schema/derived/IndexingScript.java