Skip to content

kernel.assert

kernel dialect

Runtime assertion inside a dispatchable kernel. The condition is expected to be true; if it is false, target lowering must preserve runtime failure semantics through a trap/assert path or reject the kernel when assertions cannot be represented. This is not an optimization assume.

Operation contract

Property Value
Semantic phase executable
Traits UnknownEffects, HasAncestor(kernel.def)

Signature

Kind Name Type Cardinality Description
Operand condition i1 required Predicate that must hold.
Attribute message string optional Optional human-readable assertion message.

Examples

kernel.assert %ok : i1
kernel.assert %ok "finite input required" : i1