public String analyze(Query query, int traceLevel) {
        int queryTraceLevel = query.getTrace().getLevel();
        if (traceLevel > 0 && queryTraceLevel == 0)
            query.getTrace().setLevel(1);

        matchAutomata(query, traceLevel);
        String error = analyzer.evaluate(query, traceLevel);

        query.getTrace().setLevel(queryTraceLevel);
        return error;
    }
Analyzes a query over this rule base

@param query the query to analyze
@param traceLevel the level of tracing to add to the query
@return the error caused by analyzing the query, or null if there was no error
        If there is an error, this query is destroyed (unusable)
container-search/src/main/java/com/yahoo/prelude/semantics/RuleBase.java