Source context

Program Rust

parse_decimal_seq_loop0

This Rust is the input prepared for Aeneas. Modeling choices explains the adaptations from the production source.

293     // Aeneas rejects the literal-pattern `while let`; this loop performs the294     // same nonempty check, byte comparison, and one-byte consumption in the295     // same order, with identical slice bounds.296     while !s.is_empty() && s[0] == b'0' {297         s = &s[1..];298     }299 300     s = parse_digits_into_seq(s, &mut d);301 

Aeneas declaration

The Lean below was mechanically extracted by Aeneas from Rust.

@[rust_loop]
def num.imp.dec2flt.decimal_seq.parse_decimal_seq_loop0
  (s : Slice Std.U8) : Result (Slice Std.U8) := do
  loop
    (fun s1 => num.imp.dec2flt.decimal_seq.parse_decimal_seq_loop0.body s1)
    s
Operations used here

body · Program Rust

Other extracted objects at this span

num.imp.dec2flt.decimal_seq.parse_decimal_seq_loop0.body

Source details
Declarationnum.imp.dec2flt.decimal_seq.parse_decimal_seq_loop0
Filenum/imp/../../dec2flt/decimal_seq.rs
Lines296:4–298:5
Program versionRevised program