catala - Compiler for Catala, a specification language for tax and social benefits computation rules.
Catala is a domain-specific language for deriving faithful-by-construction algorithms from legislative texts.
catala [COMMAND] FILE [OPTION]â¦
Use catala [COMMAND] --help for documentation on a specific command
c [OPTION]⦠FILE
Generates an C translation of the Catala program.
depends
[--extension=EXT]
[--include=DIR] [--prefix=PATH]
[OPTION]â¦
FILE [FILES]â¦
Lists the dependencies of the given catala files, in linking order. This includes recursive dependencies and is useful for linking an application in a target language. The space-separated list is printed to stdout. The names are printed as expected of module identifiers, i.e. capitalized. NOTE: the files specified are also included in the returned list.
exceptions
[--include=DIR] [--scope=SCOPE]
[--variable=VARIABLE]
[OPTION]⦠FILE
Prints the exception tree for the definitions of a particular variable, for debugging purposes. Use the -s option to select the scope and the -v option to select the variable. Use foo.bar to access state bar of variable foo or variable bar of subscope foo.
html [--output=OUTPUT] [--print-only-law] [--wrap] [OPTION]⦠FILE
Weaves an HTML literate programming output of the Catala program.
interpret [OPTION]⦠FILE
Runs the interpreter on the Catala program, executing the scope specified by the -s option assuming no additional external inputs.
latex
[--output=OUTPUT] [--print-only-law]
[--wrap] [OPTION]⦠FILE
[FILES]â¦
Weaves a LaTeX literate programming output of the Catala program.
makefile [--output=OUTPUT] [OPTION]⦠FILE
Generates a Makefile-compatible list of the file dependencies of a Catala program.
ocaml [OPTION]⦠FILE
Generates an OCaml translation of the Catala program.
proof [OPTION]⦠FILE
Generates and proves verification conditions about the well-behaved execution of the Catala program.
pygmentize [OPTION]⦠FILE
This special command is a wrapper around the pygmentize command that enables support for colorising Catala code.
python [OPTION]⦠FILE
Generates a Python translation of the Catala program.
typecheck [--check-invariants] [--include=DIR] [OPTION]⦠FILE
Parses and typechecks a Catala program, without interpreting it.
These commands
are intended for debugging of the Catala compiler itself,
and unlikely to be useful to the end-user
dcalc [OPTION]⦠FILE
Prints a debugging verbatim of the default calculus intermediate representation of the Catala program. Use the -s option to restrict the output to a particular scope.
lcalc [OPTION]⦠FILE
Prints a debugging verbatim of the lambda calculus intermediate representation of the Catala program. Use the -s option to restrict the output to a particular scope.
scalc [OPTION]⦠FILE
Prints a debugging verbatim of the statement calculus intermediate representation of the Catala program. Use the -s option to restrict the output to a particular scope.
scopelang
[--include=DIR]
[--output=OUTPUT]
[--scope=SCOPE] [OPTION]â¦
FILE
Prints a debugging verbatim of the scope language intermediate representation of the Catala program. Use the -s option to restrict the output to a particular scope.
catala Interpret -s Foo file.catala_en
catala Ocaml -o target/file.ml file.catala_en
-C DIR, --directory=DIR
Behave as if run from the given directory for file and error reporting. Does not affect resolution of files in arguments.
--color[=VAL] (default=always) (absent=auto or CATALA_COLOR env)
Allow output of colored and styled text. Use auto, to enable when the standard output is to a terminal, never to disable.
-d, --debug (absent CATALA_DEBUG env)
Prints debug information.
--disable-warnings
Disable all the warnings emitted by the compiler.
--help[=FMT] (default=auto)
Show this help in format FMT. The value FMT must be one of auto, pager, groff or plain. With auto, the format is pager or plain whenever the TERM env var is dumb or undefined.
-l LANG, --language=LANG
Locale variant of the input language to use when it can not be inferred from the file extension.
--message-format=VAL (absent=human)
Selects the format of error and warning messages emitted by the compiler. If set to human, the messages will be nicely displayed and meant to be read by a human. If set to gnu, the messages will be rendered according to the GNU coding standards.
--no-fail-on-assert
Instead of reporting an error on assertion failure, reports a warning and carry on with the interpretation as usual.
-p NUM, --max-digits-printed=NUM (absent=20)
Maximum number of significant digits printed for decimal results.
--plugin-dir=DIR (absent CATALA_PLUGINS env)
Set the given directory to be searched for backend plugins.
-t [FILE], --trace[=FILE] (default=-) (absent CATALA_TRACE env)
Displays a trace of the interpreter's computation or generates logging instructions in translate programs. If set as a flag, outputs trace to stdout. If FILE is defined, outputs the trace to a file while interpreting. Defining a filename does not affect code generation. Cannot use .catala extension.
--trace-format=VAL
Selects the format of trace logs emitted by the interpreter. If set to human, the messages will be nicely displayed and meant to be read by a human. If set to json, the messages will be emitted as a JSON structured object.
--version
Show version information.
-x, --stop-on-error
Stops the compilation as soon as an error is encountered.
(Deprecated) --unstyled
Removes styling (colors, etc.) from terminal output.
catala exits with:
0 |
on success. |
|||
1 |
on error. |
|||
123 |
on indiscriminate errors reported on standard error. |
|||
124 |
on command line parsing errors. |
|||
125 |
on unexpected internal errors (bugs). |
These
environment variables affect the execution of catala:
CATALA_COLOR
See option --color.
CATALA_DEBUG
See option --debug.
CATALA_PLUGINS
See option --plugin-dir.
CATALA_TRACE
See option --trace.
The authors are listed by alphabetical order:
Vincent Botbol
<vincent.botbol@inria.fr>
Nicolas Chataing <nicolas.chataing@ens.fr>
Alain Delaët-Tixeuil
<alain.delaet--tixeuil@inria.fr>
Aymeric Fromherz <aymeric.fromherz@inria.fr>
Louis Gesbert <louis.gesbert@ocamlpro.com>
Denis Merigoux <denis.merigoux@inria.fr>
Emile Rolley <erolley@tutamail.com>
Please file bug reports at https://github.com/CatalaLang/catala/issues