From a74e6d66589ca8fa12cb02b6f0cbbb4862d1c47b Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 12 Oct 2026 01:36:49 +0000 Subject: [PATCH] feat(MigrationMetadata): AppliedStereotype records a source stereotype the v2 form does not carry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The SysML v1 migrator writes it on an element whose v2 form is the stereotype's (a dependency for a «Trace») or whose stereotype comes from a profile it did not write; tags keeps the tag values no v2 feature holds. Co-Authored-By: jason.han --- engine-contract.json | 14 ++++++++++++++ libraries/MigrationMetadata.sysml | 12 ++++++++++++ 2 files changed, 26 insertions(+) diff --git a/engine-contract.json b/engine-contract.json index 783385b..b0c8908 100644 --- a/engine-contract.json +++ b/engine-contract.json @@ -632,6 +632,20 @@ "kind": "package", "consumers": [] }, + { + "name": "MigrationMetadata::AppliedStereotype", + "kind": "metadata", + "attributes": [ + "stereotype", + "profile", + "tags" + ], + "migratorEmitted": true, + "consumers": [ + "internal/semantic/semantics/synthesized_name.go", + "internal/translate/migrate/migrate.go" + ] + }, { "name": "MigrationMetadata::DeferredEvent", "kind": "metadata", diff --git a/libraries/MigrationMetadata.sysml b/libraries/MigrationMetadata.sysml index 169dd88..af5bc02 100644 --- a/libraries/MigrationMetadata.sysml +++ b/libraries/MigrationMetadata.sysml @@ -34,6 +34,18 @@ library package MigrationMetadata { attribute sourceName : ScalarValues::String; } + metadata def AppliedStereotype { + doc /* The annotated element carried the named stereotype in the + * source, and its v2 form does not: the element is itself the + * stereotype's form, as a dependency is a «Trace»'s, or the + * stereotype comes from a profile the migration did not write, + * named by profile. tags keeps, as `tag = value`, the tag values + * no v2 feature holds. */ + attribute stereotype : ScalarValues::String; + attribute profile : ScalarValues::String[0..1]; + attribute tags : ScalarValues::String[0..*]; + } + metadata def StandIn { doc /* The annotated element stands for no element of the source: the * migration made it up to write what the source left implicit,