removed one remaning debuging print, and updating all the tests

This commit is contained in:
adelaett 2023-04-14 17:59:08 +02:00
parent bc6e149618
commit 5e46253140
No known key found for this signature in database
GPG Key ID: 367A8C08F513BD65
65 changed files with 685 additions and 1 deletions

View File

@ -624,7 +624,6 @@ let interpret_program_lcalc p s : (Uid.MarkedString.info * ('a, 'm) gexpr) list
(fun ty ->
match Marked.unmark ty with
| TOption _ ->
Format.printf "input_typ: %a@." Print.typ_debug ty;
(Expr.einj (Expr.elit LUnit mark_e) Definitions.none_constr
Definitions.option_enum mark_e
: (_, _) boxed_gexpr)

View File

@ -43,3 +43,8 @@ $ catala Interpret -s Exemple1
[RESULT] Computation successful! Results:
[RESULT] montant = 96.48 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s Exemple1 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 96.48 €
```

View File

@ -101,3 +101,13 @@ $ catala Interpret -s Exemple2 --disable_warnings
[RESULT] montant = 352.77 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s Exemple1 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 345.73 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s Exemple2 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 352.77 €
```

View File

@ -35,3 +35,8 @@ $ catala Interpret -s CasTest1 --disable_warnings
[RESULT] Computation successful! Results:
[RESULT] montant = 76.38 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s CasTest1 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 76.38 €
```

View File

@ -167,3 +167,23 @@ $ catala Interpret -s Exemple4 --disable_warnings
[RESULT] Computation successful! Results:
[RESULT] montant = 118.59 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s Exemple1 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 181.91 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s Exemple2 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 67.34 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s Exemple3 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 181.91 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s Exemple4 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 118.59 €
```

View File

@ -331,3 +331,48 @@ $ catala Interpret -s Exemple9 --disable_warnings
[RESULT] Computation successful! Results:
[RESULT] montant = 210.06 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s Exemple1 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 0.00 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s Exemple2 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 352.77 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s Exemple3 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 321.61 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s Exemple4 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 0.00 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s Exemple5 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 311.56 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s Exemple6 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 0.00 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s Exemple7 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 153.77 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s Exemple8 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 11.06 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s Exemple9 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 210.06 €
```

View File

@ -156,3 +156,28 @@ $ catala Interpret -s CasTest5 --disable_warnings
[RESULT] Computation successful! Results:
[RESULT] montant = 129.65 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s CasTest1 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 12.06 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s CasTest2 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 23.12 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s CasTest3 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 154.78 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s CasTest4 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 154.78 €
```
```catala-test-inline
$ catala Interpret_Lcalc -s CasTest5 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant = ESome 129.65 €
```

View File

@ -97,3 +97,9 @@ $ catala Interpret -s Exemple1
[RESULT] montant_versé = 246.23 €
[RESULT] éligibilité = true
```
```catala-test-inline
$ catala Interpret_Lcalc -s Exemple1 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] montant_versé = ESome 246.23 €
[RESULT] éligibilité = ESome true
```

View File

@ -259,3 +259,8 @@ $ catala Interpret -s Exemple1 --disable_warnings
$ catala Typecheck
[RESULT] Typechecking successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s Exemple1 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] éligible = ESome true
```

View File

@ -422,3 +422,59 @@ $ catala Interpret -s Test13 --disable_warnings
$ catala Interpret -s Test13 --disable_warnings
[RESULT] Computation successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s Test1 --avoid_exceptions --optimize
[RESULT] Computation successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s Test2 --avoid_exceptions --optimize
[RESULT] Computation successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s Test3 --avoid_exceptions --optimize
[RESULT] Computation successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s Test4 --avoid_exceptions --optimize
[RESULT] Computation successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s Test5 --avoid_exceptions --optimize
[RESULT] Computation successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s Test6 --avoid_exceptions --optimize
[RESULT] Computation successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s Test7 --avoid_exceptions --optimize
[RESULT] Computation successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s Test8 --avoid_exceptions --optimize
[RESULT] Computation successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s Test9 --avoid_exceptions --optimize
[RESULT] Computation successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s Test10 --avoid_exceptions --optimize
[RESULT] Computation successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s Test11 --avoid_exceptions --optimize
[RESULT] Computation successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s Test12 --avoid_exceptions --optimize
[RESULT] Computation successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s Test13 --avoid_exceptions --optimize
[RESULT] Computation successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s Test13 --avoid_exceptions --optimize
[RESULT] Computation successful!
```

View File

@ -64,3 +64,7 @@ champ d'application Test1:
$ catala Interpret -s Test1 --disable_warnings
[RESULT] Computation successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s Test1 --avoid_exceptions --optimize
[RESULT] Computation successful!
```

