Update for SysML v2. This version continues to expand the textual modeling subset with better packaging, specialization, and state machine support. Highlights since 7.2:
- Same-file package imports: membership imports (e.g.
import Types::Sensor;) and wildcards (import Types::*;) with visibility, so types resolve across packages in one model file. - Namespace-aware type resolution for qualified names (e.g.
Types::Actuator) and imported usages in the generated C++ code. - Parallel (orthogonal) regions in state machines.
ref,abstract, andsubsetson part and item usages, including collection views for abstract subsets.- Feature redefinition with
:>>/redefineson part and attribute usages. - Package-level action definitions and package-scoped attributes; clearer action call conventions (
:>specialization, abstract action checks). - Improved part usage and scoped lookup when the same action name appears in multiple parts.
Import Example#
package Types {
private import ScalarValues::*;
part def Sensor {
attribute reading : Real = 1.0;
}
}
package Test {
private import Types::*;
private import ScalarValues::*;
part def Probe :> Sensor {
attribute label : Real = 10.0;
}
}Redefinition Example#
part def Engine;
part def ElectricEngine;
part def Vehicle {
attribute speed : Real default 50.5;
part engine : Engine;
}
part def SportsCar :> Vehicle {
attribute speed :>> Vehicle::speed : Real = 120;
part engine :>> Vehicle::engine : ElectricEngine;
}Orthogonal Regions Example#
state def SM parallel {
state RA {
entry; then SA1;
state SA1;
state SA2;
}
state RB {
entry; then SB1;
state SB1;
state SB2;
}
}