"""Typed DSL AST, canonicalization, and type system (``docs/02`` §7, ``docs/07`` §4). P2 builds the shared program machinery consumed by the executor (P3) and the C2 model compiler (P4): * :mod:`ast` — immutable typed AST + :class:`Program` envelope conforming to ``schemas/compiled_program.schema.json`` ``$defs/astNode``. * :mod:`canonicalize` — the §7.2 six-step canonicalization + canonical hash. * :mod:`typecheck` — dangling-selector / type-mismatch rejection and the COUNT/EXIST (set) vs scalar selector cardinality distinction. * :mod:`plotdsl` / :mod:`geometrydsl` / :mod:`tabledsl` — per-DSL operator signature tables and the C1 source compilers (tabledsl grammar only). P2 produces a typed :class:`~explicit_learning.dsl.ast.Program` *structurally* (no execution, no model calls, no reproduction gates — those are P3/P4). """ from __future__ import annotations from .ast import ( AstNode, CompileStatus, Dsl, Program, ProgramError, ast_node_from_dict, lit, ref, validate_ast_node, ) __all__ = [ "AstNode", "CompileStatus", "Dsl", "Program", "ProgramError", "ast_node_from_dict", "lit", "ref", "validate_ast_node", ]