catala/compiler
Louis Gesbert affa45c115 Unify traces between interpreter and runtime
This is a first step into unifying trace handling. This patch only affects the
interpreter, by delegating trace recording to the already existing runtime
functions.

At end of interpretation, it recovers the registered trace from the runtime, and
prints it.

NOTE: there are some limitations due to this approach, as runtime values going
through this interface have to be converted to the "runtime embedded" type. In
particular, functions can no longer be printed (which makes full sense if we
want it to happen in the same way in compiled code) ; some information, like
types, is lost, but it didn't appear to be used.

Also, a specific printer had to be added for runtime values (but it's very
simple so that shouldn't be a problem).

@denismerigoux I'd like your input on how well this goes for your use-cases.

Further work should probably be cleanup and unification of the runtime logging
interfaces ; there is already code for re-structuring the traces, printing to
JSON, etc. which could be common to runtime and interpreter.
2024-05-06 22:16:54 +02:00
..
catala_utils Fix adjustment of format width to terminal 2024-05-06 21:39:58 +02:00
dcalc More precise positions for operators throughout 2024-04-30 16:35:08 +02:00
desugared Message formatting: final touches 2024-05-03 15:14:51 +02:00
lcalc Make refactored runtime error messages clearer 2024-05-02 16:30:47 +02:00
literate Rewriting message calls to use the new intf 2024-04-10 19:26:23 +02:00
plugins More precise positions for operators throughout 2024-04-30 16:35:08 +02:00
scalc More precise positions for operators throughout 2024-04-30 16:35:08 +02:00
scopelang Fix exception positions being lost during translation/optimisations 2024-04-30 17:56:06 +02:00
shared_ast Unify traces between interpreter and runtime 2024-05-06 22:16:54 +02:00
surface Remove direct dependency towards dates_calc from the compiler 2024-05-02 16:30:46 +02:00
verification More precise positions for operators throughout 2024-04-30 16:35:08 +02:00
catala_web_interpreter.ml Rewriting message calls to use the new intf 2024-04-10 19:26:23 +02:00
catala.ml replace let _ by let () or add type annotation 2023-09-09 22:02:39 +02:00
driver.ml Message formatting: final touches 2024-05-03 15:14:51 +02:00
driver.mli Move global options of Cli to their own module 2024-03-19 15:18:35 +01:00
dune Update opam file according to opam-repository reviews 2024-05-06 21:39:58 +02:00
index.mld More doc 2023-06-18 16:08:16 +02:00
plugin.ml Rewriting message calls to use the new intf 2024-04-10 19:26:23 +02:00
plugin.mli Move global options of Cli to their own module 2024-03-19 15:18:35 +01:00
tests.ml Generalise the definition of lists of nested binders 2024-02-09 18:33:41 +01:00