Skip to content
docs
Arxo ↗

LDC-E2105 — A call to an undeclared function

For LLMs5 sections

A function call inside a rule needs a declaration behind it: either a function declared in the same file or one of the standard functions the language ships. A call to any other name is rejected at the call site — the compiler will not invent a meaning for it.

Declaring the function with its parameters and result, correcting a misspelled name, or switching to the intended standard function fixes it.

Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity P;
relation seen(a: P) kind institutional;
relation noted(a: P) kind institutional;
rule R strict { for x: P; when seen(mystery(x)); then noted(x); }
Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity P;
function mystery(x: P) -> P = x;
relation seen(a: P) kind institutional;
relation noted(a: P) kind institutional;
rule R strict { for x: P; when seen(mystery(x)); then noted(x); }

The engine reports this in its own wording:

Output
example.law:8:37: error LDC-E2105: function "mystery" is not declared (neither in the file nor in the std v1 list)

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

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