Commit Graph

283 Commits

Author SHA1 Message Date
Denis Merigoux
bcd91f5dea
Merge branch 'master' into aides_logement_outre_mer 2023-05-04 11:04:28 +02:00
Denis Merigoux
c6bafe8896
Update assets and tests 2023-05-02 10:58:45 +02:00
Denis Merigoux
3bc5b188ea
french_law.js on git compiled with dev profile 2023-04-28 14:49:45 +02:00
Emile Rolley
8128c47fa4 assets(french_law): udpate the french_law.js lib 2023-04-28 13:41:53 +02:00
Denis Merigoux
e6bccd716d
Fix a Catala program bug thanks to Proof mode! 2023-04-27 18:03:27 +02:00
Denis Merigoux
9b056f3ca1
Update assets and fix errors after rebase 2023-04-27 12:18:50 +02:00
Denis Merigoux
14dd879cc5
Restore tests, update assets 2023-04-27 12:14:27 +02:00
Denis Merigoux
9b06bb66db
Fix tests and restore CI 2023-04-27 12:14:16 +02:00
Denis Merigoux
ada8e4941a
Delete variable EVERYWHERE 2023-04-27 12:13:50 +02:00
Denis Merigoux
eb7be3581a
Update assets 2023-04-21 14:59:02 +02:00
Denis Merigoux
32ee2a0c72
Various small fixes to resolve conversations 2023-04-21 14:54:07 +02:00
Denis Merigoux
4a1efcaa12
Restore tests and update assets 2023-04-18 14:46:25 +02:00
Denis Merigoux
0ec75ad589
Merge branch 'master' into adelaett-withoutexceptionsfix 2023-04-18 14:37:02 +02:00
Denis Merigoux
c5ba3e72fe
Restore CI 2023-04-18 09:59:24 +02:00
adelaett
da7272bf70
ungit frenchlaw.py 2023-04-14 14:13:19 +02:00
adelaett
cc66023e51
Thunking justifications and conclusion in avoid_translation pass 2023-04-12 10:58:21 +02:00
adelaett
6af7456b98
typo 2023-04-07 16:32:43 +02:00
Denis Merigoux
1ee8d3923b
Restore Python API 2023-04-04 17:37:41 +02:00
Denis Merigoux
d63958d7da
Merge branch 'master' into aides_logement_outre_mer 2023-04-04 17:21:28 +02:00
Denis Merigoux
ba44949bea
Pin js_of_ocaml version : see https://github.com/CatalaLang/catala/issues/442 2023-04-04 17:13:00 +02:00
Denis Merigoux
a29339ed2f
Stringify JSON fields 2023-04-04 15:44:00 +02:00
Denis Merigoux
7d278caa30
Update OCaml assets 2023-04-04 15:19:08 +02:00
Denis Merigoux
b3949ae15c
Update assets 2023-03-31 16:55:51 +02:00
Denis Merigoux
5673708f36
Update assets 2023-03-31 15:34:51 +02:00
Louis Gesbert
a415355a39 Rework the AST Gadt to allow merging of different ASTs
The phantom polymorphic variant qualifying AST nodes is reversed:
- previously, we were explicitely restricting each AST node to the passes where it belonged using a closed type (e.g. `[< dcalc | lcalc]`)
- now, each node instead declares the "feature" it provides using an open type (e.g. `[> 'Exceptions ]`)
- then the AST for a specific pass limits the features it allows with a closed type

The result is that you can mix and match all features if you wish,
even if the result is not a valid AST for any given pass. More
interestingly, it's now easier to write a function that works on
different ASTs at once (it's the inferred default if you don't write a
type restriction).

