Skip to content
docs
Arxo ↗

LDC-E2120 — An aggregate argument the shape does not allow

For LLMs5 sections

Aggregate calls take a fixed set of arguments: the collection, an emptiness policy on some of them, and rounding controls on one of them. Each of these has its own place — a positional triple means rounding and belongs to averaging alone, an emptiness policy never applies to counting, and unknown names fit nowhere. When an argument lands where the shape has no slot for it, the compiler refuses the call at the call site.

The rule behind every refusal is the same: an option the evaluator would silently ignore must not be writable. Dropping the misplaced argument, or moving the policy to the argument the shape provides for it, clears the refusal.

Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Order;
relation amount(x: Order, a: Integer) kind empirical;
relation big(x: Order) kind institutional;
rule T strict { for x: Order; when amount(x, 1) and (count(collect y: Order where amount(y, 1), empty: 0) > 0); then big(x); }
Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Order;
relation amount(x: Order, a: Integer) kind empirical;
relation big(x: Order) kind institutional;
rule T strict { for x: Order; when amount(x, 1) and (count(collect y: Order where amount(y, 1)) > 0); then big(x); }

The engine reports this in its own wording:

Output
example.law:8:97: error LDC-E2120: count: `empty` does not apply (§59): an empty count always yields 0, and the emptiness policy has nothing to apply to. Before errata E-0195 it was accepted and SILENTLY not applied

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

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