Skip to content
docs
Arxo ↗

LDC-E1318 — Priority over an out-of-scope rule

For LLMs5 sections

Rule names are scoped: a priority nested inside an interpretation resolves its sides against the rules of that same reading, not against the top-level rules that happen to share their names. The scoping prevents a reading from accidentally binding a sibling reading’s rule — but it also means a nested priority over rules that live outside the reading binds nothing at all. The compiler stops at the priority: an edge into the void is refused, not silently kept.

The repair is to declare the rules the priority means inside the same reading, or to move the priority to the level where its rules live. A priority and its rules belong to one scope.

Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
relation q(x: Text) kind institutional;
relation p(x: Text) kind institutional;
rule A1 defeasible {
for v0: Text;
when p(v0);
then q(v0);
}
rule A2 defeasible {
for v0: Text;
when p(v0);
then q(v0);
}
interpretation R1 {
status draft;
priority P1 {
prefer A1 over A2;
}
}
Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
relation q(x: Text) kind institutional;
relation p(x: Text) kind institutional;
rule A1 defeasible {
for v0: Text;
when p(v0);
then q(v0);
}
rule A2 defeasible {
for v0: Text;
when p(v0);
then q(v0);
}
interpretation R1 {
status draft;
rule A1 defeasible {
for v0: Text;
when p(v0);
then q(v0);
}
rule A2 defeasible {
for v0: Text;
when p(v0);
then q(v0);
}
priority P1 {
prefer A1 over A2;
}
}

The engine reports this in its own wording:

Output
example.law:19:14: error LDC-E1318: priority "P1": side "A1" and "A2" names no package rule (§116); the name is not declared as a rule or the rule dropped out of lowering. Priority over a nonexistent rule never applies

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

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