Repository navigation
refactor(view,queryplan): read the lowered graphs by id - #2335
Merged
Merged
Conversation
The behaviour views, the debug locators and the query compiler's declared result walk the lowered graphs through their id-addressed accessors and reach a declaration through the graph's provenance. No tree field is removed, and neither package gains a syntax/ast forbidden edge: both still read declarations and query syntax. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…yplan-off-tree Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # internal/ir/view/behavior_forms.go
Endpoints resolve by name resolution only, so the fork written in a region names its branch targets by feature chain and forks into a nested parallel state; the fixture now holds two parallel states, four graph-only region states. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…yplan-off-tree The action-flow swimlanes develop added are laid over the id-based walk: a lane holds every node its performer performs, keyed by the node the walk draws for each id. Co-Authored-By: jason.han <hanhuijun@gmail.com>
3 of 6 tasks
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…thout source Co-Authored-By: jason.han <hanhuijun@gmail.com>
5 of 6 tasks
An accept written `accept :> fall.touchdown` recorded that it subsets something but no name, so a rendering holding no source labelled it `accept :>`. The trigger record now carries one name per link and the label joins them as the notation does. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
The trigger record joined name segments by hand, dropping a `$::` root and reading a quoted `::` as a separator. It now holds the notation's own spelling, which the label writes as it stands. Co-Authored-By: jason.han <hanhuijun@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Part of the "consumers off the tree" step of the execution-IR migration (
docs/internals/execution-ir-design.md): the behaviour views, the debug locators and the query compiler read the lowered graphs by id and through lower-side records, so that the later step can delete the tree-typed fields of the graphs without touching them.Stacked on #2264, which is stacked on #2257. Merge order: #2257 → #2264 → this; it retargets to
developas they merge.internal/ir/view:behavior.go,behavior_forms.goandlocate.gowalk the action and state graphs through their id-addressed accessors (program.StateID,program.RegionID,program.VertexRef,lower.FlowNode) and take text from anExtentrather than from a tree node. The state locator answers by id as well as by declaration, and gives no answer for a graph-only state that owns a parallel state's region.internal/ir/lower:graph_declared.gohands a reader that attaches to declarations the declaration behind an id or record and the document it was written in, and says where a guard, value, condition or message was written;Triggeringraph_sites.goalso carries the signal, operation, payload name and subsetting. These are additive; no tree field is removed.internal/ir/queryplan: the compiler's declared result reads alower.Returnand alower.Bindingthrough their accessors.Behaviour is unchanged: every rendering and every locator answer is the same.
Neither package gains a
syntax/astforbidden edge intests/hygiene. Both still read the tree legitimately: views attach origins, geometry and styling to declarations, and the query compiler compiles query syntax.How it was verified
internal/exec/runtime/testdata/conformance,internal/exec/smt/testdata,examples/(downloaded corpora included), the analysis and view test data andtests/testdata, 12,823 behaviors, comparing a digest of the rendering or the error text between the base head and this one: no difference. The same sweep over the locators' answers: no difference.internal/ir/lower/graph_declared_test.go(the new accessors) andinternal/ir/view/locate_ids_test.go(the locator by id; graph-only region owners answer for no node, which fails when the locator treats every state as drawn).go build ./...,go vet ./...,gofmt -l .(empty),make lint,go test ./...with the training, pilot and specification-example corpora required (140 packages ok),go test -C tools ./...,go test ./tests/hygiene,make docs-counts,make spec-compliance-check,make changelog-check,make wasm-check.pilot-xpect -check: 432 files, 1299 agree, 30 disagree.tests/wasm.go run -C tools ./cmd/pilot-diff -checkfails identically on develop; re-recorded by chore(baselines): re-record the pilot differential for the KerML declaration keyword error #2323.pilot-apijson-diff -checkandderived-census -check -require-exporterpass; nothing is re-recorded here.REPLEvalExpr7.084 ms → 6.942 ms (, p=0.105);, p=1.000);GRPCEvaluate14.44 µs → 14.71 µs (ConnectEvaluateHTTP114.6 µs → 118.3 µs (~, p=0.393); allocations per op unchanged.Checklist
make testandmake lintpass locallychanges/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.md(nothing user-visible changes)make docs-countsrun if a gate count moved (compliance rows need nothing: the census is counted at docs build) (none moved)F4,K5) in the body, docs, or changelog🟢 Devin Review found nothing to fix · View findings · Follow Devin's work