Repository navigation
feat(view): render GridView relationship matrices - #884
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Runtime verification at 29a7ea1:
Document output: the HTML table scrolls horizontally, and every column is reachable. The default WeasyPrint PDF fits the table on a landscape page, but the title and caption land on separate portrait pages.
Known limitation: with the optional
|
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>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
4ede181 to
41300c8
Compare
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…tionship-matrix Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # docs/reference/lsp.md
…tionship-matrix Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # .agents/skills/testing-pilot-corpora-gate/SKILL.md # .agents/skills/testing-pilot-differential/SKILL.md # .agents/skills/testing-pilot-execution-referee/SKILL.md # .agents/skills/testing-pilot-xpect/SKILL.md # README.md # docs/internals/architecture.md # docs/project/pilot-differential-baseline.json # docs/project/pilot-differential.md
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…tionship-matrix Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # docs/project/pilot-differential-baseline.json
Co-Authored-By: jason.han <hanhuijun@gmail.com>
|
This branch now conflicts with
To resolve: merge current Planned merge order for the view and docs PRs: #889 → #881 → #871 → #882 → #884 → #885 → #886. Each needs these files regenerated again after the one before it merges. Re-run the full gate ( |
|
Hold on pushes: please don't push to this branch, including |
…tionship-matrix Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # .agents/skills/testing-pilot-corpora-gate/SKILL.md # .agents/skills/testing-pilot-differential/SKILL.md # .agents/skills/testing-pilot-execution-referee/SKILL.md # .agents/skills/testing-pilot-xpect/SKILL.md # README.md # docs/internals/architecture.md # docs/project/pilot-differential-baseline.json # docs/project/pilot-differential.md
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>
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>
…tionship-matrix Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # .agents/skills/testing-pilot-corpora-gate/SKILL.md # .agents/skills/testing-pilot-differential/SKILL.md # .agents/skills/testing-pilot-execution-referee/SKILL.md # .agents/skills/testing-pilot-xpect/SKILL.md # README.md # docs/internals/architecture.md # docs/project/pilot-differential-baseline.json # docs/project/pilot-differential.md # docs/project/spec-compliance.md # docs/project/view-rendering-forms.md # docs/reference/cli.md # docs/reference/lsp.md # docs/reference/repl-commands.md # examples/self-model/surfaces.sysml # internal/ir/view/d2_test.go # internal/ir/view/view.go # tests/corpus/testdata/api_json_roundtrip_expected.txt # tests/corpus/testdata/corpus_roundtrip_expected.txt
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…tionship-matrix Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # docs/project/pilot-differential-baseline.json
…tionship-matrix Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # README.md # docs/internals/architecture.md
Co-Authored-By: jason.han <hanhuijun@gmail.com>
What and why
StandardViewDefinitions::GridViewgeneralises tabular views and "relationship matrix view, e.g. presenting allocation or dependency relationships", but everyGridViewrendered as the element table. This adds amatrixrendering kind that a standardGridViewselects with a standard element filter that names a relationship metaclass.Selector. A view whose kind comes from
GridView(directly, throughgrv, or through a view definition specialising it) becomes a matrix when a positive, resolved@Tin its own or inheritedfiltermembers, or in the[...]clause of its own or inheritedexposes, names one of these:SysML::SatisfyRequirementUsagesatisfySysML::VerificationCaseUsage,SysML::VerificationCaseDefinitionverifySysML::AllocationUsageallocateSysML::ConnectionUsageconnect,allocate,deriveSysML::InterfaceUsageconnectSysML::Dependencydependency,refineModelingMetadata::Refinement(or a specialisation)refineRequirementDerivation::DerivationMetadata(or a specialisation)deriveAn unfiltered
GridView,render asElementTable, a selector undernot, or any other@Trenders the same table it renders today, byte for byte. No OpenSysML library vocabulary is added.Shape. Rows are relationship sources and columns are targets, both in first-appearance order. A cell holds the kind keywords of the edges between that pair, deduplicated and comma-joined in the fixed order
satisfy, verify, allocate, connect, derive, refine, dependency. Each relationship element gets its most specific keyword: a derivation connection isderive, notconnect, and a#refinementdependency isrefine, notdependency. A#derivationconnection definition contributesderiveedges from its original to its derived requirement definitions. Relationships come from the exposed members and their owned members, named and unnamed, down to the tree depth limit. Exposed elements that contribute no shown edge are listed in a notice. An empty matrix reports why it is empty.Unnamed members. A matrix needs unnamed relationships such as
satisfy r1 by vehicle;, whichexposeenumeration previously skipped. The newModel.ExposedMembersadmits them through the same visibility and filter checks. Only the matrix uses it;ExposedElementsand every other rendering are unchanged.One edge implementation. The per-element edge extraction for connection, allocation, satisfaction, verification, derivation and refinement moves from
internal/doc/queryexecintosemantics.Model.RelationshipEdgesOf, which also addsdependency(client × supplier). Documentrelatedqueries now delegate to it, with unchanged behaviour.Surfaces. The kind is written in text, Markdown, CSV and TSV, and in HTML/PDF document tables. Mermaid, DOT, PlantUML and D2 are refused with the same typed wrong-form error as
table, so there is no graph output to screenshot; a matrix in a document stays a table whichever-diagram-formis chosen. It works through CLI-render,-render-formand-render-all, REPL%render, LSP render requests, the engine's and gRPCRenderViewcalls (columns and rows, as for tables), and documentDiagramblocks. A#matrix/#matrix:<target>pseudo-view shows every relationship kind without a declared view; the engine and gRPC, having no current document, need the targeted form. A filteredGridViewis classified as a matrix before any GeneralView specialisation, so the case, mixed, requirement, definition and package kinds never take it.Engine size budget.
engineGzipBudgetis restored to 7.7 MB, the size #871 approved, because a #886 merge lowered it in error.Specification basis
SysML v2 §10.2 leaves rendering to tools. The selection uses only standard constructs:
StandardViewDefinitions::GridViewand element filters (SysML v2 7.4.4, 8.3.26). The unnamed-member enumeration follows KerMLvisibleMemberships, which includes unnamed memberships. A new "GridView Relationship Matrix" section was added todocs/project/spec-compliance.md, and the view-rendering row now mentions the matrix.How it was verified
#derivationconnection, a#refinementdependency and a plain dependency, including a cell holding two kinds.grv,render asElementTable,not, an unknown selector (output equals the ordinary table) and a mixed selector. Empty-matrix cases cover both "exposes nothing" and "exposes nothing related".RelationshipEdgesOfandExposedMembers. The existingqueryexectests pass unchanged.matrix/#matrix, plus the self-model kind counts.examples/gridview-relationship-matrix.sysmlandinternal/ir/view/testdata/matrix.sysmlreport 0 errors with the pinned pilot validator. Adding the example moves the pilot-differential and RDF corpus figures, which were regenerated withmake docs-counts.go build ./...,go vet ./...,gofmt -l .,go test ./...,make docs-check,make docs-counts,make man-check, changelog check,pilot-diff -check,make wasm-check, and the training, pilot, pilot-XMI, PSSM, Reference-FMU and RDF round-trip corpus gates.Checklist
make testandmake lintpass locallychanges/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (compliance rows need nothing: the census is counted at docs build)F4,K5) in the body, docs, or changelogLink to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/46342299cdf646fc9938a7a402c65611
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/46342299cdf646fc9938a7a402c65611?variant=devin
Requested by: @HuiJun