Expand description
Core IR type definitions for IntentLang.
The IR is a typed, formally verifiable representation generated from
intent specs. Every IR node carries a SourceTrace linking it back
to the originating spec element (for Phase 3 Audit Bridge).
Structs§
- Condition
- A precondition (from
requires). - Edge
Guard - An edge-case guard — lowered from
edge_cases { when cond => action }. - Field
- A typed field within a struct.
- Function
- A function — lowered from an
actiondeclaration. Contains typed parameters, pre/postconditions, and effect/property annotations. - Invariant
- A module-level invariant — a proof obligation that must always hold.
- Module
- A compiled IR module — the output of lowering a single
.intentfile. - Param
- A typed function parameter.
- Property
- A declarative property annotation (idempotent, atomic, etc.)
- Source
Trace - Links an IR node back to its originating spec element.
- Struct
- A struct type — lowered from an
entitydeclaration.
Enums§
- ArithOp
- Arithmetic operators.
- CmpOp
- Comparison operators (shared with AST but owned by IR).
- IrExpr
- An IR expression — a simplified, typed expression tree.
- IrLiteral
- IR literal values.
- IrType
- An IR type — resolved from the intent language’s type expressions.
- Postcondition
- A postcondition (from
ensures) — may be unconditional or guarded bywhen. - Property
Value - Property value — mirrors the AST’s PropValue but in IR form.