MMEL Modeling Methodology Guide

1. Methodology overview

1.1. Goal

The goal of MMEL modeling is to capture requirements from standards documents in an unambiguous, machine-readable model. The model represents the structure, processes, data, and compliance requirements defined in the source document.

1.2. Model is not unique

There is no single correct model for a given standard. Multiple valid models may exist, each representing a legitimate interpretation of the source text. The modeler makes design decisions about how to structure the model, and different modelers may arrive at different but equally valid solutions.

1.3. Scope of this guide

This guide describes the methodology and principles for creating MMEL models. For instructions on using the MMEL editor tool, refer to the MMEL Authoring Guide .

1.4. Principles

The following principles guide the modeling process:

1.4.1. Understand requirements

Before beginning to model, thoroughly read and understand the source document. The modeler should have a clear comprehension of the document's purpose, scope, and requirements.

1.4.2. Preserve original words

The model must preserve the exact wording of the source document. Do not paraphrase, reword, or summarize requirement text. The original language must appear verbatim in provisions.

1.4.3. No additional contents

Do not add content that does not appear in the source document. The model should faithfully represent what is in the document -- nothing more, nothing less.

1.4.4. Cover all words

Every requirement, process, and data element in the source document should have a corresponding representation in the model. The model should achieve 100% coverage of the source text.

1.4.5. Focus on main document

Model the main body of the standard. Ancillary materials such as forewords, introductions (unless they contain normative requirements), and informative annexes are generally modeled as sections only, unless they contain requirements that need to be captured as provisions.

2. Model quality

2.1. Prefer more details over fewer

When deciding between a more detailed and a less detailed representation, prefer the more detailed option. Greater detail provides better traceability and reduces ambiguity.

2.2. Quality measures

The following measures are used to assess model quality:

2.2.1. Number of elements

In general, a higher number of model elements is preferable. More elements indicate that the modeler has thoroughly decomposed the source document into its constituent parts.

2.2.2. Coverage of original text

The model should cover 100% of the normative content in the source document. Every requirement, process definition, data structure, and compliance obligation should have a corresponding model element.

IMPORTANT
Coverage should be checked after completing a model. Any gaps in coverage represent content that has not been modeled and may lead to incomplete compliance tracking.

2.2.3. Semantic-equivalent elements

The model should contain zero semantic-equivalent elements. That is, no two elements should represent the same concept from the source document. Each concept should be modeled exactly once.

2.3. Quality judgment

Model quality is ultimately judged manually by reviewing the model against the source document. The measures above serve as guidelines, but human review is essential to ensure:

  • Accuracy of interpretation
  • Correctness of modality assignment
  • Proper structuring of processes and data
  • Faithful representation of the source text

2.4. Modeling challenges

The following challenges are commonly encountered during modeling:

2.4.1. Lack of field knowledge

Modelers who are unfamiliar with the domain of the standard may misinterpret requirements. Understanding the subject matter is important for creating an accurate model.

2.4.2. Ambiguous terms

Some terms in standards are inherently ambiguous. For example, the word "applicable" may be interpreted differently depending on context:

  • Does "applicable requirements" mean all requirements, or only those relevant to a specific context?
  • The modeler must use best judgment and document any assumptions.

2.4.3. Document interpretation variations

Different modelers may interpret the same document differently, leading to structurally different but semantically equivalent models. This is expected and acceptable, provided each model accurately represents the source document.

3. Modeling steps

3.1. Handling simple parts

The following mappings describe how common parts of a standard are represented in the model:

Source content Model component
Standard number Namespace (e.g., BS6004 )
Foreword, Introduction, Scope, Normative references Model sections
Terms and definitions Model terms
Figures Multimedia (Figure type)
Tables Model tables

3.2. Interpretation of flow patterns

Flow patterns in the source text are identified by specific language cues and mapped to MMEL flow components:

3.2.1. Process

The requirement to perform an activity is modeled as a Process. Typical indicators include:

  • "require [actor] to [activity]"
  • "the [actor] shall [activity]"
  • "require process to fulfil requirements"

3.2.2. Approval

The requirement for someone to approve something is modeled as an Approval:

  • "require approval for [something]"
  • "[actor] shall approve [something]"

3.2.3. Start event and End event

  • Start event -- marks the beginning of a flow (one per diagram, automatically placed)
  • End event -- marks the end of a flow path (one or more per diagram)

3.2.4. Timer event

References to time periods or intervals are modeled as Timer events:

  • "at planned intervals" -> Timer event with REPEAT mode
  • "within [time period]" -> Timer event with WAIT mode

3.2.5. Gateway

Conditional language that creates branching is modeled using Gateways:

  • "if [condition], then [action]"
  • "where [condition] applies"

3.2.6. Serial connection

When Process 1 must be completed before Process 2 begins, the processes are connected by an edge in series:

[Start] -> [Process 1] -> [Process 2] -> [End]

3.2.7. Parallel connection

When both processes are required but no specific order is mandated, they are modeled as parallel paths. Both must be completed for the overall flow to be satisfied.

3.2.8. Self connection

When a process is repeated, it may be connected back to itself, typically with a Timer event:

