Source context

Program Rust

Dec2FltAssemblyTrace

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

323 }324 325 /// Full observation record for the dispatcher path that performs final assembly.326 pub struct Dec2FltAssemblyTrace<'a, F> {327     pub body: &'a [u8],328     pub negative: bool,329     pub parse_number_result: Option<decimal::Decimal>,330     pub fast_path_input: decimal::Decimal,331     pub fast_path_result: Option<F>,332     pub first_compute_exponent: i64,333     pub first_compute_mantissa: u64,334     pub first_compute_result: BiasedFp,335     pub second_compute_guard: bool,336     pub second_compute_exponent: Option<i64>,337     pub second_compute_mantissa: Option<u64>,338     pub second_compute_result: Option<BiasedFp>,339     pub second_equals_first: Option<bool>,340     pub forced_deferral: bool,341     pub post_comparison_pair: BiasedFp,342     pub slow_path_guard: bool,343     pub slow_path_result: Option<BiasedFp>,344     pub selected_pair: BiasedFp,345     pub assembled_word: u64,346     pub assembly_result: F,347     pub lexical_sign_applied: bool,348     pub result: F,349 }350 351 /// Run the actual dispatcher while retaining its approved internal observations.352 pub fn dec2flt_with_trace<

Aeneas declaration

The Lean below was mechanically extracted by Aeneas from Rust.

structure num.imp.dec2flt.Dec2FltAssemblyTrace (F : Type) where
  body : Slice Std.U8
  negative : Bool
  parse_number_result : Option num.imp.dec2flt.decimal.Decimal
  fast_path_input : num.imp.dec2flt.decimal.Decimal
  fast_path_result : Option F
  first_compute_exponent : Std.I64
  first_compute_mantissa : Std.U64
  first_compute_result : num.imp.dec2flt.common.BiasedFp
  second_compute_guard : Bool
  second_compute_exponent : Option Std.I64
  second_compute_mantissa : Option Std.U64
  second_compute_result : Option num.imp.dec2flt.common.BiasedFp
  second_equals_first : Option Bool
  forced_deferral : Bool
  post_comparison_pair : num.imp.dec2flt.common.BiasedFp
  slow_path_guard : Bool
  slow_path_result : Option num.imp.dec2flt.common.BiasedFp
  selected_pair : num.imp.dec2flt.common.BiasedFp
  assembled_word : Std.U64
  assembly_result : F
  lexical_sign_applied : Bool
  result : F
Operations used here

BiasedFp · Program Rust

Decimal · Program Rust

Source details
Declarationnum.imp.dec2flt.Dec2FltAssemblyTrace
Filenum/imp/../../dec2flt/mod.rs
Lines326:0–349:1
Program versionPreparation 2