View File

@ -20,3 +20,11 @@ $ catala Interpret -s A
[RESULT] y = 4
[RESULT] z = 390.
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] w = ESome 0
[RESULT] x = ESome 4
[RESULT] y = ESome 4
[RESULT] z = ESome 390.
```

View File

@ -37,3 +37,16 @@ $ catala Interpret -s B
[RESULT] y = $17.20
[RESULT] z = 1
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome [ ESome $0.00; ESome $9.00; ESome $5.20 ]
```
```catala-test-inline
$ catala Interpret_Lcalc -s B --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] max = ESome $18.00
[RESULT] min = ESome $5.00
[RESULT] y = ESome $17.20
[RESULT] z = ESome 1
```

View File

@ -44,3 +44,20 @@ $ catala Interpret -s B
[RESULT] argmax = { "id" = 1; "income" = $9.00}_S
[RESULT] argmin = { "id" = 0; "income" = $0.00}_S
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome
[ ESome
{ "id" = ESome 0; "income" = ESome $0.00}_S;
ESome
{ "id" = ESome 1; "income" = ESome $9.00}_S;
ESome
{ "id" = ESome 2; "income" = ESome $5.20}_S ]
```
```catala-test-inline
$ catala Interpret_Lcalc -s B --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] argmax = ESome { "id" = ESome 1; "income" = ESome $9.00}_S
[RESULT] argmin = ESome { "id" = ESome 0; "income" = ESome $0.00}_S
```

View File

@ -16,3 +16,32 @@ $ catala Interpret -s A
[RESULT] x = [ 0; 1; 2; 3; 4; 5; 6 ]
[RESULT] y = [ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10 ]
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome
[ ESome 0; ESome 1; ESome 2; ESome 3; ESome 4; ESome 5; ESome 6 ]
[RESULT] y = ESome
[ ESome
0;
ESome
1;
ESome
2;
ESome
3;
ESome
4;
ESome
5;
ESome
6;
ESome
7;
ESome
8;
ESome
9;
ESome
10 ]
```

View File

@ -29,3 +29,14 @@ $ catala Interpret -s B
[RESULT] y = [ $9.00; $5.20 ]
[RESULT] z = [ false; true; true ]
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome [ ESome $0.00; ESome $9.00; ESome $5.20 ]
```
```catala-test-inline
$ catala Interpret_Lcalc -s B --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] y = ESome [ ESome $9.00; ESome $5.20 ]
[RESULT] z = ESome [ ESome false; ESome true; ESome true ]
```

View File

@ -44,3 +44,20 @@ $ catala Interpret -s B
[RESULT] argmax = { "id" = 1; "income" = $9.00}_S
[RESULT] argmin = { "id" = 0; "income" = $0.00}_S
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome
[ ESome
{ "id" = ESome 0; "income" = ESome $0.00}_S;
ESome
{ "id" = ESome 1; "income" = ESome $9.00}_S;
ESome
{ "id" = ESome 2; "income" = ESome $5.20}_S ]
```
```catala-test-inline
$ catala Interpret_Lcalc -s B --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] argmax = ESome { "id" = ESome 1; "income" = ESome $9.00}_S
[RESULT] argmin = ESome { "id" = ESome 0; "income" = ESome $0.00}_S
```

View File

