Expand description
The contract IR: places, expressions, predicates, and the property model.
Property is a DNF form (only Atom and Or; conjunction is a list), with
a PropertyKind vocabulary of safety tags. All contract front-ends
(attributes, JSON, compound-property macros, pest DSL) produce this IR.
StructsΒ§
- AndProperty π
- A conjunction: every
conjunctsmember must hold. - Atom
Property π - Contract
Origin π - Display metadata for a property expanded from a compound property
(
pred!-style macro). Purely presentational: it lets reports render a macro-expanded contract as a singlename(args)entry with its doc-derived meaning, instead of the underlying primitives it expanded into. - Contract
Place π - A place a contract refers to: a
PlaceBaseroot plus a sequence ofContractProjectionsteps into it (e.g.self.next.value,head.iter()). - Numeric
Predicate π - OrProperty π
- A disjunction: at least one
disjunctsmember must hold.
EnumsΒ§
- Contract
Expr π - Contract
Kind π - Contract
Projection π - A step into a place, from the base down to the value a contract talks
about (written as
.field,.unwrap_some(), or.iter()in the DSL). - Numeric
BinOp π - Numeric
Unary πOp - Place
Base π - The root of a contract place: a functionβs return value, an argument, or a
raw MIR local.
ReturnβLocal(0);Arg(n)βLocal(n + 1). - Property π
- A safety property: a boolean formula over atomic predicates.
- Property
Arg π - One argument of a predicate call β what the property is applied to.
- Property
Kind π - The vocabulary of safety predicates a contract can assert.
- RelOp π