Commit Graph
24 Commits
Author SHA1 Message Date
Chris Tate b4454e4572 Fix signed zero in integer boundary inference (#622) 2026-10-02 20:15:55 -05:00
Chris Tate 3f66c8e20b Make LLVM the sole production backend
- Remove C emission, debugging options, and automatic backend fallback.
- Complete LLVM lowering and native bootstrap coverage across supported targets.
- Link executables and libraries with precompiled C runtime packs, including iOS and Android.
2026-09-29 20:54:09 -05:00
Chris Tate 94fd361b54 Implement sparse native arrays and missing-value parity (#297)
Represent ordinary JavaScript arrays with hole, value, and explicit-undefined states; add sparse side storage and carry missing values through the frontend, native backends, runtime, and Node-facing consumers.
2026-09-12 22:39:07 -05:00
Chris Tate 469efdd7f0 refactor: clarify compiler module boundaries (#232)
* refactor: clarify compiler module boundaries

- Rename backend, frontend, IR, and cache modules for explicit ownership.
- Split native cache/vendor and frontend shared concerns into focused modules.
- Expand compiler context names and refresh imports, tests, and documentation.

* fix: preserve renamed compiler interfaces
2026-08-23 20:16:13 -05:00
Chris Tate 20f2d98fa3 fix(compiler): refine narrowed union payload fields (#84)
* fix(compiler): refine narrowed union payload fields

- Treat pure union discriminant reads as stable within compound guards.
- Cover payload-field range refinement in analysis and library builds.

* fix(compiler): preserve field facts across union discriminants
2026-08-02 19:37:32 -05:00
Chris Tate 9c49f6157c fix: coalesce same-class integer slot obligations
- Retain every declared path when structurally identical arms share a lowered record field.
- Keep differing-class collisions on SC4009 and cover both outcomes with regressions.
2026-07-30 22:24:59 -05:00
Chris Tate e7fd096d89 Refine stable numeric field paths
- Track ordinary record and class fields through stable guard expressions.

- Preserve conservative invalidation and add differential regression coverage.
2026-07-30 21:42:37 -05:00
Chris Tate d0b3e81a9b fix(library): preserve nested integer obligations 2026-07-30 20:32:37 -05:00
Chris Tate 7badeb3135 Refuse synthesized record name collisions 2026-07-30 20:11:10 -05:00
Chris Tate 73cb79ea52 Fix synthesized record attestations across composed arms 2026-07-30 19:50:21 -05:00
Chris Tate a4898f335d Prove integer writes to synthesized record slots
- Preserve tagged-union shape identity when mapping synthesized payload fields into integer inference.

- Refuse fractional writes on named-union and message payload slots, with regressions for both paths.
2026-07-30 19:31:48 -05:00
Chris Tate 650cbf23f3 Dissolve scalar aliases during sidecar projection
- Resolve scalar alias chains to their primitive wire types.

- Keep aliases out of the sidecar type table.

- Cover records, messages, helpers, and integer slots.
2026-07-30 15:09:55 -05:00
Chris Tate 4e9dc0e325 Fix empty-object integer attestations 2026-07-30 13:15:15 -05:00
Chris Tate 467ac81a86 Fix integer attestations across composed arms 2026-07-30 12:43:27 -05:00
Chris Tate 58412530fb Fix integer proof gaps in sidecar analysis 2026-07-30 12:09:04 -05:00
Chris Tate 018ba820e7 fix: preserve composed union arms in sidecar matching 2026-07-30 11:49:07 -05:00
Chris Tate b2007d75db fix: validate integer record facts safely 2026-07-30 11:25:53 -05:00
Chris Tate 6757c11af1 Match integer slots by structural shape 2026-07-30 10:31:52 -05:00
Chris Tate 9bdbf02079 Compose integer slots with optional numbers
- Project declared optional-number slots as optional<i64> and prove present numeric values across library boundaries.
- Refuse structurally colliding tagged-union obligations with an attributed SC4009 diagnostic.
2026-07-30 10:02:41 -05:00
Chris Tate 8a5bf62cf5 Refine guarded integer field reads
- Track canonical field paths through straight-line guards.
- Invalidate path proofs across calls, writes, suspension, and control-flow joins.
- Cover if and ternary proofs with Node-exact C and LLVM regressions.
2026-07-29 14:37:25 -05:00
Chris Tate 5e5d5bf8a9 Record declared u64 classes in the sidecar attestation and prove model/msg slot writes
- integer_slots now records each slot's DECLARED class ({i64, u64}); the i64 flattening narrows to the frozen format-1 TypeRef/descriptor spellings where unsigned-ness genuinely has no vocabulary, and the V1 self-check accepts both classes
- library builds declaring sidecar integer slots force-lower the designated init/update/subscriptions exports and every model-first contract helper, so record-field and msg-arm writes enter the prove-or-refuse boundary check instead of attesting from dead-stripped vacuity
- declared record-field reads seed their class shape (whole, class range), the assumption side of the slot contract: an unguarded counter increment now refuses RANGE with the teaching triple rather than a spurious may-be-NaN wholeness complaint
- profile-export param/return classes stay out of integer_slots by design — the attestation mirrors the document's own i64-spelled slots (the V10 bijection; abi.exports carries no TypeRefs) while an export's class is attested by the artifact's C signature under the same gate; the unconsumed-path refusal teaches this
- regressions added: u64 attests u64 while the TypeRef spells i64, unproven update writes into a declared model field refuse SC4022/SC4023 by slot path, and guarded writes prove and attest
2026-07-24 17:56:59 -05:00
Chris Tate 96ca45081d Drop an unused eslint directive in the ask-4 suite 2026-07-24 11:52:54 -05:00
Chris Tate 2c8e31b1ff Rendered snapshots for the integer-boundary refusal codes; dynamic-surface fixture re-based
- library-int suite snapshots SC4021/SC4022/SC4023 rendered end to end (slot path, evidence, span, fix) — the diagnostics-corpus discipline for codes the executable lane cannot reach
- dynamic-surface diagnostics fixture swaps Math.ceil for Math.sqrt (trunc/ceil compile statically now) and its snapshot regenerates
2026-07-24 11:52:12 -05:00
Chris Tate a2c68beadb The ask-4 conformance corpus end to end, with the sidecar attestation and inbound-trap fixtures
- tests/harness/library-int.test.ts: all 16 reference-corpus cases as library fixtures on both emissions — send/sendU64 are profile-mapped exports with i64/u64 params, PROVE cases pin every crossed value against the Node oracle (the test process runs the same case source), the counter loop crosses 0..9 in order, REFUSE cases name obligation, slot path, and evidence
- int-returns fixture: i64/u64 returns cross as real int64_t/uint64_t (9007199254740991, -0 as 0, -7 % 3 as -1, ToUint32 max on a u64 slot)
- int-trap fixture: inbound integers past 2^53-1 deliver the structured SC4012 host-contract trap with profile teaching/remediation; in-range extremes convert exactly
- Sidecar slots: integer_slots attestation in declaration order, declared slots spelled i64 (V10 bijection validated), unproven writes refused by slot path (Msg.count, helpers.clampIdx.return), unresolvable and non-number declarations refused SC4009, teachings ride SC4022 as attributed notes
- Layer-1 differential: no Layer-1 representation exists (trivially unobservable); pinned consequence — f64-declared vs i64-declared builds cross byte-identical values
- Integer-declared helpers join libRoots so their attestation covers a compiled body, never a dead-stripped vacuity
2026-07-24 11:39:43 -05:00