Learn a person’s duties
Intent
Section titled “Intent”I want to learn a person’s duties.
Wrong form and why it stays silent
Section titled “Wrong form and why it stays silent”Absence of a chosen reading must not be passed off as absence of duties. A group with one alternative is also not a choice.
alternatives Yes;Correct form
Section titled “Correct form”language "law.core" version "0.2";package recipe.m03 version "1.0.0";namespace "urn:recipe:m-queries:03";source Act { kind policy; }edition E of Act { language ru; officiality unofficial; materialization_status ABSTRACT_ONLY; in_force [@2026-01-01, infinity); }fragment F in E { kind article; locator "1"; text ru unofficial "Учебная норма имеет два прочтения."; }entity Person;relation registered(p: Person);relation filed(p: Person);relation receipt(p: Person);rule Create strict { for p: Person; when registered(p); then duty Filing { bearer p; achieve filed(p) during [@2026-09-01, @2026-09-30]; }; }rule NoDuty strict { for p: Person; when registered(p); then receipt(p); }interpretation Yes of F { status disputed; include Create; }interpretation No of F { status disputed; include NoDuty; }interpretation_group Meaning { alternatives Yes, No; selection exactly_one; }Frozen execution scene
Section titled “Frozen execution scene”| Input / variant | Question | Expectation |
|---|---|---|
| 1. no choice | positions() | evaluation_status == INTERPRETATION_REQUIRED; not positions_present(); |
| 2. there is a duty | positions() | evaluation_status == COMPUTED; position(Filing, ACTIVE); |
| 3. no duty | positions() | evaluation_status == COMPUTED; not positions_present(); |
| 4. no ground | positions() | evaluation_status == COMPUTED; not positions_present(); |
missing reading choice requires interpretation
test "missing reading choice requires interpretation" { given { context { legal_time @2026-09-13; decision_time @2026-09-13T09:00:00Z; knowledge_time @2026-09-13T09:00:00Z; timezone "UTC"; } assert registered(entity_ref("urn:recipe:m-queries:p")); } evaluate positions(); expect evaluation_status == INTERPRETATION_REQUIRED; expect not positions_present();}duty holder reported
test "duty holder reported" { given { context { legal_time @2026-09-13; decision_time @2026-09-13T09:00:00Z; knowledge_time @2026-09-13T09:00:00Z; timezone "UTC"; interpretation Yes; } assert registered(entity_ref("urn:recipe:m-queries:p")); } evaluate positions(); expect evaluation_status == COMPUTED; expect position(Filing, ACTIVE);}no duty reports nothing
test "no duty reports nothing" { given { context { legal_time @2026-09-13; decision_time @2026-09-13T09:00:00Z; knowledge_time @2026-09-13T09:00:00Z; timezone "UTC"; interpretation No; } assert registered(entity_ref("urn:recipe:m-queries:p")); } evaluate positions(); expect evaluation_status == COMPUTED; expect not positions_present();}missing ground reports nothing
test "missing ground reports nothing" { given { context { legal_time @2026-09-13; decision_time @2026-09-13T09:00:00Z; knowledge_time @2026-09-13T09:00:00Z; timezone "UTC"; interpretation Yes; }
} evaluate positions(); expect evaluation_status == COMPUTED; expect not positions_present();}positions() returns the positions of the whole presented case. For the single
position of scene 2, holder == "urn:recipe:m-queries:p" is checked;
this is an explicit holder check, not a hidden query filter.
An independent question truth(registered(p)) on the same input without a reading
choice returns TRUE_ONLY / COMPUTED, although the choice issue remains.
An empty list in scene 1 must not be read as proof that a duty is absent.
Check of result fields and extra inputs:
>>> import runpy>>> checks = runpy.run_path("docs/recipes/m-queries/resources/check.py")>>> checks["positions"](https://github.com/arxohq/law/blob/master/docs/recipes/m-queries/3)TrueCounterfactual
Section titled “Counterfactual”The sidecar mutation reproduces LDC-E0201. Counterfactual table variants are executed separately; input errors are not passed off as NEITHER.
Boundary
Section titled “Boundary”The positions collection and the normative status of a concrete position are different levels. A duty without a performance fact remains ACTIVE inside the window; unknown performance after the window is not examined here.
Pitfall
Section titled “Pitfall”The choice status belongs to the dependent result — see Two readings of one norm.
Documentation for Arxo. Writings — blog.arxo.io.
Anonymous visit counts on stats.arxo.io, no cookies.