001package gudusoft.gsqlparser.ir.builder;
002
003import gudusoft.gsqlparser.analyzer.v2.AnalyzerV2Config;
004import gudusoft.gsqlparser.ir.bound.BoundProgram;
005import gudusoft.gsqlparser.ir.logical.LogicalProgram;
006
007/**
008 * Phase 2 Builder: Logical IR construction (SQL relational plan + PL/SQL procedural plan).
009 * <p>
010 * Input: BoundProgram (from Phase 1)
011 * Output: {@link gudusoft.gsqlparser.ir.logical.LogicalProgram} (relational IR trees)
012 * <p>
013 * Join-analysis slice 174 (S13) retyped this interface from the empty
014 * {@code ir.builder.LogicalProgram} placeholder (now removed) to the real
015 * {@code ir.logical.LogicalProgram}, resolving the two-class naming
016 * conflict.
017 */
018public interface ILogicalIRBuilder {
019
020    /**
021     * Builds the Logical IR from the bound program.
022     *
023     * @param bound  bound program from Phase 1
024     * @param config analyzer configuration
025     * @return logical program with SQL plans and PL/SQL routines
026     */
027    LogicalProgram build(BoundProgram bound, AnalyzerV2Config config);
028}