Source context

Program Rust

parse_decimal_seq_loop2

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

300         if d.num_digits == 0 {301             // As above, this is the source leading-zero loop written in the302             // indexed form accepted by Aeneas.303             while !s.is_empty() && s[0] == b'0' {304                 s = &s[1..];305             }306         }307         while s.len() >= 8 && d.num_digits + 8 < DecimalSeq::MAX_DIGITS {308             let v = s.read_u64();

Aeneas declaration

The Lean below was mechanically extracted by Aeneas from Rust.

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

body · Program Rust

Other extracted objects at this span

num.imp.dec2flt.decimal_seq.parse_decimal_seq_loop2.body

Source details
Declarationnum.imp.dec2flt.decimal_seq.parse_decimal_seq_loop2
Filenum/imp/../../dec2flt/decimal_seq.rs
Lines303:12–305:13
Program versionOriginal program