@ -35,3 +35,16 @@ $ catala Interpret -s B
[RESULT] y = true
[RESULT] z = false
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome [ ESome 0; ESome 9; ESome 64 ]
```
```catala-test-inline
$ catala Interpret_Lcalc -s B --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] v = ESome 3
[RESULT] w = ESome true
[RESULT] y = ESome true
[RESULT] z = ESome false
```

View File

@ -57,3 +57,9 @@ let scope TestBool (foo: bool|context|output) (bar: integer|context|output) =
⟨ ⟨bar >=! 0 ⊢ true⟩, ⟨bar <! 0 ⊢ false⟩
| false ⊢ ∅ ⟩⟩
```
```catala-test-inline
$ catala Interpret_Lcalc -s TestBool --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] bar = ESome 1
[RESULT] foo = ESome true
```

View File

@ -13,3 +13,8 @@ $ catala Interpret -s TestBool
[RESULT] Computation successful! Results:
[RESULT] foo = true
```
```catala-test-inline
$ catala Interpret_Lcalc -s TestBool --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] foo = ESome true
```

View File

@ -22,3 +22,11 @@ $ catala Interpret -s TestXor
[RESULT] t_xor_f = true
[RESULT] t_xor_t = false
```
```catala-test-inline
$ catala Interpret_Lcalc -s TestXor --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] f_xor_f = ESome false
[RESULT] f_xor_t = ESome true
[RESULT] t_xor_f = ESome true
[RESULT] t_xor_t = ESome false
```

View File

@ -34,3 +34,14 @@ $ catala Interpret -s A
[RESULT] z2 = true
[RESULT] z3 = [0 years, 0 months, 5937 days]
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] m = ESome [0 years, 0 months, 11874 days]
[RESULT] m2 = ESome [0 years, 6 months, 0 days]
[RESULT] x = ESome 2019-01-01
[RESULT] y = ESome 2002-09-30
[RESULT] z = ESome true
[RESULT] z2 = ESome true
[RESULT] z3 = ESome [0 years, 0 months, 5937 days]
```

View File

@ -19,3 +19,10 @@ $ catala Interpret -s A
[RESULT] y = 2002-09-30
[RESULT] z = [0 years, 0 months, 5937 days]
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome 2019-01-01
[RESULT] y = ESome 2002-09-30
[RESULT] z = ESome [0 years, 0 months, 5937 days]
```

View File

@ -23,3 +23,12 @@ $ catala Interpret -s A
[RESULT] y = -4.3682977870532065498
[RESULT] z = 654265429805103220650980650.570540510654
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] a = ESome
-0.000000000000000000000000000000000000000000000000000000000078695580959228473468…
[RESULT] x = ESome 84.64866565265689623
[RESULT] y = ESome -4.3682977870532065498
[RESULT] z = ESome 654265429805103220650980650.570540510654
```

View File

@ -22,3 +22,11 @@ $ catala Interpret -s A
[RESULT] y = 4.368297
[RESULT] y1 = 4.
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome 84.648665
[RESULT] x1 = ESome 85.
[RESULT] y = ESome 4.368297
[RESULT] y1 = ESome 4.
```

View File

@ -19,3 +19,10 @@ $ catala Interpret -s A
[RESULT] y = 4.368297
[RESULT] z = 19.37795552820698775747…
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome 84.648665
[RESULT] y = ESome 4.368297
[RESULT] z = ESome 19.37795552820698775747…
```

View File

@ -17,3 +17,9 @@ $ catala Interpret -s A
[RESULT] x = 4.
[RESULT] y = 1.04
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome 4.
[RESULT] y = ESome 1.04
```

View File

@ -28,3 +28,10 @@ $ catala Interpret -s A
[RESULT] f = Case1 2
[RESULT] x = 2
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] e = ESome Case1 ()
[RESULT] f = ESome Case1 2
[RESULT] x = ESome 2
```

View File

@ -23,3 +23,10 @@ $ catala Interpret -s A
[RESULT] y = true
[RESULT] z = false
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome Case1 2
[RESULT] y = ESome true
[RESULT] z = ESome false
```

