LDC-Q2005 — The expression names a variable the query never bound
For LLMs5 sections
What it means
Section titled “What it means”Inside a filter or a return list, every name must come from somewhere: a source introduced at the head of the query. A name with no source is not an empty value and not a typo the engine will guess past — the expression cannot be evaluated for any row, so the query stops at the first row that reaches it.
Bind the name in a source, or replace it with the source variable the expression was meant to read.
Example
Section titled “Example”Both queries below run against this package:
language "law.core" version "0.2";package demo.diagnostics version "0.1.0";namespace "urn:law:demo:diagnostics";
entity Applicant;relation resident(a: Applicant) kind institutional;relation permit_eligible(a: Applicant) kind institutional;
rule PermitEligibility strict { for a: Applicant; when resident(a); then permit_eligible(a);}The filter reads a name no source introduces:
from r in rules where zzz == 1 select rfrom r in rules select rDocumentation for Arxo. Writings — blog.arxo.io.
Anonymous visit counts on stats.arxo.io, no cookies.