pub struct Widths { /* private fields */ }Expand description
How wide each thing in one rule is.
A rule is written at one width, the one its pattern’s opcode names, and the terms inside it
may say another: (value.i64 x) under an add.i32 is a thirty two bit add of two sixty four
bit registers, which is the shape every sext, zext and trunc in a lowering has. What a
name stands at is fixed by the pattern, because the pattern is where a name is bound, and
everywhere else reads it from here.
A bounded proof asks the same rule at a narrower width, and that scales every width in the rule by one ratio rather than flattening them all to one number. A rule that converts between widths still converts between widths when it is asked at eight bits, which it would not do if the narrow width were simply substituted everywhere.
Implementations§
Source§impl Widths
impl Widths
Sourcepub fn of(pattern: &Term) -> Widths
pub fn of(pattern: &Term) -> Widths
The widths one rule’s pattern fixes, at the width the rule is written in.
Sourcepub fn at(pattern: &Term, asked: u32) -> Widths
pub fn at(pattern: &Term, asked: u32) -> Widths
The same, scaled to a width somebody asked for. This is what a bounded proof is made of.
Sourcepub fn natural(&self) -> u32
pub fn natural(&self) -> u32
The width the rule is written in, which is the one it will run at.