Markdown for LLMs
LDC-E1311 — Procedure without exactly one initial state
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# LDC-E1311 — Procedure without exactly one initial state
## What it means
Every procedure starts somewhere exactly once: one of its states must
be marked initial, and marking two splits the start the transitions
cannot follow. A procedure with no initial state — or with more than
one — has no single entry point, so the compiler stops at the procedure
name and counts what it found.
The repair is to mark exactly one state initial. The transitions then
read from a start that exists and is unique.
## 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;
state Closed terminal;
}
```
## 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;
}
```
## Engine message
The engine reports this in its own wording:
```text
example.law:6:11: error LDC-E1311: procedure "Review": exactly one state must be `initial` (§160), declared 0
```
## Related
- [Procedures](/constructs/procedure/) — states, transitions, and how a procedure runs.
- [LDC-E1312](/diagnostics/LDC-E1312/) — transitions must name declared states.