Skip to content

Execute existing Whale floating lowering against the bounded upstream scalar interpreter #997

Closed

Description

@LunaStev

Motivation

Wave already lowers f32/f64 arithmetic, comparisons, truthiness, sign-bit negation and numeric conversions, but its locked upstream integer interpreter cannot directly execute those floating operations. The negation tests use an integer-carrier projection. Official Whale now supplies bit-exact floating scalar execution and conversion semantics, allowing actual emitted floating IR to be checked without claiming native backend parity.

Starting points: current floating negation tests, bounded oracle helpers, and official floating contract. Upstream source and API were read; this audit did not execute Wave floating IR on the newer dependency.

Scope

After the official dependency adaptation in #996, add direct execution tests for Wave's existing floating subset using the generated, reader-verified module and upstream's bounded scalar interpreter. Use independent exact-bit or rational expectations where rounding matters. Preserve Wave's f32 default, frontend materialization width and explicit conversion chains. Verify the Wave/upstream NaN policies before selecting exact-bit versus classification assertions.

Keep #939 decimal literal double rounding separate: oracle tests must not hide it by deriving expected results from the same f64 intermediary. This is focused validation under umbrella #773, not completion of it. No native execution CLI, new floating type, floating optimization or contributor-owned bool-to-float #909 implementation is included.

Completion criteria

  • Direct generated floating IR executes under explicit step/IR/memory/call budgets, without integer-carrier substitution.
  • Cases cover f32/f64 arithmetic and comparison, signed zeros, infinities/NaNs, subnormal/rounding boundaries, ordered conversions, checked float-to-int traps and short-circuit effects.
  • Expected results come from independent fixtures/oracles, and unsupported cases remain explicit diagnostics.
  • Test reports/documentation distinguish interpreter execution from native Whale parity and link the separate dependency adaptation.

Activity

  1. added
    enhancement
    help wanted
    on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions