Skip to content
docs
Arxo ↗

LDC-E4104 — A priority cycle between rules

For LLMs5 sections

Priorities order defeasible rules: one rule preferred over another wins their conflict. That order must itself be acyclic — a rule preferred over its rival, which is in turn preferred over the first, leaves no rule on top and no conflict resolved. The compiler refuses the cycle where the closing edge lands.

The fix drops or reverses one edge of the loop so the order runs one way. A single edge between two conflicting rules, and edges that never close into a loop, stay 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 D1 defeasible { for x: Text; when q(x); then p(x); }
rule D2 defeasible { for x: Text; when q(x); then not p(x); }
rule S1 strict { for x: Text; when q(x); then r(x); }
priority P1 { prefer D1 over D2; }
priority P2 { prefer D2 over D1; }
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 D1 defeasible { for x: Text; when q(x); then p(x); }
rule D2 defeasible { for x: Text; when q(x); then not p(x); }
rule S1 strict { for x: Text; when q(x); then r(x); }
priority P1 { prefer D1 over D2; }

The engine reports this in its own wording:

Output
example.law:11:10: error LDC-E4104: static priority cycle between rules [D1, D2] — error in executable profile (§192/§106)

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

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