Skip to content

selfhost: port range sums and overload compatibility core to Flow - #660

Merged
godofecht merged 4 commits into
mainfrom
selfhost/port-range-overload-core
Aug 21, 2026
Merged

godofecht merged 4 commits into
mainfrom
selfhost/port-range-overload-core

Conversation

@godofecht

ghost commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Ports two deterministic Python compiler slices into the Stage-A Flow compiler:

  • src/flow/range_sums.py arithmetic progression normalization, closed-form sums, CRT intersection, and two-range union/intersection sum helpers -> compiler/src/range_sums.flow
  • src/flow/overload.py overload type-compatibility predicates, span/array/pointer compatibility, capability compatibility, primitive/int vocabulary, and integer-literal widening predicate -> compiler/src/overload.flow

The Python AST/object-graph layers remain the reference host for now; this PR moves the pure compiler logic first, matching the existing self-hosting strategy used by FIR/LSP/proof helper ports.

Adds direct Flow tests under tests/lang/ for ascending/descending ranges, zero-step signalling, CRT intersections, union sums, pointer/array/span compatibility, null pointer adoption, capabilities, and literal widening.

Bootstrap note: these are new modules and are not imported by compiler/src/main.flow, so the checked-in Stage-A bootstrap should remain byte-identical; CI fixed-point verification is expected to confirm that before this leaves draft.

@godofecht
godofecht marked this pull request as ready for review August 21, 2026 19:47
@godofecht
godofecht merged commit d61dd66 into main Aug 21, 2026
21 checks passed
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