Expand description
Intermediate Representation (IR) for Mangle.
This IR uses a flat, indexed representation (similar to Carbon’s SemIR).
Instructions are stored in a vector and referenced by InstId.
§Relation Representation
Relations (predicates) are primarily identified by NameId.
In the Logical IR, they appear in Inst::Atom and Inst::Decl.
In the Physical IR (physical::Op), relations are abstract data sources.
Operations like Scan and Insert refer to relations by name/ID, but the
actual storage format (row-oriented, column-oriented, B-Tree, etc.) is
determined by the runtime Host implementation.
§Physical Operations
The physical module defines the imperative operations for execution:
- Iterate/Scan: Provides an iterator over a relation.
- Filter: Selects tuples matching a condition.
- Insert: Adds derived facts to a relation.
- Let: Binds values to variables for projection or calculation.
The Planner transforms declarative rules into trees of these operations.
Modules§
- physical
- Physical Plan IR for Mangle.
Structs§
- InstId
- Index of an instruction in the IR.
- Ir
- The IR container.
- NameId
- Index of a name (identifier) in the IR.
- Store
- A simple interner for strings.
- String
Id - Index of a string constant in the IR.
Enums§
- Inst
- Instructions in the Mangle IR.