Skip to main content

UML (Unified Modeling Language)

UML (Unified Modeling Language) is the graphical modelling language standardised by the OMG (Object Management Group) for specifying, visualising and documenting software systems. UML 2 defines 14 diagram types in the categories structure and behaviour — from the class diagram to the state machine diagram.

Diagram categories: structure and behaviour

The 14 diagram types of UML 2 are divided into two categories. Structure diagrams describe the static composition of a system, behaviour diagrams its dynamics:

CategoryDiagramsTypical questions
StructureClass diagram, object diagram, package diagram, component diagram, composite structure diagram, deployment diagram, profile diagramWhat building blocks does the system consist of? How are they related? What runs where?
BehaviourUse case diagram, activity diagram, state machine diagram, sequence diagram, communication diagram, timing diagram, interaction overview diagramWhat does the system do? In what order? How does it react to events?

In practice, only a core of these is used regularly: class diagrams for static structure, sequence diagrams for interactions and state machine diagrams for event-driven behaviour — the latter describe state machines and are particularly widespread in embedded development.

Sketch or model?

UML is used in two fundamentally different ways. As a sketch, it serves communication: a quick diagram on a whiteboard to explain an architecture idea. That is legitimate and useful, but the semantics exist only in the heads of those involved. As a formal model, in contrast, UML is a machine-readable artefact: behind every element stands the UML metamodel with defined meaning, a tool can check the model for consistency, and further artefacts can be derived from the model. Only this second way of using it unlocks the real value of the language — and via the profile mechanism, UML can be extended with domain-specific concepts along the way.

Role in model-driven software development

In model-driven software development (MDSD), UML models are not documentation but source artefacts: a generator translates them deterministically into executable code. Class diagrams yield data structures and interfaces, state machine diagrams yield complete behaviour implementations in C, C++, Java or Python. The same input produces the same output — this reproducibility is more than a convenience: in regulated development under ISO 26262, IEC 61508 or DO-178C, it is the foundation of the evidence chain. Hand-written code and generated code remain cleanly separated; the model is the single source of truth for the generated behaviour.

Relationship to SysML and DSLs

For systems engineering, UML was evolved into SysML: SysML v1 is defined as a UML profile and replaces software-specific concepts with discipline-neutral blocks. Where even a profiled UML does not adequately fit the domain, domain-specific languages (DSLs) are the alternative — dedicated languages with their own metamodel, tailored exactly to a subject area.

UML in practice

The pragmatic approach has prevailed: no attempt to specify a system completely up front in all 14 diagram types, but targeted use of a few diagram kinds where they carry their weight — architecture documentation, interface contracts and, above all, code generation from behaviour models. What matters is the discipline of maintaining the model as a binding artefact: a UML model that runs alongside the code and goes stale is effort without benefit; a model from which code is generated cannot go stale at all.

Frequently asked questions

Is UML outdated?
No — but its use has changed. UML is rarely used today as a complete up-front specification of entire systems. What remains relevant is a pragmatic core (above all class, sequence and state machine diagrams) for architecture communication and as a formal basis for code generation, for example from state machines in embedded development.
What is the difference between UML and SysML?
UML targets software systems, SysML targets complete technical systems made up of hardware, software and mechanics. SysML v1 is defined as a UML 2 profile: it reuses a subset of UML, replaces software-specific concepts with discipline-neutral blocks and adds requirement and parametric diagrams.
Can you generate code from UML models?
Yes — that is the core of model-driven software development (MDSD). The prerequisite is that the model is maintained as a formal artefact with clean semantics, not as a mere sketch. Generation from state machines is particularly well established: the same model deterministically produces the same code — important for regulated development.

Related terms

Reviewed by Andreas Mülder, Principal Software Engineer on July 20, 2026