Skip to content

Port AutoStackingNumber behavior to Coderive and load via CodP-TAC artifacts#86

Closed
Copilot wants to merge 4 commits into
mainfrom
copilot/replace-java-with-coderive-classes
Closed

Port AutoStackingNumber behavior to Coderive and load via CodP-TAC artifacts#86
Copilot wants to merge 4 commits into
mainfrom
copilot/replace-java-with-coderive-classes

Conversation

Copilot AI commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

This change addresses the request to move Java-written Coderive class behavior into Coderive source, then execute it through the Java runtime using compiled CodP-TAC output.
It ports a representative AutoStackingNumber API surface and wires usage through .codb loading rather than relying only on Java class implementation.

  • Problem alignment

    • Introduces a Coderive-native implementation for behavior previously exercised from Java-side AutoStackingNumber logic.
    • Ensures the Coderive implementation is compiled to CodP-TAC and consumable by Java runtime import resolution.
  • Coderive class port

    • Added src/main/cod/std/math/AutoStackingNumber.cod.
    • Implemented core operations used in parity coverage: constructors/helpers (zero, one, minusOne, fromLong, fromDouble), arithmetic (add, subtract, multiply, divide, remainder, negate, abs), scale-by-power-of-two helpers (shiftLeft, shiftRight), compare, and pow.
    • Clarified shift helper semantics as arithmetic scaling (not bit-level shifts).
  • Parity harness in Coderive

    • Added src/main/cod/demo/src/main/test/autostackingnumber/AutoStackingNumberPortParity.cod.
    • Encodes expected results for integer and floating-point cases and reports PASS/FAIL per operation.
    • Uses unit-qualified calls (math.AutoStackingNumber.*) for consistent cross-unit resolution.
  • Compiled artifact loading path

    • Added generated artifacts/index entries so runtime can load the Coderive class from CodP-TAC output:
      • src/main/cod/demo/src/bin/math/AutoStackingNumber.codb
      • src/main/cod/demo/src/bin/test.autostackingnumber/AutoStackingNumberPortParity.codb
      • src/main/cod/demo/src/idx/test.autostackingnumber.toml
use {math}

share Demo {
    share main() {
        out(math.AutoStackingNumber.add(123456789, 987654321))
        out(math.AutoStackingNumber.pow(2, -2))
    }
}

Copilot AI and others added 4 commits April 11, 2026 19:41
Agent-Logs-Url: https://github.com/DanexCodr/Coderive/sessions/4e786e09-b5ef-4abc-a69f-6bd10a56a955

Co-authored-by: DanexCodr <216312766+DanexCodr@users.noreply.github.com>
@DanexCodr DanexCodr closed this Apr 12, 2026
@DanexCodr DanexCodr deleted the copilot/replace-java-with-coderive-classes branch April 16, 2026 12:46
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.

2 participants