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 SpecObject objects and links as SpecRelation objects between SpecObject objects. Each SpecObject object specifies the associated SpecObjectType object and the SpecRelationType objects classify each SpecRelation object. The SpecObjectType and SpecRelationType objects define attributes to store requirements and link information. The SpecObject and SpecRelation objects contain values for these attributes.

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

For more information about ReqIF data organization, see the Exchange Document Content section 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 object 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 object 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 object values revert to the original imported values.

Using the Generic Mapping During Export

When you export requirements content to a ReqIF file by using a generic attribute mapping, the requirements and referenced requirements that use the built-in requirement types and all the justifications export as SpecObject objects with the associated SpecObjectType object longName attribute set to Requirement. However, you can specify what longName is set to by setting the Simulink Requirements requirement type to a custom requirement type. For more information about creating custom requirement types, see Define Custom Requirement and Link Types.

When you export links to a ReqIF file by using the generic mapping, Simulink Requirements exports the links as SpecRelation objects with the associated SpecRelationType object longName attribute 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 object defines requirement attributes. Each SpecObject object specifies the associated SpecObjectType object. The SpecObject object also contains the requirement attribute values. For more information, see the table in Choosing an Import Mapping.

If your ReqIF file contains SpecObjectType objects that have requirement attributes and you export the requirements to a ReqIF during a round-trip, the exported SpecObject object 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 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

If your requirements have links, you can export the links along with the requirements to a ReqIF file. For more information, see Exporting Requirements.

ReqIF represents links as SpecRelation objects between SpecObject objects. 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 an item that is not contained in the requirement set, such as a Simulink block or a requirement in a different requirement set, and then export the requirement and associated links to a ReqIF file, the export process inserts a SpecObject object into the ReqIF file that serves as a proxy object for the linked item.

If the linked item is one of the supported types, then the SpecObjectType object associated with the proxy SpecObject has a SpecObjectType longName value that describes the linked object type:

Linked ItemSpecObjectType longName 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 proxy SpecObject has an associated SpecObjectType object with longName set to Requirement.

Note

The exported proxy SpecObject objects 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.

If you re-import a ReqIF file generated by the Simulink Requirements export process, the software reconstructs the links that relate the proxy SpecObject objects and requirements for proxy objects of the supported types. Links that relate the requirements and proxy objects that have SpecObjectType longName value set to Requirement cannot be reconstructed. For more information, see Importing Links from a ReqIF File Generated by Simulink Requirements.

Related Topics