Holarch

SysML v2

Importing SysML v1 Models

Convert a SysML 1.x model from Cameo, MagicDraw, Enterprise Architect, Rhapsody or Papyrus into SysML v2 text, review what changed form, and import it into a SysML v2 project.

How to use it →

On this page
  1. Overview
  2. Concepts
    1. Converted, approximated and left out
    2. The SysMLv1Library package
    3. Opaque bodies become textual representations
  3. How to use it
    1. When and why
    2. Import a SysML v1 model into a project
    3. Keep the report and the text
    4. Export the model from your SysML v1 tool
  4. Worked example: the CubeSat EO-1 model
  5. Tips and common mistakes
  6. What converts
  7. Limits
  8. Messages
  9. Related pages

Overview

You can bring a SysML 1.x model into a SysML v2 project. Holarch reads the model's XMI file, converts it to SysML v2 text, checks the text, and shows a conversion report before anything changes.

  • Input: a SysML 1.x model as XMI (.xmi, .uml, .xml) or a Cameo or MagicDraw project (.mdzip).
  • Output: SysML v2 text in your project, as one undo step, or a new SysML v2 project.
  • Report: every v1 element with its result: Converted, Approximated or Left out, and why.

The conversion follows the SysML v1 to SysML v2 transformation in the OMG SysML 2.0 specification, where a model exchanged as XMI carries enough detail for it.

Concepts

Converted, approximated and left out

Each element of the v1 model gets one result:

  • Converted: the element has a direct SysML v2 counterpart, such as a block that becomes a part def.
  • Approximated: the element is kept in a changed form. For example, a full port typed by an interface block becomes a port, and a transition through a choice pseudostate becomes one transition per path.
  • Left out: SysML v2 has no counterpart, or the element points to something that is not in the file. Examples are flow final nodes, activity partitions, use case extensions and instance specifications.

The report gives the reason for every approximated and left-out element in words.

The SysMLv1Library package

Some SysML v1 properties have no SysML v2 keyword, such as a block's isEncapsulated or a refine relationship. The converter keeps them as metadata from the SysMLv1Library package, for example @SysMLv1Library::RefineData { isRefine = true; }. The package is part of Holarch's library, so these names resolve in every SysML v2 project.

Opaque bodies become textual representations

Opaque behaviors, opaque actions, guards and constraint specifications carry text in a language such as OCL or English. The converter keeps each body as a textual representation: language "OCL" /* … */. Bodies in SysML or KerML are checked like the rest of the text. See Textual representations.

How to use it

When and why

Use the import when a team moves an existing SysML 1.x model to SysML v2, or wants to reuse parts of one. The converted text is a starting point: the report tells you what to review by hand.

Import a SysML v1 model into a project

  1. Open a SysML v2 project and click Model → Import and Export.
  2. Under Import, choose Into this project or Into a new SysML v2 project.
  3. Drop the .xmi, .uml, .xml or .mdzip file on the box, or click the box to choose it. You see a progress card with the stages Reading the XMI file…, Converting to SysML v2… and Checking the result….
  4. Read Conversion from SysML v1 at the top of the preview. It states the number of elements converted, approximated and left out, and whether the SysML v2 text checks without problems.
  5. Use Show to list the approximated and left-out elements, only one of them, or all elements. Each row gives the element, its SysML v1 kind, the result with the SysML v2 keyword and qualified name, and Why.
  6. Open Show the SysML v2 text to read the result before importing it.
  7. Clear any packages you do not want in the table below, then click Import N Packages (or Create Project). The model is imported as one undo step. Undo removes it again.

Keep the report and the text

  • Click Download Report for a CSV file with every element, its result, its SysML v2 path and the reason.
  • Click Download SysML v2 Text for the converted .sysml file.

