Louis Gesbert
fa3be9bb79
Fix CI badge in Readme file
2024-02-13 17:22:57 +01:00
Louis Gesbert
1087604060
Allow access to intermediate variable states ( #578 )
2024-02-13 11:04:51 +01:00
Louis Gesbert
bf0ef0b1f5
Allow access to intermediate variable states
...
Through the syntax `var_name state state_name`.
Addresses #567 , but
- requires documentation
- explicitely accessing states of the variable being defined is not allowed at
the moment (warning proposed in #567 requires a whole-expression check, which
is better done some place else entirely)
2024-02-12 18:15:48 +01:00
Louis Gesbert
36866a919b
Tests: remove redundant part in filenames
2024-02-12 18:03:16 +01:00
Louis Gesbert
9c84457c36
Clerk: improve progress messages
2024-02-12 18:00:27 +01:00
Louis Gesbert
0d42ea0c29
Small CI fix
2024-02-12 17:25:20 +01:00
Louis Gesbert
afcc435593
CI: fix the check for bad promoted files
2024-02-12 16:44:14 +01:00
Louis Gesbert
c64503adf1
Generalise the definition of lists of nested binders ( #576 )
2024-02-12 16:31:42 +01:00
Louis Gesbert
721597a70d
Small additional simplification
2024-02-12 15:39:29 +01:00
Louis Gesbert
b04ee2afd1
Makefile: add convenience rule to simulate CI tests
...
Run `make alltest` to include catala examples and french-law stuff!
2024-02-12 14:23:49 +01:00
Louis Gesbert
d9700c2001
CI: when a same-name branch exists on catala-examples, use that
...
This offers a workaround when a PR on Catala needs a change to the examples or
french-law: you would have the CI broken either on the PR or on master.
With this, you can ensure that the CI passes without breaking master, and then
merge the branch on catala-examples/french-law simultaneously to the PR on
Catala.
2024-02-12 11:29:10 +01:00
Louis Gesbert
71551ccce8
Makefile: add an 'alltest' convenience rule that tests catala-examples
...
Convenient before filing a PR
2024-02-12 11:16:04 +01:00
Louis Gesbert
9ca952b518
Fix building of plug-ins
2024-02-12 10:48:12 +01:00
Louis Gesbert
f7672857a7
Formatting
2024-02-09 18:36:12 +01:00
Louis Gesbert
e308ff8d02
Generalise the definition of lists of nested binders
2024-02-09 18:33:41 +01:00
Louis Gesbert
c124943a6e
Repair broken unit-test
2024-02-09 18:32:19 +01:00
Louis Gesbert
68aaf6e2f0
Typing: add a "assume operator types" mode ( #575 )
2024-02-09 18:07:22 +01:00
Louis Gesbert
82fb66daef
Clerk: fix options passed to catala in out-test mode
2024-02-09 10:54:58 +01:00
Louis Gesbert
12974b089f
Printer: skip unit variables for conciseness
2024-02-07 17:54:12 +01:00
Louis Gesbert
a56d95d790
Typing: add a "assume operator types" mode
...
This allows for retyping after monomorphisation: a new function just extracts
the return type of the operator, without checking the operand types.
Also to avoid multiplying function arguments around the typer, the flags have
been gathered in a record that is included in the typing environment; it's ok to
give them default values as long as these are the strictest.
2024-02-07 17:41:04 +01:00
Louis Gesbert
ae89c870c1
Correctly pass types through monomorphisation ( #573 )
2024-02-07 15:54:05 +01:00
Louis Gesbert
ea512bfd5b
The typer doesn't handle monomorphised code yet
...
so don't retype after monomorphisation, which is now possible as the pass itself
correctly preserves types.
In time the typer will need a special case to get knowledge of the new types and
modified operator types.
2024-02-06 18:00:45 +01:00
Louis Gesbert
df70c5dd57
Simplify monomorphisation, and preserve type annotations
2024-02-06 18:00:25 +01:00
Louis Gesbert
22674cd15d
Some small cleanup & QoL changes ( #572 )
2024-02-06 16:11:42 +01:00
Louis Gesbert
e5fe02fd84
Interpreter: avoid rebuilding unchanged values
...
Closes #540 ; it was a leftover from when we were still exploring how best to
type this function.
2024-02-05 16:28:56 +01:00
Louis Gesbert
d57eb023dd
Skip compiling to js for running the tests
...
(making iterations quite a bit faster)
2024-02-05 16:28:56 +01:00
Louis Gesbert
7f5b56e8f2
Interpreter: remove no longer needed empty propagations
2024-02-05 16:28:56 +01:00
Louis Gesbert
34ae4f6156
Clerk: fix sometimes not rebuilding cmxs files
2024-02-05 16:28:56 +01:00
Louis Gesbert
870716a3f8
Factorise a bit more with more arguments to Expr.map
...
allowing a safer way to translate types both in expressions and annotations, and
clarifying the code of the dcalc->lcalc translation
2024-02-05 16:28:56 +01:00
Louis Gesbert
73c2a1e38b
Add a few optimisations for combined list operations ( #570 )
2024-02-05 13:51:02 +01:00
Louis Gesbert
61c105c365
Add one more trivial optimisation
2024-02-05 11:01:55 +01:00
Louis Gesbert
5cb8ba805b
List detuplification: better intermediate vars namings
...
for more readable code
2024-02-05 11:01:55 +01:00
Louis Gesbert
7b43f393c5
Add some optimisations to nested maps
2024-02-05 11:01:55 +01:00
Louis Gesbert
886a2cf914
Progress towards C backend ( #532 )
2024-02-01 22:31:12 +01:00
Denis Merigoux
afa8ee44bf
Delete duplicate code from 9d3550374d
2024-02-01 17:23:31 +01:00
Denis Merigoux
d7e71885c1
Formatting
2024-02-01 17:22:42 +01:00
Louis Gesbert
54ca62a78e
Fix definition and usage of the C backend test
...
(including fix of Clerk about "legacy tests")
2024-02-01 15:59:45 +01:00
Louis Gesbert
f90de90299
Monomorphisation: access types directly
2024-02-01 12:27:54 +01:00
Louis Gesbert
2dba54b906
Monomorphisation: simplify type collection
2024-02-01 12:22:31 +01:00
Louis Gesbert
9d3550374d
Remove constructor matching on strings
2024-02-01 12:17:51 +01:00
Louis Gesbert
cfdaf94989
Define Type.Map
2024-02-01 10:10:25 +01:00
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