Coder Social home page Coder Social logo

metanorma-requirements-models's Introduction

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>

metanorma-requirements-models's People

Contributors

opoudjis avatar camobap avatar ronaldtse avatar metanorma-ci avatar

Stargazers

 avatar Michael Corrado avatar

Watchers

 avatar Sebastian Skałacki avatar Ildar Manzhikov avatar James Cloos avatar  avatar Maxim Samsonov avatar  avatar Alexander Dyuzhev avatar Frank Hofmann avatar Mehmet Sabırlı avatar Vasil Buraliev avatar webdev778 avatar KW Kwan avatar  avatar Manuel Fuenmayor avatar

Forkers

gaybro8777

metanorma-requirements-models's Issues

Encode OGC ModSpec (OGC 08-131r3) and supplement MRR models

OGC ModSpec (OGC 08-131r3) provides C.1 which lists out a set of UML models.

  1. This task is to encode these models.

image

  1. The Metanorma Requirements models are meant to satisfy these models. There are also some elements currently missing from our models, which we need to supplement.

These models should be added using LutaML (1 view, N classes).

Update ModSpec model

The resulting conceptual model of a ModSpec Test (conformance test or an abstract test).

// A Conformance Test includes potentially multiple Test Methods
// A Conformance Test Method is considered a "part" of the test (A, B...)
class ConformanceTest {
  testPurpose: String
  testType: TestType
  reference: RichText[0..*]
  linkToSpecification: RequirementOrRequirementPart[1..*]
  testMethod: ConformanceTestMethod[0..*]
}

// A Test Method can contain multiple steps
// A Test Method can be linked to a particular Requirement or Requirement Part
class ConformanceTestMethod {
  linkToSpecification: RequirementOrRequirementPart[0..*]
  steps: ConformanceTestStep[1..*]
}

// A Test Step can contain inner Test Steps
class ConformanceTestStep {
  content: RichText[1..*]
  inner: ConformanceTestStep[0..*]
}

Originally posted by @ronaldtse in metanorma/metanorma-ogc#274 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.