ReqIF Under the Hood

Understanding the ReqIF Data Model

You can use ReqIF without knowing how it works in detail, but sometimes you have to get your hands dirty. This course helps you to understand the raw XML that lies underneath ReqIF, and how to use and manipulate it, if the need arises.

Content

This Solution contains:

  • 1 x Videos (TBD minutes)
  • 1 x Download
  • 2 x PDFs
  • 4 x other pieces of content

Some content of this solution is free, with several elements only accessible to premium members (upgrade now >>).

We will soon offer them as part of an online training package. Curious? Be sure that you are still subscribed to our email messages!

The ReqIF Data Model (44 min)

Summary

Content: This video lecture describes how ReqIF works in detail: It describes the data model, how it is mapped to XML and what you need to look out for when manipulating it yourself.

Target Group: Systems Integrators, Troubleshooters

Prerequisites: Basic understanding of UML modeling and XML.

Agenda

  • Introduction
    • Agenda (0:20)
    • ReqIF Overview (0:55)
    • History (2:21)
    • Resources (7:24)
    • RIF/ReqIF Versions (7:56)
    • Concepts & Use Cases (8:55)
    • Terminology (11:24)
    • 3 Views: Model, XML, Tool (11:52)
    • Persisting ReqIF (13:46)
  • Data Model Basics
    • ReqIF Top Level (14:45)
    • ReqIF Core Content (17:06)
    • ReqIF Attributes (20:33)
    • Validation with Consequent (23:45)

Agenda (cont.)

  • Demo
    • Intro (24:46)
    • ReqIF Header (26:09)
    • Outlines (26:33)
    • SpecObjects vs. SpecHierarchies (26:52)
    • Standard vs. All Attributes (27:54)
    • Identifiable & Internal Attributes (28:14)
    • SpecRelations (29:00)
    • Validation (29:48)
    • SpecTypes and Datatypes (30:34)
    • ReqIF XML (32:36)
  • Advanced Data Model
No video here? This means that you do not have access to this premium content. You can buy full access to all premium content. We will soon offer content packages, which will be cheaper, but will only offer access to a subset of the premium content. Be sure to check the update page regularly, and make sure that you receive our monthly update emails.

Lecture Notes

Up Next / Related

Posted in Premium, Video | Comments Off on The ReqIF Data Model (44 min)

ReqIF Quick Reference

The Essentials of ReqIF on One Page

This one-pager will help you make sense of the ReqIF files that you are working with. Whether you need to understand the structure or decipher the XML: This reference will save you a lot of time.

Posted in Reference | Leave a comment

Install a Full-Featured XML Editor

A Tool for Nerds

It's already possible to look at the XML source of a ReqIF file with ReqIF Studio (via right-click | Open with | Text Editor). But experts who want to get their hands dirty may prefer a fully-featured editor. This Checklist describes how to install it, step by step.

Installation

The editor is installed via an Update Site. Therefore, please be sure that you have access to the Internet.

  1. Launch ReqIF Studio
  2. Select Help | Install new Software
  3. In the "Work with:" Textbox enter the following URL:
    http://download.eclipse.org/releases/luna/
  4. Wait until the list completed loading (this can take a minute or two)
  5. Select "Eclipse XML Editors and Tools" (just search for it)
  6. Follow the Wizard and accept the license agreement
  7. You may have to accept Eclipse certificates
  8. Restart ReqIF Studio
  9. Make sure the editor got installed correctly: Right-click on a .reqif file and select "Open with | XML Editor"

Note: Eclipse remembers the editor used last for each file. Therefore, double-clicking will always use the editor used last. If you want to switch back to using the regular editor, use "Open with | ReqIF Studio Main Editor" once. After that, you can continue opening with a double-click.

Design Mode

When opening a file with the XML editor, it is first in Design Mode. The main editor shows a tree structure with two columns: The left column shows the XML element, the right column shows its content. In the following screenshot, the ReqIF header is shown.

Note that the outline also provides a means for navigation.

Source Mode

The source mode is similar to the (built-in) text editor, except:

  • It supports syntax highlighting
  • It provides an Outline for navigation
  • It provides auto-complete (Ctrl-Space in the editor)
  • It highlights matching tags (as shown in the screenshot)
Posted in Checklist | Comments Off on Install a Full-Featured XML Editor

The ReqIF Header

ReqIF Header Attributes

  • Identifier
  • Title
  • Creation Time
  • ReqIF Tool ID
  • Source Tool ID
  • ReqIF Version (always 1.0)
  • Repository ID (optional)
  • Comment (optional)

More useful than you thought!

Every ReqIF file has a header section, but it is rarely paid much attention to. Nevertheless, it contains some important and useful information, and it's a good idea to understand what information it holds, and how it can be used.

In ReqIF Studio, the header information is accessible from the Main Editor.

A ReqIF File consists of three elements, as shown in the figure below. The ReqIF Header is one of these. It is mandatory and contains information regarding the file itself, some of which makes the handling easier.

ReqIF Header

