Skip to content
docs
Arxo ↗

LDC-E4102 — A dependency cycle the strata cannot order

For LLMs5 sections

Rules are evaluated stratum by stratum: a rule that reads a predicate runs only after that predicate’s producers have completed. A dependency cycle through a non-monotone edge — a bare or status-tested read that loops back to its own producer — has no stratum to run first, so the program cannot be ordered at all. The compiler refuses the cycle at the rule that closes it and names the predicates involved.

The fix breaks the loop: read the predicate through a monotone form the ordering accepts, or restructure so the dependency runs one way only. A cycle through monotone reads alone stays lawful and silent.

Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
relation p(x: Text) kind institutional;
relation q(x: Text) kind institutional;
relation r(x: Text) kind institutional;
rule A strict { for x: Text; when q(x); then p(x); }
rule B strict { for x: Text; when p(x); then q(x); }
Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
relation p(x: Text) kind institutional;
relation q(x: Text) kind institutional;
relation r(x: Text) kind institutional;
rule A strict { for x: Text; when q(x); then p(x); }
rule B strict { for x: Text; when r(x); then q(x); }

The engine reports this in its own wording:

Output
example.law:8:6: error LDC-E4102: predicate dependency cycle through p → q with a [status] edge — the program is not stratifiable (§110/§191: cycles allow only monotone supported(P) edges §65/§103); cycle rules: A, B

Documentation for Arxo. Writings — blog.arxo.io.

Anonymous visit counts on stats.arxo.io, no cookies.