Skip to content
docs
Arxo ↗

LDC-E2102 — A predicate with no declaration

For LLMs5 sections

A rule body may only call predicates the file declares as relations. A name the file never declares is most often a typo, a predicate that was renamed in the declarations but not in the rule, or a helper the author meant to add and forgot. The compiler stops at the call instead of treating the unknown name as a fresh predicate.

Declaring the relation with its parameters, or correcting the name at the call site, clears the diagnostic.

Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity P;
relation known(a: P, b: P) kind institutional;
rule R strict { for x: P; when nowhere(x); then known(x, x); }
Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity P;
relation known(a: P, b: P) kind institutional;
relation noted(a: P, b: P) kind institutional;
rule R strict { for x: P; for y: P; when known(x, y); then noted(x, y); }

The engine reports this in its own wording:

Output
example.law:7:32: error LDC-E2102: predicate "nowhere" is not declared as a relation in this file

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

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