Primary inventory and preservation analysis of the upstream-to-crate delta ============================================================================ Method and complete file inventory ---------------------------------- This record compares the supplied files in upstream/ with the frozen adapted crate/. It treats the sources and their control flow as primary evidence; it does not use a prior route decision as semantic proof and makes no assertion that a supplied GOAL is true. The exact raw aggregate diff is retained as reference/model-evidence/source-adaptation-delta.diff. It was generated from the repository root by this exact command (the for-list is the complete LC_ALL=C-sorted upstream inventory, identical files contribute zero bytes, labels are literal root-relative paths, hunks are concatenated in listed order, status 1 is accepted as diff's expected ``files differ'' status, and every other nonzero status aborts): export LC_ALL=C artifact=reference/model-evidence/source-adaptation-delta.diff : > "$artifact" saw_difference=0 for supplied in \ dec2flt/common.rs \ dec2flt/decimal.rs \ dec2flt/decimal_seq.rs \ dec2flt/fpu.rs \ dec2flt/lemire.rs \ dec2flt/mod.rs \ dec2flt/parse.rs \ dec2flt/slow.rs \ dec2flt/table.rs \ traits.rs do if diff --unified=0 --label "upstream/$supplied" --label "crate/$supplied" \ "upstream/$supplied" "crate/$supplied" >> "$artifact"; then : else diff_status=$? if [ "$diff_status" -ne 1 ]; then exit "$diff_status" fi saw_difference=1 fi done test "$saw_difference" -eq 1 sha256sum "$artifact" The command used GNU diffutils 3.12 at /usr/bin/diff, whose SHA-256 is dfab4814355b488934cf8c63ce96d94184ea3d9b5e4f9be50278ad8e080168f5. Its actual final output was: fdf88cabfe40ce962d2bd5eda22eb5b3cbbf8a936a81b896e98698bf472cd0e4 reference/model-evidence/source-adaptation-delta.diff The retained byte stream is 38,813 bytes and 933 lines. The complete source inventory and independently reproduced file hashes are: supplied path upstream SHA-256 crate SHA-256 status dec2flt/common.rs fc64094721ff23e08fcba013154d04dec3fe986cae5ffd73a20f86049980aace 4c4be815335a7b176527eb1345e662890caa48181a0a4f814594339016cab18e changed dec2flt/decimal.rs 3c164785e1bc3f3b48aa9c212dd6c4ab535fe828523af9fa584df4c7b1e60e0d 633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb changed dec2flt/decimal_seq.rs c0c1c6028e3f57cefc3de7635a94788e9180f5ebcedc7a334ec8dbac786ec788 4aa4ecf9f31970033093d73238d4f2c72d433639bbe467c0741b185807380bd9 changed dec2flt/fpu.rs 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f identical dec2flt/lemire.rs fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 identical dec2flt/mod.rs 7198e238c554b692405537a446b3526ad66805ec2900cd0e299f10c51402a44a ecadc1d7df05dfda85fcf99fc45da7e40cb36aa9736d12d1b3a75f60f532907d changed dec2flt/parse.rs 9daf21ab9445a84552535152f376eef8c30f3d5827296c0645f5952d3b22bbf1 50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f changed dec2flt/slow.rs 43e7aba32d7431bbf0e1bbcb4c334eaffb23eb66891c7e45abe799c5235cc0d2 93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485 changed dec2flt/table.rs 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb identical traits.rs 66a02c44d72dfcc3ddae7e34a290e390dabaf98c5911b283d2d97f2f0075a44e 9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf changed The standalone package adds four files having no supplied counterpart: crate/Cargo.toml 2040ce5dc92c51b5245113f97682b692b876aa57708b5c7c483425ba152943c8 crate/lib.rs 1df2b8bcb2f52068d05a6343923716d0ef4475abdef34a0de3fe7cb8dc2ba95b crate/num/mod.rs d9ac4f964d124bd4660914dc4c80bbb14f48d7851f9a8edc71a0931e9fce37b3 crate/num/imp/mod.rs df09b97393e97b23b0a558c2fcbbf4e75dd9d68338f1e83f168bab80a37a31f1 Thus fpu.rs, lemire.rs, and the complete 671-line table.rs, including their algorithmic constants and tables, are byte-identical. The following sections account for every other file and every changed hunk. Namespace and error shell ------------------------- crate/lib.rs:1-12 is a no_std crate root that re-exports core::f64 and core::ops and introduces the same num module path expected by the supplied slice. crate/num/imp/mod.rs:1-10 uses path attributes to place traits.rs and dec2flt/mod.rs at core::num::imp-like module names. These declarations add no wrapper call or computation. crate/num/mod.rs:1 re-exports core::num::FpCategory. crate/num/mod.rs:3-26 defines a local private FloatErrorKind and ParseFloatError shell so the standalone package can name the parser's error type. The pursued GOALs observe only panic versus normal return and, on normal return, the outer Result's Ok/Err discriminant; they do not observe the private error kind or formatting. No identity is asserted between this local shell and an unpinned core error payload. crate/Cargo.toml:5-22 selects the package, empty default features, and checked-overflow profiles. The configuration and fresh build are independently reproduced in setup-reproduction.txt. Visibility, derives, and bounds ------------------------------- upstream/dec2flt/mod.rs:90 versus crate/dec2flt/mod.rs:90 changes only the visibility of the existing BiasedFp import so a goal-facing caller can name the same type. It changes neither layout nor execution. upstream/dec2flt/common.rs:68 and decimal.rs:28 and decimal_seq.rs:17 include Debug derives. The corresponding crate spans common.rs:48-51, decimal.rs:28-31, and decimal_seq.rs:17-20 remove only Debug. Copy, Clone, PartialEq, Eq, and Default used by computation remain where present, and no accepted observation formats these records. upstream/traits.rs:11-52 versus crate/traits.rs:11-64 removes formatting from Int, removes a redundant Copy supertrait from CastInto, and instantiates Int only for u64. Every call of CastInto is through Int, which still requires Copy; all retained concrete values are primitive Copy values. The removed u16/u32 instances are associated only with the disabled f16/f32 formats. upstream/traits.rs:55-76 versus crate/traits.rs:67-80 removes Add, Debug, PartialEq, PartialOrd, Default, and Clone from Float while retaining Copy, Mul, Div, and Neg. A search of all retained generic bodies shows no call using a removed operation. upstream/dec2flt/decimal.rs:56-89 versus crate/dec2flt/decimal.rs:59-111 and upstream/dec2flt/mod.rs:209-256 versus crate/dec2flt/mod.rs:352-520 add direct Div, Mul, and Neg bounds already implied by Lemire -> Float, and replace operator notation with calls to those same traits. Rust desugars the original /, *, and unary - to these trait calls, so the operands, call order, result, and admitted f64 specialization are unchanged. Exact constants, tables, and specialized decoding ------------------------------------------------- The source formulae and decimal-literal table were evaluated directly by the pinned rustc using the retained source reference/model-evidence/adaptation-constants-probe.rs. The command was: R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc P=reference/model-evidence/adaptation-constants-probe.rs B=.trellis/scratch/adaptation-constants-probe "$R" --edition 2024 --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B" sha256sum "$P" "$B" "$B" The source hash was b5a4a2cba0c08053cb9a816adb1ba5dbd160bf3928bdf5ccf56b7ae83aaa2aa5 and the resulting executable hash was b02d2f6deb675f17d0dbdc22e57a67d7692689f7a2b0d7b125556c35c4b8a4a5. Raw output was: largest_power_of_ten=308 max_exponent_fast_path=22 max_exponent_disguised=37 neg_nan=fff8000000000000 pow10_0=3ff0000000000000 pow10_1=4024000000000000 pow10_2=4059000000000000 pow10_3=408f400000000000 pow10_4=40c3880000000000 pow10_5=40f86a0000000000 pow10_6=412e848000000000 pow10_7=416312d000000000 pow10_8=4197d78400000000 pow10_9=41cdcd6500000000 pow10_10=4202a05f20000000 pow10_11=42374876e8000000 pow10_12=426d1a94a2000000 pow10_13=42a2309ce5400000 pow10_14=42d6bcc41e900000 pow10_15=430c6bf526340000 pow10_16=4341c37937e08000 pow10_17=4376345785d8a000 pow10_18=43abc16d674ec800 pow10_19=43e158e460913d00 pow10_20=4415af1d78b58c40 pow10_21=444b1ae4d6e2ef50 pow10_22=4480f0cf064dd592 upstream/traits.rs:134-137 computes LARGEST_POWER_OF_TEN through a Float default, and upstream/traits.rs:175-193 gives the generic integer_decode and the helper used by that constant. crate/traits.rs:146 makes the constant an associated requirement; crate/traits.rs:309-359 supplies the retained f64 values and decoder after substituting BITS=64, SIG_BITS=52, EXP_BIAS=1023, EXPONENT_MASK, MANTISSA_MASK, and the u64 operations. Each source expression then becomes exactly the corresponding crate expression: sign is bits>>63, exponent is (bits & mask)>>52 cast to i16, the subnormal mantissa is shifted once, the normal mantissa receives 1<<52, and 1023+52 is subtracted. The resulting tuple and every bit operation are unchanged. The probe output above shows that the computed f64 LARGEST_POWER_OF_TEN is 308 and that the source -f64::NAN word is fff8000000000000, exactly crate/traits.rs:315-327; the independent binary64-boundary.txt record fixes the masks and primitive bit semantics used by the decoder. upstream/dec2flt/mod.rs:118-129 gives the two Lemire default formulae. crate/dec2flt/mod.rs:115-128 makes them associated requirements, and the retained f64 instance at crate/dec2flt/mod.rs:217-220 supplies 22 and 37, the integer results of the two source formulae for 53 significand bits. upstream/dec2flt/mod.rs:176-181 indexes a 32-entry f64 table with exponent&31. crate/dec2flt/mod.rs:222-251 performs the same masked selection using from_bits: cases 0 through 22 are the exact pinned binary64 words printed above for 1e0 through 1e22 and all other cases return positive zero, as did entries 23 through 31. The full word list and the pinned float semantics are recorded in binary64-boundary.txt. The analogous f16/f32 replacements at crate/dec2flt/mod.rs:145-215 and crate/traits.rs:187-307 lie under cfg(any()) and cannot enter this build. Whole-function from_u64 opacity ------------------------------- upstream/dec2flt/mod.rs:184-188 and crate/dec2flt/mod.rs:263-266 have the same f64 body: the same enabled debug_assert that v <= 1<<53, followed by the same primitive `v as f64` cast. The sole semantic-boundary annotation is #[charon::opaque] at crate line 262, syntactically attached to the function item. It therefore hides the entire from_u64 body from translation: neither the debug assertion nor the cast is transparent in the extraction. The callers, their guards, and the surrounding native-path computation remain transparent. The fresh external inventory contains the whole method as the single external F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64. Its separately reviewed ModelF64FromU64 binding supplies exactly successful integer conversion for v <= 2^53 and assertion failure otherwise. Digit scans, slice patterns, and helper extraction ------------------------------------------------- upstream/dec2flt/common.rs:14-53 supplies ByteSlice::parse_digits: repeatedly split_first, wrapping-subtract ASCII zero, invoke the closure exactly when the result is below 10, consume that byte, and stop at the first other byte. crate/dec2flt/common.rs:11-36 removes only this method. Its complete set of uses is replaced as follows. * upstream/dec2flt/parse.rs:31-48 versus crate/dec2flt/parse.rs:31-58 keeps the eight-byte loop, wrapping multiply/add, and then performs the same digit test, accumulator update, and one-byte progress with an index. The local rename num to chunk is lexical only. * upstream/dec2flt/parse.rs:83-97 versus crate/dec2flt/parse.rs:131-153 expands matches!/parse_digits into the same nonempty first-digit guard, the same 0x10000 bounded exponent update, the same first-nondigit suffix, and the same final sign. The bound is tested before each checked multiply and addition, exactly as in the closure. * upstream/dec2flt/decimal_seq.rs:220-295 versus crate/dec2flt/decimal_seq.rs:231-359 extracts parse_digits_into_seq, parse_decimal_exponent, and count_trailing_zeros. The digit helpers use the same wrapping byte test, forward order, try_add_digit state transition, and 0x10000 exponent guard. The reverse helper visits indices consumed_len-1 down to zero, increments only for ASCII zero, ignores a decimal point, and stops at the first other byte, exactly the original iter().rev() loop. In all these replacements, indexing occurs only under count