catala/compiler/plugins
Louis Gesbert 403156b36e Computation and checking of module hashes
This includes a few separate changes:

- pass visibility information of declarations (depending on wether the
  declaration was in a ```catala-metadata block or not)

- add reasonable hash computation functions to discriminate the interfaces. In
  particular:
  * Uids have a `hash` function that depends on their string, but not on their
    actual uid (which is not stable between runs of the compiler) ; the existing
    `hash` function and its uses have been renamed to `id`.
  * The `Hash` module provides the tools to properly combine hashes, etc. While
    we rely on `Hashtbl.hash` for the atoms, we take care not to use it on any
    recursive structure (it relies on a bounded traversal).

- insert the hashes in the artefacts, and properly check and report those (for
  OCaml)

**Remains to do**:

- Record and check the hashes in the other backends

- Provide a way to get stable inline-test outputs in the presence of module
  hashes

- Provide a way to write external modules that don't break at every Catala
  update.
2024-05-28 11:43:50 +02:00
..
api_web.ml Computation and checking of module hashes 2024-05-28 11:43:50 +02:00
dune Rework module includes CLI in Catala 2023-09-27 13:14:40 +02:00
explain.ml Computation and checking of module hashes 2024-05-28 11:43:50 +02:00
json_schema.ml Rewriting message calls to use the new intf 2024-04-10 19:26:23 +02:00
lazy_interp.ml Computation and checking of module hashes 2024-05-28 11:43:50 +02:00
plugins.mld Remove generated files from git 2023-07-10 15:48:11 +02:00
python.ml Rewriting message calls to use the new intf 2024-04-10 19:26:23 +02:00
README.md Documentation about plugins 2022-08-09 15:00:13 +02:00

Catala compiler plugins

You want to add a customized backend for the Catala compiler but don't want to modify its source code? Thanks to dynamic linking, it is possible to do so. The advantage of creating a customized backend is the possibility to craft a generated target code that perfectly matches the naming conventions, module structure or coding style of your application.

See the online documentation for more details on how to create them, or look at the existing plugins in this directory for inspiration.