The following list describes the attributes and points out eventual particularities.

  • Identifier – This attribute identifies the ReqIF file and is mandatory. The identifier must comply with the format of an XML identifier (e.g. no spaces, must start with a character, etc.).  This ID must be different for every file! In other words, even if just one requirement has changed, a new ID must be used. Don't use this ID to track repeated requirement exchanges. That information should be traced in the tool extensions (see information on conversation ID below).
  • Title – A useful, human-readable title. This attribute is mandatory.
  • Creation Time – The timestamp indicating the generation time and date of this file. This attribute is mandatory and must be formatted as an XML dateTime. Note that the timezone information is optional but recommended.
  • ReqIF Tool ID – An identifier for the ReqIF exporter has to be provided here. This mandatory attribute should not be confused with the Source Tool ID, but may be identical if the requirements tool has the built-in capability of exporting ReqIF.
  • Source Tool ID – This is the identifier of the requirements tool and is mandatory.
  • ReqIF Version – Here the version of ReqIF is required. Note that this currently has always to be "1.0", even for ReqIF 1.1 and 1.2! This sounds confusing, but is required this way, as the schema of those versions has not changed (see ReqIF FAQ).
  • Repository ID – This optional attribute allows the writing tool to provide information regarding the repository of the data, e.g. the database that has been used.
  • Comment – This optional attribute can be used freely. It is not recommended to use it for information that is being machine processed. The tool extensions are recommended for this purpose.

A note on ReqIF ID and Conversation ID. It is tempting to use the ReqIF ID to track the repeated exchange of requirements between two parties, and some tools have been known to do this (hopefully not any more). Resist the temptation and don't do it! For one, you risk that a tool does not even analyze the content of your file, as the ID has not changed. This is also a violation of the ReqIF standard. Instead, the ReqIF Implementor Forum has defined a tool extension for exactly this purpose. Using the tool extension is the recommended approach.

There are three representations of the ReqIF Header, as shown in the figure below:

  • The ReqIF Standard uses a UML representation, as shown on the left. Please consult the standard for detailed information, e.g. the types of the attributes.
  • The header is stored as XML in the file, as shown in the middle. In ReqIF Studio, you can inspect the XML by right-clicking on a .reqif file and opening it as Text.
  • In ReqIF Studio, the Main Editor has a form that shows the header attributes and allows some of them to be edited, as shown on the right.

Images: Unsplash, OMG

Posted in Reference | Comments Off on The ReqIF Header

Consequent

ReqIF is spreading, and partners start handing .reqif and .reqifz files back and forth.  But chances are that the first import of such a file will fail.  How do you debug the problem? Consequent, the free ReqIF-Validator, may provide the answer.

There are two versions of Consequent available, GUI and Console.

GUI-Version: Consequent is already built into ReqIF Studio. Validation is done automatically upon saving. Information on usage is found below and in the handbook.

Command Line Version: We provide a command line version of Consequent. This is useful for batch processing and has additional features. It is available as a separate download.

Differences at a Glance

Topic GUI Command Line
Cross-File-Validation Only one ReqIF file is validated, cross-file SpecRelations are ignored. SpecRelations across files are validated, if all relevant .reqif files are provided as arguments.
Selective disabling of rules Individual rules can be disabled via Window | Preferences | Model Validation | Constraints. All rules are always applied.
Error Markers Error markers are created, which allow to see errors in a text editor Line numbers are provided in the output
Saving results Upon validating, the user can save as XML. The output of the tool is plain text or XML (with -x option). It can be redirected into a file.

Usage GUI Version

The latest version of formalmind Studio comes with an integrated version of Consequent. Use it as follows:

  • Right-Click the file to be validated in the Project Explorer (no need to open the file)
  • Select Validate | Consequent ReqIF Validation
  • A dialog indicates the completion of the validation, which is shown in the Problem View.
  • If the Problem View is not visible, open it by hand via Window | Show View | Other… | General | Problems
  • To see the error in the file, you must open it in a text editor as follows:
    • Right-Click the file in the Project Explorer
    • Select Open With | Text Editor
    • Errors are shown with an icon in the left margin (hovering over the error reveals the problem) – see screenshot below
    • For errors with line numbers, it is possible to double click on an error in the Problem View to jump to the corresponding position in the Text Editor
  • Error markers do not reset automatically. Re-run the validation to update them. You can manually clear error markes (e.g. for files that do not exist any more) by right-clicking on an element in the Problem View and selecting Delete.

In the Text Editor, errors are shown like this (with the mouse hovering over the icon):

error-marker

Posted in Software | Leave a comment

ReqIF Constraints Reference

Figuring out whether all is right

A lot can be wrong with a ReqIF file. Finding a specific problem can be tricky. This two-pager lists all possible problems with a ReqIF file. Even better, the ReqIF-Validator Consequent can check a ReqIF file and report its problem. This reference will also help you to make sense of the results reported by Consequent.

Posted in Reference | Comments Off on ReqIF Constraints Reference

Face-to-Face Training (German and English)

Nothing beats working with a real person

This library is designed to give you as much information as possible, using various digital formats, let it be a PDF, a video to software. But if you need to absorb a lot of information in a short time, nothing beats working with an expert. This is why we offer trainings on a regular basis:

Posted in Training | Comments Off on Face-to-Face Training (German and English)