catala/compiler/scalc
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
..
ast.ml Computation and checking of module hashes 2024-05-28 11:43:50 +02:00
dune refactor(runtimes): add runtime_ocaml and runtime_jsoo in the catala package 2022-07-22 16:52:56 +02:00
from_lcalc.ml Computation and checking of module hashes 2024-05-28 11:43:50 +02:00
from_lcalc.mli Almost there with structs 2023-12-11 17:08:32 +01:00
print.ml Computation and checking of module hashes 2024-05-28 11:43:50 +02:00
print.mli Add externals to scalc, working test with Python backend 2024-02-26 14:56:43 +01:00
scalc.mld Fix most doc errors 2023-06-02 17:17:45 +02:00
to_c.ml Computation and checking of module hashes 2024-05-28 11:43:50 +02:00
to_c.mli Add monomorphizing option 2023-12-19 15:01:06 +01:00
to_python.ml Computation and checking of module hashes 2024-05-28 11:43:50 +02:00
to_python.mli Big reformatting 2022-03-08 15:03:14 +01:00
to_r.ml Computation and checking of module hashes 2024-05-28 11:43:50 +02:00
to_r.mli Starting to implement R backend 2023-08-04 17:25:12 +02:00