LDC-E4102 — A dependency cycle the strata cannot order
For LLMs5 sections
What it means
Section titled “What it means”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.
Example
Section titled “Example”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); }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); }Documentation for Arxo. Writings — blog.arxo.io.
Anonymous visit counts on stats.arxo.io, no cookies.