Preconditions

The ReqIF files and SysML v2 models used with this tool must satisfy certain preconditions. Most are met by default when the requirements management tool follows the ReqIF specification.

Precondition satisfaction can be checked using the syside reqif check CLI command. syside reqif check reqif <file.reqif> runs the ReqIF preconditions against an exchange document; syside reqif check sysml runs the SysML v2 preconditions against the current workspace. The same checks also run automatically as part of syside reqif import and syside reqif export.

ReqIF Preconditions

These checks run against the ReqIF exchange document.

Structural Integrity

  • Every cross-element reference must resolve to an element in the document of the right kind: a Spec* element’s type to its corresponding *Type definition; a SpecHierarchy’s object and a SpecRelation’s source and target to an existing SpecObject; a RelationGroup’s source and target to an existing Specification; and every AttributeDefinition’s datatype to an existing DatatypeDefinition.

  • If the document contains any SpecRelation, it must also contain at least one RelationGroup. SysML v2 maps SpecRelation to a connection inside a RelationGroup, so an unhomed relation has no parent namespace.

  • Every SpecRelation must be referenced by exactly one RelationGroup. References must resolve (no dangling ids), no relation may be claimed by more than one group, and no relation may be left unclaimed.

  • For each RelationGroup, every SpecRelation it contains must reference SpecObjects that live inside one of the Specifications named on the group’s source and target.

  • Each SpecObject may appear in at most one Specification.

  • The SpecHierarchy must contain no cycles: no SpecObject may appear as its own descendant.

  • A given SpecObject may parent nested hierarchy nodes in at most one position across the model. Two distinct hierarchy nodes that parent the same SpecObject would emit colliding indexed-name siblings ('1', '2', …) under one RequirementDefinition.

Name Uniqueness

SysML v2 names that share a scope must be unique, so the import checks that every incoming ReqIF LONG_NAME is unique once translated. In practice this means:

  • Each top-level ReqIF element (an enum DatatypeDef, a *Type template, a SpecObject, a Specification, or a RelationGroup) must have a name unique across this combined set.

  • A SpecRelation must not share a name with any of those top-level elements, and within a single RelationGroup every SpecRelation must have a unique name. (The same SpecRelation name may be reused in a different RelationGroup.)

  • Every EnumValue within an enumeration DatatypeDef and every AttributeDef within a SpecType must have a unique name.

Tip

If the source tool does not enforce LONG_NAME uniqueness, re-run the import with --resolve-duplicate-names instead of editing the upstream document. The flag is documented in Working with ReqIF and the suffix it adds is stripped automatically on export.

Other Reserved-Name Constraints

A few additional name collisions break re-parse of the emitted SysML v2 for reasons orthogonal to the global namespace above:

  • No element name may match a reserved SysideReqIF metadata name (the names defined by the SysideReqIF.sysml library).

  • An enumeration DatatypeDef must not share its name with the AttributeDef it types. Otherwise SysML v2 emits an ambiguous attribute Priority typed by Priority; rename the enum (e.g. to Priority_enum) to fix.

  • A SpecType must not carry both a magic ReqIF.Text / ReqIF.Description AttributeDef and a free-form AttributeDef named Text / Description. The magic attributes are emitted as doc Text / doc Description blocks on the parent and would shadow the free-form sibling.

Warnings (Non-Fatal)

  • A DatatypeDef referenced by no AttributeDef is reported as a warning. Such a DatatypeDef has no carrier on the SysML v2 side (the embedding only emits DatatypeDefs reached through @reqif_* annotations on AttributeDefs) and is dropped on import.

SysML v2 Preconditions

These checks run against the .sysml documents in the current workspace.

  • Each .sysml document may declare at most one top-level Package or LibraryPackage. Incremental ReqIF import overwrites the document with one top-level package, so any extras would be dropped. Both kinds count toward the limit; a file that mixes one of each still fails.

  • Every ReqIF tag (every element annotated with a @reqif_* metadata tag) must be “locked”: must carry both a stable identifier and a last_change value. Unlocked tags lose their identity across ReqIF round-trips. Run syside reqif lock to populate fresh UUIDs and last_change timestamps for any element flagged here.

  • A @reqif-annotated def may subclassify (:>) another @reqif-annotated def only when the parent carries a #reqif_*_type prefix tag and the child does not. This is the instance-to-type pattern that import emits: a SpecObject / Specification / RelationGroup def specializing its corresponding SpecObjectType / SpecificationType / RelationGroupType. Any other @reqif :> @reqif chain (type extending type, or instance extending instance) has no ReqIF analogue and would be dropped on the next export. attribute usages that redefine (:>>) a type’s AttributeDef are unaffected; redefinition is not subclassification.