The opportunity was also taken to simplify the encoding of the
operators, which don't need a second type parameter anymore.
2023-03-30 15:30:08 +02:00
Denis Merigoux
f3e4127bcc
Update assets 2023-03-30 15:09:45 +02:00
Denis Merigoux
3417d07945
Fixed bug in L861-5-1 2023-03-28 12:09:52 +02:00
Denis Merigoux
3122dd7821
Update assets 2023-03-21 16:10:00 +01:00
Denis Merigoux
48ef5b8f21
Fix warning and update assets 2023-03-21 14:00:49 +01:00
Denis Merigoux
5d3aded38d
Update Python API 2023-03-20 11:18:55 +01:00
Denis Merigoux
79d6c0e25d
Fix ML and JS french law 2023-03-17 18:59:41 +01:00
Denis Merigoux
7f705beb07
Merge branch 'master' into aides_logement_outre_mer 2023-03-17 17:52:10 +01:00
Denis Merigoux
4fcdd005e0
Merge branch 'master' into aides_logement_outre_mer 2023-03-17 09:18:27 +01:00
Raphaël Monat
a09b4b82fd Updating french_law 2023-03-16 17:20:13 +01:00
Raphaël Monat
64fa32392f Update generated files 2023-03-16 17:20:09 +01:00
Raphaël Monat
7021c41f93 Add date rounding option within scopes 2023-03-16 16:55:55 +01:00
Denis Merigoux
74df4ee988
Merge branch 'master' into aides_logement_outre_mer 2023-03-14 14:10:09 +01:00
Denis Merigoux
283d82bfce
French law JS must be created with a dune release profile 2023-03-14 11:53:27 +01:00
Louis Gesbert
508992de33 Embed the Pygments Catala lexer
This enables the HTML output to work without a custom Pygments installation (or
the proper venv activated)
2023-03-13 14:41:24 +01:00
Louis Gesbert
deb12d2c4a Bump version to 0.8.0
Changelog:
---

A lot has been going on, with more than 530 patches and 70 PRs merged since
0.7.0 last summer. In summary:

- Quite a lot of syntax improvements and changes. Checkout the latest
  [cheat-sheet](https://catalalang.github.io/catala/syntax.pdf) for an overview

- Allow local `let ... equals ... in ...` definitions

- Better error messages and positions throughout

- Added the ability to directly call a scope and retrieve its outputs, like a
  function

- Added disambiguation, allowing to access structure fields without specifying
  the structure type each time

- Added automated resolution of operators, allowing e.g. to write just `+` in
  place of all the type-specific operators `+.`, `+$`, `+@`, `+^`, etc.

- More consistent priority for operators. It is no longer allowed to write `a
  and b or c` without parenthesis.

- Added and changed some operators (`date + duration` now allowed either way,
  `int / int` now returns a decimal, added `duration / duration`)

- Added the ability to have variables and functions defined at
  top-level (outside of any scope). See annex A of the tutorial for details.

- Added support for functions with multiple arguments

- Some big refactors in the compiler, allowing much better code sharing between
  the different passes, and making it much easier to extend. Also added the
  possibility to run the type-checker earlier, etc.

- Countless bug-fixes

- Improvements to our proof backend with Z3

- A tool to automatically synchronise with the upstream French law from
  Legifrance
2023-03-08 18:07:53 +01:00
Denis Merigoux
bfc827296c
Merge branch 'master' into aides_logement_outre_mer 2023-03-06 14:09:51 +01:00
adelaett
c680b932ff update nix files 2023-03-03 14:51:51 +01:00
Denis Merigoux
74175907ca
Adelaett fix arrowlist (#409) 2023-03-03 14:04:04 +01:00
Louis Gesbert
a3b9045745 Update the cheat-sheet
- Add the new syntax for multi-argument functions
- Add the syntax for defining top-level values
- Increased font size and improved compacity
2023-03-02 17:00:14 +01:00
Louis Gesbert
cf2e80ba51 Refactor Python dependency handling
* Use the newer "pyproject.toml" for syntax highlighters
* Use venv for everything (previously, the pygment lexers were installed
  globally, but more recent Python releases frown upon that. This will probably
  be more stable in the long run...)
* Use one venv at the root of the project (`_python_venv/`) for both
  pygments and the runtime
* Initialise this venv automatically from the Makefile (it should no longer be
  necessary to run scattered `set_up.sh` scripts with mysterious interactions)

On the downsides, though:
* Only tested with Python 3.11 at the moment
* Need to remember to activate the venv (`. _python_venv/bin/activate`) from the
  root for e.g. HTML literate output to work. A more manageable solution could
  be for Catala to provide the lexers on-the-fly when calling `pygmentize`.
2023-03-02 16:24:53 +01:00
adelaett
290e67ea7e adding the parsing code to the CI. 2023-02-28 15:23:19 +01:00
Denis Merigoux
0667e3d40f
Merge branch 'master' into aides_logement_outre_mer 2023-02-28 15:01:31 +01:00
Louis Gesbert
72cf477dd9 Toplevel definitions: fixes following review
Thanks @denismerigoux!
2023-02-15 12:40:15 +01:00
Louis Gesbert
c3af0b4097 Toplevel definitions: branch cleanup
- fix remaining warnings (mostly unused arguments)
- renamings throughout for consistency and clarity
2023-02-13 18:02:09 +01:00
Louis Gesbert
912e1500c4 Handle toplevel defs down to scalc 2023-02-13 11:44:32 +01:00