"""Type-directed compiler and exact relational execution for STRATA-COMPOSE.""" from strata.modeling.compose.ast import ( AnchorRef, Apply, ProgramNode, ProgramTypeError, anchor_ref, apply_chain, canonicalize, operator_chain, ) from strata.modeling.compose.anchors import ( AnchorLinkOutput, ParticipantFacetAnchorLinker, StructuredAnchorLinker, TypedCandidateAnchorLinker, copied_anchor, ) from strata.modeling.compose.chart_parser import ChartItem, ParseResult, TypedChartParser from strata.modeling.compose.executor import ( TypedAlgebraGraph, TypedGraphValue, TypedProgramExecutor, permute_graph, permute_value, ) from strata.modeling.compose.evidence_lattice import ( EvidenceDecision, decide_evidence, decide_evidence_tensor, ) from strata.modeling.compose.fragments import ( FunctionFragment, LexicalCandidate, LexicalFragmentClassifier, ) from strata.modeling.compose.lm_adapter import ( AlgebraGraphReadAdapter, ComposeLMOutput, FrozenLMWithAlgebraRead, SparseAlgebraGraphRead, ) from strata.modeling.compose.head_quotient import ( ExportedHeadQuotientAttention, GraphProgram, GroupedGraphReadAdapter, HeadKVCache, HeadMode, HeadQuotientAttention, HeadQuotientBlock, HeadQuotientLM, HeadQuotientIncrementalOutput, HeadQuotientOutput, ScopedGraphRead, StaticProgramGraphReadAdapter, StaticScopedGraphReadAdapter, sparsemax, ) from strata.modeling.compose.natural_compiler import ( NaturalAtomicCompiler, NaturalCompilerOutput, decode_valid_spans, gated_compiler_reliability, ) from strata.modeling.compose.natural_grounder import ( NaturalGrounderOutput, NaturalMentionGrounder, decode_joint_assignment, set_valued_assignment_loss, ) from strata.modeling.compose.natural_denotation_ranker import ( DenotationRankerOutput, FrameConditionedDenotationRanker, decode_role_specific, ) from strata.modeling.compose.prunable_attention import ( AlgebraOverlapBlock, ExportedAlgebraBlock, PrunableAlgebraLM, PrunableLMOutput, ) from strata.modeling.compose.position_extension import SegmentFactorizedPositionExtension from strata.modeling.compose.residual_memory import ( BoundedFusionOutput, ResidualMemory, ResidualNodeType, SparseResidualRead, bounded_graph_residual_fusion, graph_residual_orthogonality_loss, reconstruction_residual, residual_utility, select_residual_memory, sparse_residual_read, ) from strata.modeling.compose.types import ( GraphOperator, OPERATOR_SIGNATURES, OperatorSignature, SemanticType, signature, ) __all__ = [ "AnchorLinkOutput", "AnchorRef", "AlgebraGraphReadAdapter", "GroupedGraphReadAdapter", "ExportedHeadQuotientAttention", "GraphProgram", "HeadKVCache", "HeadMode", "HeadQuotientAttention", "HeadQuotientBlock", "HeadQuotientLM", "HeadQuotientIncrementalOutput", "HeadQuotientOutput", "ScopedGraphRead", "StaticProgramGraphReadAdapter", "StaticScopedGraphReadAdapter", "sparsemax", "AlgebraOverlapBlock", "Apply", "BoundedFusionOutput", "ChartItem", "ComposeLMOutput", "FunctionFragment", "FrozenLMWithAlgebraRead", "GraphOperator", "LexicalCandidate", "LexicalFragmentClassifier", "NaturalAtomicCompiler", "NaturalCompilerOutput", "NaturalGrounderOutput", "NaturalMentionGrounder", "DenotationRankerOutput", "FrameConditionedDenotationRanker", "OPERATOR_SIGNATURES", "OperatorSignature", "ParseResult", "ParticipantFacetAnchorLinker", "ProgramNode", "ProgramTypeError", "PrunableAlgebraLM", "PrunableLMOutput", "ResidualMemory", "ResidualNodeType", "SemanticType", "SparseAlgebraGraphRead", "SparseResidualRead", "SegmentFactorizedPositionExtension", "StructuredAnchorLinker", "TypedAlgebraGraph", "TypedCandidateAnchorLinker", "TypedChartParser", "TypedGraphValue", "TypedProgramExecutor", "ExportedAlgebraBlock", "EvidenceDecision", "anchor_ref", "apply_chain", "bounded_graph_residual_fusion", "canonicalize", "copied_anchor", "decide_evidence", "decide_evidence_tensor", "decode_valid_spans", "decode_joint_assignment", "decode_role_specific", "gated_compiler_reliability", "graph_residual_orthogonality_loss", "operator_chain", "permute_graph", "permute_value", "reconstruction_residual", "residual_utility", "select_residual_memory", "signature", "set_valued_assignment_loss", "sparse_residual_read", ]