Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
7c89510
integration: slice-2 (length->count) + marker derives
briansrls Jun 20, 2026
ad440de
integration: + bright-badger Measure (04_infer+05_emit) + eager-boar …
briansrls Jun 20, 2026
8b8fbb9
emit(import-completeness): authored imports for emitter-rendered symb…
briansrls Jun 20, 2026
c840cc6
integration: bring #5325 regen_stage0.rs languages_consumer_census mo…
briansrls Jun 20, 2026
d6b4c39
emit(List seed carrier): render List nominal as host Vec in seed bran…
briansrls Jun 20, 2026
239ff28
emit(Int generic-arg seed carrier): apply rust_seed_host_numeric_alia…
briansrls Jun 20, 2026
36348c8
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 21, 2026
a33c5ae
Merge origin/main into emitter/seed-green-integration (resolve emitte…
briansrls Jun 21, 2026
8c1dd84
Merge origin/main (#5476) into emitter/seed-green-integration
briansrls Jun 21, 2026
0a069ec
Re-ignore machine_width emit test: committed seed not yet regenerated
briansrls Jun 21, 2026
2018cd8
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 21, 2026
9cf103f
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 21, 2026
cb921c1
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 21, 2026
eeec49e
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 21, 2026
65e1f83
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 21, 2026
c0f35e0
Add lexer-layer host builtins to v2 interpreter (chars/chars_to_strin…
briansrls Jun 21, 2026
4a8afdd
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 21, 2026
63eba0e
Interpreter spike: additive record-form-map + list_push method dispatch
briansrls Jun 21, 2026
5f9d24c
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 21, 2026
6a9e5db
Merge remote-tracking branch 'origin/main' into emitter/seed-green-in…
briansrls Jun 21, 2026
6f0c583
Merge remote-tracking branch 'origin/main' into emitter/seed-green-in…
briansrls Jun 21, 2026
dd81e67
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 22, 2026
2d0df5e
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 22, 2026
be52559
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 22, 2026
23015bb
Route-A class 1/6: correct splice dissolution pointer to adhoc-1bdd02…
briansrls Jun 22, 2026
ffb12b4
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 22, 2026
fc5a9ec
Route-A: rustfmt the fixture-lever mirror splice (CI fmt gate)
briansrls Jun 22, 2026
8961054
Merge remote-tracking branch 'origin/main' into emitter/seed-green-in…
briansrls Jun 22, 2026
751dfa9
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 22, 2026
f5bef4a
WIP class-3 computation layer: corpus_repr single authority (inert, .…
briansrls Jun 22, 2026
aeb61f6
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 22, 2026
e5b0ca0
Revert "WIP: Section 5 self-host execution manager: Lane A drive the …
briansrls Jun 22, 2026
6cf05a7
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 22, 2026
dee71b3
Revert "WIP: Section 5 self-host execution manager: Lane A drive the …
briansrls Jun 22, 2026
8f95dc3
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 22, 2026
86f71b0
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 22, 2026
675046c
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 22, 2026
bedc415
Section 5 self-host: thread corpus-global RustCorpusRepr selector thr…
briansrls Jun 22, 2026
ca4d06e
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 22, 2026
c725862
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 22, 2026
6525026
Restore known-good stage0 seed (revert premature regen); keep .dag cl…
briansrls Jun 22, 2026
ad010f6
WIP: Section 5 self-host execution manager: Lane A drive the emitted …
briansrls Jun 22, 2026
9757de2
Restore known-good stage0 seed (auto-committed local regen reverted a…
briansrls Jun 22, 2026
6d37177
Merge remote-tracking branch 'origin/main' into emitter/seed-green-in…
briansrls Jun 22, 2026
e6d38e6
class-3 review fix: correct §6 dissolution-direction comment (src/v1 …
briansrls Jun 22, 2026
588bcc6
Merge remote-tracking branch 'origin/main' into emitter/seed-green-in…
Jun 22, 2026
3b28498
PATH A — land class-3-embodying cargo-green seed via overlay-3-committed
Jun 22, 2026
1ca2ab8
PATH A carrier-mark: append quick-seal's representation-invariance ca…
Jun 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dsl/extdeps/rust/cargo.dag
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
module extdeps.cargo

import extdeps.cargo_version { CargoPackageVersion, CargoVersionRequirement, CargoToolVersionFloor }
import extdeps.version.semver { SemVerConstraint }
import std.types { FilePathParts }

// -- Edition -------------------------------------------------------
Expand Down
6 changes: 5 additions & 1 deletion dsl/product/compute_fabric.dag
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import std.measure {
HardwareThreadCount,
byte_size,
byte_size_count,
measure_count,
hardware_thread_count,
hardware_thread_count_value,
hertz,
Expand Down Expand Up @@ -151,7 +152,10 @@ fn money_micros(count: Nat) -> MoneyMicros {
}

fn money_micros_count(m: MoneyMicros) -> Nat {
m.count
// Cross-module Measure alias (MoneyAmount<Micro>): `.count` only peels where
// Measure is local, so route through the generic std.measure.measure_count
// accessor (same pattern as bandwidth_count in hardware_selection).
measure_count(m: m)
}

type ProviderIdentity = NonEmptyStr where brand("ProviderIdentity")
Expand Down
5 changes: 4 additions & 1 deletion dsl/product/hardware_selection.dag
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ fn milliwatt(count: Nat) -> Milliwatt {
}

fn milliwatt_count(w: Milliwatt) -> Nat {
w.count
// Cross-module Measure alias (Measure<Power, Milli, Nat>): `.count` only peels
// where Measure is local, so route through the generic std.measure.measure_count
// accessor (same pattern as bandwidth_count below).
measure_count(m: w)
}

// === The decision point: five grounded axes ==============================
Expand Down
18 changes: 9 additions & 9 deletions dsl/std/measure.dag
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ fn gibibyte(count: Nat) -> Gibibyte {
}

fn gibibyte_count(g: Gibibyte) -> Nat {
g.count
measure_count(g)
}

fn gibibyte_to_byte_size(g: Gibibyte) -> ByteSize {
Expand Down Expand Up @@ -444,23 +444,23 @@ fn watt(count: Nat) -> Watt {
}

fn watt_count(w: Watt) -> Nat {
w.count
measure_count(w)
}

fn celsius(count: Int) -> Celsius {
Celsius { count: count }
}

fn celsius_count(c: Celsius) -> Int {
c.count
measure_count(c)
}

fn rpm(count: Nat) -> RevolutionsPerMinute {
RevolutionsPerMinute { count: count }
}

fn rpm_count(r: RevolutionsPerMinute) -> Nat {
r.count
measure_count(r)
}

// --- MoneyAmount<S>: price magnitude carrier ------------------------------
Expand Down Expand Up @@ -509,37 +509,37 @@ fn money_amount_micro(count: Nat) -> MoneyAmountMicro {
}

fn money_amount_micro_count(m: MoneyAmountMicro) -> Nat {
m.count
measure_count(m)
}

fn byte_size(count: Nat) -> ByteSize {
ByteSize { count: count }
}

fn byte_size_count(b: ByteSize) -> Nat {
b.count
measure_count(b)
}

fn bit_width(count: Nat) -> BitWidth {
BitWidth { count: count }
}

fn bit_width_count(b: BitWidth) -> Nat {
b.count
measure_count(b)
}

fn hertz(count: Nat) -> Hertz {
Hertz { count: count }
}

fn hertz_count(h: Hertz) -> Nat {
h.count
measure_count(h)
}

fn hardware_thread_count(count: Nat) -> HardwareThreadCount {
HardwareThreadCount { count: count }
}

fn hardware_thread_count_value(t: HardwareThreadCount) -> Nat {
t.count
measure_count(t)
}
25 changes: 24 additions & 1 deletion src/v1/04_emit_info.dag
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ type TypeSummary {
has_fn_fields: Bool
}

// RustCorpusRepr: which container/text REALIZATION HANDLER the Rust emitter
// selects for the WHOLE corpus. The spec is unchanged (List<e> = FreeMonoid<e>
// at std/types.dag; String) — this names WHICH of the §2 N handlers realizes it.
// It is a whole-CORPUS property, computed ONCE at the emit boundary
// (rust_corpus_repr in 05_emit_rust.dag) and threaded down as an individual
// emit-info field (like shared_types), never decided per-module: a corpus that
// bundles any v1 seed source (src/v1) emits the HOST representation end-to-end
// (§7 — the bootstrap seed is host: List→Vec, String, Nat/Int→i64); a pure v2
// target keeps the faithful FreeMonoid carrier. Selecting once and threading the
// selection makes per-module divergence UNWRITABLE (§5 construction-not-check).
// §6-TRANSITIONAL: HostNative dissolves when src/v1 is deleted (seed→0 ⇒ no seed
// source ⇒ rust_corpus_repr is FaithfulFreeMonoid uniformly).
type RustCorpusRepr = HostNative | FaithfulFreeMonoid

// EmitGraphInfo: the reconcile→emit boundary contract.
//
// Invariant: emit never calls back into infer. All data the emitter needs
Expand Down Expand Up @@ -78,6 +92,12 @@ type EmitGraphInfo {
// (no Consumed) and fan-out > 1. These can be passed by borrow (&Rc<T>).
read_only_params_index: Map<String, Set<String>>
read_only_params: Set<String>
// Corpus-global Rust container/text realization handler (§2 one-spec-N-handlers).
// Computed ONCE at the emit boundary (rust_corpus_repr) and read by the
// type-renderers' leaf gates (rust_seed_host_container_base / _numeric_alias /
// rust_named_type_base) so every module emits the SAME representation — the
// single authority for the host-vs-faithful selection. §6-transitional.
corpus_repr: RustCorpusRepr
}

type EmitInfoBuildState {
Expand All @@ -100,7 +120,10 @@ fn empty_emit_graph_info() -> EmitGraphInfo {
variant_to_enum: empty_map(),
owned_bindings: empty_set(),
read_only_params_index: empty_map(),
read_only_params: empty_set()
read_only_params: empty_set(),
// Default to the faithful v2-target carrier; emit_rust overrides to HostNative
// for a corpus that bundles v1 seed source (rust_corpus_repr, computed once).
corpus_repr: FaithfulFreeMonoid
}
}

Expand Down
18 changes: 17 additions & 1 deletion src/v1/04_infer.dag
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ import v1.compiler.infer_sigs {
import v1.compiler.infer_emit_info {
TypeRepr, StructRepr, EnumRepr,
TypeSummary, EmitGraphInfo, EmitInfoBuildState,
RustCorpusRepr, HostNative, FaithfulFreeMonoid,
empty_emit_graph_info, lookup_emit_type_summary,
build_struct_field_summaries, build_enum_field_summaries,
add_emit_item_summary, derive_variant_to_enum
Expand Down Expand Up @@ -6384,6 +6385,20 @@ fn build_positional_payload_variants(modules: List<TypedModule>, type_summaries:
)
}

// Corpus-global Rust representation selector (§2 handler selection). HostNative
// iff the corpus bundles any v1 seed source (src/v1) — then the whole crate emits
// the host representation (List→Vec, String, Nat/Int→i64) so the bootstrap seed
// compiles (§7); otherwise the faithful v2-target FreeMonoid carrier. Computed
// ONCE here (the single authority on EmitGraphInfo.corpus_repr); every emit site
// COPIES the field and the type-renderers READ it — never recomputed downstream,
// which is what makes per-module representation divergence unwritable (§5).
// §6-transitional: collapses to FaithfulFreeMonoid when src/v1 is deleted.
fn rust_corpus_repr(modules: List<TypedModule>) -> RustCorpusRepr {
let has_seed = modules |> any(m =>
map_keys(m.type_env.source_indices) |> any(k => contains(k, "/v1/") || contains(k, "src/v1")))
if has_seed { HostNative } else { FaithfulFreeMonoid }
}

fn build_emit_graph_info(modules: List<TypedModule>) -> EmitGraphInfo {
let init = EmitInfoBuildState {
type_summaries: empty_map()
Expand Down Expand Up @@ -6412,7 +6427,8 @@ fn build_emit_graph_info(modules: List<TypedModule>) -> EmitGraphInfo {
variant_to_enum: vtoe,
owned_bindings: empty_set(),
read_only_params_index: empty_map(),
read_only_params: empty_set()
read_only_params: empty_set(),
corpus_repr: rust_corpus_repr(modules: modules)
}
}

Expand Down
Loading