Skip to content
docs
Arxo ↗

LDC-E2140 — Named arguments that do not match the signature

For LLMs5 sections

A call may name its arguments, but the names come from the declared signature of the relation — every parameter exactly once, no unknown names, no repetitions, no mixing with positional arguments. The compiler orders the given values by the signature, so anything the signature does not contain leaves a parameter without a value. When the names do not line up with the signature, the compiler refuses the call at the call site.

The fix is a rename at the call: spell every parameter name exactly as declared, once each. Calls without a declared signature to order by — function calls and comprehension-free aggregates — cannot take named arguments at all.

Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Person;
relation paid(person: Person, amount: Integer) kind empirical;
relation rich(p: Person) kind institutional;
rule R strict { for p: Person; when paid(person: p, bogus: 1); then rich(p); }
Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Person;
relation paid(person: Person, amount: Integer) kind empirical;
relation rich(p: Person) kind institutional;
rule R strict { for p: Person; when paid(person: p, amount: 1); then rich(p); }

The engine reports this in its own wording:

Output
example.law:8:37: error LDC-E2140: parameter "amount" must be given exactly once; check for unknown and repeated names

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

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