java.lang.Object
com.darkcollective.relix.semantic.internal.SchemaInferenceEngine

public final class SchemaInferenceEngine extends Object
Orchestrates the schema-inference pass (Phase 4 of semantic analysis).

The engine drives a SchemaInferenceVisitor over every relational algebra expression reachable from the root script:

  1. Named view bodies — every QueryRelationSymbol in the symbol table is visited in registration order. After successful inference the symbol is re-registered with the resolved schema so that later symbols referencing it see the correct output type.
  2. Root query expressions — the inline RA expression (if any) inside each QueryStatement in the root file.

Registration order equals dependency-first processing order because the SymbolCollector already traverses files topologically. This means that in the common case all dependencies are resolved before dependants are processed. Symbols whose dependencies could not be inferred produce an SymbolCollector.UNRESOLVED_SCHEMA placeholder; the engine silently leaves those unannotated.

All errors are accumulated in a list and returned via errors(). The engine never throws.