View File

@ -22,3 +22,9 @@ $ catala Interpret -s A
[RESULT] x = Case1 2
[RESULT] y = 42
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome Case1 2
[RESULT] y = ESome 42
```

View File

@ -49,3 +49,15 @@ $ catala Interpret -s Simple_case
[RESULT] x = Case1 2
[RESULT] y = 31
```
```catala-test-inline
$ catala Interpret_Lcalc -s Simple_case_2 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome Case3 ()
[RESULT] y = ESome 31
```
```catala-test-inline
$ catala Interpret_Lcalc -s Simple_case --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome Case1 2
[RESULT] y = ESome 31
```

View File

@ -19,3 +19,7 @@ scope Bar:
$ catala Interpret -s Bar
[RESULT] Computation successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s Bar --avoid_exceptions --optimize
[RESULT] Computation successful!
```

View File

@ -24,3 +24,9 @@ $ catala Interpret -s A
[RESULT] x = 0
[RESULT] y = 0
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome 0
[RESULT] y = ESome 0
```

View File

@ -17,3 +17,8 @@ $ catala Interpret -s A
[RESULT] Computation successful! Results:
[RESULT] x = 1
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome 1
```

View File

@ -21,3 +21,8 @@ $ catala Interpret -s A
[RESULT] Computation successful! Results:
[RESULT] x = 2
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome 2
```

View File

@ -52,3 +52,9 @@ $ catala Interpret -s Benefit
[RESULT] benefit = $2000.00
[RESULT] person = { "age" = 26; "disabled" = true}_Person
```
```catala-test-inline
$ catala Interpret_Lcalc -s Benefit --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] benefit = ESome $2000.00
[RESULT] person = ESome { "age" = ESome 26; "disabled" = ESome true}_Person
```

View File

@ -26,3 +26,10 @@ $ catala Interpret -s A
[RESULT] y = 1
[RESULT] z = 0
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome 0
[RESULT] y = ESome 1
[RESULT] z = ESome 0
```

View File

@ -19,3 +19,8 @@ $ catala Interpret -s A
[RESULT] Computation successful! Results:
[RESULT] x = 1
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome 1
```

View File

@ -25,3 +25,8 @@ $ catala Interpret -s A
[RESULT] Computation successful! Results:
[RESULT] x = 0
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome 0
```

View File

@ -23,3 +23,9 @@ $ catala Interpret -s A
[RESULT] x = 1
[RESULT] y = 3
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome 1
[RESULT] y = ESome 3
```

View File

@ -16,3 +16,8 @@ $ catala Interpret -s A
[RESULT] Computation successful! Results:
[RESULT] x = 1
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome 1
```

View File

@ -23,3 +23,9 @@ $ catala Interpret -s A
[RESULT] x = 1
[RESULT] y = 2
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome 1
[RESULT] y = ESome 2
```

View File

@ -26,3 +26,8 @@ $ catala Interpret -s R
[RESULT] Computation successful! Results:
[RESULT] r = 30
```
```catala-test-inline
$ catala Interpret_Lcalc -s R --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] r = ESome 30
```

View File

@ -30,3 +30,7 @@ let scope B (B_in: B_in): B =
$ catala Interpret -s B
[RESULT] Computation successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s B --avoid_exceptions --optimize
[RESULT] Computation successful!
```

View File

@ -44,3 +44,18 @@ $ catala Interpret -s A
[RESULT] Computation successful! Results:
[RESULT] literate_parsing_is_ok = true
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] literate_parsing_is_ok = ESome true
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] literate_parsing_is_ok = ESome true
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] literate_parsing_is_ok = ESome true
```

View File

