Skip to content

metanorma/metanorma-requirements-models

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metanorma Requirements Models

Build Status

Metanorma supplies a predefined set of information models for the encoding of machine-readable requirements.

Scope

This repository provides the definitions of requirement models supported by Metanorma.

These models are used for:

  • Encoding machine-readable requirements in Metanorma standards

  • Reference for Metanorma users who wish to understand these models when used in Metanorma syntax

  • Export of machine-readable requirements

Metanorma supports usage of the following requirement models:

  1. Metanorma requirement models

  2. OGC modular specification models (OGC ModSpec)

Modelling

General

A standard or specification generally contains a set of requirements that apply to a subject. The value of a machine-readable or machine-interpretable requirement is the ability to allow a machine to perform validation (or commonly called, a "test") of that requirement to determine compliance.

These models (a "requirement models suite") commonly include the following:

  • a "requirement" model

  • a "conformance test" model

  • a collection specification mechanism such as:

    • "requirements class" which describes the common motivation of a set of requirements

    • "conformance test class" that describes the common motivation, or a set of coherent features, amongst a set of tests

Various suites support slightly different primitives and have slightly different semantics.

The OGC ModSpec supports requirement parts, test parts and hierarchical test steps.
The Metanorma requirement models support encoding of machine-executable code within a requirement.
requirements
Figure 1. Metanorma requirement models in UML
ogc modspec
Figure 2. OGC ModSpec models in UML

Metanorma requirement models

OGC ModSpec models

Examples

Metanorma requirements examples

Encoding examples of Metanorma requirements models are available at metanorma-mrr-samples.

<recommendation id="_">
  <label>/ogc/recommendation/wfs/2</label>
  <inherit>/ss/584/2015/level/1</inherit>
  <subject>user</subject>
  <description>
    <p id="_">I recommend <em>this</em>.</p>
  </description>
  <specification exclude="false" type="tabular">
    <p id="_">This is the object of the recommendation:</p>
    <table id="_">
      <tbody>
        <tr>
          <td align="left">Object</td>
          <td align="left">Value</td>
        </tr>
        <tr>
          <td align="left">Mission</td>
          <td align="left">Accomplished</td>
        </tr>
      </tbody>
    </table>
  </specification>
  <description>
    <p id="_">As for the measurement targets,</p>
  </description>
  <measurement-target exclude="false">
    <p id="_">The measurement target shall be measured as:</p>
    <formula id="_">
      <stem type="AsciiMath">r/1 = 0</stem>
    </formula>
  </measurement-target>
  <verification exclude="false">
    <p id="_">The following code will be run for verification:</p>
    <sourcecode id="_">CoreRoot(success): HttpResponse
      if (success)
      recommendation(label: success-response)
      end
    </sourcecode>
  </verification>
  <import exclude="true">
    <sourcecode id="_">success-response()</sourcecode>
  </import>
</recommendation>