API reference
python:irx:irx.analysis
module analysis
irx.analysis
Source: packages/irx/src/irx/analysis/__init__.py:1
Semantic analysis package.
Re-export the semantic-analysis APIs, semantic-contract types, and sidecar metadata used by hosts, tests, and backend lowering.
Modules
-
analyzer — Semantic analyzer orchestration.
-
api — Public semantic-analysis API entry points.
-
arrow_conversion — Checked Arrow container conversions and reference ownership.
-
bindings — Module-visible binding tables.
-
builtin_file — Explicit host capabilities and construction of native-backed File classes.
-
call_arguments — Bind source call operands without reordering their evaluation.
-
class_lifecycle — Class ownership, constructor binding, and bounded lifecycle validity.
-
collections — Collection capability helpers for semantic analysis.
-
context — Shared semantic-analysis context.
-
contract — Public semantic contract for hosts and lowering.
-
dataframe_literals — Validate constant rich DataFrame cells and serialize their Arrow storage.
-
exception_types — Host-registered exception identities and ordinary class construction.
-
extensions — Backend-independent analysis extension contracts.
-
factories — Semantic entity factories.
-
facts — Typed, immutable semantic attachments owned by an analysis generation.
-
ffi — Public FFI semantic helpers.
-
file_io — Focused semantic rules for single-owner native text files.
-
float_literals — Single-rounding conversion of exact values to supported binary formats.
-
flow — Compositional statement completion outcomes.
-
handlers — Semantic-analysis handlers.
-
iterables — Iterable capability helpers for semantic analysis.
-
module_interfaces — Host-facing module interfaces for multi-module analysis.
-
module_symbols — Module-aware semantic identity and LLVM mangling helpers.
-
normalization — Semantic normalization helpers.
-
nullable — Resolve nullable scalar and Series kernel contracts before lowering.
-
numeric_literals — Contextual numeric literals and constant representability.
-
numeric_policy — Value-preserving numeric promotion and conversion classification.
-
ownership — Semantic ownership helpers for runtime-managed values.
-
parameters — Consistent parameter ownership in ordinary and specialized bodies.
-
reachability — Conservative declaration reachability for opt-in library modules.
-
registry — Semantic registration helpers.
-
resolved_nodes — Sidecar semantic dataclasses attached to AST nodes.
-
scopes — Lexical scope helpers for semantic analysis.
-
sequences — Borrowed, exact numeric sequence adaptation and access contracts.
-
session — Multi-module compilation session management.
-
symbols — Variable-symbol helpers for semantic analysis.
-
table_io — Resolve trusted tabular I/O without arbitrary FFI access.
-
text — Semantic contracts for checked Unicode text operations.
-
types — Type helpers for semantic analysis.
-
typing — Type-computation helpers for semantic analysis.
-
validation — Validation helpers for semantic analysis.
Classes
-
ClassHeaderFieldKind — Stable class-header field categories.
-
ClassInitializationSourceKind — Stable class-initialization source categories.
-
ClassLifecyclePhase — One canonical initialization and destruction phase.
-
ClassMemberKind — Stable semantic class-member categories.
-
ClassMemberResolutionKind — Stable class-member resolution categories.
-
ClassObjectRepresentationKind — Stable class object-representation categories.
-
CollectionMethodKind — Stable collection-method semantic categories.
-
CompilationSession — Shared state for multi-module analysis and lowering.
-
Diagnostic — One structured diagnostic record.
-
DiagnosticBag — Collect diagnostics across one semantic-analysis attempt.
-
ExceptionCauseMode — Diagnostic chaining requested by a raise expression.
-
FFIAdmissibility — Stable semantic FFI admissibility classes.
-
FFICallableInfo — Canonical public FFI callable metadata.
-
FFILinkStrategy — Stable semantic native symbol-resolution strategies.
-
FFITypeClass — Stable semantic FFI type classes.
-
FFITypeInfo — One canonical semantic FFI type description.
-
FlowOutcome — The five distinct ways a statement region can complete.
-
ImportResolutionError — Expected host failure while resolving or parsing an import.
-
ImportResolver — Host callback that resolves imports to parsed modules.
-
IterationKind — Stable iterable adapter kinds.
-
IterationOrder — Stable iterable ordering categories.
-
MethodDispatchKind — Stable method-dispatch categories.
-
NumericConversion — Classification of a numeric conversion under the checked numeric policy.
-
NumericConversionKind — Numeric conversion semantics before choosing an execution mechanism.
-
OwnershipEscapeKind — Semantic resource escape boundaries.
-
OwnershipKind — Semantic resource ownership classes.
-
OwnershipTransferKind — Semantic resource transfer operations.
-
ParsedModule — One parsed module supplied by the host compiler.
-
PhaseErrorBoundary — One compiler-phase error boundary.
-
ResolvedAssignment — Resolved assignment target.
-
ResolvedBaseClassFieldAccess — Resolved explicit base-class field access metadata.
-
ResolvedCallArguments — Source-ordered evaluations mapped onto positional ABI slots.
-
ResolvedClassConstruction — Resolved class construction metadata.
-
ResolvedClassFieldAccess — Resolved class-field access metadata.
-
ResolvedCollectionMethod — Resolved collection method capability.
-
ResolvedContextManager — Resolved context-manager metadata.
-
ResolvedDefaultArgument — One declaration-resolved omitted argument and its destination.
-
ResolvedExceptionHandler — Ordered nominal matches and a lexical handler binding.
-
ResolvedExceptionType — Nominal exception identity and validated base storage.
-
ResolvedFileOpen — Validated open operands in original evaluation order.
-
ResolvedFileOperation — A validated operation on an owned native file.
-
ResolvedImportBinding — One resolved imported local binding.
-
ResolvedIteration — Resolved iterable capability.
-
ResolvedMaterialization — Single-pass numeric materialization with an optional sized bound.
-
ResolvedMethodCall — Resolved class method call metadata.
-
ResolvedNativeExceptionInitialization — Native diagnostic initialization within ordinary class construction.
-
ResolvedNativeFileInitialization — Caller-checked native initialization of a real File class field.
-
ResolvedOperator — Normalized operator meaning.
-
ResolvedRaise — Validated raised value and explicit diagnostic cause.
-
ResolvedSequenceAccess — Exact borrowed numeric adapter selected by semantic analysis.
-
ResolvedStaticClassFieldAccess — Resolved static class-field access metadata.
-
ResolvedTextOperation — Source-ordered text operands and their normalized ABI positions.
-
ResolvedTry — Validated statement-only exception region.
-
ResourceKind — Runtime-managed resource categories.
-
ResourceOwnership — Resolved ownership and escape metadata for one resource value.
-
SemanticAnalyzer — Concrete semantic analyzer.
-
SemanticBinding — One visible top-level binding in a module namespace.
-
SemanticClass — Resolved class information.
-
SemanticClassFieldInitializer — One resolved instance-field initialization step.
-
SemanticClassHeaderField — One reserved class-object header slot.
-
SemanticClassInitialization — Canonical class construction and initialization plan.
-
SemanticClassLayout — Canonical class-object layout metadata.
-
SemanticClassLayoutField — One resolved instance-field storage slot.
-
SemanticClassMember — Canonical semantic class-member record.
-
SemanticClassMemberResolution — Canonical class-member lookup resolution.
-
SemanticClassMethodDispatch — One resolved class-method dispatch entry.
-
SemanticClassStaticInitializer — One resolved static-field initialization step.
-
SemanticClassStaticStorage — One resolved static-member storage record.
-
SemanticContract — Stable semantic contract exposed by IRx.
-
SemanticError — Raised when semantic analysis fails.
-
SemanticFlags — Normalized semantic flags.
-
SemanticFunction — Resolved function information.
-
SemanticInfo — Sidecar semantic information stored on AST nodes.
-
SemanticModule — Semantic identity for an imported module.
-
SemanticPhase — One stable semantic phase.
-
SemanticStruct — Resolved struct information.
-
SemanticSymbol — Resolved symbol information.
-
TemplateArgumentBinding — One concrete template argument binding.
-
TemplateSpecializationKey — Stable semantic template-specialization identity.
-
TextOperationKind — Validated operations on NUL-free Unicode text.
Functions
-
analyze — Analyze one AST root and attach semantic sidecars.
-
analyze_module — Analyze an AST module.
-
analyze_modules — Analyze a reachable graph of host-provided parsed modules.
-
builtin_exception_module — Build language-neutral builtin exceptions for direct AST hosts.
-
classify_numeric_conversion — Plan implicit eligibility and explicit range checking for numerics.
-
flow_outcomes — Compose conservative outcomes without conflating raise and return.
-
get_semantic_contract — Return the stable public semantic contract.
-
integer_bounds — Return the inclusive domain of a supported integer, excluding bool.
-
is_lossless_numeric_conversion — Test containment of full numeric domains, not the current values.
-
list_resource_ownership — Build one dynamic-list ownership contract.
-
lossless_common_numeric_type — Select the smallest containing numeric domain or reject the pair.
-
resolve_iteration_capability — Resolve one iterable semantic capability.
-
resource_ownership — Return one node's typed resource-ownership sidecar.
-
string_resource_ownership — Build one string ownership contract.
-
symbol_resource_ownership — Return the ownership contract attached to a symbol declaration.
-
transfer_resource_ownership — Derive one ownership record for a validated transfer boundary.