Markdown for LLMs
LDC-E1313 — Transition out of a terminal state
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# LDC-E1313 — Transition out of a terminal state
## What it means
A terminal state ends the run: marking a state terminal promises that
nothing leaves it. A transition that starts from such a state breaks
that promise — kept silent, the terminality would be a mere comment —
so the compiler stops at the transition.
The repair is to honor the ending: point the transition at a
non-terminal state, or drop the terminal mark if the state genuinely
has somewhere to go. Ends stay ends.
## 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 Mid terminal;
state Closed terminal;
transition Back {
from Mid;
to Closed;
}
}
```
## 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:10:16: error LDC-E1313: transition "Back" exits terminal state "Mid" — terminality would otherwise be a comment (§160)
```
## Related
- [Procedures](/constructs/procedure/) — states, transitions, and how a procedure runs.
- [LDC-E1312](/diagnostics/LDC-E1312/) — transitions must name declared states.