Skip to content

Editor.add_member() cannot produce anonymous attribute redefinition (:>> notation) #596

Description

@mzargham

Summary

Editor.add_member() cannot produce anonymous attribute redefinitions (:>> notation). The :>> shorthand for attribute redefinition is valid SysML v2 syntax that the parser accepts, but there is no way to author it through the Editor API.

SysML v2 spec coverage

  • KerML spec §8.3.7 defines Redefines notation (:>>).
  • OMG API (formal/2026-03-04) exposes Redefinition as a retrievable element type.
  • Example: attribute :>> cycleTime = 200.0 [SI::s] parses successfully in opensysml v0.9.0.

Steps to reproduce

```python
editor = model.edit()

Attempt 1: specializes on an attribute usage raises:

"kind 'attribute' is a usage and cannot carry specializes targets"

editor.add_member(owner="NominalToaster", kind="attribute", name=":>>cycleTime", specializes=["Appliance::cycleTime"])

Attempt 2: kind string with :>> notation raises IllegalMemberKindError

editor.add_member(owner="NominalToaster", kind="attribute :>>", name="cycleTime")
```

Expected

A dedicated helper or kind string that produces an anonymous attribute redefinition.

Actual

No supported path exists; both workarounds raise exceptions.

Workaround

Load the :>> declaration as a SysML notation string via conn.load_from_content(...).

Context

Discovered while building Open-MBEE/toaster — attribute :>> cycleTime is introduced in Ch2.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions