Cheat Sheet | SysML v2 Textual Notation Basics

Explore with
SysIDE
Get SysIDE PDF
SysML v2 Diagram

Constructs & Expressions

Construct Expression Example
Line note // // this is a comment
Block note //* */ //* also comment */
Comment /* */ /* a comment */
Documentation doc /* */ doc /* Doc text */
Definition def part def Vehicle
Classifier classifier classifier Person
Usage : part bike : Vehicle
Feature Feature : feature age : Integer
Specialization :> SportsCar :> Vehicle
Redefinition :>> :>> total_wheels = 2
Import import private import ISQ::*;
Multiplicity range [ ..] Wheel [0..*]
Multiplicity [] wheel [4] : Wheel
Qualified reference :: ISQ::MassValue
Assignment = mass = 1500 [kg]
Comparison operators < <= == != >= > === !== tank.fuelLevel == tank.maxFuelLevel
Metadata @ @ToolMetadata

Keywords & shorthand Notation

Keyword Short Form Repeatable*
defined by :
specializes :>
subsets :>
references ::>
crosses =>
redefines :>>
*a:b,c allowed
a::>b,c not allowed

Packages

Package Definition and Imports

package VehicleModel {
    public import VehicleParts;
    private import ISQ::MassValue;
    private import SI::kg;
}

Alias

alias MV for ISQ::MassValue;

Parts

Part Definition

part def Engine;
part def Vehicle {
    attribute mass : MassValue;
    attribute wheels : Integer;
}

Specialization

part def SportsCar :> Vehicle {
    :>> wheels = 4;
}

Part Usage

part vehicle : Vehicle {
    :>> mass = 1500 [kg];
    part engine : Engine;
}

Items

Item Definition

item def Fuel{
    attribute fuelMass :> ISQ::mass;
}

Connections

Connection Definition

connection def DeviceConn {
    end part hub : Hub;
    end part device : Device;
    attribute bandwidth : Real;
}

Connection Usage

connection conn : DeviceConn {
    end part hub ::> mainSwitch;
    end part device ::> sensorFeed;
}

Ports

Port Definition

port def FuelingPort {
    attribute flowRate : Real;
    out fuelOut : Fuel;
    in fuelIn : Fuel;
}

Port Usage

port fuelTankPort : FuelingPort;

Brought by

Sensmetry

Developer of

SysIDE SysIDE

Member of

OMG

Excerpts and examples in this cheat sheet are derived from the OMG® SysML® v2.0 Beta 4 specification (© 2019–2025 Object Management Group, Inc. and its contributors). All rights reserved.

Actions

Action Definition

action def StartEngine {
    in ignitionSignal : Boolean;
    out status : EngineStatus;
}

Composite Action

action def Drive {
    action accelerate : Accelerate;
    first start then accelerate;
}

Perform Action

part vehicle : Vehicle {
    action driveVehicle : Drive;
    action pressGas {
        perform driveVehicle;
    }
}

State Definition

state def EngineStates {
    state Off;
    state Running;
}

Constraints & Requirements

Constraint Definition

constraint def IsFull {
    in tank : FuelTank;
    tank.fuelLevel == tank.maxFuelLevel
}

Constraint Usage

part def Vehicle {
    part fuelTank : FuelTank;
    constraint tankIsFull : IsFull {
        in tank = fuelTank;
    }
}

Requirement Definition

requirement def MassRequirement {
    subject vehicle : Vehicle;
    attribute massActual : ISQ::MassValue;
    attribute massLimit : ISQ::MassValue;
    require constraint {massActual <= massLimit}
}

Requirement Usage

requirement <R1> vehicleMass : MassRequirement {
    attribute :>> massActual = vehicle.mass;
    attribute :>> massLimit = 1800 [kg];
}

Satisfy Requirement

satisfy R1 by vehicle;

Brought by

Sensmetry

Developer of

SysIDE SysIDE

Member of

OMG

Excerpts and examples in this cheat sheet are derived from the OMG® SysML® v2.0 Beta 4 specification (© 2019–2025 Object Management Group, Inc. and its contributors). All rights reserved.