Type Strategy Registry

14 sections

100%
Overview

Eliminate cross-phase drift permanently by creating a single, pure-data crate (ori_registry) that declares the complete behavioral specification of every builtin type — methods, operators, ownership, memory strategy — as const data that all compiler phases consume. No phase hard-codes type knowledge independently. One declaration per fact, one source of truth, structural enforcement via Rust's type system.

Completed

14 sections
Section 1 Complete

Core Data Model Design

Design all Rust types for the pure-data type strategy registry

86/86 tasks
Section 2 Complete

Crate Scaffolding & Purity Enforcement

Create ori_registry crate with zero dependencies, correct module structure, workspace integration, and compile/test-time purity enforcement

63/63 tasks
Section 3 Complete

Primitive Type Definitions (int, float, bool, byte, char)

Define complete TypeDef constants for all primitive types (int, float, bool, byte, char)

58/58 tasks
Section 4 Complete

String Type Definition

Define complete TypeDef constant for str including all methods, operators, and ownership annotations

0/0 tasks
Section 5 Complete

Compound Type Definitions

Define complete TypeDef specifications for Duration, Size, Ordering, Error, and format spec types in ori_registry

111/111 tasks
Section 6 Complete

Collection & Wrapper Type Definitions

Define complete TypeDef constants for all generic collection and wrapper types: List, Map, Set, Range, Tuple, Option, Result, Channel

0/0 tasks
Section 7 Complete

Iterator & DoubleEndedIterator Type Definitions

Complete pure-data TypeDef declarations for Iterator<T> and DoubleEndedIterator<T>, including all adapter/consumer methods, DEI-only gating, and CollectionMethod enum mapping

0/0 tasks
Section 8 Complete

Query API & Lookup Functions

Define the public interface layer between ori_registry data and all consuming compiler phases

52/52 tasks
Section 9 Complete

Wire Type Checker (ori_types)

Replace all inline resolve_*_method dispatchers in ori_types with registry-driven lookups

173/173 tasks
Section 10 Complete

Wire Evaluator (ori_eval)

Replace all hardcoded method enumerations in ori_eval with registry-derived data, while preserving existing dispatch performance (O(1) Name comparison) and the resolver chain architecture

63/63 tasks
Section 11 Complete

Wire ARC & Borrow Pass (ori_arc)

Replace BORROWING_METHOD_NAMES and BuiltinOwnershipSets construction with ori_registry as the single source of truth, and preserve iterator/COW exclusion semantics

69/69 tasks
Section 12 Complete

Wire LLVM Backend (ori_llvm) — OpStrategy Dispatch & Builtin Simplification

Replace emit_binary_op/emit_unary_op type guards with registry-driven OpStrategy dispatch; simplify declare_builtins! macro

95/95 tasks
Section 13 Complete

Migrate ori_ir & Legacy Consolidation

Delete ori_ir::builtin_methods (now superseded by ori_registry), update all consumers to use ori_registry, confirm DerivedTrait and format spec stay in ori_ir — without breaking any tests

95/95 tasks
Section 14 Complete

Enforcement Tests, Testing Matrix & Exit Criteria

Make cross-phase drift structurally impossible via enforcement tests, eliminate all allowlists, remove all legacy code, and define exhaustive exit criteria for the entire plan

190/190 tasks