Books / Law as Code in Practice: French Family Benefits / Appendix E

Appendix E

Solutions to the Exercises

5 min read

Risograph cover art in French blue and red on off-white paper: the facade of an apartment building with one window lit in red; a thin blue line runs down from it to a small stack of blank sheets.
Contents of Law as Code in Practice: French Family Benefits

Chapter 0 — What CNAF Pays, and Why It Is a Law-as-Code Problem

  1. Article R. 823-10 of the construction and housing code: the right starts on 1 April 2026, the first day of the month after the conditions were met (the lease began on 14 March; the application followed on 20 March). So the answer to the prediction is April, not March.
  2. The household must attach supporting documents (R. 823-2 CCH). The fund must pay the net family allowances (L. 521-1 CSS) and inform the recipient (L. 583-1 CSS).
  3. Article D. 521-1 gives percentages of the BMAF: computed exactly they give €425.5624 a month. Rounding that total to the cent gives €425.56. The yearly instruction prints each line rounded first (349.06 + 76.51), giving €425.57. The model reports both, and marks 425.57 as the result of a named reading.

Model counted on 11 October 2026: 27 packages, 2,662 rules, 1,945 scenario files.

Chapter 1 — Sources and Editions: Which French Text Applies on Which Date

  1. No: it is the resource base counted by the model.
  2. The legal date of the question.
  3. The inputs that the new edition requires, here the monthly resource records and relevant household facts.

Chapter 2 — The Birth Grant: First Rule, First Answer

  1. Yes: ressources <= plafond.
  2. No. There is no annual-resource fact from which to make that comparison.
  3. The annual resources under the applicable resource rules, represented here by ressources_annuelles.

Chapter 3 — Parameters and Revaluation: The BMAF and the Yearly Instruction

  1. 2.2975: 229.75% of the base.
  2. No. The base is a supplied input in each cohort file.
  3. The source anchors, together with the row’s validity window and pinned publication records.

Chapter 4 — One Family, One Decision: The Garnier Household in April 2026

  1. The conditions were met in March, before the month of the application (May). The second sentence of R. 823-10 — rule OuvertureMoisDemande — applies: the aid is due from the first day of the month of the application, 1 May 2026. The rule OuvertureApresConditions does not apply, because its condition “conditions month ≥ application month” is false.
  2. The housing allowance: the model refuses with INEXACT_DIVISION, because D. 823-16 makes the aid decrease in proportion without saying how to round, and the quotient has no finite decimal value.
  3. The duty to justify the change with the request for review (JustifierChangements), created by R. 823-3 of the construction and housing code.

Chapter 5 — How a Scenario Is Written

  1. given.
  2. The annual-resource input equals the constructed ceiling, and the test expects TRUE_ONLY for the right.
  3. The same status could be reached on unintended grounds; the proof identifies the rule and facts used.

Chapter 6 — Housing Aid: The APL Formula and the K Coefficient

  1. Downward to two decimal places.
  2. No. Af is the formula component; subsequent adjustments are separate steps.
  3. They contain the text used for the working reading of the image-published formula.

Chapter 7 — When the Text Does Not Specify Rounding

  1. €164.76 under the selected reading.
  2. No. It reports a calculation that requires a rounding choice.
  3. Both return RUNTIME_ERROR with INEXACT_DIVISION. The unchanged PpPlancherFinal belongs to a separate reading group; this refusal does not decide entitlement.

Chapter 8 — One Text, Two Readings

  1. INTERPRETATION_REQUIRED.
  2. No. The above-threshold file does not exercise the floor’s effect.
  3. No: they are the personal contribution and formula aid component in an isolated test.

Chapter 9 — A Human Must Decide: Decent Housing

  1. Not established, with the status requires judgment. The request concerns logement_decent for the Garnier household and is addressed to the paying body (OrganismePayeur).
  2. The end of the third sentence: the rent reduction gives the owner no ground to seek termination of the lease. The household holds the immunity (NonResiliationBailNonDecence), against the landlord.
  3. The calculated amount, €189.95295 a month, is established. Whether it is paid waits for the decency assessment.

Chapter 10 — Duties of the Fund and the Household

  1. No: existence and performance are distinct.
  2. No: its recorded expectation is undetermined.
  3. The fund’s duty to inform recipients about the nature and extent of their rights.

Chapter 11 — A Family Over Time: Overpayments, Deductions, Prescription

  1. No: the gross grant is a supplied input.
  2. March 2026: €318.40, because recovery of the AF overpayment is supplied as time-barred and both carry-over amounts are zero.
  3. No: the served PA amount is supplied; that entitlement calculation belongs to a separate scenario.

Chapter 12 — Remission of a Debt, Prior Review and Deadlines

  1. No: the debt’s grounds are not contested in this remission procedure.
  2. No: it is a notification deadline; the text also provides an implied rejection for silence.
  3. No: it demonstrates grounds affecting recovery during challenge.

Chapter 13 — Explaining a Decision to the Recipient

  1. This is a different file, without the age supplement and with different resources.
  2. The degree and manner of the algorithm’s contribution, including the human role.
  3. No. It still needs native French legal and editorial qualification.

Chapter 14 — Testing a Reform Before It Is Signed

  1. One expression in one rule: CoeffNominal retains c * 1.05 instead of c, so the 2026 coefficient becomes 1.008 × 1.05 and the BMAF €502.07 instead of €478.16.
  2. The recorded impact run compared the two versions of the package and evaluated no scenarios, so an unchanged outcome there is an absence of observation, not a conclusion — which is why the draft is executed in Step 2 and the family files are run in Step 4.
  3. By €27.26 (from €545.10 to €572.36). The allowance is a percentage of the BMAF that grows with the number of children — 114% for four children against 32% for two — so the same 5% on the BMAF moves a larger amount.

Chapter 15 — Finding Families Who Do Not Claim

  1. No. It identifies a row for a complete question and review.
  2. No. It should pass for further examination.
  3. Nothing: its full entitlement was not evaluated in this scene.

Chapter 16 — An Assistant That Answers With Proof

  1. law_ask; search and rules prepare the question.
  2. Ask for the information and inspect the missing-premise response.
  3. No. It was the recorded compatible MCP client.

Chapter 17 — Audit and Reproduction

  1. No. It establishes repeatability of this saved computation.
  2. No. Preserve the request, executable bundle and supporting materials.
  3. No. It is a new case question.

Chapter 18 — Migrating a Rulebook: Other Tools’ Tests as Acceptance

  1. Preserve it. A justified correction needs its own evidence and review.
  2. Inputs, date, units, components, parameters, defaults and readings.
  3. Sourced external tests, explicit mappings, execution of both sides and qualified differences. This chapter has not completed that work.

Contents · PDF · EPUB · Free under CC BY 4.0

Law as Code in Practice: French Family Benefits

Contents

Reading settings

Text size
Appearance

Preferences and your reading place are saved only in this browser.