Skip to content
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
dd6a1aa
WIP: R3 Evaluator
briansrls May 5, 2026
418336f
Merge remote-tracking branch 'origin/main' into session/merry-gull-128
briansrls May 5, 2026
757e084
WIP: R3 Evaluator
briansrls May 5, 2026
3337f8c
Merge remote-tracking branch 'origin/main' into session/merry-gull-128
briansrls May 5, 2026
b62b9e1
test(v3): keep T-Demo suite visibility coverage fast
briansrls May 5, 2026
1ca6d17
WIP: R3 Evaluator
briansrls May 5, 2026
3db50b9
test(v3): require non-empty T-Demo suite claims
briansrls May 5, 2026
0d571e0
WIP: R3 Evaluator
briansrls May 5, 2026
216c7c5
test(v3): sample T-Demo canonical suite runner execution
briansrls May 5, 2026
1ef451f
WIP: R3 Evaluator
briansrls May 5, 2026
ce0517e
Merge remote-tracking branch 'origin/main' into session/merry-gull-128
briansrls May 5, 2026
6f04237
Merge remote-tracking branch 'origin/main' into session/merry-gull-128
briansrls May 5, 2026
70035e6
Merge remote-tracking branch 'origin/main' into session/merry-gull-128
briansrls May 5, 2026
aad9518
Merge remote-tracking branch 'origin/main' into session/merry-gull-128
briansrls May 5, 2026
5c98a0c
docs: use symbol anchors in G0d brief
briansrls May 5, 2026
ee07134
Merge remote-tracking branch 'origin/session/merry-gull-128' into ses…
briansrls May 5, 2026
69c1b85
WIP: R3 Evaluator
briansrls May 5, 2026
407da8a
docs: fix nullary variant lowerer anchor
briansrls May 5, 2026
da3dfc6
Merge remote-tracking branch 'origin/main' into session/merry-gull-128
briansrls May 6, 2026
61c90a6
Merge remote-tracking branch 'origin/main' into session/merry-gull-128
briansrls May 6, 2026
9755c34
Merge remote-tracking branch 'origin/main' into session/merry-gull-128
briansrls May 6, 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
26 changes: 13 additions & 13 deletions docs/briefs/r3-pr-e6-g0d-constructor-runtime-execution-worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ E6-G0c made `TransformTarget::Callable(decl)` executable only when `decl`
resolves to an Arrow with a `UserDefined` body. The current evaluator branch
fails closed on every non-Arrow callable target:

- `src/v3/compiler/src/lib.rs:579-585` reads
- `src/v3/compiler/src/lib.rs` `eval_transform_node` reads
`dag.declaration(callee_decl).connective`, accepts only
`TypeConnective::Arrow { body, .. }`, and otherwise returns
`BadTransformOperands { reason: "Callable target declaration is not an Arrow type" }`.
Expand All @@ -48,33 +48,33 @@ Two lowered constructor families reach `TransformTarget::Callable(target)`:
- `lower_record_literal_expr` resolves the expected record type to a
`Conj`, orders inputs by the declaration's `children` labels, lowers each
field expression against its field type, then calls
`lower_constructor_invocation(dag, target_decl, inputs, span)` at
`src/v3/compiler/src/lower.rs:6442-6534`.
`lower_constructor_invocation(dag, target_decl, inputs, span)` in
`src/v3/compiler/src/lower.rs` `lower_record_literal_expr`.
- `lower_constructor_invocation` emits
`Behavior::Transform(TransformNode { target:
TransformTarget::Callable(target), inputs, ... })` at
`src/v3/compiler/src/lower.rs:6331-6347`.
TransformTarget::Callable(target), inputs, ... })` in
`src/v3/compiler/src/lower.rs` `lower_constructor_invocation`.
- The `target_decl` here is the record / Conj declaration, not an Arrow.

2. **Variant constructors.**
- Nullary variants can enter through `SurfaceExpr::Var` when the expected
type is a sum: `resolve_expected_variant_constructor(...)` followed by
`lower_constructor_invocation(..., Vec::new(), ...)` at
`src/v3/compiler/src/lower.rs:5846-5852`.
`lower_constructor_invocation(..., Vec::new(), ...)` in
`src/v3/compiler/src/lower.rs` `lower_expr`.
- Named variant-record constructors enter through
`lower_variant_record_expr`: the lowerer resolves the variant declaration,
reads payload field labels/types via
`variant_payload_fields_for_lowering`, orders payload inputs by those
declared labels, and calls `lower_constructor_invocation(dag,
variant_decl, inputs, ...)` at
`src/v3/compiler/src/lower.rs:6537-6614`.
variant_decl, inputs, ...)` in
`src/v3/compiler/src/lower.rs` `lower_variant_record_expr`.
- `variant_payload_fields_for_lowering` gets the payload fields by walking
the variant declaration to a `Conj` and preserving child labels at
`src/v3/compiler/src/lower.rs:5761-5779`.
the variant declaration to a `Conj` and preserving child labels in
`src/v3/compiler/src/lower.rs` `variant_payload_fields_for_lowering`.
- Variant membership is not inferred from "walks to `Conj`" alone. The
lowerer resolves constructor identity through
`resolve_expected_variant_constructor`, which checks the parent
`TypeConnective::Disj { variants }` list (`src/v3/compiler/src/lower.rs:6703+`).
`TypeConnective::Disj { variants }` list in `src/v3/compiler/src/lower.rs`.
For generic sums, that resolver may materialize an
`Instantiation { template: variant_decl, arguments }`; E6-G0d must
preserve that instantiation instead of checking only the outer
Expand All @@ -87,7 +87,7 @@ accepted by the lowerer, evaluate it into the existing runtime `Value` carrier.

## Runtime Output Contract

Use only the live evaluator carriers in `src/v3/compiler/src/lib.rs:71-87`:
Use only the live evaluator carriers in `src/v3/compiler/src/lib.rs`:

```rust
Value::RecordValue(Vec<NamedField>)
Expand Down
Loading