OCSMP Model Builder Advanced study materials
OCSMP Model Builder Advanced study resources

OCSMP Model Builder Advanced: Adapting SysML: Metamodeling, Profiles, Libraries, and Viewpoints

OCSMP Model Builder Advanced · Work through your exam, one topic at a time.

All guide sections

Adapting SysML: Metamodeling, Profiles, Libraries, and Viewpoints

Domain 1 tests how SysML itself can be adapted without abandoning its UML foundation: MOF metamodel levels, stereotype/profile mechanisms, reusable model libraries, and viewpoint definitions for stakeholder-specific views.

Metamodel and profiles

SysML is a UML 2 profile, not a separate metamodel. At M2, UML metaclasses such as Class, Property, and Port are extended by stereotypes with tagged values and constraints. A domain profile imports the SysML/UML metamodel, defines stereotypes extending the appropriate metaclass or specializing an existing SysML stereotype, and is applied to a package before its stereotypes can be used. Stereotypes are dynamic classification: an element keeps its base metaclass but gains extra properties. A profile is packaged and versioned, and is applied through profile application; importing a package is not the same as applying a profile.

Model libraries and viewpoints

Model libraries hold reusable types, value types, and patterns; they are imported with public or private import and should be versioned with the model. A SysML viewpoint, stereotyped «Viewpoint», states stakeholder, concerns, and modeling method; a «View» conforms to a viewpoint and selects model content. Do not confuse viewpoint (specification) with view (actual diagram or model selection).

Worked example

Extend SysML for safety requirements. Create a profile SafetyProfile; define stereotype «SafetyRequirement» specializing SysML «Requirement»; add tagged value asil: String and an OCL constraint asil in {'A','B','C','D'}. Apply the profile to the Safety package, then apply «SafetyRequirement» to a requirement. Reasoning: reuse Requirement semantics and satisfy/derive links; only add safety metadata; constraints validate at M1. If you instead created a new M2 metaclass, you would lose SysML tool semantics and require a metamodel change.

Traps

Using a stereotype where a metaclass is required; forgetting to apply the profile; using package import as profile application; defining a viewpoint without concerns or conform; duplicating library elements instead of importing; assuming stereotype properties are inherited by ports or parts automatically.