Skip to content

Reference evaluator, stdlib round 1: 217 functions from the chapters — 412/610 evaluated, 409 agree, abstains 434 to 198; exact float text; findings F7-F10 - #42

Merged
O6lvl4 merged 3 commits into
mainfrom
ref-stdlib-1
Aug 21, 2026

Conversation

@O6lvl4

@O6lvl4 O6lvl4 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

The stdlib long tail, first burn-down round (#10's standing ratchet).

Numbers over spec/wasm_cross + spec/programs (610 programs)

before after
evaluated by the reference 175 412
agree with the native target 171/172 409/412 — the 3 disagreements are all ADJUDICATED: F1 (named-arg order) and F10 ×2 (±0 min/max where 0.58.0 lags ratified ALS-T23), each under @ref-allow
evaluator faults 0 0
abstains (proofs/ref-abstain.toml, shrink-only) 434 / 154 classes 198 / 73 classes
stdlib functions implemented 17 217
λ_almd kernel 49/49 ×2 49/49 ×2

What lands

  • ref/src/fmtfloat.rs — the evaluator's own float text: exact big-integer Dragon4 shortest digits (ALS-T13), to_fixed as round-half-even on the exact binary value (ALS-T9), and correctly rounded decimal→binary64 for ANY digit count/exponent (ALS-T2, denormals and saturation included). Held to the host formatter/parser by two oracle tests over ~6,000 samples — the host appears only as a test oracle.
  • 217 stdlib functions written from ALS-S1..S6, T1..T24, C1..C10 and the fixtures those sections cite: T1's 25-code-point whitespace set, T5 full case mapping with the Final_Sigma rule, T6 termination aborts (division by zero, integer overflow, clamp/rotate/chunk messages), T8 parse grammars as pinned, T14/T16 mask and truncation doctrines, T23 zero-order min/max, T24 conversions, ADR-0006 first-err fallible callbacks in every HOF, in-place mutators.
  • Semantics corrections the corpus forced: bindings are shared slots (a closure's var write is observed outside — closure_captured_list_mutation, sort_by_call_count; a shadowing let stays frozen — ref_gleam_capture_shadow); propagation carries its polarity so an Option-returning pure fn propagates none as none (C-211, pure_bang_propagation); fan.any/fan.settle; checker-style nominal retag of anonymous records with a unique field set.

New findings (PARSER-NOTES F7–F10) — normative prose vs executable evidence, before any implementation is judged

  • F7 ALS-T16 says a negative count clamps 負→0; C-054's own fixture pins string.take(s, -1) = WHOLE (the as-usize doctrine). Prose and evidence disagree.
  • F8 ALS-S3's one vacuous-truth sentence covers five different lifts: is_alphanumeric("") = false, is_digit is ASCII-only and empty-false, is_whitespace("") = TRUE, is_upper/lower are Python-style.
  • F9 ALS-T8: int.parse trims the T1 Unicode whitespace set (T8 is silent); int.from_hex is not from_str_radix — lowercase 0x prefixes strip repeatedly (0x0x0x10 = 16), 0X does not, the sign may follow the prefix (0x-ff = -255).
  • F10 release 0.58.0 still applies the retired first-argument ±0 rule in min/max — @ref-allow tracks both fixtures until the pin advances (the T23 chapter already declares its suite files red).

🤖 Generated with Claude Code

O6lvl4 added 3 commits August 21, 2026 10:39
…shortest digits (ALS-T13), round-half-even to_fixed on the exact binary value (ALS-T9), correctly rounded decimal-to-binary64 for any digit count (ALS-T2); two host-oracle tests hold it to ~6000 samples, the host appearing only as the test oracle
…05/0006 rules — code-point strings with the T1 whitespace set and Final_Sigma, T8 parse grammars as the fixtures pin them (unicode trim, the real from_hex), T6 termination aborts, T14-T16 masks and truncation doctrines, T23 zero-order min/max, T24 conversions, first-err fallible callbacks, in-place mutators; bindings become shared slots (closure writes flow, shadowing freezes), propagation carries its polarity (Option channels, C-211), fan.any/settle, unique-field-set record retag
…ted, 409 agree with native, 0 faults); the T23 zero-order fixtures carry @ref-allow while 0.58.0 lags the ratified rule; PARSER-NOTES second pass records P14-P16 and findings F7-F10 (T16 vs C-054, S3 per-predicate lifts, T8's real grammars, the T23 lag)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant