docs← Back to article

Markdown for LLMs

LDC-E4122 — A stage whose round range is empty

The source Markdown for this article. Copy it into your assistant or download it as a text file.

Download this articlePlain text ↗
# LDC-E4122 — A stage whose round range is empty

## What it means

A stage index runs from its lower bound to its upper bound in the declared
direction. When the direction contradicts the bounds — ascending from a
higher number down to a lower one — the range covers no rounds at all, and
there is nothing to execute. The compiler refuses the stage at its index.

Align the bounds with the direction: swap them, or declare the descending
direction the bounds already describe.

## Example

```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";

relation counter(i: Integer) kind institutional;
stage R { index i: Integer from 5 to 1; bind counter index 1; }
```

## Fix

```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";

relation counter(i: Integer) kind institutional;
stage R { index i: Integer from 1 to 5; bind counter index 1; }
```

## Engine message

The engine reports this in its own wording:

```text
example.law:6:11: error LDC-E4122: STAGE_DOMAIN_EMPTY: stage "R": direction ascending contradicts bounds 5 … 1 (§111.2 item 1)
```

## Related

- [Time](/constructs/time/) — how rounds and indices are written.