docs← Back to article

Markdown for LLMs

Catala

The source Markdown for this article. Copy it into your assistant or download it as a text file.

Download this articlePlain text ↗
# Catala

**In short:** Catala and Arxo both compute statutory outcomes from pinned
legal text with auditable derivations. This page is for a reader who knows
Catala — or is choosing a statute-computation tool — and wants the honest
map: shared ground, real differences, and what has actually been run.
For the hands-on concept mapping, see [Coming from
Catala](/language/coming-from-catala/).

## What Catala is for

Catala is a language for writing tax and benefit rules next to the statute
they come from. One variable gets a general definition plus an exception
tree; the text and the code live in the same literate file. Its strengths
are statute-grade datatypes (infinite-precision decimal, money rounded to
the cent, Gregorian dates with explicit ambiguity modes, and an
absent-or-present marker for missing values), a testing culture of scope
tests and cram tests with execution traces, and an opt-in proof plugin that
checks exception trees for gaps and overlaps with a solver. The core
translation from its default calculus has a mechanically checked proof;
the code backends are not covered by it.

## Where it meets Arxo

The overlap is direct: the same vehicle-damage assessment rules computed in
both languages, Catala's trace against Arxo's proof graph. Both sides pin
the source text, both derive the answer from rules rather than paraphrasing
the act, and both keep the derivation inspectable.

Comparability has edges. Catala has no first-class forms for working-day
calendars, act revisions, duties, units, or source hashes — those are done
by hand-written wrappers around the program. Contradictory input (two
records disagreeing about one fact) cannot be posed to a Catala variable,
which holds one value; Arxo keeps both supports in a dual answer. These are
recorded as limits, not defects.

## Key differences

- **Money rounding is a language property.** Catala rounds money-by-decimal
  products half away from zero in its runtime; Arxo computes exact
  arithmetic and refuses inexact division. Fractional-cent sums are expected
  to diverge — the contract says so before any run.
- **Conflicting applicable definitions are an engine property.** Two valid
  Catala definitions for one variable raise a runtime conflict error;
  Arxo keeps a dual status and requires a declared priority to resolve it.
  Detection versus status: different mechanism, neither side broken.
- **Absence is a value with a producer.** Catala marks a missing value
  absent; Arxo answers "not established" and can name the missing premise.
  A Catala caller decides what to pass for the unknown; Arxo leaves it
  unknown.
- **Proof is opt-in.** Catala's solver-backed check of exception trees is a
  real strength, but it is not the default build path — results obtained
  with the interpreter and the standard runtime do not inherit its
  guarantees.

## A concrete scenario

The prepared experiment replays fifteen vehicle-damage cases — thresholds,
assessor rules, working-day deadlines, cent-level sums, coverage edges —
plus an edit axis (a kilometre threshold change, a shorter reporting term,
a tool upgrade), through the Catala interpreter and the Arxo package, with
verdicts of match, not comparable, or mutation-killed per case.

Separately, a **historical** parity run on Catala 1.2.0 (September 2026,
published in the project parity repository) replayed 65 act cases and 240
random inputs through both models with full agreement, including caught
mutations. Those numbers belong to that run and that version — interpreter
plus standard runtime on one act — not to current engines or other
backends.

## Choosing and combining

Choose Catala when the deliverable is a French-style social-law computation
with literate statute text, exact money, and a mature test-and-trace
workflow — and when one value per variable matches the problem. Look to
Arxo when missing facts, contradictory records, declared priorities between
competing grounds, or dated editions are part of the question. A cooperation
pattern that fits both: Catala computes the statutory amount, Arxo frames
the surrounding entitlement, its exceptions across sources, and its history
across editions.

## Evidence and open questions

- Sources checked: September 2026 (Catala book, tutorial, releases, and the
  core-translation paper; code read on pinned tags, nothing built or run).
- Studied profile: Catala 1.2.1; historical numbers: Catala 1.2.0
  interpreter with the standard runtime, on the vehicle-damage pilot subset.
- Basis: confirmed by documentation plus a prepared protocol; comparative
  run not performed.
- Open: working-day and revision handling beyond wrappers, the maturity of
  the explanation tooling, and solver-check semantics on new tasks.

## Sources and reproducible materials

- Companion page: [Catala: the parity run](/comparisons/catala-parity-run/) — setup, results, timings, and limits of the executed run.
- The Catala book and tutorial (conditions and exceptions; dates and money
  handling): [book.catala-lang.org](https://book.catala-lang.org/)
- Releases 1.2.0 and 1.2.1:
  [github.com/CatalaLang/catala](https://github.com/CatalaLang/catala)
- Core translation, full text: [arxiv.org/abs/2103.03198](https://arxiv.org/abs/2103.03198v2)
- Historical parity repository:
  [github.com/arxohq/arxo-catala-parity](https://github.com/arxohq/arxo-catala-parity)