Sinelabore Homepage

Diagnostics#

When the code generator cannot make sense of a model it reports a message with a stable code. The codes are grouped by what went wrong, so the first digits already tell you where to look:

Range Area
E1001, E2008, M10xx State machine structure — reused from the UML backends
E30xx Type references — a name that should denote a type
E31xx Features and usages — attributes, ports, actions, flow nodes
W31xx Warnings — the model is accepted, but probably not what you meant

E… prevents usable code from being produced. W… and M… let generation continue.

Type references#

Code Message Typical cause
E3001 unresolved type ‘X’ Typo, missing import, or the type lives in another file that is not reachable from the primary one
E3002 ambiguous type ‘X’ Two wildcard imports bring in the same name — qualify it (Pkg::X)
E3003 type ‘X’ has wrong kind e.g. an item definition used where a port definition is required
E3004 type ‘X’ is not visible The type exists but is private in the package that owns it

Features and usages#

Code Message Typical cause
E3101 unresolved feature ‘X’ The attribute, port or part named here does not exist on the part or any of its base parts
E3103 feature ‘X’ has wrong kind e.g. an attribute used where a port is expected
E3105 cannot connect … / incompatible connection types A connect joins two in ports, two out ports, or ports of different types
E3107 action usage ‘X’ has no definition entry X; or do action X; names an action that is not declared on the part or its base parts
E3109 action usage ‘X’ binds n parameters but the definition declares m The call site passes the wrong number of parameters, or an in/out direction does not match
E3111 cannot resolve performer chain ‘X’ A segment of a.b.setOn does not exist — or the chain ends on a collection, which cannot be performed on. Perform on a named member instead
E3113 flow node ‘X’ is used as K1 but was already declared as K2 The same name appears twice in one action flow with different meanings
E3119 cannot resolve port ‘X’ used in a send action The port is not declared on the part or any of its base parts

Warnings#

Code Message What to do
W3115 ‘x’ adds values with different units Units are normalized but never converted. Either write both operands in the same unit, or ignore the warning if the mix is intended. Only + and - are checked — U*I is ordinary physics and stays quiet. See Attributes
W3117 ‘x’ declares a new empty action You wrote entry action x; where an action x already exists. That declares a second, empty one. To perform the existing action write entry x; or entry references x;. See States

State machine structure#

These come from the shared state machine backend and also appear for UML models.

Code Meaning
E1001 A default state is missing. With an init state leading into a choice, the else path is usually the one that is absent
E2008 A transition starts in a state that is not known in this machine — check for a typo in the source state, or a transition that starts in a history state
M1024 / M1032 A state is not reachable — no transition leads to it
M1054 A state has no outgoing transition, which usually indicates a dead end

Reading the location#

Messages carry the source position where available:

tl.sysml:212:9: W3117: 'setYellow' declares a new empty action.
                To perform an existing one write 'setYellow;' or 'references setYellow'.

Run the generator with -d to get the symbol table dump alongside the diagnostics; it shows how each name was classified (def, usage, use+def, connect) and which references were bound. That is usually the fastest way to see why a name did not resolve.

Cross-checking against the reference implementation#

The generator accepts a few constructs that stricter tools reject, and it cannot detect every modelling error. If a model generates cleanly but a SysML editor complains, the editor is usually right. See Tooling for how to validate a model against the SysML v2 reference implementation.