r/systems_engineering • • 3d ago

Resources SysML v2 Tutorial (Lesson 26): Requirement Definitions (Requirements as Code)

https://youtu.be/_OyuW8fKEJs

Hi r/systems_engineering,

We are kicking off Phase 5 of our SysML v2 deep dive series. Up through Lesson 25, we covered what a system is (structure) and what it does (actions, flows, and states). Now we move to what the system must do: Requirement Definitions.

Being Fair to SysML v1 (and DOORS/ReqIF)

SysML v1 didn't lack requirements support. It gave teams mature, auditable traceability («satisfy», «verify», «deriveReqt», «refine», «copy»), containment hierarchies, coverage matrices, and over a decade of refined DOORS and ReqIF integration.

The limitation wasn't traceability—it was what lived inside the requirement. A classic v1 requirement like id: REQ-001 / text: "The vehicle shall not exceed 5000 kg at takeoff." is crystal clear to a human, but opaque to the model. Finding every requirement with a mass limit above 4,000 kg meant searching text and reading sentences; updating that threshold meant manually checking every dependent calculation.

The v2 Shift: RequirementDefinition Is a ConstraintDefinition

In SysML v2, a requirement can still carry its human-readable doc text and stable contract ID (as a short name like <'REQ-001'>), but it also embeds typed thresholds, an explicit subject**, and an evaluable** require constraint:

package MassRequirements {
    private import ISQ::*;
    private import SI::*;

    part def LaunchVehicle {
        attribute totalMass: MassValue;
    }

    requirement def <'REQ-001'> MaxTakeoffMass {
        doc /*
             * The vehicle shall not exceed the specified
             * takeoff mass under any loading configuration.
             */
        subject vehicle: LaunchVehicle;
        attribute maxMass: MassValue = 5000 [kg];

        require constraint {
            vehicle.totalMass <= maxMass
        }
    }
}

Because maxMass is a typed quantity (5000 [kg]) and the rule is a formal constraint, tools can natively query mass thresholds across the model, evaluate compliance against the design, and propagate limit changes automatically.

Reuse Without Copy-Paste (subject + :>>)

In SysML v1, «copy» created a read-only mirror of a master requirement's text—useful for alignment, but you couldn't swap in different budgets for different subsystems without authoring separate requirements.

In SysML v2, declaring a typed subject lets you define a rule once and reuse it across multiple parts with different allocated values via redefinition (:>>):

part def PhysicalComponent {
    attribute actualMass: MassValue;
}

requirement def MassBudgetCompliance {
    subject component: PhysicalComponent;
    attribute allocatedMass: MassValue;

    require constraint {
        component.actualMass <= allocatedMass
    }
}

part def LaunchVehicle {
    part firstStage: PhysicalComponent;
    part secondStage: PhysicalComponent;
    part payload: PhysicalComponent;

    requirement stage1Mass: MassBudgetCompliance {
        subject = firstStage;
        :>> allocatedMass = 3200 [kg];
    }
    requirement stage2Mass: MassBudgetCompliance {
        subject = secondStage;
        :>> allocatedMass = 1400 [kg];
    }
    requirement payloadMass: MassBudgetCompliance {
        subject = payload;
        :>> allocatedMass = 400 [kg];
    }
}

Three Practical Details Worth Knowing

  • Native actor and stakeholder roles: Instead of tracking authorities and users in external spreadsheets, you can declare actor (who interacts with the subject) and stakeholder (who has an interest in the requirement, like a CertificationAuthority) directly on the requirement and filter by them automatically.
  • Qualitative requirements stay text: Not everything is a Boolean expression (e.g., "The system shall be maintainable by a technician with standard tooling"). Those stay cleanly in the doc block alongside their subject and metadata, versioned with the model.
  • Honest tooling reality: SysML v1 still has the edge in mature DOORS and ReqIF ecosystems, while v2 requirements-management tooling is still younger.

SysML v1 vs. SysML v2 at a Glance

TopicSysML v1SysML v2
Requirement Element«requirement» stereotype on a Classrequirement def, based on ConstraintDefinition
ThresholdsEmbedded inside the text sentenceTyped quantities (e.g., 5000 [kg])
SubjectNamed in text, linked later via «satisfy»Explicitly declared as a typed subject
Reuse«copy» mirrors read-only textOne definition reused with different subjects and :>> values
RolesStakeholders tied to viewpoints, not requirementsactor and stakeholder declared directly on the requirement
Identifiersid propertyShort name (e.g., <'REQ-001'>)
Tool EcosystemMature DOORS / ReqIF supportRequirements-management tooling is still younger

Next lesson (Lesson 27), we'll cover require and assume—how to formally state the operating conditions under which a requirement actually applies.

Curious to hear from the practitioners here: On your current programs, what percentage of your requirements could realistically be expressed as evaluable constraints vs. qualitative text—and is DOORS/ReqIF integration still the main blocker keeping your team on v1?

3 Upvotes

2 comments sorted by

1

u/Aerothermal 22h ago

Appreciate all these videos. At times a little difficult to follow. From my perspective it would be easier to parse without making any comparisons to SysML v1; to enjoy the videos you have to be already an experienced practitioner of V1; if not then the reader MUST learn both v1 and v2 from your videos at the same time. I.e. there's a lot of superfluous confusing fluff in these videos, to take onboard and sort in your mind at the same time as learning the v2; and try not to mix them up! I think that was the wrong approach. Just an opinion.

2

u/SysModeler 21h ago

Fair point, and thanks for the honest feedback! This 35-episode series was scripted much earlier with transitioning practitioners in mind—since there are already plenty of v2-only resources out there, we wanted to offer the v1-to-v2 perspective for people who need it.

We do plan to release a shorter, pure SysML v2 series after this, though we want to finish out the final 9 episodes of this one first.