[Process] <- [Timer (REPEAT)]

3.2.9. Gateway with conditions

When a gateway has conditions on its outgoing edges, the flow takes the path whose condition is satisfied:

[Gateway] -- condition A --> [Process A]
          |- condition B --> [Process B]

3.2.10. Gateway without conditions

When a gateway has no conditions, the flow is fulfilled if any one of the outgoing paths is fulfilled (like an OR gateway):

[Gateway] --> [Process A]
          |-> [Process B]
  (fulfilled if either A or B is completed)

3.3. Three-step methodology

The modeling process follows three steps:

3.3.1. Step 1: Find requirements (provisions)

Identify all provisions in the source document. Each provision is a basic unit consisting of:

  • Actor -- who is responsible
  • Modality -- the RFC 2119 keyword (SHALL, SHOULD, MAY, CAN, MUST)
  • Required evidence -- what must be demonstrated or documented

3.3.2. Step 2: Identify relationships

Group provisions under processes. Determine:

  • Which provisions belong to the same process
  • Which processes are subprocesses of others
  • The chronological order of processes

3.3.3. Step 3: Convert to diagrams

Every subprocess becomes a diagram. Create diagrams for each subprocess and populate them with the appropriate flow components:

  • Place processes for each activity
  • Add approvals where needed
  • Insert timer events for time-based requirements
  • Use gateways for conditional logic
  • Connect components with edges to define the flow

3.4. Full walkthrough: BS 202000 clause 9.2.1 (Internal audit)

This section demonstrates the complete modeling process for BS 202000 clause 9.2.1 on internal audits.

3.4.1. Source text analysis

The clause requires the organization to conduct internal audits. The key requirements are identified as follows:

3.4.2. Conduct internal audit

The primary process -- the organization must conduct internal audits:

process ConductInternalAudit {
  actor Organization
  modality SHALL
}

3.4.3. Check SMS conformance

The audit must check that the SMS (Safety Management System) conforms to:

  • The organization's own requirements
  • The requirements of BS 202000
  • Whether the SMS is effectively implemented and maintained

3.4.4. Plan, establish, implement, and maintain audit program

These actions form a subprocess of the overall audit process:

process PlanAuditProgram {
  actor Organization
  modality SHALL
}
process EstablishAuditProgram {
  actor Organization
  modality SHALL
}
process ImplementAuditProgram {
  actor Organization
  modality SHALL
}
process MaintainAuditProgram {
  actor Organization
  modality SHALL
}

3.4.5. Define criteria and scope

process DefineAuditCriteriaAndScope {
  actor Organization
  modality SHALL
}

3.4.6. Select auditor

process SelectAuditor {
  actor Organization
  modality SHALL
}

3.4.7. Conduct audits

process ConductAudits {
  actor Organization
  modality SHALL
}

3.4.8. Report results

process ReportAuditResults {
  actor Organization
  modality SHALL
}

3.4.9. Take correction

process TakeCorrection {
  actor Organization
  modality SHALL
}

3.4.10. Timer for planned intervals

The source text states audits must occur "at planned intervals," which is modeled with a Timer event:

timer_event PlannedIntervals {
  mode REPEAT
  value "planned intervals"
}

3.4.11. Documentation as independent path

The documentation requirement forms an independent path in the diagram, representing record-keeping that occurs alongside the audit process.

4. Modeling with measurements

This section provides a full walkthrough of creating measurements in a model, using BS 6004 clause 7.3 as an example.

4.1. Walkthrough: BS 6004 clause 7.3

BS 6004 clause 7.3 defines test requirements for electric cables. The tabulated data in Tables 3 through 6 specify the relationship between cable parameters and their acceptable test values.

4.2. Database table from tabulated data

The first step is to create a database table from the tabulated data in the standard. BS 6004 Tables 3 through 6 contain 67 records of cable test parameters.

Create a table in the model and populate it with the data from the source tables:

table CableTestData {
  class CableTestData#data
  source "Tables 3-6, BS 6004"
  record_count 67
}

Import the data from CSV or enter it manually using the Table view.

4.3. User-provided measurement variables

Define measurement variables that correspond to the input parameters the user will provide:

measurement tm {
  type NUMERIC
  description "Measured test value"
}
measurement cable_type {
  type TABLE_OPTIONS
  table CableTestData
  column "cable_type"
  description "Type of cable under test"
}
measurement cross_section {
  type TABLE_OPTIONS
  table CableTestData
  column "cross_section"
  description "Cross-sectional area of conductor"
}
measurement conductor_class {
  type TABLE_OPTIONS
  table CableTestData
  column "conductor_class"
  description "Class of conductor"
}

The TABLE_OPTIONS type creates a drop-down selection populated from the values in the specified table column.

4.4. Derived measurements

Define derived measurements that look up values from the database table:

measurement tn {
  type TABLE_REFERENCE
  table CableTestData
  column "tn"
  lookup_by ["cable_type", "cross_section", "conductor_class"]
  description "Nominal test value from reference table"
}

The TABLE_REFERENCE type performs a table lookup using the specified key columns. The value of tn is automatically determined based on the user's selections for cable_type , cross_section , and conductor_class .