@ -39,3 +39,13 @@ $ catala Interpret -s S
[RESULT] Computation successful! Results:
[RESULT] a = A ()
```
```catala-test-inline
$ catala Interpret_Lcalc -s S2 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] b = ESome B ()
```
```catala-test-inline
$ catala Interpret_Lcalc -s S --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] a = ESome A ()
```

View File

@ -17,3 +17,9 @@ $ catala Interpret -s A
[RESULT] x = $0.30
[RESULT] y = $0.30
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome $0.30
[RESULT] y = ESome $0.30
```

View File

@ -19,3 +19,10 @@ $ catala Interpret -s A
[RESULT] y = $8548650.96
[RESULT] z = $7.23
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome $123.54
[RESULT] y = ESome $8548650.96
[RESULT] z = ESome $7.23
```

View File

@ -50,3 +50,19 @@ $ catala Interpret -s S2
[RESULT] Computation successful! Results:
[RESULT] y = 1
```
```catala-test-inline
$ catala Interpret_Lcalc -s S --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] a = ESome
{
"x" = ESome -2.;
"y" = ESome { "y" = ESome false; "z" = ESome -1.}_B
}_A
[RESULT] b = ESome { "y" = ESome true; "z" = ESome 42.}_B
```
```catala-test-inline
$ catala Interpret_Lcalc -s S2 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] y = ESome 1
```

View File

@ -24,3 +24,11 @@ $ catala Interpret -s S
[RESULT] a = { "x" = 0; "y" = { "y" = true; "z" = 0.}_B}_A
[RESULT] b = { "y" = true; "z" = 0.}_B
```
```catala-test-inline
$ catala Interpret_Lcalc -s S --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] a = ESome
{ "x" = ESome 0; "y" = ESome { "y" = ESome true; "z" = ESome 0.}_B
}_A
[RESULT] b = ESome { "y" = ESome true; "z" = ESome 0.}_B
```

View File

@ -624,3 +624,24 @@ def s(s_in:SIn):
b = temp_b_7
return S(a = a_3, b = b)
```
```catala-test-inline
$ catala Interpret_Lcalc -s S --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] a = ESome 1946.5744
[RESULT] b = ESome { "y" = ESome true; "z" = ESome 2091.}_A
```
```catala-test-inline
$ catala Interpret_Lcalc -s S2 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] a = ESome 154.
```
```catala-test-inline
$ catala Interpret_Lcalc -s S3 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] a = ESome 2480.
```
```catala-test-inline
$ catala Interpret_Lcalc -s S4 --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] a = ESome 6001.
```

View File

@ -15,3 +15,8 @@ $ catala Interpret -s S
[RESULT] Computation successful! Results:
[RESULT] a = true
```
```catala-test-inline
$ catala Interpret_Lcalc -s S --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] a = ESome true
```

View File

@ -48,3 +48,20 @@ $ catala Interpret -s C
[RESULT] z1 = 2
[RESULT] z2 = 2
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] x = ESome 0
```
```catala-test-inline
$ catala Interpret_Lcalc -s B --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] y1 = ESome 1
[RESULT] y2 = ESome 1
```
```catala-test-inline
$ catala Interpret_Lcalc -s C --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] z1 = ESome 2
[RESULT] z2 = ESome 2
```

View File

@ -24,3 +24,9 @@ $ catala Interpret -s Titi
[RESULT] fizz = { "foo" = 1213}_Toto
[RESULT] fuzz = { "foo" = 1323}_Toto
```
```catala-test-inline
$ catala Interpret_Lcalc -s Titi --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] fizz = ESome { "foo" = ESome 1213}_Toto
[RESULT] fuzz = ESome { "foo" = ESome 1323}_Toto
```

View File

@ -37,3 +37,16 @@ $ catala Interpret -s B
[RESULT] a = 42
[RESULT] b = true
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] a = ESome -1
[RESULT] a_base = ESome 1
[RESULT] b = ESome false
```
```catala-test-inline
$ catala Interpret_Lcalc -s B --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] a = ESome 42
[RESULT] b = ESome true
```

View File

