Skip to content

SysML v2 Quick Reference

A concise reference for the most common SysML v2 constructs. For the full language specification, see the OMG SysML v2 Language Specification.

Definitions

Definitions declare reusable types. Every usage keyword has a matching def form.

KeywordDescription
part defA structural component type. Parts compose a system hierarchy.
item defThings that flow between parts (messages, fuel, signals). Supertype of part def.
attribute defA data value type (scalar, string, quantity). Always referential — no sub-parts.
enum defAn attribute definition with a fixed set of enumeration literals.
port defA typed interaction point through which parts connect or flow.
action defA behavioral step or function a part can perform.
state defA state machine with entry/do/exit actions and transitions.
connection defA typed binary link between two end features (ports or parts).
allocation defA binary mapping from a logical element to a physical one.
requirement defA formal requirement with a subject, text body, and constraints.
view defA specialized part def that selects and renders a model subset.
metadata defA structured annotation type applied to elements with @.

Usages

Drop the def suffix to get the usage keyword. Usages appear inside definitions and create owned, typed members.

KeywordDescription
partA structural member inside a containing part or package.
itemSomething that flows or is transferred (payload, message, entity).
attributeA data property on a definition or usage, always referential.
portAn interaction point on a part, typed by a port def.
actionA behavioral step: a usage of an action def.
stateA state usage inside a state machine body.
connectionInstantiates a connection def between two end features.
allocateShorthand for an allocation usage: allocate source to target;
satisfy requirementAsserts that a design element satisfies a named requirement.
exposeImports elements into a view (like import, but always protected).

Relationships & Symbols

SymbolDescription
:>Specialization / subsetting. On definitions: inherits and refines a parent type. On usages: subsets an inherited member.
:>>Redefinition. A usage overrides an inherited member — narrower than subsetting. Also used to set a feature value inline.
::>Reference subsetting. An end feature references an existing usage without owning it. Used mainly on connection ends.
:Typing. A usage is classified by a definition.
bind … = …Binding connector. Declares that two features always have equal values.
= <expr>Feature value. Assigns a fixed or default value to a feature (not a connector).
sysml
part def Truck :> Vehicle { ... }       // specialization
part engine :>> powerUnit;              // redefinition
end part hub ::> mainSwitch;            // reference subsetting
part w : Wheel;                         // typing
bind tank.fuelOut = engine.fuelIn;      // binding connector
attribute mass = 1200 [kg];             // feature value

Annotations & Modifiers

KeywordDescription
@Applies a metadata def to an element: @ Approved { by = "Jane"; }
docAttaches a documentation string: doc /* Human-readable description */
abstractMarks a definition or usage as abstract (cannot be instantiated directly).
variationMarks a definition whose members are mutually exclusive variant choices.

Views & Visualization

KeywordDescription
view defDefines a kind of view with filter conditions and a rendering rule.
viewA usage of a view def that selects concrete elements to expose.
exposeSelects elements into a view (supports ::* wildcard and ::** recursive).
filterBoolean condition limiting which elements are included.
renderSpecifies the rendering tool/format for the view.

Minimal example

sysml
package MySystem {

    attribute def Mass { attribute :>> num; attribute :>> mRef = 1 [kg]; }

    part def Engine {
        attribute mass : Mass;
        port powerOut;
    }

    part def Vehicle :> Engine {          // specializes Engine
        part engine : Engine;
        attribute :>> mass = 1200 [kg];   // redefines + sets value
        bind engine.powerOut = powerOut;  // binding connector
    }

    view def Overview {
        expose Vehicle::**;               // all nested elements, recursively
        filter not @SysML::AttributeUsage;
    }
}

Spec42 v0.50.0 · Released under the MIT License.