Main Content

Export Requirements to ReqIF Files

Many third-party requirements management tools support data exchange using the Requirements Interchange Format, also known as ReqIF™. You can export requirements in Simulink® Requirements™ to a ReqIF file.

Choosing an Export Mapping

ReqIF represents requirements as SpecObjects and links as SpecRelations between SpecObjects. Each SpecObject specifies the associated SpecObjectType and the SpecRelationTypes classify each SpecRelation. The SpecObjectType and SpecRelationType define attributes to store requirements and link information. The SpecObjects and SpecRelations contain values for these attributes.

When you export requirements and links to a ReqIF file, the export process maps the Simulink Requirements objects to SpecObjects and SpecRelations. The exported value of the SpecObjectType and SpecRelationType depends on the export mapping that you choose.

For more information about ReqIF data organization, see Exchange Document Content in Requirements Interchange Format (ReqIF) Version 1.2 .

Simulink Requirements provides built-in export mappings for some third-party applications that use ReqIF:

  • IBM® Rational® DOORS®

  • IBM DOORS Next

  • Polarion™

  • PREEvision

  • Jama

You can also use a generic mapping.

A ReqIF round-trip is when you import requirements from a ReqIF file, edit the requirements, and export them back to a ReqIF file. When you import requirements during a ReqIF round-trip, avoid unexpected behavior by using either:

  • A generic mapping

  • The same mapping for import and export

For more information about ReqIF round-trips, see Round-Trip Importing and Exporting for ReqIF Files.

When you export requirements authored in Simulink Requirements, use a generic mapping.

Reusing the Import Mapping During Export

If you import requirements from a ReqIF file, you can change the requirement types manually or by mapping the SpecObjectType values to requirement types in Simulink Requirements. For more information, see Map SpecObjectTypes to Requirement Types. If you export requirements during a round-trip with the same attribute mapping used for the import, the exported SpecObjectType values revert to the original imported values regardless of changes that you made to the requirement type after importing.

Similarly, if you import links from a ReqIF file, you can change the link types manually. If you export links during a round-trip and use the same attribute mapping used for the import, the exported SpecRelationType values revert to the original imported values.

Using the Generic Mapping During Export

When you export requirements content to a ReqIF file using a generic attribute mapping, all requirements, referenced requirements, and justifications export as SpecObjects with SpecObjectType set to Requirement.

When you export links to a ReqIF file using the generic mapping, Simulink Requirements exports the links as SpecRelations with SpecRelationType set to the same value as the link type in Simulink Requirements. For more information about link types, see Link Types.

Exporting Requirement Attributes

The SpecObjectType defines requirement attributes. Each SpecObject specifies the associated SpecObjectType. The SpecObject also contains the requirement attribute values. For more information, see the table in Choosing an Import Mapping.

If your ReqIF file contains SpecObjectTypes that have requirement attributes and you export the requirements to a ReqIF during a round-trip, the exported SpecObject attribute values revert to the original imported values regardless of the export mapping chosen. The values revert even if you mapped the attributes to requirement properties or custom attributes after the import. For more information about editing attribute mappings for requirements after import, see Mapping ReqIF Attributes in Simulink Requirements

When you author requirements in Simulink Requirements and export them to a ReqIF file, the export process only exports the requirement ID, summary, and custom attributes.

Exporting Requirements

You can export a single requirement set, a single Import node, which is denoted by , or a single parent requirement and all of its children to a ReqIF file.

If you export a single parent requirement, the export process also exports the requirements above the parent requirement up to the top-level requirement. You can only export a single parent requirement if it was authored in Simulink Requirements.

To export requirements content:

  1. In the Requirements Editor, select the requirement set, Import node, or requirement that you want to export.

  2. Click Export > ReqIF.

  3. The Export Requirement Set to ReqIF dialog appears. In the dialog, set Export mapping for attributes and types to the attribute mapping that aligns with your third-party tool, or set it to Generic. For more information, see Choosing an Export Mapping.

  4. Under Additional contents to export, select Export links to include links in the exported ReqIF, or clear the selection to omit links.

  5. Output file shows the default file path and name for the exported ReqIF file. To edit the file path or name, click Browse and save the file path and name by clicking Save.

  6. Export the ReqIF file by clicking Export.

Exporting Links

You can export links to a ReqIF file when you export requirements that link to other items. For more information, see Exporting Requirements.

ReqIF represents links as SpecRelations between SpecObjects. When you export links to a ReqIF file, the exported SpecRelationType depends on the export mapping that you use. For more information, see Choosing an Export Mapping.

If you link a requirement in Simulink Requirements to a Model-Based Design item such as a Simulink block, and then export the requirement and associated links to a ReqIF file, the export process inserts a SpecObject into the ReqIF file that serves as a proxy object for the linked item.

The SpecObjectType for the proxy SpecObject has a descriptive value for some commonly linked items:

Linked ItemSpecObjectType Value

  • Simulink model element

  • Stateflow® model element

  • System Composer™ model element

Simulink Object

Simulink Test™:

  • Test file

  • Test suite

  • Test case

  • Iteration

  • Assessment

Simulink Test Object

MATLAB® code

MATLAB Code Range

Web browser URL

External Resource

Simulink data dictionary entry

Simulink DDEntry

  • Requirement

  • Referenced requirement

Simulink Requirements object

For all other items, the SpecObjectType for the proxy SpecObject is Requirement.

Note

The exported proxy SpecObjects include persistent IDs that can be used by the third-party tool to avoid duplicating the proxy objects. Duplication may occur if different ReqIF files contain links from the same MATLAB or Simulink object.

Related Topics