Repository navigation
feat(migrate): actors, use cases and requirements are usages; use case diagrams draw their associations, includes, extends and refines as connections - #1033
Merged
Conversation
…xtends and refines as connections between usages 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)".
|
…nnection moves (77 mapped, 13 approximated) Co-Authored-By: jason.han <hanhuijun@gmail.com>
HuiJun
marked this pull request as ready for review
October 9, 2026 21:34
…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>
…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>
…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>
…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>
…e relates its subject to it; an allocate to a requirement stays a dependency Co-Authored-By: jason.han <hanhuijun@gmail.com>
…every requirement it subsets or is typed by, aliases followed 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
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 wereactorusages inside a use case def,include use casemembers anddependencydeclarations between definitions. Aconnectionis 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:
partusage and a UseCase ause caseusage, each in its owning package, carrying what the def held (subject, includes, extension points, the migrated behavior). Nopart def/use case defand no inneractorparameters, so each v1 element is one v2 element.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;, orsatisfy R;unnamed), a «DeriveReqt»'sconnection defends 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 thanWhereType(RequirementDefinition). An InstanceSpecification of a requirement is reported, as an individual cannot specialize a usage.connectionbetween 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) asdoc. No trailing comments.connection def(connection drives : Drives connect driver to vehicle;).asInterconnectionDiagramover those usages and connections with their Cameo geometry; the renderer drawsuse caseandrequirementusages as nodes and anincludeas the connection's line, not a nested node.Specification basis
SysML v2 textual notation:
ConnectionUsageends are feature references, so connections join usages;ConnectionDefinitionis the v2 form of a KerML Association, so a named v1 Association maps to aconnection defwith its link as aconnectionusage.SatisfyRequirementUsage/VerificationCaseUsageobjectives 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) andscripts/changelog.py checkpass locally.requirement def→requirement, the:>satisfy/verify/derive forms, theNamedrequirement filters and the use case diagram views.TestUsagesOnlyForConnectedDefinitions,TestRequirementsAreUsages(nested, specializing, typed-property, refine, satisfy and instance cases),TestExecuteRelatedDerivationDefinitionsover ends subsetting usages; relationship, table, document and layout tests updated to the new forms.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 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/dbff7ccc1454416fb497412e51cf5513
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/dbff7ccc1454416fb497412e51cf5513?variant=devin
Requested by: @HuiJun