mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-19 16:28:12 +03:00
Restore testing (formatting is better!)
This commit is contained in:
parent
d1210cc0e4
commit
579e66a500
@ -33,9 +33,9 @@ scope B:
|
||||
$ catala Interpret -s A
|
||||
[RESULT] Computation successful! Results:
|
||||
[RESULT] x =
|
||||
[ { S id = 0; income = $0.00; };
|
||||
{ S id = 1; income = $9.00; };
|
||||
{ S id = 2; income = $5.20; } ]
|
||||
[ { S id = 0; income = $0.00; };
|
||||
{ S id = 1; income = $9.00; };
|
||||
{ S id = 2; income = $5.20; } ]
|
||||
```
|
||||
|
||||
```catala-test-inline
|
||||
@ -48,10 +48,10 @@ $ catala Interpret -s B
|
||||
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
|
||||
[RESULT] Computation successful! Results:
|
||||
[RESULT] x =
|
||||
ESome
|
||||
[ ESome { S id = ESome 0; income = ESome $0.00; };
|
||||
ESome { S id = ESome 1; income = ESome $9.00; };
|
||||
ESome { S id = ESome 2; income = ESome $5.20; } ]
|
||||
ESome
|
||||
[ ESome { S id = ESome 0; income = ESome $0.00; };
|
||||
ESome { S id = ESome 1; income = ESome $9.00; };
|
||||
ESome { S id = ESome 2; income = ESome $5.20; } ]
|
||||
```
|
||||
```catala-test-inline
|
||||
$ catala Interpret_Lcalc -s B --avoid_exceptions --optimize
|
||||
|
@ -19,20 +19,18 @@ $ catala Interpret -s A
|
||||
```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] 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 ]
|
||||
ESome
|
||||
[ ESome 0;
|
||||
ESome 1;
|
||||
ESome 2;
|
||||
ESome 3;
|
||||
ESome 4;
|
||||
ESome 5;
|
||||
ESome 6;
|
||||
ESome 7;
|
||||
ESome 8;
|
||||
ESome 9;
|
||||
ESome 10 ]
|
||||
```
|
||||
|
@ -33,9 +33,9 @@ scope B:
|
||||
$ catala Interpret -s A
|
||||
[RESULT] Computation successful! Results:
|
||||
[RESULT] x =
|
||||
[ { S id = 0; income = $0.00; };
|
||||
{ S id = 1; income = $9.00; };
|
||||
{ S id = 2; income = $5.20; } ]
|
||||
[ { S id = 0; income = $0.00; };
|
||||
{ S id = 1; income = $9.00; };
|
||||
{ S id = 2; income = $5.20; } ]
|
||||
```
|
||||
|
||||
```catala-test-inline
|
||||
@ -48,10 +48,10 @@ $ catala Interpret -s B
|
||||
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
|
||||
[RESULT] Computation successful! Results:
|
||||
[RESULT] x =
|
||||
ESome
|
||||
[ ESome { S id = ESome 0; income = ESome $0.00; };
|
||||
ESome { S id = ESome 1; income = ESome $9.00; };
|
||||
ESome { S id = ESome 2; income = ESome $5.20; } ]
|
||||
ESome
|
||||
[ ESome { S id = ESome 0; income = ESome $0.00; };
|
||||
ESome { S id = ESome 1; income = ESome $9.00; };
|
||||
ESome { S id = ESome 2; income = ESome $5.20; } ]
|
||||
```
|
||||
```catala-test-inline
|
||||
$ catala Interpret_Lcalc -s B --avoid_exceptions --optimize
|
||||
|
@ -18,7 +18,7 @@ scope A:
|
||||
$ catala Interpret -s A
|
||||
[RESULT] Computation successful! Results:
|
||||
[RESULT] a =
|
||||
-0.000000000000000000000000000000000000000000000000000000000078695580959228473468…
|
||||
-0.000000000000000000000000000000000000000000000000000000000078695580959228473468…
|
||||
[RESULT] x = 84.64866565265689623
|
||||
[RESULT] y = -4.3682977870532065498
|
||||
[RESULT] z = 654265429805103220650980650.570540510654
|
||||
@ -27,8 +27,8 @@ $ catala Interpret -s A
|
||||
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
|
||||
[RESULT] Computation successful! Results:
|
||||
[RESULT] a =
|
||||
ESome
|
||||
-0.000000000000000000000000000000000000000000000000000000000078695580959228473468…
|
||||
ESome
|
||||
-0.000000000000000000000000000000000000000000000000000000000078695580959228473468…
|
||||
[RESULT] x = ESome 84.64866565265689623
|
||||
[RESULT] y = ESome -4.3682977870532065498
|
||||
[RESULT] z = ESome 654265429805103220650980650.570540510654
|
||||
|
@ -54,11 +54,7 @@ $ catala Interpret -s S2
|
||||
$ catala Interpret_Lcalc -s S --avoid_exceptions --optimize
|
||||
[RESULT] Computation successful! Results:
|
||||
[RESULT] a =
|
||||
ESome
|
||||
{ A
|
||||
x = ESome -2.;
|
||||
y = ESome { B y = ESome false; z = ESome -1.; };
|
||||
}
|
||||
ESome { A x = ESome -2.; y = ESome { B y = ESome false; z = ESome -1.; }; }
|
||||
[RESULT] b = ESome { B y = ESome true; z = ESome 42.; }
|
||||
```
|
||||
```catala-test-inline
|
||||
|
@ -27,11 +27,6 @@ $ catala Interpret -s S
|
||||
```catala-test-inline
|
||||
$ catala Interpret_Lcalc -s S --avoid_exceptions --optimize
|
||||
[RESULT] Computation successful! Results:
|
||||
[RESULT] a =
|
||||
ESome
|
||||
{ A
|
||||
x = ESome 0;
|
||||
y = ESome { B y = ESome true; z = ESome 0.; };
|
||||
}
|
||||
[RESULT] a = ESome { A x = ESome 0; y = ESome { B y = ESome true; z = ESome 0.; }; }
|
||||
[RESULT] b = ESome { B y = ESome true; z = ESome 0.; }
|
||||
```
|
||||
|
@ -19,7 +19,7 @@ $ catala Proof --disable_counterexamples
|
||||
6 │ context y content boolean
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.y] This variable might return an empty error:
|
||||
[WARNING] [A.y] This variable might return an empty error:
|
||||
┌─⯈ tests/test_proof/bad/array_length-empty.catala_en:6.11-6.12:
|
||||
└─┐
|
||||
6 │ context y content boolean
|
||||
|
@ -20,7 +20,7 @@ $ catala Proof --disable_counterexamples
|
||||
6 │ context y content boolean
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.y] At least two exceptions overlap for this variable:
|
||||
[WARNING] [A.y] At least two exceptions overlap for this variable:
|
||||
┌─⯈ tests/test_proof/bad/array_length-overlap.catala_en:6.11-6.12:
|
||||
└─┐
|
||||
6 │ context y content boolean
|
||||
|
@ -24,7 +24,7 @@ scope Foo:
|
||||
|
||||
```catala-test-inline
|
||||
$ catala Proof --disable_counterexamples
|
||||
[ERROR] [Foo.x] This variable might return an empty error:
|
||||
[WARNING] [Foo.x] This variable might return an empty error:
|
||||
┌─⯈ tests/test_proof/bad/assert-empty.catala_en:4.11-4.12:
|
||||
└─┐
|
||||
4 │ output x content integer
|
||||
|
@ -22,7 +22,7 @@ $ catala Proof --disable_counterexamples
|
||||
6 │ context y content boolean
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.y] This variable might return an empty error:
|
||||
[WARNING] [A.y] This variable might return an empty error:
|
||||
┌─⯈ tests/test_proof/bad/dates_get_year-empty.catala_en:6.11-6.12:
|
||||
└─┐
|
||||
6 │ context y content boolean
|
||||
|
@ -22,7 +22,7 @@ $ catala Proof --disable_counterexamples
|
||||
6 │ context y content boolean
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.y] At least two exceptions overlap for this variable:
|
||||
[WARNING] [A.y] At least two exceptions overlap for this variable:
|
||||
┌─⯈ tests/test_proof/bad/dates_get_year-overlap.catala_en:6.11-6.12:
|
||||
└─┐
|
||||
6 │ context y content boolean
|
||||
|
@ -21,7 +21,7 @@ $ catala Proof --disable_counterexamples
|
||||
6 │ context y content boolean
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.y] This variable might return an empty error:
|
||||
[WARNING] [A.y] This variable might return an empty error:
|
||||
┌─⯈ tests/test_proof/bad/dates_simple-empty.catala_en:6.11-6.12:
|
||||
└─┐
|
||||
6 │ context y content boolean
|
||||
|
@ -22,7 +22,7 @@ $ catala Proof --disable_counterexamples
|
||||
6 │ context y content boolean
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.y] At least two exceptions overlap for this variable:
|
||||
[WARNING] [A.y] At least two exceptions overlap for this variable:
|
||||
┌─⯈ tests/test_proof/bad/dates_simple-overlap.catala_en:6.11-6.12:
|
||||
└─┐
|
||||
6 │ context y content boolean
|
||||
|
@ -19,7 +19,7 @@ $ catala Proof --disable_counterexamples
|
||||
6 │ context y content boolean
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.y] This variable might return an empty error:
|
||||
[WARNING] [A.y] This variable might return an empty error:
|
||||
┌─⯈ tests/test_proof/bad/duration-empty.catala_en:6.11-6.12:
|
||||
└─┐
|
||||
6 │ context y content boolean
|
||||
|
@ -20,7 +20,7 @@ $ catala Proof --disable_counterexamples
|
||||
6 │ context y content boolean
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.y] At least two exceptions overlap for this variable:
|
||||
[WARNING] [A.y] At least two exceptions overlap for this variable:
|
||||
┌─⯈ tests/test_proof/bad/duration-overlap.catala_en:6.11-6.12:
|
||||
└─┐
|
||||
6 │ context y content boolean
|
||||
|
@ -37,7 +37,7 @@ $ catala Proof --disable_counterexamples
|
||||
7 │ -- C content boolean
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.x] This variable might return an empty error:
|
||||
[WARNING] [A.x] This variable might return an empty error:
|
||||
┌─⯈ tests/test_proof/bad/enums-empty.catala_en:15.11-15.12:
|
||||
└──┐
|
||||
15 │ context x content integer
|
||||
|
@ -35,7 +35,7 @@ $ catala Proof --disable_counterexamples
|
||||
5 │ -- C content boolean
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.x] This variable might return an empty error:
|
||||
[WARNING] [A.x] This variable might return an empty error:
|
||||
┌─⯈ tests/test_proof/bad/enums-nonbool-empty.catala_en:13.11-13.12:
|
||||
└──┐
|
||||
13 │ context x content integer
|
||||
|
@ -35,7 +35,7 @@ $ catala Proof --disable_counterexamples
|
||||
5 │ -- C content boolean
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.x] At least two exceptions overlap for this variable:
|
||||
[WARNING] [A.x] At least two exceptions overlap for this variable:
|
||||
┌─⯈ tests/test_proof/bad/enums-nonbool-overlap.catala_en:13.11-13.12:
|
||||
└──┐
|
||||
13 │ context x content integer
|
||||
|
@ -37,7 +37,7 @@ $ catala Proof --disable_counterexamples
|
||||
7 │ -- C content boolean
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.x] At least two exceptions overlap for this variable:
|
||||
[WARNING] [A.x] At least two exceptions overlap for this variable:
|
||||
┌─⯈ tests/test_proof/bad/enums-overlap.catala_en:15.11-15.12:
|
||||
└──┐
|
||||
15 │ context x content integer
|
||||
|
@ -30,7 +30,7 @@ $ catala Proof --disable_counterexamples
|
||||
6 │ -- C2
|
||||
│ ‾‾
|
||||
└─ Article
|
||||
[ERROR] [A.y] This variable might return an empty error:
|
||||
[WARNING] [A.y] This variable might return an empty error:
|
||||
┌─⯈ tests/test_proof/bad/enums_inj-empty.catala_en:10.11-10.12:
|
||||
└──┐
|
||||
10 │ context y content integer
|
||||
|
@ -25,7 +25,7 @@ $ catala Proof --disable_counterexamples
|
||||
10 │ context y content integer
|
||||
│ ‾
|
||||
└─ Article
|
||||
[ERROR] [A.y] At least two exceptions overlap for this variable:
|
||||
[WARNING] [A.y] At least two exceptions overlap for this variable:
|
||||
┌─⯈ tests/test_proof/bad/enums_inj-overlap.catala_en:10.11-10.12:
|
||||
└──┐
|
||||
10 │ context y content integer
|
||||
|
@ -28,7 +28,7 @@ $ catala Proof --disable_counterexamples
|
||||
10 │ context y content integer
|
||||
│ ‾
|
||||
└─ Article
|
||||
[ERROR] [A.y] This variable might return an empty error:
|
||||
[WARNING] [A.y] This variable might return an empty error:
|
||||
┌─⯈ tests/test_proof/bad/enums_unit-empty.catala_en:10.11-10.12:
|
||||
└──┐
|
||||
10 │ context y content integer
|
||||
|
@ -28,7 +28,7 @@ $ catala Proof --disable_counterexamples
|
||||
10 │ context y content integer
|
||||
│ ‾
|
||||
└─ Article
|
||||
[ERROR] [A.y] At least two exceptions overlap for this variable:
|
||||
[WARNING] [A.y] At least two exceptions overlap for this variable:
|
||||
┌─⯈ tests/test_proof/bad/enums_unit-overlap.catala_en:10.11-10.12:
|
||||
└──┐
|
||||
10 │ context y content integer
|
||||
|
@ -20,7 +20,7 @@ $ catala Proof --disable_counterexamples
|
||||
5 │ context x content boolean
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.x] This variable might return an empty error:
|
||||
[WARNING] [A.x] This variable might return an empty error:
|
||||
┌─⯈ tests/test_proof/bad/let_in_condition-empty.catala_en:5.11-5.12:
|
||||
└─┐
|
||||
5 │ context x content boolean
|
||||
|
@ -23,7 +23,7 @@ $ catala Proof --disable_counterexamples
|
||||
8 │ context y content boolean
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.y] This variable might return an empty error:
|
||||
[WARNING] [A.y] This variable might return an empty error:
|
||||
┌─⯈ tests/test_proof/bad/money-empty.catala_en:8.11-8.12:
|
||||
└─┐
|
||||
8 │ context y content boolean
|
||||
|
@ -24,7 +24,7 @@ $ catala Proof --disable_counterexamples
|
||||
8 │ context y content boolean
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.y] At least two exceptions overlap for this variable:
|
||||
[WARNING] [A.y] At least two exceptions overlap for this variable:
|
||||
┌─⯈ tests/test_proof/bad/money-overlap.catala_en:8.11-8.12:
|
||||
└─┐
|
||||
8 │ context y content boolean
|
||||
|
@ -24,7 +24,7 @@ $ catala Proof --disable_counterexamples
|
||||
8 │ context y content integer
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.y] At least two exceptions overlap for this variable:
|
||||
[WARNING] [A.y] At least two exceptions overlap for this variable:
|
||||
┌─⯈ tests/test_proof/bad/no_vars-conflict.catala_en:8.11-8.12:
|
||||
└─┐
|
||||
8 │ context y content integer
|
||||
|
@ -23,7 +23,7 @@ $ catala Proof --disable_counterexamples
|
||||
7 │ context y content integer
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.y] This variable might return an empty error:
|
||||
[WARNING] [A.y] This variable might return an empty error:
|
||||
┌─⯈ tests/test_proof/bad/no_vars-empty.catala_en:7.11-7.12:
|
||||
└─┐
|
||||
7 │ context y content integer
|
||||
|
@ -139,7 +139,7 @@ $ catala Proof --disable_counterexamples
|
||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
└┬ ProLaLa 2022 Super Cash Bonus
|
||||
└─ Amount
|
||||
[ERROR] [Amount.amount] This variable might return an empty error:
|
||||
[WARNING] [Amount.amount] This variable might return an empty error:
|
||||
┌─⯈ tests/test_proof/bad/prolala_motivating_example.catala_en:60.11-60.17:
|
||||
└──┐
|
||||
60 │ context amount content integer
|
||||
@ -147,7 +147,7 @@ $ catala Proof --disable_counterexamples
|
||||
└┬ ProLaLa 2022 Super Cash Bonus
|
||||
└─ Amount
|
||||
Counterexample generation is disabled so none was generated.
|
||||
[ERROR] [Eligibility.is_eligible] This variable might return an empty error:
|
||||
[WARNING] [Eligibility.is_eligible] This variable might return an empty error:
|
||||
┌─⯈ tests/test_proof/bad/prolala_motivating_example.catala_en:11.10-11.21:
|
||||
└──┐
|
||||
11 │ output is_eligible content boolean
|
||||
@ -155,7 +155,7 @@ Counterexample generation is disabled so none was generated.
|
||||
└┬ ProLaLa 2022 Super Cash Bonus
|
||||
└─ Eligibility
|
||||
Counterexample generation is disabled so none was generated.
|
||||
[ERROR] [Eligibility.is_eligible] At least two exceptions overlap for this variable:
|
||||
[WARNING] [Eligibility.is_eligible] At least two exceptions overlap for this variable:
|
||||
┌─⯈ tests/test_proof/bad/prolala_motivating_example.catala_en:11.10-11.21:
|
||||
└──┐
|
||||
11 │ output is_eligible content boolean
|
||||
|
@ -19,7 +19,7 @@ $ catala Proof --disable_counterexamples
|
||||
6 │ context y content boolean
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.y] This variable might return an empty error:
|
||||
[WARNING] [A.y] This variable might return an empty error:
|
||||
┌─⯈ tests/test_proof/bad/rationals-empty.catala_en:6.11-6.12:
|
||||
└─┐
|
||||
6 │ context y content boolean
|
||||
|
@ -20,7 +20,7 @@ $ catala Proof --disable_counterexamples
|
||||
6 │ context y content boolean
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.y] At least two exceptions overlap for this variable:
|
||||
[WARNING] [A.y] At least two exceptions overlap for this variable:
|
||||
┌─⯈ tests/test_proof/bad/rationals-overlap.catala_en:6.11-6.12:
|
||||
└─┐
|
||||
6 │ context y content boolean
|
||||
|
@ -47,7 +47,7 @@ $ catala Proof --disable_counterexamples
|
||||
15 │ context x10 content boolean
|
||||
│ ‾‾‾
|
||||
└─ Test
|
||||
[ERROR] [A.x10] This variable might return an empty error:
|
||||
[WARNING] [A.x10] This variable might return an empty error:
|
||||
┌─⯈ tests/test_proof/bad/sat_solving.catala_en:15.11-15.14:
|
||||
└──┐
|
||||
15 │ context x10 content boolean
|
||||
|
@ -28,7 +28,7 @@ $ catala Proof --disable_counterexamples
|
||||
13 │ context x content integer
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.x] This variable might return an empty error:
|
||||
[WARNING] [A.x] This variable might return an empty error:
|
||||
┌─⯈ tests/test_proof/bad/structs-empty.catala_en:13.11-13.12:
|
||||
└──┐
|
||||
13 │ context x content integer
|
||||
|
@ -28,7 +28,7 @@ $ catala Proof --disable_counterexamples
|
||||
13 │ context x content integer
|
||||
│ ‾
|
||||
└─ Test
|
||||
[ERROR] [A.x] At least two exceptions overlap for this variable:
|
||||
[WARNING] [A.x] At least two exceptions overlap for this variable:
|
||||
┌─⯈ tests/test_proof/bad/structs-overlap.catala_en:13.11-13.12:
|
||||
└──┐
|
||||
13 │ context x content integer
|
||||
|
@ -70,28 +70,26 @@ $ catala Interpret -t -s HousingComputation
|
||||
[LOG] ≔ HousingComputation.result: 3
|
||||
[RESULT] Computation successful! Results:
|
||||
[RESULT] f = λ (x: integer) →
|
||||
error_empty
|
||||
⟨true
|
||||
⊢ (let result : RentComputation =
|
||||
(λ (RentComputation_in: RentComputation_in) →
|
||||
let g : integer → integer =
|
||||
λ (x1: integer) →
|
||||
error_empty ⟨true ⊢ x1 + 1⟩
|
||||
in
|
||||
let f : integer → integer =
|
||||
λ (x1: integer) →
|
||||
error_empty ⟨true ⊢ g (x1 + 1)⟩
|
||||
in
|
||||
{ RentComputation f = f; })
|
||||
{RentComputation_in}
|
||||
in
|
||||
let result1 : RentComputation =
|
||||
{ RentComputation
|
||||
f = λ (param0: integer) → result.f param0;
|
||||
}
|
||||
in
|
||||
if true then result1 else result1).
|
||||
f
|
||||
x⟩
|
||||
error_empty
|
||||
⟨true
|
||||
⊢ (let result : RentComputation =
|
||||
(λ (RentComputation_in: RentComputation_in) →
|
||||
let g : integer → integer =
|
||||
λ (x1: integer) →
|
||||
error_empty ⟨true ⊢ x1 + 1⟩
|
||||
in
|
||||
let f : integer → integer =
|
||||
λ (x1: integer) →
|
||||
error_empty ⟨true ⊢ g (x1 + 1)⟩
|
||||
in
|
||||
{ RentComputation f = f; })
|
||||
{RentComputation_in}
|
||||
in
|
||||
let result1 : RentComputation =
|
||||
{ RentComputation f = λ (param0: integer) → result.f param0; }
|
||||
in
|
||||
if true then result1 else result1).
|
||||
f
|
||||
x⟩
|
||||
[RESULT] result = 3
|
||||
```
|
||||
|
@ -26,38 +26,36 @@ scope RentComputation:
|
||||
$ catala Interpret -s RentComputation
|
||||
[RESULT] Computation successful! Results:
|
||||
[RESULT] f1 = λ (x: integer) →
|
||||
error_empty
|
||||
⟨true ⊢ let x1 : integer = x + 1 in
|
||||
error_empty ⟨true ⊢ x1 + 1⟩⟩
|
||||
error_empty ⟨true ⊢ let x1 : integer = x + 1 in
|
||||
error_empty ⟨true ⊢ x1 + 1⟩⟩
|
||||
[RESULT] f2 = λ (x: integer) →
|
||||
error_empty
|
||||
⟨true ⊢ let x1 : integer = x + 1 in
|
||||
error_empty ⟨true ⊢ x1 + 1⟩⟩
|
||||
error_empty ⟨true ⊢ let x1 : integer = x + 1 in
|
||||
error_empty ⟨true ⊢ x1 + 1⟩⟩
|
||||
```
|
||||
|
||||
```catala-test-inline
|
||||
$ catala Interpret_Lcalc -s RentComputation --avoid_exceptions --optimize
|
||||
[RESULT] Computation successful! Results:
|
||||
[RESULT] f1 =
|
||||
ESome
|
||||
(λ (x: integer) →
|
||||
ESome
|
||||
match
|
||||
(match (ESome (λ (x1: integer) → ESome (x1 + 1))) with
|
||||
| ENone _ → ENone _
|
||||
| ESome f1 → f1 (x + 1))
|
||||
with
|
||||
| ENone f1 → raise NoValueProvided
|
||||
| ESome x1 → x1)
|
||||
ESome
|
||||
(λ (x: integer) →
|
||||
ESome
|
||||
match
|
||||
(match (ESome (λ (x1: integer) → ESome (x1 + 1))) with
|
||||
| ENone _ → ENone _
|
||||
| ESome f1 → f1 (x + 1))
|
||||
with
|
||||
| ENone f1 → raise NoValueProvided
|
||||
| ESome x1 → x1)
|
||||
[RESULT] f2 =
|
||||
ESome
|
||||
(λ (x: integer) →
|
||||
ESome
|
||||
match
|
||||
(match (ESome (λ (x1: integer) → ESome (x1 + 1))) with
|
||||
| ENone _ → ENone _
|
||||
| ESome f2 → f2 (x + 1))
|
||||
with
|
||||
| ENone f2 → raise NoValueProvided
|
||||
| ESome x1 → x1)
|
||||
ESome
|
||||
(λ (x: integer) →
|
||||
ESome
|
||||
match
|
||||
(match (ESome (λ (x1: integer) → ESome (x1 + 1))) with
|
||||
| ENone _ → ENone _
|
||||
| ESome f2 → f2 (x + 1))
|
||||
with
|
||||
| ENone f2 → raise NoValueProvided
|
||||
| ESome x1 → x1)
|
||||
```
|
||||
|
@ -50,20 +50,20 @@ $ catala Interpret -s B
|
||||
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
|
||||
[RESULT] Computation successful! Results:
|
||||
[RESULT] t =
|
||||
ESome
|
||||
{ T
|
||||
a = ESome { S x = ESome 0; y = ESome false; };
|
||||
b = ESome { S x = ESome 1; y = ESome true; };
|
||||
}
|
||||
ESome
|
||||
{ T
|
||||
a = ESome { S x = ESome 0; y = ESome false; };
|
||||
b = ESome { S x = ESome 1; y = ESome true; };
|
||||
}
|
||||
```
|
||||
```catala-test-inline
|
||||
$ catala Interpret_Lcalc -s B --avoid_exceptions --optimize
|
||||
[RESULT] Computation successful! Results:
|
||||
[RESULT] out = ESome 1
|
||||
[RESULT] t =
|
||||
ESome
|
||||
{ T
|
||||
a = ESome { S x = ESome 0; y = ESome false; };
|
||||
b = ESome { S x = ESome 1; y = ESome true; };
|
||||
}
|
||||
ESome
|
||||
{ T
|
||||
a = ESome { S x = ESome 0; y = ESome false; };
|
||||
b = ESome { S x = ESome 1; y = ESome true; };
|
||||
}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user