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’stypeto its corresponding*Typedefinition; aSpecHierarchy’sobjectand aSpecRelation’ssourceandtargetto an existingSpecObject; aRelationGroup’ssourceandtargetto an existingSpecification; and everyAttributeDefinition’s datatype to an existingDatatypeDefinition.If the document contains any
SpecRelation, it must also contain at least oneRelationGroup. SysML v2 mapsSpecRelationto a connection inside aRelationGroup, so an unhomed relation has no parent namespace.Every
SpecRelationmust be referenced by exactly oneRelationGroup. 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, everySpecRelationit contains must referenceSpecObjectsthat live inside one of theSpecificationsnamed on the group’ssourceandtarget.Each
SpecObjectmay appear in at most oneSpecification.The
SpecHierarchymust contain no cycles: noSpecObjectmay appear as its own descendant.A given
SpecObjectmay parent nested hierarchy nodes in at most one position across the model. Two distinct hierarchy nodes that parent the sameSpecObjectwould emit colliding indexed-name siblings ('1','2', …) under oneRequirementDefinition.
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*Typetemplate, aSpecObject, aSpecification, or aRelationGroup) must have a name unique across this combined set.A
SpecRelationmust not share a name with any of those top-level elements, and within a singleRelationGroupeverySpecRelationmust have a unique name. (The sameSpecRelationname may be reused in a differentRelationGroup.)Every
EnumValuewithin an enumerationDatatypeDefand everyAttributeDefwithin aSpecTypemust have a unique name.An enumeration
DatatypeDefmust not share its name with anAttributeDefit types. Otherwise SysML v2 emits an ambiguousattribute Priority : Priority, in which the attribute and its type cannot be told apart.
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
resolves every collision listed in this section. It is documented in
Working with ReqIF, and the suffix it adds is stripped automatically on export.
Other reserved-name constraints
Two further name collisions break re-parse of the emitted SysML v2 for reasons
orthogonal to the global namespace above. --resolve-duplicate-names does not resolve
these, so they must be fixed in the source document:
No element name may match a reserved
SysideReqIFmetadata name (the names defined by theSysideReqIF.sysmllibrary).A
SpecTypemust not carry both a magicReqIF.Text/ReqIF.DescriptionAttributeDefand a free-formAttributeDefnamedText/Description. The magic attributes are emitted asdoc Text/doc Descriptionblocks on the parent and would shadow the free-form sibling.
Warnings (non-fatal)
A
DatatypeDefreferenced by noAttributeDefis reported as a warning. Such aDatatypeDefhas no carrier on the SysML v2 side (the embedding only emitsDatatypeDefsreached through@reqif_*annotations onAttributeDefs) and is dropped on import.
SysML v2 preconditions
These checks run against the .sysml documents in the current workspace.
Each
.sysmldocument may declare at most one top-levelPackageorLibraryPackage. 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 alast_changevalue. Unlocked tags lose their identity across ReqIF round-trips. Runsyside reqif lockto populate fresh UUIDs andlast_changetimestamps for any element flagged here.A
@reqif-annotateddefmay subclassify (:>) another@reqif-annotateddefonly when the parent carries a#reqif_*_typeprefix tag and the child does not. This is the instance-to-type pattern thatimportemits: aSpecObject/Specification/RelationGroupdefspecializing its correspondingSpecObjectType/SpecificationType/RelationGroupType. Any other@reqif :> @reqifchain (type extending type, or instance extending instance) has no ReqIF analogue and would be dropped on the next export.attributeusages that redefine (:>>) a type’sAttributeDefare unaffected; redefinition is not subclassification. The rule applies within onesource: elements annotated for different exchanges may specialize each other freely, since no single exchange sees both and nothing is lost on round-trip.Every ReqIF tag’s
sourcemust be a string literal, or absent. Which exchange a tag belongs to has to mean the same thing to every reader, and the annotation writers behindsyside reqif link applyread the source from the syntax rather than evaluating it. Asourcethat only evaluation can resolve is one the toolchain cannot place, solink applyrefuses to touch the element.No two distinct elements may claim the same
(source, identifier)pair. That pair is an element’s ReqIF identity within one exchange, so a collision would export two SysML v2 elements as the same ReqIF element. Datatype marker tags (@reqif_string,@reqif_integer, …) are excluded, since one scalarDatatypeDefis legitimately referenced from a marker tag under eachAttributeDefthat uses it.No element may carry two identity-bearing tags of the same kind with the same
source: at most one base@reqif, at most one@reqif_enum_value, and at most one datatype marker per element per exchange. The datatype markers count together, because@reqif_stringbeside@reqif_integerin one exchange is two datatype identities for oneAttributeDef.