@ -48,3 +48,19 @@ $ catala Interpret -s C
[RESULT] Computation successful! Results:
[RESULT] z = 2
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] u = ESome true
[RESULT] x = ESome 0
```
```catala-test-inline
$ catala Interpret_Lcalc -s B --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] y = ESome 1
```
```catala-test-inline
$ catala Interpret_Lcalc -s C --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] z = ESome 2
```

View File

@ -22,3 +22,8 @@ $ catala Interpret -s Caller
[RESULT] Computation successful! Results:
[RESULT] y = 1
```
```catala-test-inline
$ catala Interpret_Lcalc -s Caller --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] y = ESome 1
```

View File

@ -23,3 +23,7 @@ scope Caller:
$ catala Interpret -s Caller
[RESULT] Computation successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s Caller --avoid_exceptions --optimize
[RESULT] Computation successful!
```

View File

@ -34,3 +34,21 @@ $ catala Interpret -s A
└─ Article
[RESULT] Computation successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[WARNING] In scope "A", the variable "y" is never used anywhere; maybe it's unnecessary?
┌─⯈ tests/test_struct/good/ambiguous_fields.catala_en:12.10-11:
└──┐
12 │ context y content integer
│ ‾
└─ Article
[WARNING] The structure "Bar" is never used; maybe it's unnecessary?
┌─⯈ tests/test_struct/good/ambiguous_fields.catala_en:7.22-25:
└─┐
7 │ declaration structure Bar:
│ ‾‾‾
└─ Article
[RESULT] Computation successful!
```

View File

@ -50,3 +50,24 @@ $ catala Interpret -s B
{ "a" = { "x" = 0; "y" = false}_S; "b" = { "x" = 1; "y" = true}_S
}_T
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] t = ESome
{
"a" = ESome { "x" = ESome 0; "y" = ESome false}_S;
"b" = ESome { "x" = ESome 1; "y" = ESome true}_S
}_T
```
```catala-test-inline
$ catala Interpret_Lcalc -s B --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] out = ESome 1
[RESULT] t = ESome
{
"a" = ESome { "x" = ESome 0; "y" = ESome false}_S;
"b" = ESome { "x" = ESome 1; "y" = ESome true}_S
}_T
```

View File

@ -29,3 +29,16 @@ $ catala Interpret -s A
[RESULT] x = { "f" = 1}_Foo
[RESULT] y = 1
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[WARNING] The structure "Bar" is never used; maybe it's unnecessary?
┌─⯈ tests/test_struct/good/same_name_fields.catala_en:7.22-25:
└─┐
7 │ declaration structure Bar:
│ ‾‾‾
└─ Article
[RESULT] Computation successful! Results:
[RESULT] x = ESome { "f" = ESome 1}_Foo
[RESULT] y = ESome 1
```

View File

@ -23,3 +23,9 @@ $ catala Interpret -s A
[RESULT] s = { "x" = 1; "y" = 2}_S
[RESULT] z = 3
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] s = ESome { "x" = ESome 1; "y" = ESome 2}_S
[RESULT] z = ESome 3
```

View File

@ -67,3 +67,13 @@ $ catala Interpret -s S
[RESULT] o_t = 2022-01-24
[RESULT] o_x = 0.14285714285714285714…
```
```catala-test-inline
$ catala Interpret_Lcalc -s S --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] o_b = ESome true
[RESULT] o_d = ESome [0 years, 0 months, -13 days]
[RESULT] o_i = ESome -5
[RESULT] o_m = ESome $-5.75
[RESULT] o_t = ESome 2022-01-24
[RESULT] o_x = ESome 0.14285714285714285714…
```

View File

@ -25,3 +25,8 @@ $ catala Interpret -s A
$ catala Typecheck
[RESULT] Typechecking successful!
```
```catala-test-inline
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] foo = ESome 3
```

View File

@ -48,3 +48,9 @@ $ catala Interpret -s B
[RESULT] foofoo = 4
[RESULT] foofoofoo = 6
```
```catala-test-inline
$ catala Interpret_Lcalc -s B --avoid_exceptions --optimize
[RESULT] Computation successful! Results:
[RESULT] foofoo = ESome 4
[RESULT] foofoofoo = ESome 6
```