Catala is an open-source programming language designed to allow for “correct-by-construction” encodings of taxation and benefit legislation. This gives enhanced assurances that the encoding of a piece of legislation does not have “bugs”, by making those bugs possible to detect or test for.
It is a functional-style programming language, and legislation encoded in Catala can be compiled into several other languages, including OCaml and Python.
The Catala web page includes tutorials for using Catala to encode legislation in both English and French.