from .bdias_assist import BDiasAssist
from .bdias_parser import BDiasParser
from .bdias_code_gen import BDiasCodeGen
from .bdias_critical_path import BDiasCriticalPathAnalyzer
from .bdias_pattern_analyzer import BDiasPatternAnalyzer
from .bdias_pattern_codegen import generate_parallel_code
from .bdias_pattern_presenter import present_transformation
from .constants import EXPLANATIONS, PARTITIONING_SUGGESTIONS
from .analysis import (
    analyze_code,
    analyze_blocks,
    analyze_critical_path,
    analyze_patterns,
    analyze_integrated,
    generate_parallel_code_logic
)

__version__ = "0.9.1a"

# LangChain tools (optional import)
try:
    from .bdias_langchain_tools import (
        AnalyzeCodeTool,
        GenerateParallelCodeTool,
        get_bartdias_tools
    )
    _LANGCHAIN_AVAILABLE = True
except ImportError:
    _LANGCHAIN_AVAILABLE = False
    AnalyzeCodeTool = None
    GenerateParallelCodeTool = None
    get_bartdias_tools = None

__all__ = [
    'BDiasAssist',
    'BDiasParser',
    'BDiasCodeGen',
    'BDiasCriticalPathAnalyzer',
    'BDiasPatternAnalyzer',
    'generate_parallel_code',
    'present_transformation',
    'EXPLANATIONS',
    'PARTITIONING_SUGGESTIONS',
    'analyze_code',
    'analyze_blocks',
    'analyze_critical_path',
    'analyze_patterns',
    'analyze_integrated',
    'generate_parallel_code_logic'
]

if _LANGCHAIN_AVAILABLE:
    __all__.extend([
        'AnalyzeCodeTool',
        'GenerateParallelCodeTool',
        'get_bartdias_tools'
    ])
