Lesson 9: The Power of Conjugation
The Magic Tilde ~
In SysML v1, conjugation was already a defined concept. Originally, it relied on a UML boolean property (isConjugated=true). Later, SysML v1.6 introduced the formally defined ~InterfaceBlock stereotype (pronounced "conjugated interface block") to explicitly reverse the direction of FlowProperties and DirectedFeatures without requiring manual duplication.
However, because SysML v1 was a profile built on top of UML, this was achieved via constraints that mandated tools to automatically generate these inverted features via stereotypes.
SysML v2 elevates conjugation from a profile stereotype to a native component of the language's abstract syntax and formal semantics. Instead of using FlowProperties inside an InterfaceBlock, SysML v2 utilizes standard Directed Features (features marked as in, out, or inout) directly inside a port def.
Textual Notation
Let's build a High-Voltage Charging System. Notice we only write the ChargingPort definition once.
package ChargingSystem {
// 1. Import the standard International System of Quantities library
import ISQ::*;
// Define the data payload
item def PaymentData;
// 2. Define a specific port purely for electrical power
port def PowerPort {
// Using the standard ISQ library for the quantity kind
out attribute transferredEnergy : EnergyValue;
}
// 3. Define a specific port purely for communication
port def DataPort {
in item paymentInfo : PaymentData;
}
// 4. Combine them into a composite port (representing the physical plug)
port def ChargingPort {
port powerPin : PowerPort;
port dataPin : DataPort;
}
// 5. System Usage
part def SuperCharger {
port plug : ChargingPort;
}
part def ElectricVehicle {
// Conjugating the composite port automatically flips
// the directions for BOTH the powerPin and dataPin!
port socket : ~ChargingPort;
}
}Graphical Notation

Understanding the Textual Notation
From the charger’s perspective, electrical energy flows out, and payment authorization data flows in.
The charger then uses the port exactly as defined:
part def SuperCharger { port plug : ChargingPort;} |
|---|
However, from the vehicle’s perspective, the electrical energy flows in, and the payment data flows out.
So the vehicle uses the conjugated form:
part def ElectricVehicle { port socket : ~ChargingPort;} |
|---|
For the vehicle, the exact same nested ports and directed features are present, but their directions are mathematically reversed. Energy comes into the socket's power pin, and payment information goes out of the data pin.
We did not create a second port definition. We used one definition from two complementary perspectives.
Deep Dive: The Abstract Syntax of Conjugation
- In SysML v2, you do not just visually tag a port as conjugated; the language dynamically constructs the conjugated type in the mathematical background.
- According to the SysML v2 abstract syntax, every
port defimplicitly declares a single, nestedConjugatedPortDefinition. This generated definition inherits all the features of the original port, but its directed features are mathematically reversed via aPortConjugationrelationship:inbecomesout, andoutbecomesin. (The directioninoutis its own conjugate and remains unchanged). - The name of this generated definition is exactly the name of the original port with a tilde (
~) prepended. For example, if you define a port namedChargingPort, the SysML v2 tool automatically builds a conjugated definition uniquely identified asChargingPort::'~ChargingPort'. - When you type a usage with a tilde (e.g.,
port socket : ~ChargingPort), it is a concrete syntax shorthand that binds the usage directly to this generated, invertedConjugatedPortDefinition.
V1 vs. V2 Cheat Sheet
| Concept | SysML v1 | SysML v2 |
|---|---|---|
| Conjugation Mechanism | Used the ~InterfaceBlock stereotype, which applied constraints to reverse the feature directions of the original block. (The older UML isConjugated=true property on ports was deprecated). | A native PortConjugation relationship in the abstract syntax. Every port def automatically contains a ConjugatedPortDefinition. |
| Flow Semantics | Handled using FlowProperty elements (with in, out, inout directions) owned by Blocks or Interface Blocks. | Handled using standard Directed Features. Any usage (attributes, items, parts) can be preceded by in, out, or inout keywords. |
Next Lesson
In the next lesson, we will look at the connection itself. In SysML v2, the "wire" between ports is a first-class structural definition. We will explore how an interface def acts as a blueprint, allowing you to specify connection ends and give the connection medium its own physical attributes.