4.5. TABLE_OPTIONS for choice fields

TABLE_OPTIONS measurement variables present the user with a choice from values found in a specific column of the database table. This ensures that the user can only select values that exist in the reference data.

measurement cable_type {
  type TABLE_OPTIONS
  table CableTestData
  column "cable_type"
}

4.6. TABLE_REFERENCE for derived values

TABLE_REFERENCE measurement variables derive their value by looking up a record in the database table that matches the user-provided key values. This is used to retrieve reference values such as nominal test thresholds.

measurement tn {
  type TABLE_REFERENCE
  table CableTestData
  column "tn"
  lookup_by ["cable_type", "cross_section", "conductor_class"]
}

4.7. Adding measurement test at a Process

Once the measurements are defined, add a measurement test to the relevant process. The test evaluates whether the measured value meets the acceptance criterion.

For BS 6004 clause 7.3, the test checks whether the measured value tm is within the acceptable range relative to the nominal value tn :

process TestCable {
  actor TestingLaboratory
  measurement_test "[tm] <= 0.9 * [tn] - 0.1"
  validate_provision P_7_3
}

In this test:

  • [tm] is the measured test value (user input)
  • [tn] is the nominal value (derived from the table lookup)
  • The formula 0.9 * [tn] - 0.1 defines the acceptance threshold
  • The test passes if the measured value is at or below the threshold

4.8. Testing in Model Viewer

After defining the measurements and tests, use the Model Viewer to verify the model:

  1. Open the model in the Model Viewer.
  2. Navigate to the process containing the measurement test.
  3. Enter test values for the user-provided measurements ( tm, cable_type, cross_section, conductor_class).
  4. The derived measurement ( tn) is automatically calculated.
  5. The measurement test result is displayed, showing whether the test passes or fails.

This interactive testing ensures that the measurement model behaves correctly before deployment.

5. Modeling with branching

This section provides a walkthrough of modeling conditional requirements using gateways and edge conditions, using BS 13485 clause 6.4.2 as an example.

5.1. Walkthrough: BS 13485 clause 6.4.2

BS 13485 clause 6.4.2 contains requirements for contamination control. Some requirements apply only when the organization manufactures sterile medical devices, creating a conditional branch in the model.

5.2. Gateway for conditional requirements

A Gateway is used to represent the conditional logic: "if the organization manufactures sterile medical devices, then additional requirements apply."

gateway SterileDeviceCheck {
  description "Does the organization manufacture sterile medical devices?"
}

The gateway splits the flow into two paths:

  • One path for general requirements (applicable to all organizations)
  • One path for additional requirements (applicable only to organizations manufacturing sterile medical devices)

5.3. TRUE/FALSE toggle for parameterized view

The condition is modeled as a Boolean parameter that can be toggled:

  • When sterile = true -- the additional requirements path is active
  • When sterile = false -- the additional requirements path is inactive

This creates a parameterized view where the model can represent different configurations depending on the organization's context.

5.4. Edge conditions

The outgoing edges from the gateway carry conditions that determine which path is taken:

edge SterileDeviceCheck_to_SterileRequirements {
  condition "[sterile] = 'true'"
  description "Organization manufactures sterile medical devices"
}
edge SterileDeviceCheck_to_GeneralRequirements {
  condition "[sterile] = 'false'"
  description "Organization does not manufacture sterile medical devices"
}

When the model is viewed or executed:

  • If the sterile parameter is set to true, the flow follows the sterile requirements path
  • If the sterile parameter is set to false, the flow follows the general requirements path

5.5. Modeling the conditional path

The additional requirements for sterile medical devices are modeled as processes connected via the gateway:

process ControlContamination {
  actor Organization
  modality SHALL
  validate_provision P_6_4_2_a
}
process ControlMicrobiologicalContamination {
  actor Organization
  modality SHALL
  validate_provision P_6_4_2_b
  condition "[sterile] = 'true'"
}

5.6. Diagram structure

The resulting diagram has the following structure:

[Start] -> [ControlContamination] -> [Gateway: SterileDeviceCheck]
                                        |
                          +--------------+--------------+
                          |                             |
                 [sterile = true]              [sterile = false]
                          |                             |
        [ControlMicrobiological                       [End]
         Contamination]
                          |
                        [End]

5.7. Future plans

The following enhancements are planned for branching and conditional modeling:

5.7.1. OCL support

Future versions will support OCL (Object Constraint Language) for more expressive conditions:

edge Gateway1_to_ProcessA {
  condition_ocl "self.sterile = true and self.riskLevel > 3"
}

5.7.2. Validation feedback

The model viewer will provide real-time validation feedback, indicating which paths are active based on the current parameter values and highlighting any conflicting or unreachable paths.

5.7.3. GUI for formula setting

A graphical user interface for setting edge conditions and measurement formulas is planned, allowing modelers to build conditions visually rather than typing formulas manually.

5.7.4. Data class support

Future versions will support using data class attributes directly in conditions, enabling more complex conditional logic based on structured data:

edge Gateway1_to_ProcessA {
  condition "[device.isSterile] = true"
}