Semantic Optimization Pipeline

10 sections

0%
Overview

Make proven facts survive into optimization — including algebraic structure. Ori's compiler already proves rich semantic facts about types, ownership, purity, and structure through the trait system, AIMS lattice, ARC pipeline, and type checker.

○

Planned

10 sections
Section 1 Not Started

Hygiene & Targeted Fixes

Split bloated files so downstream sections have clean, right-sized modules to extend (BUG-04-029 shift overflow already fixed)

0/56 tasks
Section 2 Not Started

LLVM Metadata Infrastructure

Build the metadata emission layer so Sections 03-04 can attach TBAA, range, and alias metadata to LLVM instructions

0/45 tasks
Section 3 Not Started

Backend-Neutral AIMS Facts and LLVM Projection

Freeze neutral AIMS ownership, fresh-allocation, effect/access, and disjointness facts once, then project them faithfully in every executor

0/54 tasks
Section 4 Not Started

TBAA, Range, and Invariant Metadata

Emit TBAA on struct field accesses, !range on bounded returns, and !invariant.load on immutable borrowed params

0/46 tasks
Section 5 Not Started

Structural Derive Normalization

Mark derived methods as memory(read) and leave a clean handoff for ARC-level peepholes to Section 09

0/47 tasks
Section 6 Not Started

Runtime Identity Fixes

Fix runtime string and list concat to be true algebraic identities so identity elimination in Section 09 is sound

0/40 tasks
Section 7 Not Started

Algebra Law Schema

Add algebraic law declarations, identity-provider traits, and the exported law/provenance index that Section 09 consumes

0/86 tasks
Section 8 Not Started

Algebra Law Adoption

Install algebraic law declarations on stdlib operator traits and impls so the normalization pass has laws to consume

0/56 tasks
Section 9 Not Started

Algebraic Normalization Pass

Build a step-3b ARC IR normalization pass that rewrites expressions using exported algebraic law metadata

0/90 tasks
Section 10 Not Started

Advanced Rewrites & Verification

Add distributivity, multiplicative inverse, cross-block TRMC activation, and comprehensive verification of the full optimization pipeline

0/97 tasks