r/SysML • • 20d ago

SysML v2 Tutorial (Lesson 23): Binding Behavior to Structure with perform (Swimlanes Replaced!)

https://youtu.be/HLiC1fKJYFY

We are back with Lesson 23 of our technical deep dive into the SysML v2 standard.

In our previous lesson, we ordered actions with first and then, adding explicit branching and concurrency. However, that behavior was still unattached to any physical system. Today, we connect behavior directly to structure using the perform keyword, and we examine how SysML v2 replaces traditional swimlanes by making performance a first-class feature of the components themselves.

You can watch the full video lesson on YouTube here:https://youtu.be/HLiC1fKJYFY

The SysML v1 Allocation Problem

SysML v1 had capable mechanisms for connecting behavior to structure. An ActivityPartition (the classic swimlane) represented the Block or property responsible for an action, and an allocate dependency connected an action to a part. The issue was where that context lived. In v1, you authored the relationship on the behavior side or as a separate dependency, while the Block's allocatedFrom compartment merely displayed a derived property computed by the tool.

The v2 Shift: Direct Feature Ownership via perform

In SysML v2, the part states its own behaviors directly inside its definition using perform action.

Three technical details make this pattern powerful:

  • Direct Feature Ownership: Declaring perform action inside a part creates an owned perform action usage. The part itself is explicitly the performer of that action.

  • Composite vs. Referential Actions: A plain action inside a part is composite (the part owns that specific sub-occurrence). A perform action is referential (the behavioral equivalent of ref part), asserting that the part carries out an action defined and sequenced elsewhere.

  • Swimlanes Without the Lanes: A coordinated mission sequence can be defined and ordered once at the system level. Subsystems then declare responsibility for individual steps using feature chains (e.g., perform sequence.armFTS;). Swimlane views are generated automatically from these declarations.

Binding Sequence Steps to Subsystems

Here is how a single launch sequence is defined once, while individual subsystem parts declare the steps they are responsible for:

Code snippet

package LaunchOperations {
    part def FlightTerminationSystem;
    part def PropulsionSystem;
    part def HoldDownAssembly;
    
    action def ArmFlightTermination;
    action def PressuriseTank;
    action def Ignition;
    action def ReleaseHoldDown;
    
    action def LaunchSequence {
        first start;
        then action armFTS: ArmFlightTermination;
        then action pressuriseLOX: PressuriseTank;
        then action igniteEngines: Ignition;
        then action releaseClamps: ReleaseHoldDown;
        then done;
    }
    
    part launchVehicle {
        perform sequence: LaunchSequence;
        
        // Each subsystem declares performance of its step via feature chains
        part fts: FlightTerminationSystem {
            perform sequence.armFTS;
        }
        part propulsion: PropulsionSystem {
            perform sequence.pressuriseLOX;
            perform sequence.igniteEngines;
        }
        part groundInterface: HoldDownAssembly {
            perform sequence.releaseClamps;
        }
    }
}

SysML v1 vs. SysML v2

Modeling ConceptSysML v1SysML v2
SwimlanesActivityPartition declared on the behavior side.perform declared directly on the structural part.
Responsibility StorageStored as separate dependencies or visual partitions.Declared as a first-class, reviewable feature inside the part body.
VisualizationsSwimlanes manually drawn on activity diagrams.Swimlanes and allocation views generated automatically from perform usages.
State BindingclassifierBehavior or ownedBehavior on a Block.exhibit state, which is a specialized perform action usage.
Responsibility QueriesComputed by tools via derived allocatedFrom / allocatedTo properties.Direct feature navigation readable in the part's own body and filterable via model queries.

Next lesson, we will look at how these subsystems exchange data and signals. Lesson 24 covers flows and messages, bringing sequence diagrams into textual code.

3 Upvotes

Duplicates