Commit Graph

3969 Commits

Author SHA1 Message Date
Louis Gesbert
d60b521a4e Fix Python backend and CI 2024-02-01 01:01:04 +01:00
Louis Gesbert
e47a1fc220 Improve translation of typing upon dcalc -> lcalc
A little bit of effort enables us to propagate valid typing annotations, making
subsequent typing re-inference easier (and avoiding a traversal just to remove
type annotations)
2024-01-31 19:15:27 +01:00
Louis Gesbert
7a4ac4364b Mark closure conversion as untyped
since it doesn't correctly propagate and update types. (Ideally it would, but
otherwise it would be better to remove the type annotations on the fly instead
of introducing wrong ones then cleaning them up).
2024-01-31 17:52:06 +01:00
Louis Gesbert
e8e112d7f7 Add tuples to the Python backend 2024-01-31 11:02:03 +01:00
Louis Gesbert
c86b69fee5 Merge remote-tracking branch 'origin/master' into c_backend 2024-01-31 10:57:06 +01:00
Denis Merigoux
cd11f62558
Missing among keyword in VScode english 2024-01-30 15:29:47 +01:00
Louis Gesbert
5d233f4532 Fix warning 2024-01-29 11:37:42 +01:00
Denis Merigoux
a033f02689
Restore tests 2024-01-29 11:06:48 +01:00
Louis Gesbert
502fff8a0c Fix CI for PRs yet again 2024-01-28 22:29:05 +01:00
Denis Merigoux
b48fb0e223
Array compilation to C is OK 2024-01-26 20:15:32 +01:00
Denis Merigoux
3e807ae071
Remove warnings 2024-01-26 17:53:49 +01:00
Denis Merigoux
a39b67bf12
Merge branch 'master' into c_backend 2024-01-26 17:43:07 +01:00
Louis Gesbert
2d8bdca624
Support for list recombinations (#568) 2024-01-26 16:46:46 +01:00
Louis Gesbert
371f9554b8 Support for list recombinations
The primary use-case for this was to be able to run computations on a list of
structures, then return an updated list with some fields in the structures
modified : that is what we need for distribution of tax amounts among household
members, for example.

This patch has a few components:

- Addition of a test as an example for tax distributions

- Added a transformation, performed during desugaring, that -- where lists are
  syntactically expected, i.e. after the `among` keyword -- turns a (syntactic)
  tuple of lists into a list of tuples ("zipping" the lists)

- Arg-extremum transformation was also fixed to use an intermediate list instead
  of computing the predicate twice

- For convenience, allow to bind multiple variables in most* list
  operations (previously only `let in` and functions allowed it)

- Fixed the printer for tuples to differentiate them from lists

*Note: tuples are not yet allowed on the left-hand side of filters and
arg-extremums for annoying syntax conflict reasons.
2024-01-26 11:29:33 +01:00
Louis Gesbert
13bc62a561 Build: make partial pattern-matchings always fatal
and fix the `make` clean rule
2024-01-26 11:22:12 +01:00
Louis Gesbert
bc90a7b890 Add (internally) a map2 operator 2024-01-26 11:22:12 +01:00
Louis Gesbert
7cbf7d6d1b
Reduce default verbosity of invariant checks (#569) 2024-01-26 11:21:16 +01:00
Louis Gesbert
fd127508db CI: fix running on PRs
(for real this time...)
2024-01-25 18:58:51 +01:00
Louis Gesbert
a9f8fa36b8 Reduce default verbosity of invariant checks
they break the tests too often for no good reason
2024-01-25 18:18:43 +01:00
Louis Gesbert
a0cdc0e663 CI: fix checking if on master for artifact publication 2024-01-25 18:08:31 +01:00
Louis Gesbert
c0aedaf5ad CI: trigger from tags and manually 2024-01-25 10:41:51 +01:00
Louis Gesbert
b5c02cf203 Fix CI yet again 2024-01-24 11:57:59 +01:00
Louis Gesbert
f188ad678f Fix GH action caching 2024-01-24 11:41:34 +01:00
Louis Gesbert
7b25a42970 Better version handling
Always generate the version through git when possible, and encode that within
the binaries so that `catala --version` does'nt give misleading information.

Previously we used dune's builtin functionality, but that resorts to a hack at
install time which is unpleasant and doesn't work with our use of `opam
install`.

The cost is a re-linking of catala_utils and the binaries upon git commit, which
is hardly noticeable.
2024-01-24 11:41:34 +01:00
Denis Merigoux
45a2aec1c9
Improve missing field error message (#566) 2024-01-24 11:33:04 +01:00
Denis Merigoux
34c62a73c1
Improve missing field error message 2024-01-23 12:05:18 +01:00
Denis Merigoux
8a139f6a3c
Work on arrays 2024-01-22 16:49:58 +01:00
Louis Gesbert
7636a6e8d5 CI: cleanup the exposed artifacts 2024-01-22 13:58:32 +01:00
Louis Gesbert
c1d0411bf3 CI: yet another GH actions workaround (take 5) 2024-01-21 23:16:08 +01:00
Louis Gesbert
1cbda684bd CI: yet another GH actions workaround (take 4) 2024-01-20 22:50:43 +01:00
Louis Gesbert
99eb115cc8 CI: yet another GH actions workaround (take 3) 2024-01-20 20:44:12 +01:00
Louis Gesbert
3348800fee CI: yet another GH actions workaround (take 2) 2024-01-20 18:14:39 +01:00
Louis Gesbert
3fdf325e10 CI: yet another GH actions workaround 2024-01-20 16:53:17 +01:00
Louis Gesbert
b71401f1a1 CI: fix artifact name escaping 2024-01-20 14:40:29 +01:00
Louis Gesbert
81eb7bf6d2 CI: Fix artifact source dir 2024-01-20 11:51:01 +01:00
Louis Gesbert
c336a7bb62
[WIP] Rehaul CI to run examples and generate artifacts again (#562) 2024-01-19 18:34:24 +01:00
Louis Gesbert
7a9ca6486c CI: fix gathering of artifacts 2024-01-19 17:49:39 +01:00
Denis Merigoux
1ccd115367
Allow literal scope output structures (#564) 2024-01-19 17:36:56 +01:00
Louis Gesbert
7f6f89c4c4 Build the html manpages as part of the doc target 2024-01-19 16:12:29 +01:00
Louis Gesbert
1c2c41b2ff Allow literal scope output structures 2024-01-19 15:43:35 +01:00
Louis Gesbert
db6c8c6c16 Add missing python package file 2024-01-19 13:39:22 +01:00
Louis Gesbert
e676d02055 Ensure dependencies for french_law are as tight as possible
See related patch in french_law: running `npm install` would bring in the whole
bs platform, including the recompilation of a full OCaml compiler which takes
>30min on our small runners. In fact for the purpose here, it's not needed so
restrict to just the smallest js requirements.
2024-01-19 12:12:28 +01:00
Louis Gesbert
c006c3343e Rehaul CI to run examples and generate artifacts again
this requires to fetch catala-examples and french-law from their own repos

Restrict static builds and publication to master
2024-01-18 16:14:27 +01:00
Louis Gesbert
853b841ce3 Remove LaTeX dependencies from opam file
to make the ci caches an order of magnitude smaller
2024-01-18 16:14:27 +01:00
Louis Gesbert
d9a17db4c0 Fix running inline tests
Warning: one of them is broken and was disabled
2024-01-18 16:14:27 +01:00
Denis Merigoux
50d3164f36
Restore C compilation 2024-01-17 17:26:41 +01:00
Denis Merigoux
5310e47e5b
Fix monomorphization problems with [TAny] left 2024-01-17 16:03:20 +01:00
Denis Merigoux
0a8fdde7de
Fix monomorphization 2024-01-17 14:02:32 +01:00
Denis Merigoux
ca8e4989ea
Type Scalc flow to avoid unresolved typing
With the new EAppOp node, the typing of operator application has changed and this causes some problems
with the example in test_scope/good/nothing.catala_en when retyping the LCalc to go to Scalc. This
commit changes the weird thing that for generating Scalc, the "typed" parameter was set to "untyped".
2024-01-17 13:08:20 +01:00
Denis Merigoux
a1ab58478c
Remove useless field 2024-01-17 11:29:39 +01:00