Skip to content
docs
Arxo ↗

LDC-W2151 — Literal amounts with different currencies or units in one operation

For LLMs5 sections

Two literals written directly as operands of one operation carry different tags: two money amounts in different currencies, or two quantities with different unit tags. The operation is one that needs matching tags — addition, subtraction, division, a comparison, or the standard min, max and div_round.

The engine never converts between currencies or units implicitly, so such an operation cannot produce the value the text suggests. The warning names both literals. It looks only at literals written in place: the currency or unit of a variable, a constant or a computed value is not inferred, and a user function that happens to be called min keeps its own contract. A percentage is a plain decimal and has no unit tag. The warning never fails the check.

Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
relation owes(m: Money) kind institutional;
rule R strict {
then owes(100 KZT + 5 USD);
}
Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
relation owes(m: Money) kind institutional;
rule R strict {
then owes(100 KZT + 5 KZT);
}

The engine reports this in its own wording:

Output
example.law:8:15: warning LDC-W2151: «+»: literal operands have different currencies (KZT and USD); this operation requires matching tags and performs no implicit conversion (§48, §50, §58)

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

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