Skip to content

fix(migrate): an untyped property follows its tool's kind marker; unmarked, it is an attribute, or a part when composite - #1035

Merged
HuiJun merged 6 commits into
developfrom
fix/untyped-property-kind
Oct 10, 2026
Merged

HuiJun merged 6 commits into
developfrom
fix/untyped-property-kind

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

What and why

The SysML v1 migrator wrote every property without a type as ref x; (featureKeyword returned ref whenever t == nil). That ignored MagicDraw's property-kind markers — a «ValueProperty» with no type came out as ref x { /* applied stereotype «ValueProperty» */ }, the marker written as an applied stereotype because the generated keyword did not represent it — and it made plain classes whose attributes carry no type (a filename, a capture date) look like reference parts in a Cameo/CATIA model browser.

An untyped property is now written by untypedKeyword:

  • the usage its marker names — «ValueProperty» attribute, «PartProperty» part, «SharedProperty»/«ReferenceProperty» ref, «ConstraintProperty» constraint — with the marker omitted, as it already is on typed properties (markedPropertyKind and isPropertyKindMarker share one propertyKindMarker reading);
  • a ref typed by its default individual, as before;
  • otherwise a part when its aggregation is composite and an attribute otherwise, each reported approximated with a note saying so.

Typed properties are unchanged.

Specification basis

OMG SysML v1 to v2 Transformation mapping model, PropertyUntyped_Mapping (UML4SysML::Classification), which maps an untyped property to a ReferenceUsage. This change deliberately departs from it, so the census row moves from faithful to approximate with the reason recorded in docs/project/sysml-v1-transformation-census-baseline.json; docs/reference/sysml-v1-migration.md gains the two rows (marked / unmarked untyped property).

How it was verified

  • tests/migrate/testdata/xmi/property_markers.xmi gains seven untyped properties (one per marker, one unmarked scalar, one unmarked composite); TestPropertyKindMarkersAreNotWritten pins attribute load;, part trailer;, ref depot;, ref driver;, constraint rule;, attribute color;, part chassis;, the marked ones mapped and the unmarked ones approximated with their notes, and that no marker is written as a stereotype.
  • TestUntypedPropertiesAreAttributesInAndOutsideConstraintDefinitions (renamed) and the existing individual-default tests (ref angles : usual; kept) pin the unmarked and individual paths; expectations in relations_test.go, behavior_members_internal_test.go and diagrams_internal_test.go that encoded the old ref moved to attribute; goldens for property_markers, collectors and tool_profiles regenerated and reviewed.
  • go build ./..., go vet ./..., gofmt -l . (empty), go test ./... green; go run -C tools ./cmd/transformation-census -check and python3 scripts/changelog.py check pass.

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

devin-ai-integration Bot and others added 2 commits October 10, 2026 00:37
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…arked, it is an attribute, or a part when composite

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

@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review October 10, 2026 01:46
devin-ai-integration[bot]

This comment was marked as resolved.

…stead of crashing

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 3 commits October 10, 2026 02:05
…he part inherits by redefinition, subsetting or name

Co-Authored-By: jason.han <hanhuijun@gmail.com>
… the part inherits by redefinition, subsetting or name

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

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

# Conflicts:
#	docs/project/sysml-v1-transformation-census-baseline.json
#	docs/project/sysml-v1-transformation-census.md
@HuiJun
HuiJun merged commit d860787 into develop Oct 10, 2026
26 checks passed
@HuiJun
HuiJun deleted the fix/untyped-property-kind branch October 10, 2026 11:40
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