Errors
Errors have the form file:line:col: error: message. The output below is real:
it was produced by drumlin during this site’s build, without the file prefix.
Unknown names
drumlin suggests the closest declared name.
component Scheduler
component Worker
Scheduelr --> Worker
drumlin says:
3:1: error: unknown element `Scheduelr`; did you mean `Scheduler`?
Duplicate declarations
component Worker
component Worker
drumlin says:
2:11: error: `Worker` is already declared
Unclosed blocks
component Outer {
component Inner
drumlin says:
2:1: error: missing `}` for `Outer`
Unmatched braces
component Lonely
}
drumlin says:
2:1: error: unmatched `}`
Invalid nesting
diagram package
package Outer { class Inner }
Outer +-- Inner
drumlin says:
3:1: error: `Inner` is drawn inside `Outer`, so containment needs no line; declare `Inner` outside the `Outer` block
Misplaced statements
provides IFoo
drumlin says:
1:1: error: `provides` and `requires` belong inside a component
Ambiguous ports
component A { port data }
component B { port data }
component C
data --> C
drumlin says:
4:1: error: port `data` is ambiguous; write `<component>.data`
Unimplemented diagram kinds
diagram timing "Handshake"
drumlin says:
1:1: error: diagram kind `timing` is not implemented; this prototype supports `component`, `package`, `sequence`, `state`, `activity`
Sequence diagrams
Names must be declared before use, so a typo is caught where it happens.
diagram sequence
participant Server
Servre -> Server : ping
drumlin says:
3:1: error: unknown participant `Servre`; did you mean `Server`?; declare it with `participant` before its first use
A return needs a message block to return from.
diagram sequence
participant A
return done
drumlin says:
3:1: error: `return` belongs inside a message block
A fragment continuation must match its opener.
diagram sequence
participant A
participant B
opt "x" {
A -> B : y
} else {
B -> A : z
}
drumlin says:
6:3: error: `else` must follow the `}` of an `alt`
State diagrams
Rules from UML 2.5.1 clause 14 are checked. A fork, for example, needs one incoming and at least two outgoing transitions.
diagram state
fork f
A --> f
f --> B
drumlin says:
2:6: error: fork `f` needs exactly one incoming and at least two outgoing transitions
A name used only once, close to another name, is reported as a likely typo. Write
state Idel first if the state really has that name.
diagram state
state Idle
[*] --> Idle
Idle --> Idel : wait
drumlin says:
4:10: error: unknown state `Idel`; did you mean `Idle`? declare it with `state Idel` if intended
A transition leaving a pseudostate cannot have a trigger.
diagram state
choice c
A --> c
c --> B : go
drumlin says:
4:7: error: a transition leaving a pseudostate cannot have a trigger; use `[guard] / effect`
A transition cannot join two orthogonal regions of one state.
diagram state
state A {
region {
[*] --> B
}
region {
[*] --> C
C --> B
}
}
drumlin says:
8:5: error: a transition cannot join two orthogonal regions of `A`
Activity diagrams
Statements after the end of a flow can never run.
diagram activity
start
stop
action "Late"
drumlin says:
4:1: error: this statement can never run: the flow already ended with `stop` on line 3; remove it, or move it before the end
Every branch of a fork needs a step.
diagram activity
start
fork {
action "A"
} and {
}
stop
drumlin says:
5:3: error: this `fork` branch is empty; each branch needs a step, or remove the branch
A flow must not end on a merge, because a merge has one outgoing flow.
diagram activity
start
if "x" {
action "A"
}
drumlin says:
3:1: error: the flow continues after this `if` but nothing follows; add a step, or end it with `stop` or `end`
When a diagram uses lanes, every action must be in one.
diagram activity
lane "A" {
}
start
action "B"
stop
drumlin says:
5:1: error: this diagram uses lanes, so this `action` must be inside a `lane` block