Markdown for LLMs
LDC-E1312 — Transition to an undeclared state
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# LDC-E1312 — Transition to an undeclared state
## What it means
A transition moves between states of its own procedure: both ends must
name states that procedure declares, and a transition missing an end
declares no move at all. An endpoint the procedure never declared
points nowhere, so the compiler stops at the unknown name.
The repair is a spelling check against the state list: fix the name,
declare the missing state, or complete the transition with both ends.
Every endpoint then lands on a state that exists.
## Example
```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Tenant;
procedure Review(t: Tenant) {
state Open initial;
state Closed terminal;
transition Decide {
from Open;
to Missing;
}
}
```
## Fix
```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Tenant;
procedure Review(t: Tenant) {
state Open initial;
state Closed terminal;
transition Decide {
from Open;
to Closed;
}
}
```
## Engine message
The engine reports this in its own wording:
```text
example.law:11:12: error LDC-E1312: transition "Decide": state "Missing" is not declared in the procedure (§160)
```
## Related
- [Procedures](/constructs/procedure/) — states, transitions, and how a procedure runs.
- [LDC-E1313](/diagnostics/LDC-E1313/) — no transition may leave a terminal state.