pub struct Rule {
pub pattern: Term,
pub guard: Option<Term>,
pub replacement: Term,
pub spec: Term,
pub bounded: Option<String>,
pub line: u32,
pub column: u32,
}Expand description
One rule: what it matches, what it produces, and what makes that sound.
Fields§
§pattern: TermThe term to match, which is IR for a rewrite and IR for a lowering.
guard: Option<Term>A condition on the match, which is where a rule that only holds for some constants says so. It sits between the pattern and the replacement because it is part of deciding whether the rule fires, not part of what firing produces.
replacement: TermWhat to put in the matched term’s place.
spec: TermThe bitvector claim relating the two, which is what rucc-verify discharges. It is not
optional, because a rule set that lets one rule through without a specification is a rule
set with an unverified rule in it.
bounded: Option<String>Why a proof at narrower widths is enough for this rule, when there is a reason to think the solver will not manage the real one. A rule carrying this is not excused anything: it is still asked at its own width first, and the clause only says what a person is willing to sign for if the answer comes back as a shrug.
line: u32The line the rule starts on.
column: u32The column the rule starts at.