Export the model from your SysML v1 tool

  • Cameo Systems Modeler and MagicDraw: import the .mdzip project directly, or use File → Export To → Eclipse UML2 (v5.x) XMI File and import the .xmi file.
  • Enterprise Architect: select the package, choose Publish → Export XML, select XMI 2.1, and import the .xml file. Enterprise Architect project files (.eap, .qea) cannot be read directly.
  • IBM Rhapsody: export the model with the XMI toolkit (XMI 2.x) and import the file.
  • Eclipse Papyrus: import the model's .uml file.

Worked example: the CubeSat EO-1 model

The CubeSat EO-1 demo is an LML project. Its SysML v1 export makes a realistic test model.

  1. Open the CubeSat EO-1 demo and export it as UML/SysML XMI in the OMG XMI 2.5.1 format (see Export a UML/SysML model (XMI)).
  2. Open a SysML v2 project, click Model → Import and Export, choose Into a new SysML v2 project, and drop the .xmi file. The report reads: 1,042 elements, 1,007 converted, 32 approximated, 3 left out. The SysML v2 text checks without problems.
  3. Set Show to Left out. The three rows are a use case extension, which SysML v2 does not have, and two trace relationships to elements without a name, which SysML v2 text cannot refer to.
  4. Click Create Project. The new SysML v2 project opens on the Text page with the satellite's structure, functions, requirements and traces.

Tips and common mistakes

  • Import one XMI file at a time, without other files. Import one SysML v1 XMI file at a time, without other files.
  • Name the elements you trace to. Relationships to unnamed elements are left out, because SysML v2 text refers to elements by name.
  • Check approximations first. They are the places where the meaning may differ from the v1 model, such as ports typed by blocks or connector ends inside parts.
  • Elements with the same name in one place are renamed with a suffix such as _2. The report lists each rename.

What converts

SysML v1SysML v2
Model, packagepackage
Block, actorpart def
Value type, data type, enumerationattribute def, enum def (value types with a known SI unit specialize the ISQ quantity)
Signalitem def
Interface blockport def
Part, reference and value propertiespart, ref part, attribute, with multiplicities and default values
Proxy port, flow propertyport, in/out item or attribute
Full portpart with @SysMLv1Library::PortData
Connector, binding connector, item flowconnect, bind, flow
Generalization:>
Activity, call behavior action, pinsaction def, action, parameters
Control and object flows, guardssuccessions with if guards and else, flows between parameters
Initial, final, decision, merge, fork, joinstart, done, decide, merge, fork, join
State machine, states, regionsstate def, state, parallel states
Transitions, signal and time triggerstransition with accept, accept after, guards and effects
Interactionoccurrence def with lifelines and messages
Use case, subject, includeuse case def, subject, include
Requirement (id and text)requirement <'id'> Name { doc /* text */ }
Satisfy, verify, derive requirementsatisfy, verify in a verification objective, derivation connection
Refine, tracedependency with SysMLv1Library metadata
Allocate, dependencyallocate, dependency
Constraint block, constraintconstraint def, assert constraint
Stereotypes and tagged valuesmetadata def per stereotype, applied with its tags
Comment, documentationdoc, comment

Limits

  • One file of at most 64 MB.
  • At most 250,000 elements, nested at most 512 levels deep. Deeper elements are left out with the reason nesting.
  • The converted text is at most 8 MB.
  • Diagrams and their layout are not converted. Create views in the SysML v2 project.

Messages

MessageWhat to do
Import one SysML v1 XMI file at a time, without other files.Import the XMI file on its own.
<file> holds no UML or SysML elements. Export the model as XMI 2.x and import it again.Export the model again as XMI 2.x.
No UML model was found in <file>. In Cameo or MagicDraw, export the model as Eclipse UML2 XMI and import the .xmi file.Export the project as XMI.
The SysML v1 model has more than 250,000 elements. Export a smaller part of the model.Export one package at a time.
The converted SysML v2 text would be larger than 8 MB. Export a smaller part of the model.Export one package at a time.

SysML® and OMG® are registered trademarks of Object Management Group, Inc. in the United States and other countries.