Skip to content

feat(migrate): actors, use cases and requirements are usages; use case diagrams draw their associations, includes, extends and refines as connections - #1033

Merged
HuiJun merged 12 commits into
developfrom
feat/use-case-connections
Oct 10, 2026
Merged

HuiJun merged 12 commits into
developfrom
feat/use-case-connections

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

What and why

A migrated use case diagram was written as a view rendered asTextualNotation, so nothing it showed was drawn, and the lines it drew in v1 — actor associations, «Include», Extend, «Refine» — had no v2 member a tool can show as a line: they were actor usages inside a use case def, include use case members and dependency declarations between definitions. A connection is what tools draw, and a connection joins features, never definitions. A use case def plus a usage written beside it also showed up in a tool as two elements (two "Operator" actors on one diagram), and a trailing /* «include» */ comment as a note.

The migration now writes a use case model the way v2 users draw one:

  • A UML Actor is a part usage and a UseCase a use case usage, each in its owning package, carrying what the def held (subject, includes, extension points, the migrated behavior). No part def/use case def and no inner actor parameters, so each v1 element is one v2 element.
  • A «Requirement» is likewise a requirement <id> Name { doc … } usage, a nested requirement its subrequirement, a general one subset (requirement Safety :> Mass;). A «Satisfy»/«Verify» subsets it (satisfy requirement 'satisfy R' :> R;, or satisfy R; unnamed), a «DeriveReqt»'s connection def ends and a requirement-typed property subset it, and the document query engine reads a derivation def whose ends subset requirement usages. Requirement tables, matrices and «Requirement»-stereotype filters list the usages by name (Named) rather than WhereType(RequirementDefinition). An InstanceSpecification of a requirement is reported, as an individual cannot specialize a usage.
  • Each actor association, «Include», Extend and «Refine» becomes a connection between the two usages, named by its kind ('Operator to Control Instrument', 'A includes B', 'A extends B', 'A refines B'), hosted by the nearest package holding both ends; a relationship its author named keeps the name and carries its kind (and an extend's condition) as doc. No trailing comments.
  • A definition that is still a def (a block, action, …) gets one package-level usage only when a connection first names it; a named association's one usage is typed by its connection def (connection drives : Drives connect driver to vehicle;).
  • Use case diagrams are rendered asInterconnectionDiagram over those usages and connections with their Cameo geometry; the renderer draws use case and requirement usages as nodes and an include as the connection's line, not a nested node.
  • Classifier/Namespace/PackageableElement tables keep listing migrated actors, use cases and requirements by name; an Actor/UseCase table over a model without them lists the empty sequence.

Specification basis

SysML v2 textual notation: ConnectionUsage ends are feature references, so connections join usages; ConnectionDefinition is the v2 form of a KerML Association, so a named v1 Association maps to a connection def with its link as a connection usage. SatisfyRequirementUsage/VerificationCaseUsage objectives reference a requirement usage by subsetting. No row of docs/project/spec-compliance.md moves.

How it was verified

  • go build ./..., go vet ./..., gofmt -l . (empty), go test ./..., the transformation census (-measure, -check) and scripts/changelog.py check pass locally.
  • Goldens regenerated and reviewed: the changes are the usages and connections, requirement def → requirement, the :> satisfy/verify/derive forms, the Named requirement filters and the use case diagram views.
  • New tests: TestUsagesOnlyForConnectedDefinitions, TestRequirementsAreUsages (nested, specializing, typed-property, refine, satisfy and instance cases), TestExecuteRelatedDerivationDefinitions over ends subsetting usages; relationship, table, document and layout tests updated to the new forms.
  • A Cameo SysML v1 model with 4 use case diagrams (41 diagrams, 1124 elements): one part Operator;, all 4 use case diagrams render as graphs with every shown element positioned and every connector routed; the full output with the OpenSysML libraries inlined loads in the OMG pilot validator with 0 errors and 0 warnings.

Checklist

  • make test and make lint pass locally
  • Tests added or updated for the change
  • Documentation extended where it already covers the surface (see CONTRIBUTING.md)
  • Changelog entry added as changes/unreleased/<slug>.<section>.md, not as an edit to CHANGELOG.md
  • baselines regenerated and make docs-counts run if a gate count moved (compliance rows need nothing: the census is counted at docs build)
  • No internal work-item labels (waves, slices, F4, K5) in the body, docs, or changelog

Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/dbff7ccc1454416fb497412e51cf5513
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/dbff7ccc1454416fb497412e51cf5513?variant=devin
Requested by: @HuiJun

…xtends and refines as connections between usages

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

…nnection moves (77 mapped, 13 approximated)

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@HuiJun
HuiJun marked this pull request as ready for review October 9, 2026 21:34
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration Bot and others added 3 commits October 9, 2026 22:09
…connection names yield to package members; use case views expose an association end's usages

A dependency with several clients or suppliers now writes one connection per
client–supplier pair, each named distinctly and each exposed by the views
that show the dependency. A connection named after its relationship takes
the name only when no member of the package it is written in has it. A use
case view showing only an association end exposes the connection and both
usages it joins, and only use case views expose those usages.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…named by their kind

A UML Actor is written as a part usage and a UseCase as a use case usage
(subject, includes and behavior inside it), so each is one element a tool
draws once and a connection can join. Actor associations, includes, extends
and refines are connections named by their kind with no trailing comment,
an extend's points and condition as the connection's doc. The interconnection
renderer draws an include as the connection's line, not a nested node.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration Bot and others added 2 commits October 10, 2026 00:02
…actor and use case instances are reported, not individual usages; Classifier filters list use case usages

Co-Authored-By: jason.han <hanhuijun@gmail.com>
…nsus cites actorLink

A generic table over Classifier, Type, Namespace or PackageableElement no longer selects UseCaseUsage by type, which also matched use-case-typed properties and include usages; it names the written actor and use case usages (Named intersected with the scope) and unions them with the type rows. Actor and UseCase tables select the same way. The transformation census baseline cites actorLink and connectActor for the actor mappings, scoped to uml:Actor, with the fixture counts remeasured.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
devin-ai-integration[bot]

This comment was marked as resolved.

…ts no rows

typeFilter.query only calls Named when a usage is written; with none and no type to select, the rows are the scope less itself, since Named takes at least one name. The empty_classifier_tables fixture pins it.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration Bot and others added 2 commits October 10, 2026 00:55
…e rather than walking its scope twice

Co-Authored-By: jason.han <hanhuijun@gmail.com>
…fy, derive and refine join it directly

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration devin-ai-integration Bot changed the title feat(migrate): use case diagrams draw actor associations, includes, extends and refines as connections between usages feat(migrate): actors, use cases and requirements are usages; use case diagrams draw their associations, includes, extends and refines as connections Oct 10, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

…e relates its subject to it; an allocate to a requirement stays a dependency

Co-Authored-By: jason.han <hanhuijun@gmail.com>
devin-ai-integration[bot]

This comment was marked as resolved.

…every requirement it subsets or is typed by, aliases followed

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@HuiJun
HuiJun merged commit 792474f into develop Oct 10, 2026
26 checks passed
@HuiJun
HuiJun deleted the feat/use-case-connections branch October 10, 2026 04:56
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