You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got a very confusing error on two conflicting exceptions, where the positions reported didn't match the actual issue. I failed to reproduce for now on a simplified example, but it can be seen on https://github.com/CatalaLang/poc-cnaf/tree/debugConflictPos with clerk test tests/fonctionnels/cas_1.catala_fr
In more detail, on the follwing piece of code:
champ d'application Barèmes:
étiquette base
définition taux_majoration_montant_forfaitaire
de isolement, rôle
sous condition isolement sous forme Isolé et
rôle sous forme PersonneÀCharge de n et n = 1
conséquence égal à 50%
étiquette base
définition taux_majoration_montant_forfaitaire
de isolement, rôle
sous condition isolement sous forme Isolé et
rôle sous forme PersonneÀCharge de n et n = 2
conséquence égal à 30% # <=== position 1
étiquette base
définition taux_majoration_montant_forfaitaire
de isolement, rôle
sous condition isolement sous forme Isolé et
rôle sous forme PersonneÀCharge de n et n > 2
conséquence égal à 40% # <=== position 2
étiquette base
définition taux_majoration_montant_forfaitaire
de isolement, rôle
sous condition isolement sous forme Couple et
rôle sous forme Conjoint
conséquence égal à 50%
étiquette base
définition taux_majoration_montant_forfaitaire
de isolement, rôle
sous condition isolement sous forme Couple et
rôle sous forme PersonneÀCharge de n et n = 1
conséquence égal à 30%
étiquette base
définition taux_majoration_montant_forfaitaire
de isolement, rôle
sous condition isolement sous forme Couple et
rôle sous forme PersonneÀCharge de n et n = 2
conséquence égal à 30%
étiquette base
définition taux_majoration_montant_forfaitaire
de isolement, rôle
sous condition isolement sous forme Couple et
rôle sous forme PersonneÀCharge de n et n > 1
conséquence égal à 40%
we get:
┌─[ERROR]─
│
│ During evaluation: conflict between multiple valid consequences for assigning the same variable.
│
├─➤ src/rsa.catala_fr:348.24-348.27:
│ │
│ 348 │ conséquence égal à 30%
│ │ ‾‾‾
├─ Brique 4 : calcul du Revenu de Solidarité Active (RSA)
│ └─ les barèmes RSA
│
├─➤ src/rsa.catala_fr:355.24-355.27:
│ │
│ 355 │ conséquence égal à 40%
│ │ ‾‾‾
└─ Brique 4 : calcul du Revenu de Solidarité Active (RSA)
└─ les barèmes RSA
The issue is that the two positions referred to are as marked with comments on the source, and it's pretty clear that they cannot conflict. The actual issue is between the two last cases, because of a typo in the last one.
The issue likely comes from the tweak that merges condition with syntactically identical outcomes, to avoid spurious conflicts...
As an additional feature wish: when a conflict happens, it would be extremely useful for debugging to know what inputs the conflict happened on. This is non-trivial, we would need to
extract the free variables in the conditions to get the relevant information, at compile time
at runtime, output the values of these variables when a conflict (or a missing definition error) happens
The text was updated successfully, but these errors were encountered:
The issue is that the term (in unoptimised lcalc) is a match of the form:
match
(match if case = 6 then ESome 0.3 else ENone () with
| ENone → if case = 5 then ESome 0.3 else ENone ()
| ESome x → ESome x)
with
| ENone → if case = 2 then ESome 0.3 else ENone ()
| ESome x → ESome x;
where the ESome x -> ESome x, rebuilding the original term unchanged, lose its original position information
I got a very confusing error on two conflicting exceptions, where the positions reported didn't match the actual issue. I failed to reproduce for now on a simplified example, but it can be seen on https://github.com/CatalaLang/poc-cnaf/tree/debugConflictPos with
clerk test tests/fonctionnels/cas_1.catala_fr
In more detail, on the follwing piece of code:
we get:
The issue is that the two positions referred to are as marked with comments on the source, and it's pretty clear that they cannot conflict. The actual issue is between the two last cases, because of a typo in the last one.
The issue likely comes from the tweak that merges condition with syntactically identical outcomes, to avoid spurious conflicts...
As an additional feature wish: when a conflict happens, it would be extremely useful for debugging to know what inputs the conflict happened on. This is non-trivial, we would need to
The text was updated successfully, but these errors were encountered: