Skip to content

Docs · Engines

SysML v2 (structure)

Model-based systems engineering in the OMG SysML v2 textual notation — parts, ports, interfaces, item flows, specialization and redefinition — drawn as an interconnection view and a decomposition, and CHECKED. An internal block diagram hides everything that decides whether a system can actually be wired: a port's directions live in another box on another page, its conjugation is a single `~`, an interface's end order appears nowhere on the page at all. Delete one tilde from a correct fuel system and the figure is pixel-identical while every direction reverses. This engine decides thirteen questions the picture cannot show — two ports that both supply and never consume, an interface bound the wrong way round, a flow carrying a payload its destination does not accept, a redefinition that misspelt what it replaces and silently declared a second feature beside it, a composition cycle no instance of which can be built — and it distinguishes a defect in the model from a library it does not carry, so `import ISQ::*` produces gaps rather than forty false errors.

Architectural composition of precision sculptural forms
Templates
8
Source language
plaintext
Workstation
Studio
Engine id
sysml

In the same space

Most users come to SysML v2 (structure) from Cameo Systems Modeler, IBM Rhapsody, Sparx Enterprise Architect (SysML), SysML v2 Pilot Implementation or PlantUML block diagrams. flowss runs this engine in the browser — no install, shareable via URL, exportable to PNG / SVG / PDF / source.

Syntax at a glance

package FuelSystem {
  item def Fuel;
  port def FuelPort { out item feed : Fuel; in item spill : Fuel; }
  interface def FuelLine { end supplier : FuelPort; end consumer : ~FuelPort; }
  part def Tank { port outlet : FuelPort; }
  part def Pump { port inlet : ~FuelPort; }
  part def Vehicle {
    part tank : Tank;
    part pump : Pump;
    interface feed : FuelLine connect tank.outlet to pump.inlet;
  }
}

Paste this in the Studio code pane to see SysML v2 (structure) render live. The full grammar is at the upstream-docs link above.

Sample templates

All 8 →
architecture
SysML v2 — Fuel System, Wired Correctly

The reference model, and the one to copy. A tank, a pump and an engine joined by a typed fuel interface, with the filler neck as a boundary port of the vehicle. Every port opposes the port it meets, every interface binds its ends in the order its definition declares, the payload conforms, and the item arriving at the boundary continues to something inside. Reports clean — and the figure is byte-for-byte the same as the next template's, which does not.

architecture
Teaching Case — One Character, Every Direction Reversed

The same fuel system with a single `~` deleted from the pump's inlet. The connection list is byte-identical, the figure is pixel-identical, and every direction in the joint has reversed: `feed` is now `out` at both ends and `spill` is `in` at both, so there are two suppliers, two consumers and nothing transferable. This is the commonest error in hand-written SysML v2 and it is invisible at any zoom. Open it beside the template above.

architecture
Teaching Case — An Interface Bound the Wrong Way Round

A drawn line has no ends. `connect pump.inlet to tank.outlet` and `connect tank.outlet to pump.inlet` are the same segment between the same two squares, and the definition that says which port belongs at which end is on another page. The engine evaluates the conformance predicate twice — in declared order and reversed — so it can say specifically that the ends are swapped and that exchanging them fixes it, rather than only that something does not conform.

architecture
Teaching Case — A Redefinition That Redefined Nothing

A redefinition is the one construct where a typo does not fail. `part redefines engien : TurboEngine;` does not replace the inherited `engine` — it silently declares a SECOND feature beside it, so the specialized vehicle has two engines. The compartment lists a part called `engien` in exactly the font it would list a correct one, and the inherited engine is not drawn at all because inherited features usually are not. The second finding here is the sibling defect: a redefinition that widens the multiplicity it replaces, so the specialization stops requiring what its supertype required.

architecture
Teaching Case — A System That Cannot Be Built

`Assembly` composes a `Subassembly`, which composes a `Module`, which composes an `Assembly`. Composition is ownership, so no instance of any of the three can ever be constructed — building one requires building itself. It draws as three rectangles and three composition lines, usually across two pages of a decomposition view, and nobody traces the loop by eye. The same document also holds a `ref part` cycle, which is perfectly legal: a reference is not ownership, and this engine excludes reference edges deliberately rather than reporting the two together.

architecture
Teaching Case — What a Library This Engine Does Not Carry Looks Like

The most important template in this set, and nothing in it is wrong. Every real SysML v2 model opens with `import ISQ::*`, and the quantity kinds it brings live in a model library shipped with the standard that this engine does not carry. So `ISQ::MassValue` is reported as a GAP with the reason — not as an error against a type that is perfectly correct, and not as a pass on a name that was never checked. Delete the import line and the same names become hard findings, because then nothing could have supplied them. Same model, two honest answers, and collapsing them in either direction is how a checking tool gets switched off in an afternoon.

Engine reference: sysml · ← Browse all engines · Quick-start guide