mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-19 00:15:39 +03:00
Disable recursive tests reset for now; remove rel paths in test out
This commit is contained in:
parent
fa33d37d84
commit
edd6dce0d8
@ -98,7 +98,8 @@ let rec has_inline_tests ?(parents = []) (file : string) : bool =
|
|||||||
|
|
||||||
let has_inline_tests file = has_inline_tests file (* hide optional parameter *)
|
let has_inline_tests file = has_inline_tests file (* hide optional parameter *)
|
||||||
|
|
||||||
let [@ocamlformat "disable"] rec scan_for_inline_tests ?(parents=[]) (file : string)
|
let [@ocamlformat "disable"] rec scan_for_inline_tests
|
||||||
|
?(parents=[]) (file : string)
|
||||||
: file_tests list =
|
: file_tests list =
|
||||||
let parents, file = checkfile parents file in
|
let parents, file = checkfile parents file in
|
||||||
let read_file ic =
|
let read_file ic =
|
||||||
@ -138,7 +139,8 @@ let [@ocamlformat "disable"] rec scan_for_inline_tests ?(parents=[]) (file : str
|
|||||||
1
|
1
|
||||||
(String.sub file_str 0 pos)
|
(String.sub file_str 0 pos)
|
||||||
in
|
in
|
||||||
Message.raise_error "Bad inline-test format at %s line %d" file line
|
Message.raise_error "Bad inline-test format at %s line %d"
|
||||||
|
file line
|
||||||
in
|
in
|
||||||
let params =
|
let params =
|
||||||
List.filter (( <> ) "")
|
List.filter (( <> ) "")
|
||||||
@ -179,12 +181,14 @@ let run_inline_tests
|
|||||||
(file : string)
|
(file : string)
|
||||||
(catala_exe : string)
|
(catala_exe : string)
|
||||||
(catala_opts : string list) =
|
(catala_opts : string list) =
|
||||||
|
let _, file = checkfile [] file in
|
||||||
match scan_for_inline_tests file with
|
match scan_for_inline_tests file with
|
||||||
| [] -> Message.emit_warning "No inline tests found in %s" file
|
| [] -> Message.emit_warning "No inline tests found in %s" file
|
||||||
| file_tests ->
|
| file_tests ->
|
||||||
Message.emit_debug "@[<v 2>Running tests:@ %a@]"
|
Message.emit_debug "@[<v 2>Running tests:@ %a@]"
|
||||||
(Format.pp_print_list (fun ppf t -> Format.fprintf ppf "- @[<hov>%s:@ %d tests@]"
|
(Format.pp_print_list
|
||||||
t.filename (List.length t.tests)))
|
(fun ppf t -> Format.fprintf ppf "- @[<hov>%s:@ %d tests@]"
|
||||||
|
t.filename (List.length t.tests)))
|
||||||
file_tests;
|
file_tests;
|
||||||
let run test oc =
|
let run test oc =
|
||||||
List.iter
|
List.iter
|
||||||
@ -192,6 +196,8 @@ let run_inline_tests
|
|||||||
output_string oc test.text_before;
|
output_string oc test.text_before;
|
||||||
let cmd_out_rd, cmd_out_wr = Unix.pipe () in
|
let cmd_out_rd, cmd_out_wr = Unix.pipe () in
|
||||||
let ic = Unix.in_channel_of_descr cmd_out_rd in
|
let ic = Unix.in_channel_of_descr cmd_out_rd in
|
||||||
|
let file_dir, file = Filename.dirname file, Filename.basename file in
|
||||||
|
let catala_exe = Unix.realpath catala_exe in
|
||||||
let cmd =
|
let cmd =
|
||||||
Array.of_list ((catala_exe :: catala_opts) @ test.params @ [file])
|
Array.of_list ((catala_exe :: catala_opts) @ test.params @ [file])
|
||||||
in
|
in
|
||||||
@ -206,6 +212,9 @@ let run_inline_tests
|
|||||||
|> Array.of_seq
|
|> Array.of_seq
|
||||||
in
|
in
|
||||||
let pid =
|
let pid =
|
||||||
|
let cwd = Unix.getcwd () in
|
||||||
|
Unix.chdir file_dir;
|
||||||
|
Fun.protect ~finally:(fun () -> Unix.chdir cwd) @@ fun () ->
|
||||||
Unix.create_process_env catala_exe cmd env Unix.stdin cmd_out_wr
|
Unix.create_process_env catala_exe cmd env Unix.stdin cmd_out_wr
|
||||||
cmd_out_wr
|
cmd_out_wr
|
||||||
in
|
in
|
||||||
@ -237,7 +246,8 @@ let run_inline_tests
|
|||||||
in
|
in
|
||||||
List.iter
|
List.iter
|
||||||
(fun test ->
|
(fun test ->
|
||||||
if reset then (
|
if test.filename <> file then ()
|
||||||
|
else if reset then (
|
||||||
let out = test.filename ^ ".out" in
|
let out = test.filename ^ ".out" in
|
||||||
(try File.with_out_channel out (run test)
|
(try File.with_out_channel out (run test)
|
||||||
with e ->
|
with e ->
|
||||||
|
@ -35,13 +35,13 @@ You could have written : "condition",
|
|||||||
or "content"
|
or "content"
|
||||||
|
|
||||||
Error token:
|
Error token:
|
||||||
┌─⯈ examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.21-11.26:
|
┌─⯈ test_nsw_social_housie.catala_en:11.21-11.26:
|
||||||
└──┐
|
└──┐
|
||||||
11 │ context my_gaming scope GamingAuthorized
|
11 │ context my_gaming scope GamingAuthorized
|
||||||
│ ‾‾‾‾‾
|
│ ‾‾‾‾‾
|
||||||
|
|
||||||
Last good token:
|
Last good token:
|
||||||
┌─⯈ examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.11-11.20:
|
┌─⯈ test_nsw_social_housie.catala_en:11.11-11.20:
|
||||||
└──┐
|
└──┐
|
||||||
11 │ context my_gaming scope GamingAuthorized
|
11 │ context my_gaming scope GamingAuthorized
|
||||||
│ ‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾
|
||||||
@ -79,13 +79,13 @@ You could have written : "condition",
|
|||||||
or "content"
|
or "content"
|
||||||
|
|
||||||
Error token:
|
Error token:
|
||||||
┌─⯈ examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.21-11.26:
|
┌─⯈ test_nsw_social_housie.catala_en:11.21-11.26:
|
||||||
└──┐
|
└──┐
|
||||||
11 │ context my_gaming scope GamingAuthorized
|
11 │ context my_gaming scope GamingAuthorized
|
||||||
│ ‾‾‾‾‾
|
│ ‾‾‾‾‾
|
||||||
|
|
||||||
Last good token:
|
Last good token:
|
||||||
┌─⯈ examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.11-11.20:
|
┌─⯈ test_nsw_social_housie.catala_en:11.11-11.20:
|
||||||
└──┐
|
└──┐
|
||||||
11 │ context my_gaming scope GamingAuthorized
|
11 │ context my_gaming scope GamingAuthorized
|
||||||
│ ‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾
|
||||||
@ -123,13 +123,13 @@ You could have written : "condition",
|
|||||||
or "content"
|
or "content"
|
||||||
|
|
||||||
Error token:
|
Error token:
|
||||||
┌─⯈ examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.21-11.26:
|
┌─⯈ test_nsw_social_housie.catala_en:11.21-11.26:
|
||||||
└──┐
|
└──┐
|
||||||
11 │ context my_gaming scope GamingAuthorized
|
11 │ context my_gaming scope GamingAuthorized
|
||||||
│ ‾‾‾‾‾
|
│ ‾‾‾‾‾
|
||||||
|
|
||||||
Last good token:
|
Last good token:
|
||||||
┌─⯈ examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.11-11.20:
|
┌─⯈ test_nsw_social_housie.catala_en:11.11-11.20:
|
||||||
└──┐
|
└──┐
|
||||||
11 │ context my_gaming scope GamingAuthorized
|
11 │ context my_gaming scope GamingAuthorized
|
||||||
│ ‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾
|
||||||
@ -169,13 +169,13 @@ You could have written : "condition",
|
|||||||
or "content"
|
or "content"
|
||||||
|
|
||||||
Error token:
|
Error token:
|
||||||
┌─⯈ examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.21-11.26:
|
┌─⯈ test_nsw_social_housie.catala_en:11.21-11.26:
|
||||||
└──┐
|
└──┐
|
||||||
11 │ context my_gaming scope GamingAuthorized
|
11 │ context my_gaming scope GamingAuthorized
|
||||||
│ ‾‾‾‾‾
|
│ ‾‾‾‾‾
|
||||||
|
|
||||||
Last good token:
|
Last good token:
|
||||||
┌─⯈ examples/NSW_community_gaming/tests/test_nsw_social_housie.catala_en:11.11-11.20:
|
┌─⯈ test_nsw_social_housie.catala_en:11.11-11.20:
|
||||||
└──┐
|
└──┐
|
||||||
11 │ context my_gaming scope GamingAuthorized
|
11 │ context my_gaming scope GamingAuthorized
|
||||||
│ ‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -37,7 +37,7 @@ $ catala Interpret -s Dec
|
|||||||
division by zero at runtime
|
division by zero at runtime
|
||||||
|
|
||||||
The division operator:
|
The division operator:
|
||||||
┌─⯈ tests/test_arithmetic/bad/division_by_zero.catala_en:20.23-20.30:
|
┌─⯈ division_by_zero.catala_en:20.23-20.30:
|
||||||
└──┐
|
└──┐
|
||||||
20 │ definition i equals 1. / 0.
|
20 │ definition i equals 1. / 0.
|
||||||
│ ‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾
|
||||||
@ -45,7 +45,7 @@ The division operator:
|
|||||||
└─ with decimals
|
└─ with decimals
|
||||||
|
|
||||||
The null denominator:
|
The null denominator:
|
||||||
┌─⯈ tests/test_arithmetic/bad/division_by_zero.catala_en:20.28-20.30:
|
┌─⯈ division_by_zero.catala_en:20.28-20.30:
|
||||||
└──┐
|
└──┐
|
||||||
20 │ definition i equals 1. / 0.
|
20 │ definition i equals 1. / 0.
|
||||||
│ ‾‾
|
│ ‾‾
|
||||||
@ -60,7 +60,7 @@ $ catala Interpret -s Int
|
|||||||
division by zero at runtime
|
division by zero at runtime
|
||||||
|
|
||||||
The division operator:
|
The division operator:
|
||||||
┌─⯈ tests/test_arithmetic/bad/division_by_zero.catala_en:10.23-10.28:
|
┌─⯈ division_by_zero.catala_en:10.23-10.28:
|
||||||
└──┐
|
└──┐
|
||||||
10 │ definition i equals 1 / 0
|
10 │ definition i equals 1 / 0
|
||||||
│ ‾‾‾‾‾
|
│ ‾‾‾‾‾
|
||||||
@ -68,7 +68,7 @@ The division operator:
|
|||||||
└─ with integers
|
└─ with integers
|
||||||
|
|
||||||
The null denominator:
|
The null denominator:
|
||||||
┌─⯈ tests/test_arithmetic/bad/division_by_zero.catala_en:10.27-10.28:
|
┌─⯈ division_by_zero.catala_en:10.27-10.28:
|
||||||
└──┐
|
└──┐
|
||||||
10 │ definition i equals 1 / 0
|
10 │ definition i equals 1 / 0
|
||||||
│ ‾
|
│ ‾
|
||||||
@ -83,7 +83,7 @@ $ catala Interpret -s Money
|
|||||||
division by zero at runtime
|
division by zero at runtime
|
||||||
|
|
||||||
The division operator:
|
The division operator:
|
||||||
┌─⯈ tests/test_arithmetic/bad/division_by_zero.catala_en:30.23-30.35:
|
┌─⯈ division_by_zero.catala_en:30.23-30.35:
|
||||||
└──┐
|
└──┐
|
||||||
30 │ definition i equals $10.0 / $0.0
|
30 │ definition i equals $10.0 / $0.0
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
@ -91,7 +91,7 @@ The division operator:
|
|||||||
└─ with money
|
└─ with money
|
||||||
|
|
||||||
The null denominator:
|
The null denominator:
|
||||||
┌─⯈ tests/test_arithmetic/bad/division_by_zero.catala_en:30.31-30.35:
|
┌─⯈ division_by_zero.catala_en:30.31-30.35:
|
||||||
└──┐
|
└──┐
|
||||||
30 │ definition i equals $10.0 / $0.0
|
30 │ definition i equals $10.0 / $0.0
|
||||||
│ ‾‾‾‾
|
│ ‾‾‾‾
|
||||||
|
@ -11,12 +11,12 @@ $ catala typecheck
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
Please add parentheses to explicit which of these operators should be applied first
|
Please add parentheses to explicit which of these operators should be applied first
|
||||||
|
|
||||||
┌─⯈ tests/test_arithmetic/bad/logical_prio.catala_en:6.28-6.31:
|
┌─⯈ logical_prio.catala_en:6.28-6.31:
|
||||||
└─┐
|
└─┐
|
||||||
6 │ definition o equals true and (false and true and true) or false
|
6 │ definition o equals true and (false and true and true) or false
|
||||||
│ ‾‾‾
|
│ ‾‾‾
|
||||||
|
|
||||||
┌─⯈ tests/test_arithmetic/bad/logical_prio.catala_en:6.58-6.60:
|
┌─⯈ logical_prio.catala_en:6.58-6.60:
|
||||||
└─┐
|
└─┐
|
||||||
6 │ definition o equals true and (false and true and true) or false
|
6 │ definition o equals true and (false and true and true) or false
|
||||||
│ ‾‾
|
│ ‾‾
|
||||||
|
@ -16,21 +16,21 @@ $ catala Interpret -s A
|
|||||||
I don't know how to apply operator >= on types integer and
|
I don't know how to apply operator >= on types integer and
|
||||||
money
|
money
|
||||||
|
|
||||||
┌─⯈ tests/test_array/bad/fold_error.catala_en:10.50-10.52:
|
┌─⯈ fold_error.catala_en:10.50-10.52:
|
||||||
└──┐
|
└──┐
|
||||||
10 │ definition list_high_count equals number of (m >= $7) for m among list
|
10 │ definition list_high_count equals number of (m >= $7) for m among list
|
||||||
│ ‾‾
|
│ ‾‾
|
||||||
└─ Article
|
└─ Article
|
||||||
|
|
||||||
Type integer coming from expression:
|
Type integer coming from expression:
|
||||||
┌─⯈ tests/test_array/bad/fold_error.catala_en:5.35-5.42:
|
┌─⯈ fold_error.catala_en:5.35-5.42:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ context list content collection integer
|
5 │ context list content collection integer
|
||||||
│ ‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾
|
||||||
└─ Article
|
└─ Article
|
||||||
|
|
||||||
Type money coming from expression:
|
Type money coming from expression:
|
||||||
┌─⯈ tests/test_array/bad/fold_error.catala_en:10.53-10.55:
|
┌─⯈ fold_error.catala_en:10.53-10.55:
|
||||||
└──┐
|
└──┐
|
||||||
10 │ definition list_high_count equals number of (m >= $7) for m among list
|
10 │ definition list_high_count equals number of (m >= $7) for m among list
|
||||||
│ ‾‾
|
│ ‾‾
|
||||||
|
@ -18,21 +18,21 @@ Error during typechecking, incompatible types:
|
|||||||
└─⯈ bool
|
└─⯈ bool
|
||||||
|
|
||||||
Error coming from typechecking the following expression:
|
Error coming from typechecking the following expression:
|
||||||
┌─⯈ tests/test_bool/bad/bad_assert.catala_en:9.13-9.14:
|
┌─⯈ bad_assert.catala_en:9.13-9.14:
|
||||||
└─┐
|
└─┐
|
||||||
9 │ assertion x
|
9 │ assertion x
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Type integer coming from expression:
|
Type integer coming from expression:
|
||||||
┌─⯈ tests/test_bool/bad/bad_assert.catala_en:5.20-5.27:
|
┌─⯈ bad_assert.catala_en:5.20-5.27:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ output x content integer
|
5 │ output x content integer
|
||||||
│ ‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Type bool coming from expression:
|
Type bool coming from expression:
|
||||||
┌─⯈ tests/test_bool/bad/bad_assert.catala_en:9.13-9.14:
|
┌─⯈ bad_assert.catala_en:9.13-9.14:
|
||||||
└─┐
|
└─┐
|
||||||
9 │ assertion x
|
9 │ assertion x
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -16,21 +16,21 @@ Error during typechecking, incompatible types:
|
|||||||
└─⯈ bool
|
└─⯈ bool
|
||||||
|
|
||||||
Error coming from typechecking the following expression:
|
Error coming from typechecking the following expression:
|
||||||
┌─⯈ tests/test_bool/bad/test_xor_with_int.catala_en:8.30-8.32:
|
┌─⯈ test_xor_with_int.catala_en:8.30-8.32:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ definition test_var equals 10 xor 20
|
8 │ definition test_var equals 10 xor 20
|
||||||
│ ‾‾
|
│ ‾‾
|
||||||
└─ 'xor' should be a boolean operator
|
└─ 'xor' should be a boolean operator
|
||||||
|
|
||||||
Type integer coming from expression:
|
Type integer coming from expression:
|
||||||
┌─⯈ tests/test_bool/bad/test_xor_with_int.catala_en:8.30-8.32:
|
┌─⯈ test_xor_with_int.catala_en:8.30-8.32:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ definition test_var equals 10 xor 20
|
8 │ definition test_var equals 10 xor 20
|
||||||
│ ‾‾
|
│ ‾‾
|
||||||
└─ 'xor' should be a boolean operator
|
└─ 'xor' should be a boolean operator
|
||||||
|
|
||||||
Type bool coming from expression:
|
Type bool coming from expression:
|
||||||
┌─⯈ tests/test_bool/bad/test_xor_with_int.catala_en:8.33-8.36:
|
┌─⯈ test_xor_with_int.catala_en:8.33-8.36:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ definition test_var equals 10 xor 20
|
8 │ definition test_var equals 10 xor 20
|
||||||
│ ‾‾‾
|
│ ‾‾‾
|
||||||
|
@ -28,12 +28,12 @@ $ catala Interpret -s Test
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
You cannot set multiple date rounding modes
|
You cannot set multiple date rounding modes
|
||||||
|
|
||||||
┌─⯈ tests/test_date/bad/rounding_option_conflict.catala_en:10.14-10.24:
|
┌─⯈ rounding_option_conflict.catala_en:10.14-10.24:
|
||||||
└──┐
|
└──┐
|
||||||
10 │ date round decreasing
|
10 │ date round decreasing
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾
|
||||||
|
|
||||||
┌─⯈ tests/test_date/bad/rounding_option_conflict.catala_en:12.14-12.24:
|
┌─⯈ rounding_option_conflict.catala_en:12.14-12.24:
|
||||||
└──┐
|
└──┐
|
||||||
12 │ date round increasing
|
12 │ date round increasing
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -45,14 +45,14 @@ $ catala Interpret -s Ge
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
Cannot compare together durations that cannot be converted to a precise number of days
|
Cannot compare together durations that cannot be converted to a precise number of days
|
||||||
|
|
||||||
┌─⯈ tests/test_date/bad/uncomparable_duration.catala_en:40.23-40.30:
|
┌─⯈ uncomparable_duration.catala_en:40.23-40.30:
|
||||||
└──┐
|
└──┐
|
||||||
40 │ definition d equals 1 month >= 2 day
|
40 │ definition d equals 1 month >= 2 day
|
||||||
│ ‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾
|
||||||
└┬ `UncomparableDurations` exception management
|
└┬ `UncomparableDurations` exception management
|
||||||
└─ `>=` operator
|
└─ `>=` operator
|
||||||
|
|
||||||
┌─⯈ tests/test_date/bad/uncomparable_duration.catala_en:40.34-40.39:
|
┌─⯈ uncomparable_duration.catala_en:40.34-40.39:
|
||||||
└──┐
|
└──┐
|
||||||
40 │ definition d equals 1 month >= 2 day
|
40 │ definition d equals 1 month >= 2 day
|
||||||
│ ‾‾‾‾‾
|
│ ‾‾‾‾‾
|
||||||
@ -66,14 +66,14 @@ $ catala Interpret -s Gt
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
Cannot compare together durations that cannot be converted to a precise number of days
|
Cannot compare together durations that cannot be converted to a precise number of days
|
||||||
|
|
||||||
┌─⯈ tests/test_date/bad/uncomparable_duration.catala_en:30.23-30.30:
|
┌─⯈ uncomparable_duration.catala_en:30.23-30.30:
|
||||||
└──┐
|
└──┐
|
||||||
30 │ definition d equals 1 month > 2 day
|
30 │ definition d equals 1 month > 2 day
|
||||||
│ ‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾
|
||||||
└┬ `UncomparableDurations` exception management
|
└┬ `UncomparableDurations` exception management
|
||||||
└─ `<=` operator
|
└─ `<=` operator
|
||||||
|
|
||||||
┌─⯈ tests/test_date/bad/uncomparable_duration.catala_en:30.33-30.38:
|
┌─⯈ uncomparable_duration.catala_en:30.33-30.38:
|
||||||
└──┐
|
└──┐
|
||||||
30 │ definition d equals 1 month > 2 day
|
30 │ definition d equals 1 month > 2 day
|
||||||
│ ‾‾‾‾‾
|
│ ‾‾‾‾‾
|
||||||
@ -87,14 +87,14 @@ $ catala Interpret -s Le
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
Cannot compare together durations that cannot be converted to a precise number of days
|
Cannot compare together durations that cannot be converted to a precise number of days
|
||||||
|
|
||||||
┌─⯈ tests/test_date/bad/uncomparable_duration.catala_en:20.23-20.30:
|
┌─⯈ uncomparable_duration.catala_en:20.23-20.30:
|
||||||
└──┐
|
└──┐
|
||||||
20 │ definition d equals 1 month <= 2 day
|
20 │ definition d equals 1 month <= 2 day
|
||||||
│ ‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾
|
||||||
└┬ `UncomparableDurations` exception management
|
└┬ `UncomparableDurations` exception management
|
||||||
└─ `<=` operator
|
└─ `<=` operator
|
||||||
|
|
||||||
┌─⯈ tests/test_date/bad/uncomparable_duration.catala_en:20.34-20.39:
|
┌─⯈ uncomparable_duration.catala_en:20.34-20.39:
|
||||||
└──┐
|
└──┐
|
||||||
20 │ definition d equals 1 month <= 2 day
|
20 │ definition d equals 1 month <= 2 day
|
||||||
│ ‾‾‾‾‾
|
│ ‾‾‾‾‾
|
||||||
@ -108,14 +108,14 @@ $ catala Interpret -s Lt
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
Cannot compare together durations that cannot be converted to a precise number of days
|
Cannot compare together durations that cannot be converted to a precise number of days
|
||||||
|
|
||||||
┌─⯈ tests/test_date/bad/uncomparable_duration.catala_en:10.23-10.30:
|
┌─⯈ uncomparable_duration.catala_en:10.23-10.30:
|
||||||
└──┐
|
└──┐
|
||||||
10 │ definition d equals 1 month < 2 day
|
10 │ definition d equals 1 month < 2 day
|
||||||
│ ‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾
|
||||||
└┬ `UncomparableDurations` exception management
|
└┬ `UncomparableDurations` exception management
|
||||||
└─ `<` operator
|
└─ `<` operator
|
||||||
|
|
||||||
┌─⯈ tests/test_date/bad/uncomparable_duration.catala_en:10.33-10.38:
|
┌─⯈ uncomparable_duration.catala_en:10.33-10.38:
|
||||||
└──┐
|
└──┐
|
||||||
10 │ definition d equals 1 month < 2 day
|
10 │ definition d equals 1 month < 2 day
|
||||||
│ ‾‾‾‾‾
|
│ ‾‾‾‾‾
|
||||||
|
@ -11,8 +11,8 @@ scope A:
|
|||||||
|
|
||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Interpret -s A --message=gnu
|
$ catala Interpret -s A --message=gnu
|
||||||
tests/test_default/bad/conflict.catala_en:8.56-8.57: [ERROR] There is a conflict between multiple valid consequences for assigning the same variable.
|
conflict.catala_en:8.56-8.57: [ERROR] There is a conflict between multiple valid consequences for assigning the same variable.
|
||||||
tests/test_default/bad/conflict.catala_en:8.56-8.57: [ERROR] This consequence has a valid justification:
|
conflict.catala_en:8.56-8.57: [ERROR] This consequence has a valid justification:
|
||||||
tests/test_default/bad/conflict.catala_en:9.56-9.57: [ERROR] This consequence has a valid justification:
|
conflict.catala_en:9.56-9.57: [ERROR] This consequence has a valid justification:
|
||||||
#return code 123#
|
#return code 123#
|
||||||
```
|
```
|
||||||
|
@ -13,7 +13,7 @@ scope A:
|
|||||||
$ catala Interpret -s A
|
$ catala Interpret -s A
|
||||||
[WARNING] In scope "A", the variable "y" is declared but never defined; did you forget something?
|
[WARNING] In scope "A", the variable "y" is declared but never defined; did you forget something?
|
||||||
|
|
||||||
┌─⯈ tests/test_default/bad/empty.catala_en:6.10-6.11:
|
┌─⯈ empty.catala_en:6.10-6.11:
|
||||||
└─┐
|
└─┐
|
||||||
6 │ output y content boolean
|
6 │ output y content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
@ -21,7 +21,7 @@ $ catala Interpret -s A
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
This variable evaluated to an empty term (no rule that defined it applied in this situation)
|
This variable evaluated to an empty term (no rule that defined it applied in this situation)
|
||||||
|
|
||||||
┌─⯈ tests/test_default/bad/empty.catala_en:6.10-6.11:
|
┌─⯈ empty.catala_en:6.10-6.11:
|
||||||
└─┐
|
└─┐
|
||||||
6 │ output y content boolean
|
6 │ output y content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -17,7 +17,7 @@ $ catala Interpret -s A
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
This variable evaluated to an empty term (no rule that defined it applied in this situation)
|
This variable evaluated to an empty term (no rule that defined it applied in this situation)
|
||||||
|
|
||||||
┌─⯈ tests/test_default/bad/empty_with_rules.catala_en:5.10-5.11:
|
┌─⯈ empty_with_rules.catala_en:5.10-5.11:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ output x content integer
|
5 │ output x content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -21,13 +21,13 @@ or "under condition",
|
|||||||
or "."
|
or "."
|
||||||
|
|
||||||
Error token:
|
Error token:
|
||||||
┌─⯈ tests/test_default/bad/typing_or_logical_error.catala_en:8.30-8.31:
|
┌─⯈ typing_or_logical_error.catala_en:8.30-8.31:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ definition wrong_definition = 1
|
8 │ definition wrong_definition = 1
|
||||||
│ ‾
|
│ ‾
|
||||||
|
|
||||||
Last good token:
|
Last good token:
|
||||||
┌─⯈ tests/test_default/bad/typing_or_logical_error.catala_en:8.13-8.29:
|
┌─⯈ typing_or_logical_error.catala_en:8.13-8.29:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ definition wrong_definition = 1
|
8 │ definition wrong_definition = 1
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -13,12 +13,12 @@ scope A:
|
|||||||
$ catala Interpret -s A
|
$ catala Interpret -s A
|
||||||
[WARNING] These definitions have identical justifications and consequences; is it a mistake?
|
[WARNING] These definitions have identical justifications and consequences; is it a mistake?
|
||||||
|
|
||||||
┌─⯈ tests/test_default/good/mutliple_definitions.catala_en:9.3-9.15:
|
┌─⯈ mutliple_definitions.catala_en:9.3-9.15:
|
||||||
└─┐
|
└─┐
|
||||||
9 │ definition w equals 3
|
9 │ definition w equals 3
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
|
||||||
┌─⯈ tests/test_default/good/mutliple_definitions.catala_en:6.3-6.15:
|
┌─⯈ mutliple_definitions.catala_en:6.3-6.15:
|
||||||
└─┐
|
└─┐
|
||||||
6 │ definition w equals 3
|
6 │ definition w equals 3
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -19,7 +19,7 @@ $ catala Interpret -s A
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
This constructor name is ambiguous, it can belong to E or F. Desambiguate it by prefixing it with the enum name.
|
This constructor name is ambiguous, it can belong to E or F. Desambiguate it by prefixing it with the enum name.
|
||||||
|
|
||||||
┌─⯈ tests/test_enum/bad/ambiguous_cases.catala_en:14.23-14.28:
|
┌─⯈ ambiguous_cases.catala_en:14.23-14.28:
|
||||||
└──┐
|
└──┐
|
||||||
14 │ definition e equals Case1
|
14 │ definition e equals Case1
|
||||||
│ ‾‾‾‾‾
|
│ ‾‾‾‾‾
|
||||||
|
@ -20,7 +20,7 @@ $ catala Interpret -s A
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
Couldn't infer the enumeration name from lonely wildcard (wildcard cannot be used as single match case)
|
Couldn't infer the enumeration name from lonely wildcard (wildcard cannot be used as single match case)
|
||||||
|
|
||||||
┌─⯈ tests/test_enum/bad/ambiguous_wildcard.catala_en:15.5-15.21:
|
┌─⯈ ambiguous_wildcard.catala_en:15.5-15.21:
|
||||||
└──┐
|
└──┐
|
||||||
15 │ -- anything : 31
|
15 │ -- anything : 31
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -23,13 +23,13 @@ $ catala Interpret -s A
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
The constructor Case3 has been matched twice:
|
The constructor Case3 has been matched twice:
|
||||||
|
|
||||||
┌─⯈ tests/test_enum/bad/duplicate_case.catala_en:18.16-18.20:
|
┌─⯈ duplicate_case.catala_en:18.16-18.20:
|
||||||
└──┐
|
└──┐
|
||||||
18 │ -- Case3 : true
|
18 │ -- Case3 : true
|
||||||
│ ‾‾‾‾
|
│ ‾‾‾‾
|
||||||
└─ Article
|
└─ Article
|
||||||
|
|
||||||
┌─⯈ tests/test_enum/bad/duplicate_case.catala_en:17.16-17.21:
|
┌─⯈ duplicate_case.catala_en:17.16-17.21:
|
||||||
└──┐
|
└──┐
|
||||||
17 │ -- Case3 : false
|
17 │ -- Case3 : false
|
||||||
│ ‾‾‾‾‾
|
│ ‾‾‾‾‾
|
||||||
|
@ -12,7 +12,7 @@ $ catala Typecheck
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
The enum Foo does not have any cases; give it some for Catala to be able to accept it.
|
The enum Foo does not have any cases; give it some for Catala to be able to accept it.
|
||||||
|
|
||||||
┌─⯈ tests/test_enum/bad/empty.catala_en:4.25-4.28:
|
┌─⯈ empty.catala_en:4.25-4.28:
|
||||||
└─┐
|
└─┐
|
||||||
4 │ declaration enumeration Foo:
|
4 │ declaration enumeration Foo:
|
||||||
│ ‾‾‾
|
│ ‾‾‾
|
||||||
|
@ -20,7 +20,7 @@ scope A:
|
|||||||
$ catala Interpret -s A
|
$ catala Interpret -s A
|
||||||
[WARNING] The constructor "Case3" of enumeration "E" is never used; maybe it's unnecessary?
|
[WARNING] The constructor "Case3" of enumeration "E" is never used; maybe it's unnecessary?
|
||||||
|
|
||||||
┌─⯈ tests/test_enum/bad/missing_case.catala_en:7.6-7.11:
|
┌─⯈ missing_case.catala_en:7.6-7.11:
|
||||||
└─┐
|
└─┐
|
||||||
7 │ -- Case3
|
7 │ -- Case3
|
||||||
│ ‾‾‾‾‾
|
│ ‾‾‾‾‾
|
||||||
@ -28,7 +28,7 @@ $ catala Interpret -s A
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
The constructor Case3 of enum E is missing from this pattern matching
|
The constructor Case3 of enum E is missing from this pattern matching
|
||||||
|
|
||||||
┌─⯈ tests/test_enum/bad/missing_case.catala_en:14.25-16.22:
|
┌─⯈ missing_case.catala_en:14.25-16.22:
|
||||||
└──┐
|
└──┐
|
||||||
14 │ definition out equals match e with pattern
|
14 │ definition out equals match e with pattern
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -42,7 +42,7 @@ $ catala Interpret -s First_case
|
|||||||
Wildcard must be the last match case
|
Wildcard must be the last match case
|
||||||
|
|
||||||
Not ending wildcard:
|
Not ending wildcard:
|
||||||
┌─⯈ tests/test_enum/bad/not_ending_wildcard.catala_en:19.5-19.21:
|
┌─⯈ not_ending_wildcard.catala_en:19.5-19.21:
|
||||||
└──┐
|
└──┐
|
||||||
19 │ -- anything : 31
|
19 │ -- anything : 31
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
@ -50,7 +50,7 @@ Not ending wildcard:
|
|||||||
└─ Wildcard can't be the first case
|
└─ Wildcard can't be the first case
|
||||||
|
|
||||||
Next reachable case:
|
Next reachable case:
|
||||||
┌─⯈ tests/test_enum/bad/not_ending_wildcard.catala_en:20.5-20.18:
|
┌─⯈ not_ending_wildcard.catala_en:20.5-20.18:
|
||||||
└──┐
|
└──┐
|
||||||
20 │ -- Case2 : 42
|
20 │ -- Case2 : 42
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
@ -65,7 +65,7 @@ $ catala Interpret -s Middle_case
|
|||||||
Wildcard must be the last match case
|
Wildcard must be the last match case
|
||||||
|
|
||||||
Not ending wildcard:
|
Not ending wildcard:
|
||||||
┌─⯈ tests/test_enum/bad/not_ending_wildcard.catala_en:19.5-19.21:
|
┌─⯈ not_ending_wildcard.catala_en:19.5-19.21:
|
||||||
└──┐
|
└──┐
|
||||||
19 │ -- anything : 31
|
19 │ -- anything : 31
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
@ -73,7 +73,7 @@ Not ending wildcard:
|
|||||||
└─ Wildcard can't be the first case
|
└─ Wildcard can't be the first case
|
||||||
|
|
||||||
Next reachable case:
|
Next reachable case:
|
||||||
┌─⯈ tests/test_enum/bad/not_ending_wildcard.catala_en:20.5-20.18:
|
┌─⯈ not_ending_wildcard.catala_en:20.5-20.18:
|
||||||
└──┐
|
└──┐
|
||||||
20 │ -- Case2 : 42
|
20 │ -- Case2 : 42
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -36,21 +36,21 @@ Error during typechecking, incompatible types:
|
|||||||
└─⯈ F
|
└─⯈ F
|
||||||
|
|
||||||
Error coming from typechecking the following expression:
|
Error coming from typechecking the following expression:
|
||||||
┌─⯈ tests/test_enum/bad/quick_pattern_2.catala_en:28.23-28.24:
|
┌─⯈ quick_pattern_2.catala_en:28.23-28.24:
|
||||||
└──┐
|
└──┐
|
||||||
28 │ definition y equals x with pattern Case3
|
28 │ definition y equals x with pattern Case3
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Article
|
└─ Article
|
||||||
|
|
||||||
Type E coming from expression:
|
Type E coming from expression:
|
||||||
┌─⯈ tests/test_enum/bad/quick_pattern_2.catala_en:17.21-17.22:
|
┌─⯈ quick_pattern_2.catala_en:17.21-17.22:
|
||||||
└──┐
|
└──┐
|
||||||
17 │ context x content E
|
17 │ context x content E
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Article
|
└─ Article
|
||||||
|
|
||||||
Type F coming from expression:
|
Type F coming from expression:
|
||||||
┌─⯈ tests/test_enum/bad/quick_pattern_2.catala_en:28.23-28.43:
|
┌─⯈ quick_pattern_2.catala_en:28.23-28.43:
|
||||||
└──┐
|
└──┐
|
||||||
28 │ definition y equals x with pattern Case3
|
28 │ definition y equals x with pattern Case3
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -26,21 +26,21 @@ Error during typechecking, incompatible types:
|
|||||||
└─⯈ F
|
└─⯈ F
|
||||||
|
|
||||||
Error coming from typechecking the following expression:
|
Error coming from typechecking the following expression:
|
||||||
┌─⯈ tests/test_enum/bad/quick_pattern_3.catala_en:18.21-18.22:
|
┌─⯈ quick_pattern_3.catala_en:18.21-18.22:
|
||||||
└──┐
|
└──┐
|
||||||
18 │ definition y equals x with pattern Case3
|
18 │ definition y equals x with pattern Case3
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Article
|
└─ Article
|
||||||
|
|
||||||
Type E coming from expression:
|
Type E coming from expression:
|
||||||
┌─⯈ tests/test_enum/bad/quick_pattern_3.catala_en:13.19-13.20:
|
┌─⯈ quick_pattern_3.catala_en:13.19-13.20:
|
||||||
└──┐
|
└──┐
|
||||||
13 │ context x content E
|
13 │ context x content E
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Article
|
└─ Article
|
||||||
|
|
||||||
Type F coming from expression:
|
Type F coming from expression:
|
||||||
┌─⯈ tests/test_enum/bad/quick_pattern_3.catala_en:18.21-18.41:
|
┌─⯈ quick_pattern_3.catala_en:18.21-18.41:
|
||||||
└──┐
|
└──┐
|
||||||
18 │ definition y equals x with pattern Case3
|
18 │ definition y equals x with pattern Case3
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -25,21 +25,21 @@ Error during typechecking, incompatible types:
|
|||||||
└─⯈ F
|
└─⯈ F
|
||||||
|
|
||||||
Error coming from typechecking the following expression:
|
Error coming from typechecking the following expression:
|
||||||
┌─⯈ tests/test_enum/bad/quick_pattern_4.catala_en:17.21-17.22:
|
┌─⯈ quick_pattern_4.catala_en:17.21-17.22:
|
||||||
└──┐
|
└──┐
|
||||||
17 │ definition y equals x with pattern Case3
|
17 │ definition y equals x with pattern Case3
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Type E coming from expression:
|
Type E coming from expression:
|
||||||
┌─⯈ tests/test_enum/bad/quick_pattern_4.catala_en:12.19-12.20:
|
┌─⯈ quick_pattern_4.catala_en:12.19-12.20:
|
||||||
└──┐
|
└──┐
|
||||||
12 │ context x content E
|
12 │ context x content E
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Type F coming from expression:
|
Type F coming from expression:
|
||||||
┌─⯈ tests/test_enum/bad/quick_pattern_4.catala_en:17.21-17.41:
|
┌─⯈ quick_pattern_4.catala_en:17.21-17.41:
|
||||||
└──┐
|
└──┐
|
||||||
17 │ definition y equals x with pattern Case3
|
17 │ definition y equals x with pattern Case3
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -22,7 +22,7 @@ The name of this constructor has not been defined before
|
|||||||
(it's probably a typographical error).
|
(it's probably a typographical error).
|
||||||
|
|
||||||
Here is your code :
|
Here is your code :
|
||||||
┌─⯈ tests/test_enum/bad/quick_pattern_fail.catala_en:15.38-15.43:
|
┌─⯈ quick_pattern_fail.catala_en:15.38-15.43:
|
||||||
└──┐
|
└──┐
|
||||||
15 │ definition y equals x with pattern Case3
|
15 │ definition y equals x with pattern Case3
|
||||||
│ ‾‾‾‾‾
|
│ ‾‾‾‾‾
|
||||||
|
@ -26,7 +26,7 @@ $ catala Interpret -s A
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
This case matches a constructor of enumeration E but previous case were matching constructors of enumeration F
|
This case matches a constructor of enumeration E but previous case were matching constructors of enumeration F
|
||||||
|
|
||||||
┌─⯈ tests/test_enum/bad/too_many_cases.catala_en:21.8-21.13:
|
┌─⯈ too_many_cases.catala_en:21.8-21.13:
|
||||||
└──┐
|
└──┐
|
||||||
21 │ -- Case4 : true
|
21 │ -- Case4 : true
|
||||||
│ ‾‾‾‾‾
|
│ ‾‾‾‾‾
|
||||||
|
@ -21,7 +21,7 @@ scope A:
|
|||||||
$ catala Interpret -s A
|
$ catala Interpret -s A
|
||||||
[WARNING] Unreachable match case, all constructors of the enumeration E are already specified
|
[WARNING] Unreachable match case, all constructors of the enumeration E are already specified
|
||||||
|
|
||||||
┌─⯈ tests/test_enum/bad/useless_wildcard.catala_en:17.5-17.21:
|
┌─⯈ useless_wildcard.catala_en:17.5-17.21:
|
||||||
└──┐
|
└──┐
|
||||||
17 │ -- anything : 31
|
17 │ -- anything : 31
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -18,7 +18,7 @@ The name of this constructor has not been defined before
|
|||||||
(it's probably a typographical error).
|
(it's probably a typographical error).
|
||||||
|
|
||||||
Here is your code :
|
Here is your code :
|
||||||
┌─⯈ tests/test_enum/bad/wrong_cons.catala_en:11.23-11.28:
|
┌─⯈ wrong_cons.catala_en:11.23-11.28:
|
||||||
└──┐
|
└──┐
|
||||||
11 │ definition e equals Case2
|
11 │ definition e equals Case2
|
||||||
│ ‾‾‾‾‾
|
│ ‾‾‾‾‾
|
||||||
|
@ -19,7 +19,7 @@ $ catala Interpret -s A
|
|||||||
This exception can refer to several definitions. Try using labels to disambiguate
|
This exception can refer to several definitions. Try using labels to disambiguate
|
||||||
|
|
||||||
Ambiguous exception
|
Ambiguous exception
|
||||||
┌─⯈ tests/test_exception/bad/ambiguous_unlabeled_exception.catala_en:12.3-13.15:
|
┌─⯈ ambiguous_unlabeled_exception.catala_en:12.3-13.15:
|
||||||
└──┐
|
└──┐
|
||||||
12 │ exception
|
12 │ exception
|
||||||
│ ‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾
|
||||||
@ -28,14 +28,14 @@ Ambiguous exception
|
|||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Candidate definition
|
Candidate definition
|
||||||
┌─⯈ tests/test_exception/bad/ambiguous_unlabeled_exception.catala_en:10.14-10.15:
|
┌─⯈ ambiguous_unlabeled_exception.catala_en:10.14-10.15:
|
||||||
└──┐
|
└──┐
|
||||||
10 │ definition x equals 1
|
10 │ definition x equals 1
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Candidate definition
|
Candidate definition
|
||||||
┌─⯈ tests/test_exception/bad/ambiguous_unlabeled_exception.catala_en:8.14-8.15:
|
┌─⯈ ambiguous_unlabeled_exception.catala_en:8.14-8.15:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ definition x equals 0
|
8 │ definition x equals 0
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -18,7 +18,7 @@ $ catala Interpret -s A
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
Unknown label for the scope variable x: "base_y"
|
Unknown label for the scope variable x: "base_y"
|
||||||
|
|
||||||
┌─⯈ tests/test_exception/bad/dangling_exception.catala_en:12.13-12.19:
|
┌─⯈ dangling_exception.catala_en:12.13-12.19:
|
||||||
└──┐
|
└──┐
|
||||||
12 │ exception base_y
|
12 │ exception base_y
|
||||||
│ ‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾
|
||||||
|
@ -23,7 +23,7 @@ $ catala Interpret -s A
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
Exception cycle detected when defining x: each of these 3 exceptions applies over the previous one, and the first applies over the last
|
Exception cycle detected when defining x: each of these 3 exceptions applies over the previous one, and the first applies over the last
|
||||||
|
|
||||||
┌─⯈ tests/test_exception/bad/exceptions_cycle.catala_en:8.3-10.15:
|
┌─⯈ exceptions_cycle.catala_en:8.3-10.15:
|
||||||
└──┐
|
└──┐
|
||||||
8 │ label base_x
|
8 │ label base_x
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
@ -32,7 +32,7 @@ Exception cycle detected when defining x: each of these 3 exceptions applies ove
|
|||||||
10 │ definition x equals 0
|
10 │ definition x equals 0
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
|
||||||
┌─⯈ tests/test_exception/bad/exceptions_cycle.catala_en:12.3-14.15:
|
┌─⯈ exceptions_cycle.catala_en:12.3-14.15:
|
||||||
└──┐
|
└──┐
|
||||||
12 │ label exception_x
|
12 │ label exception_x
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
@ -41,7 +41,7 @@ Exception cycle detected when defining x: each of these 3 exceptions applies ove
|
|||||||
14 │ definition x equals 1
|
14 │ definition x equals 1
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
|
||||||
┌─⯈ tests/test_exception/bad/exceptions_cycle.catala_en:16.3-18.15:
|
┌─⯈ exceptions_cycle.catala_en:16.3-18.15:
|
||||||
└──┐
|
└──┐
|
||||||
16 │ label exception_exception_x
|
16 │ label exception_exception_x
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -14,7 +14,7 @@ $ catala Interpret -s A
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
This exception does not have a corresponding definition
|
This exception does not have a corresponding definition
|
||||||
|
|
||||||
┌─⯈ tests/test_exception/bad/missing_unlabeled_definition.catala_en:8.3-9.15:
|
┌─⯈ missing_unlabeled_definition.catala_en:8.3-9.15:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ exception
|
8 │ exception
|
||||||
│ ‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -25,7 +25,7 @@ $ catala Interpret -s A
|
|||||||
This exception can refer to several definitions. Try using labels to disambiguate
|
This exception can refer to several definitions. Try using labels to disambiguate
|
||||||
|
|
||||||
Ambiguous exception
|
Ambiguous exception
|
||||||
┌─⯈ tests/test_exception/bad/one_ambiguous_exception.catala_en:18.3-19.15:
|
┌─⯈ one_ambiguous_exception.catala_en:18.3-19.15:
|
||||||
└──┐
|
└──┐
|
||||||
18 │ exception
|
18 │ exception
|
||||||
│ ‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾
|
||||||
@ -34,14 +34,14 @@ Ambiguous exception
|
|||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Candidate definition
|
Candidate definition
|
||||||
┌─⯈ tests/test_exception/bad/one_ambiguous_exception.catala_en:16.14-16.15:
|
┌─⯈ one_ambiguous_exception.catala_en:16.14-16.15:
|
||||||
└──┐
|
└──┐
|
||||||
16 │ definition y equals 4
|
16 │ definition y equals 4
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Candidate definition
|
Candidate definition
|
||||||
┌─⯈ tests/test_exception/bad/one_ambiguous_exception.catala_en:14.14-14.15:
|
┌─⯈ one_ambiguous_exception.catala_en:14.14-14.15:
|
||||||
└──┐
|
└──┐
|
||||||
14 │ definition y equals 2
|
14 │ definition y equals 2
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -15,7 +15,7 @@ $ catala Interpret -s A
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
Cannot define rule as an exception to itself
|
Cannot define rule as an exception to itself
|
||||||
|
|
||||||
┌─⯈ tests/test_exception/bad/self_exception.catala_en:9.13-9.19:
|
┌─⯈ self_exception.catala_en:9.13-9.19:
|
||||||
└─┐
|
└─┐
|
||||||
9 │ exception base_y
|
9 │ exception base_y
|
||||||
│ ‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾
|
||||||
|
@ -21,14 +21,14 @@ $ catala Interpret -s A
|
|||||||
There is a conflict between multiple valid consequences for assigning the same variable.
|
There is a conflict between multiple valid consequences for assigning the same variable.
|
||||||
|
|
||||||
This consequence has a valid justification:
|
This consequence has a valid justification:
|
||||||
┌─⯈ tests/test_exception/bad/two_exceptions.catala_en:12.23-12.24:
|
┌─⯈ two_exceptions.catala_en:12.23-12.24:
|
||||||
└──┐
|
└──┐
|
||||||
12 │ definition x equals 1
|
12 │ definition x equals 1
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
This consequence has a valid justification:
|
This consequence has a valid justification:
|
||||||
┌─⯈ tests/test_exception/bad/two_exceptions.catala_en:15.23-15.24:
|
┌─⯈ two_exceptions.catala_en:15.23-15.24:
|
||||||
└──┐
|
└──┐
|
||||||
15 │ definition x equals 2
|
15 │ definition x equals 2
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -14,13 +14,13 @@ scope Foo:
|
|||||||
$ catala Scopelang -s Foo
|
$ catala Scopelang -s Foo
|
||||||
[WARNING] These definitions have identical justifications and consequences; is it a mistake?
|
[WARNING] These definitions have identical justifications and consequences; is it a mistake?
|
||||||
|
|
||||||
┌─⯈ tests/test_exception/good/double_definition.catala_en:9.3-9.15:
|
┌─⯈ double_definition.catala_en:9.3-9.15:
|
||||||
└─┐
|
└─┐
|
||||||
9 │ definition x equals 1
|
9 │ definition x equals 1
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
└─ Foo
|
└─ Foo
|
||||||
|
|
||||||
┌─⯈ tests/test_exception/good/double_definition.catala_en:8.3-8.15:
|
┌─⯈ double_definition.catala_en:8.3-8.15:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ definition x equals 1
|
8 │ definition x equals 1
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
@ -39,13 +39,13 @@ Dcalc translation below.
|
|||||||
$ catala Dcalc -s Foo
|
$ catala Dcalc -s Foo
|
||||||
[WARNING] These definitions have identical justifications and consequences; is it a mistake?
|
[WARNING] These definitions have identical justifications and consequences; is it a mistake?
|
||||||
|
|
||||||
┌─⯈ tests/test_exception/good/double_definition.catala_en:9.3-9.15:
|
┌─⯈ double_definition.catala_en:9.3-9.15:
|
||||||
└─┐
|
└─┐
|
||||||
9 │ definition x equals 1
|
9 │ definition x equals 1
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
└─ Foo
|
└─ Foo
|
||||||
|
|
||||||
┌─⯈ tests/test_exception/good/double_definition.catala_en:8.3-8.15:
|
┌─⯈ double_definition.catala_en:8.3-8.15:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ definition x equals 1
|
8 │ definition x equals 1
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -50,36 +50,36 @@ $ catala Exceptions -s Foo -v x
|
|||||||
Printing the tree of exceptions for the definitions of variable "x" of scope "Foo".
|
Printing the tree of exceptions for the definitions of variable "x" of scope "Foo".
|
||||||
[RESULT]
|
[RESULT]
|
||||||
Definitions with label "base":
|
Definitions with label "base":
|
||||||
┌─⯈ tests/test_exception/good/groups_of_exceptions.catala_en:9.3-9.26:
|
┌─⯈ groups_of_exceptions.catala_en:9.3-9.26:
|
||||||
└─┐
|
└─┐
|
||||||
9 │ label base definition x under condition
|
9 │ label base definition x under condition
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
└─ Test
|
└─ Test
|
||||||
┌─⯈ tests/test_exception/good/groups_of_exceptions.catala_en:13.3-13.26:
|
┌─⯈ groups_of_exceptions.catala_en:13.3-13.26:
|
||||||
└──┐
|
└──┐
|
||||||
13 │ label base definition x under condition
|
13 │ label base definition x under condition
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
└─ Test
|
└─ Test
|
||||||
[RESULT]
|
[RESULT]
|
||||||
Definitions with label "intermediate":
|
Definitions with label "intermediate":
|
||||||
┌─⯈ tests/test_exception/good/groups_of_exceptions.catala_en:17.3-17.49:
|
┌─⯈ groups_of_exceptions.catala_en:17.3-17.49:
|
||||||
└──┐
|
└──┐
|
||||||
17 │ label intermediate exception base definition x under condition
|
17 │ label intermediate exception base definition x under condition
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
└─ Test
|
└─ Test
|
||||||
┌─⯈ tests/test_exception/good/groups_of_exceptions.catala_en:21.3-21.49:
|
┌─⯈ groups_of_exceptions.catala_en:21.3-21.49:
|
||||||
└──┐
|
└──┐
|
||||||
21 │ label intermediate exception base definition x under condition
|
21 │ label intermediate exception base definition x under condition
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
└─ Test
|
└─ Test
|
||||||
[RESULT]
|
[RESULT]
|
||||||
Definitions with label "exception_to_intermediate":
|
Definitions with label "exception_to_intermediate":
|
||||||
┌─⯈ tests/test_exception/good/groups_of_exceptions.catala_en:25.3-25.38:
|
┌─⯈ groups_of_exceptions.catala_en:25.3-25.38:
|
||||||
└──┐
|
└──┐
|
||||||
25 │ exception intermediate definition x under condition
|
25 │ exception intermediate definition x under condition
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
└─ Test
|
└─ Test
|
||||||
┌─⯈ tests/test_exception/good/groups_of_exceptions.catala_en:29.3-29.38:
|
┌─⯈ groups_of_exceptions.catala_en:29.3-29.38:
|
||||||
└──┐
|
└──┐
|
||||||
29 │ exception intermediate definition x under condition
|
29 │ exception intermediate definition x under condition
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -33,14 +33,14 @@ $ catala Interpret -s S
|
|||||||
There is a conflict between multiple valid consequences for assigning the same variable.
|
There is a conflict between multiple valid consequences for assigning the same variable.
|
||||||
|
|
||||||
This consequence has a valid justification:
|
This consequence has a valid justification:
|
||||||
┌─⯈ tests/test_func/bad/bad_func.catala_en:14.65-14.70:
|
┌─⯈ bad_func.catala_en:14.65-14.70:
|
||||||
└──┐
|
└──┐
|
||||||
14 │ definition f of x under condition (x >= x) consequence equals x + x
|
14 │ definition f of x under condition (x >= x) consequence equals x + x
|
||||||
│ ‾‾‾‾‾
|
│ ‾‾‾‾‾
|
||||||
└─ Article
|
└─ Article
|
||||||
|
|
||||||
This consequence has a valid justification:
|
This consequence has a valid justification:
|
||||||
┌─⯈ tests/test_func/bad/bad_func.catala_en:15.62-15.67:
|
┌─⯈ bad_func.catala_en:15.62-15.67:
|
||||||
└──┐
|
└──┐
|
||||||
15 │ definition f of x under condition not b consequence equals x * x
|
15 │ definition f of x under condition not b consequence equals x * x
|
||||||
│ ‾‾‾‾‾
|
│ ‾‾‾‾‾
|
||||||
|
@ -18,13 +18,13 @@ $ catala typecheck
|
|||||||
Function argument name mismatch between declaration ('x') and definition ('y')
|
Function argument name mismatch between declaration ('x') and definition ('y')
|
||||||
|
|
||||||
Argument declared here:
|
Argument declared here:
|
||||||
┌─⯈ tests/test_func/bad/param_inconsistency.catala_en:4.42-4.43:
|
┌─⯈ param_inconsistency.catala_en:4.42-4.43:
|
||||||
└─┐
|
└─┐
|
||||||
4 │ internal f1 content decimal depends on x content integer
|
4 │ internal f1 content decimal depends on x content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
|
|
||||||
Defined here:
|
Defined here:
|
||||||
┌─⯈ tests/test_func/bad/param_inconsistency.catala_en:10.20-10.21:
|
┌─⯈ param_inconsistency.catala_en:10.20-10.21:
|
||||||
└──┐
|
└──┐
|
||||||
10 │ definition f1 of y under condition not cond
|
10 │ definition f1 of y under condition not cond
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -17,13 +17,13 @@ $ catala typecheck
|
|||||||
Function argument name mismatch between declaration ('x') and definition ('y')
|
Function argument name mismatch between declaration ('x') and definition ('y')
|
||||||
|
|
||||||
Argument declared here:
|
Argument declared here:
|
||||||
┌─⯈ tests/test_func/bad/param_inconsistency2.catala_en:4.42-4.43:
|
┌─⯈ param_inconsistency2.catala_en:4.42-4.43:
|
||||||
└─┐
|
└─┐
|
||||||
4 │ internal f1 content decimal depends on x content integer
|
4 │ internal f1 content decimal depends on x content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
|
|
||||||
Defined here:
|
Defined here:
|
||||||
┌─⯈ tests/test_func/bad/param_inconsistency2.catala_en:9.30-9.31:
|
┌─⯈ param_inconsistency2.catala_en:9.30-9.31:
|
||||||
└─┐
|
└─┐
|
||||||
9 │ exception definition f1 of y under condition not cond
|
9 │ exception definition f1 of y under condition not cond
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -17,13 +17,13 @@ $ catala typecheck
|
|||||||
Function argument name mismatch between declaration ('x') and definition ('y')
|
Function argument name mismatch between declaration ('x') and definition ('y')
|
||||||
|
|
||||||
Argument declared here:
|
Argument declared here:
|
||||||
┌─⯈ tests/test_func/bad/param_inconsistency3.catala_en:4.42-4.43:
|
┌─⯈ param_inconsistency3.catala_en:4.42-4.43:
|
||||||
└─┐
|
└─┐
|
||||||
4 │ internal f1 content decimal depends on x content integer
|
4 │ internal f1 content decimal depends on x content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
|
|
||||||
Defined here:
|
Defined here:
|
||||||
┌─⯈ tests/test_func/bad/param_inconsistency3.catala_en:9.30-9.31:
|
┌─⯈ param_inconsistency3.catala_en:9.30-9.31:
|
||||||
└─┐
|
└─┐
|
||||||
9 │ exception definition f1 of y under condition not cond
|
9 │ exception definition f1 of y under condition not cond
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -13,7 +13,7 @@ $ catala Interpret -s RecursiveFunc
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
The variable f is used in one of its definitions, but recursion is forbidden in Catala
|
The variable f is used in one of its definitions, but recursion is forbidden in Catala
|
||||||
|
|
||||||
┌─⯈ tests/test_func/bad/recursive.catala_en:8.28-8.29:
|
┌─⯈ recursive.catala_en:8.28-8.29:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ definition f of x equals f of x + 1
|
8 │ definition f of x equals f of x + 1
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -21,21 +21,21 @@ $ catala Scopelang -s B
|
|||||||
It is impossible to give a definition to a subscope variable not tagged as input or context.
|
It is impossible to give a definition to a subscope variable not tagged as input or context.
|
||||||
|
|
||||||
Incriminated subscope:
|
Incriminated subscope:
|
||||||
┌─⯈ tests/test_func/good/context_func.catala_en:9.3-9.4:
|
┌─⯈ context_func.catala_en:9.3-9.4:
|
||||||
└─┐
|
└─┐
|
||||||
9 │ a scope A
|
9 │ a scope A
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Incriminated variable:
|
Incriminated variable:
|
||||||
┌─⯈ tests/test_func/good/context_func.catala_en:5.10-5.11:
|
┌─⯈ context_func.catala_en:5.10-5.11:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ output f content integer depends on x content integer
|
5 │ output f content integer depends on x content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Incriminated subscope variable definition:
|
Incriminated subscope variable definition:
|
||||||
┌─⯈ tests/test_func/good/context_func.catala_en:15.3-15.17:
|
┌─⯈ context_func.catala_en:15.3-15.17:
|
||||||
└──┐
|
└──┐
|
||||||
15 │ definition a.f of x under condition b and x > 0 consequence equals x - 1
|
15 │ definition a.f of x under condition b and x > 0 consequence equals x - 1
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
@ -48,21 +48,21 @@ $ catala Dcalc -s A
|
|||||||
It is impossible to give a definition to a subscope variable not tagged as input or context.
|
It is impossible to give a definition to a subscope variable not tagged as input or context.
|
||||||
|
|
||||||
Incriminated subscope:
|
Incriminated subscope:
|
||||||
┌─⯈ tests/test_func/good/context_func.catala_en:9.3-9.4:
|
┌─⯈ context_func.catala_en:9.3-9.4:
|
||||||
└─┐
|
└─┐
|
||||||
9 │ a scope A
|
9 │ a scope A
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Incriminated variable:
|
Incriminated variable:
|
||||||
┌─⯈ tests/test_func/good/context_func.catala_en:5.10-5.11:
|
┌─⯈ context_func.catala_en:5.10-5.11:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ output f content integer depends on x content integer
|
5 │ output f content integer depends on x content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Incriminated subscope variable definition:
|
Incriminated subscope variable definition:
|
||||||
┌─⯈ tests/test_func/good/context_func.catala_en:15.3-15.17:
|
┌─⯈ context_func.catala_en:15.3-15.17:
|
||||||
└──┐
|
└──┐
|
||||||
15 │ definition a.f of x under condition b and x > 0 consequence equals x - 1
|
15 │ definition a.f of x under condition b and x > 0 consequence equals x - 1
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
@ -75,21 +75,21 @@ $ catala Dcalc -s B
|
|||||||
It is impossible to give a definition to a subscope variable not tagged as input or context.
|
It is impossible to give a definition to a subscope variable not tagged as input or context.
|
||||||
|
|
||||||
Incriminated subscope:
|
Incriminated subscope:
|
||||||
┌─⯈ tests/test_func/good/context_func.catala_en:9.3-9.4:
|
┌─⯈ context_func.catala_en:9.3-9.4:
|
||||||
└─┐
|
└─┐
|
||||||
9 │ a scope A
|
9 │ a scope A
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Incriminated variable:
|
Incriminated variable:
|
||||||
┌─⯈ tests/test_func/good/context_func.catala_en:5.10-5.11:
|
┌─⯈ context_func.catala_en:5.10-5.11:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ output f content integer depends on x content integer
|
5 │ output f content integer depends on x content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Incriminated subscope variable definition:
|
Incriminated subscope variable definition:
|
||||||
┌─⯈ tests/test_func/good/context_func.catala_en:15.3-15.17:
|
┌─⯈ context_func.catala_en:15.3-15.17:
|
||||||
└──┐
|
└──┐
|
||||||
15 │ definition a.f of x under condition b and x > 0 consequence equals x - 1
|
15 │ definition a.f of x under condition b and x > 0 consequence equals x - 1
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -20,14 +20,14 @@ $ catala Typecheck
|
|||||||
This subscope variable is a mandatory input but no definition was provided.
|
This subscope variable is a mandatory input but no definition was provided.
|
||||||
|
|
||||||
Incriminated subscope:
|
Incriminated subscope:
|
||||||
┌─⯈ tests/test_io/bad/forgot_input.catala_en:9.3-9.4:
|
┌─⯈ forgot_input.catala_en:9.3-9.4:
|
||||||
└─┐
|
└─┐
|
||||||
9 │ a scope A
|
9 │ a scope A
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Incriminated variable:
|
Incriminated variable:
|
||||||
┌─⯈ tests/test_io/bad/forgot_input.catala_en:6.9-6.10:
|
┌─⯈ forgot_input.catala_en:6.9-6.10:
|
||||||
└─┐
|
└─┐
|
||||||
6 │ input x content integer
|
6 │ input x content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -20,21 +20,21 @@ $ catala Typecheck
|
|||||||
It is impossible to give a definition to a subscope variable not tagged as input or context.
|
It is impossible to give a definition to a subscope variable not tagged as input or context.
|
||||||
|
|
||||||
Incriminated subscope:
|
Incriminated subscope:
|
||||||
┌─⯈ tests/test_io/bad/inputing_to_not_input.catala_en:8.3-8.4:
|
┌─⯈ inputing_to_not_input.catala_en:8.3-8.4:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ a scope A
|
8 │ a scope A
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Incriminated variable:
|
Incriminated variable:
|
||||||
┌─⯈ tests/test_io/bad/inputing_to_not_input.catala_en:5.10-5.11:
|
┌─⯈ inputing_to_not_input.catala_en:5.10-5.11:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ output a content integer
|
5 │ output a content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Incriminated subscope variable definition:
|
Incriminated subscope variable definition:
|
||||||
┌─⯈ tests/test_io/bad/inputing_to_not_input.catala_en:14.3-14.17:
|
┌─⯈ inputing_to_not_input.catala_en:14.3-14.17:
|
||||||
└──┐
|
└──┐
|
||||||
14 │ definition a.a equals 0
|
14 │ definition a.a equals 0
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -13,14 +13,14 @@ $ catala Typecheck
|
|||||||
It is impossible to give a definition to a scope variable tagged as input.
|
It is impossible to give a definition to a scope variable tagged as input.
|
||||||
|
|
||||||
Incriminated variable:
|
Incriminated variable:
|
||||||
┌─⯈ tests/test_io/bad/redefining_input.catala_en:5.16-5.17:
|
┌─⯈ redefining_input.catala_en:5.16-5.17:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ input output a content integer
|
5 │ input output a content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Incriminated variable definition:
|
Incriminated variable definition:
|
||||||
┌─⯈ tests/test_io/bad/redefining_input.catala_en:8.3-8.15:
|
┌─⯈ redefining_input.catala_en:8.3-8.15:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ definition a equals 0
|
8 │ definition a equals 0
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -17,7 +17,7 @@ scope B:
|
|||||||
$ catala Typecheck
|
$ catala Typecheck
|
||||||
[WARNING] This variable is dead code; it does not contribute to computing any of scope "A" outputs. Did you forget something?
|
[WARNING] This variable is dead code; it does not contribute to computing any of scope "A" outputs. Did you forget something?
|
||||||
|
|
||||||
┌─⯈ tests/test_io/bad/using_non_output.catala_en:5.12-5.13:
|
┌─⯈ using_non_output.catala_en:5.12-5.13:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ internal a content integer
|
5 │ internal a content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
@ -26,21 +26,21 @@ $ catala Typecheck
|
|||||||
The variable a.a cannot be used here, as it is not part of subscope a's results. Maybe you forgot to qualify it as an output?
|
The variable a.a cannot be used here, as it is not part of subscope a's results. Maybe you forgot to qualify it as an output?
|
||||||
|
|
||||||
Incriminated variable usage:
|
Incriminated variable usage:
|
||||||
┌─⯈ tests/test_io/bad/using_non_output.catala_en:14.13-14.16:
|
┌─⯈ using_non_output.catala_en:14.13-14.16:
|
||||||
└──┐
|
└──┐
|
||||||
14 │ assertion a.a = 0
|
14 │ assertion a.a = 0
|
||||||
│ ‾‾‾
|
│ ‾‾‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Incriminated subscope variable declaration:
|
Incriminated subscope variable declaration:
|
||||||
┌─⯈ tests/test_io/bad/using_non_output.catala_en:5.12-5.13:
|
┌─⯈ using_non_output.catala_en:5.12-5.13:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ internal a content integer
|
5 │ internal a content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Incriminated subscope declaration:
|
Incriminated subscope declaration:
|
||||||
┌─⯈ tests/test_io/bad/using_non_output.catala_en:8.3-8.4:
|
┌─⯈ using_non_output.catala_en:8.3-8.4:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ a scope A
|
8 │ a scope A
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -18,21 +18,21 @@ $ catala Interpret -s A
|
|||||||
I don't know how to apply operator * on types money and
|
I don't know how to apply operator * on types money and
|
||||||
money
|
money
|
||||||
|
|
||||||
┌─⯈ tests/test_money/bad/no_mingle.catala_en:12.26-12.27:
|
┌─⯈ no_mingle.catala_en:12.26-12.27:
|
||||||
└──┐
|
└──┐
|
||||||
12 │ definition z equals (x * y)
|
12 │ definition z equals (x * y)
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Article
|
└─ Article
|
||||||
|
|
||||||
Type money coming from expression:
|
Type money coming from expression:
|
||||||
┌─⯈ tests/test_money/bad/no_mingle.catala_en:5.21-5.26:
|
┌─⯈ no_mingle.catala_en:5.21-5.26:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ context x content money
|
5 │ context x content money
|
||||||
│ ‾‾‾‾‾
|
│ ‾‾‾‾‾
|
||||||
└─ Article
|
└─ Article
|
||||||
|
|
||||||
Type money coming from expression:
|
Type money coming from expression:
|
||||||
┌─⯈ tests/test_money/bad/no_mingle.catala_en:6.21-6.26:
|
┌─⯈ no_mingle.catala_en:6.21-6.26:
|
||||||
└─┐
|
└─┐
|
||||||
6 │ context y content money
|
6 │ context y content money
|
||||||
│ ‾‾‾‾‾
|
│ ‾‾‾‾‾
|
||||||
|
@ -16,7 +16,7 @@ $ catala typecheck
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
Scope calls are not allowed outside of a scope
|
Scope calls are not allowed outside of a scope
|
||||||
|
|
||||||
┌─⯈ tests/test_name_resolution/bad/toplevel_defs.catala_en:11.11-11.23:
|
┌─⯈ toplevel_defs.catala_en:11.11-11.23:
|
||||||
└──┐
|
└──┐
|
||||||
11 │ equals (output of S1).a
|
11 │ equals (output of S1).a
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -62,9 +62,8 @@ let s (s_in: SIn.t) : S.t =
|
|||||||
a_)))))
|
a_)))))
|
||||||
with
|
with
|
||||||
EmptyError -> (raise (NoValueProvided
|
EmptyError -> (raise (NoValueProvided
|
||||||
{filename = "tests/test_name_resolution/good/let_in2.catala_en";
|
{filename = "let_in2.catala_en"; start_line=5; start_column=18;
|
||||||
start_line=5; start_column=18; end_line=5; end_column=19;
|
end_line=5; end_column=19; law_headings=["Article"]})) in
|
||||||
law_headings=["Article"]})) in
|
|
||||||
{S.a = a_}
|
{S.a = a_}
|
||||||
let () =
|
let () =
|
||||||
Runtime_ocaml.Runtime.register_module "Let_in2"
|
Runtime_ocaml.Runtime.register_module "Let_in2"
|
||||||
|
@ -384,7 +384,7 @@ def s2(s2_in:S2In):
|
|||||||
law_headings=[]), [], temp_a_1, temp_a)
|
law_headings=[]), [], temp_a_1, temp_a)
|
||||||
except EmptyError:
|
except EmptyError:
|
||||||
temp_a_2 = dead_value
|
temp_a_2 = dead_value
|
||||||
raise NoValueProvided(SourcePosition(filename="tests/test_name_resolution/good/toplevel_defs.catala_en",
|
raise NoValueProvided(SourcePosition(filename="toplevel_defs.catala_en",
|
||||||
start_line=37, start_column=10,
|
start_line=37, start_column=10,
|
||||||
end_line=37, end_column=11,
|
end_line=37, end_column=11,
|
||||||
law_headings=["Test toplevel function defs"]))
|
law_headings=["Test toplevel function defs"]))
|
||||||
@ -404,7 +404,7 @@ def s3(s3_in:S3In):
|
|||||||
law_headings=[]), [], temp_a_4, temp_a_3)
|
law_headings=[]), [], temp_a_4, temp_a_3)
|
||||||
except EmptyError:
|
except EmptyError:
|
||||||
temp_a_5 = dead_value
|
temp_a_5 = dead_value
|
||||||
raise NoValueProvided(SourcePosition(filename="tests/test_name_resolution/good/toplevel_defs.catala_en",
|
raise NoValueProvided(SourcePosition(filename="toplevel_defs.catala_en",
|
||||||
start_line=57, start_column=10,
|
start_line=57, start_column=10,
|
||||||
end_line=57, end_column=11,
|
end_line=57, end_column=11,
|
||||||
law_headings=["Test function def with two args"]))
|
law_headings=["Test function def with two args"]))
|
||||||
@ -422,7 +422,7 @@ def s4(s4_in:S4In):
|
|||||||
law_headings=[]), [], temp_a_7, temp_a_6)
|
law_headings=[]), [], temp_a_7, temp_a_6)
|
||||||
except EmptyError:
|
except EmptyError:
|
||||||
temp_a_8 = dead_value
|
temp_a_8 = dead_value
|
||||||
raise NoValueProvided(SourcePosition(filename="tests/test_name_resolution/good/toplevel_defs.catala_en",
|
raise NoValueProvided(SourcePosition(filename="toplevel_defs.catala_en",
|
||||||
start_line=80, start_column=10,
|
start_line=80, start_column=10,
|
||||||
end_line=80, end_column=11,
|
end_line=80, end_column=11,
|
||||||
law_headings=["Test inline defs in toplevel defs"]))
|
law_headings=["Test inline defs in toplevel defs"]))
|
||||||
@ -440,7 +440,7 @@ def s(s_in:SIn):
|
|||||||
law_headings=[]), [], temp_a_10, temp_a_9)
|
law_headings=[]), [], temp_a_10, temp_a_9)
|
||||||
except EmptyError:
|
except EmptyError:
|
||||||
temp_a_11 = dead_value
|
temp_a_11 = dead_value
|
||||||
raise NoValueProvided(SourcePosition(filename="tests/test_name_resolution/good/toplevel_defs.catala_en",
|
raise NoValueProvided(SourcePosition(filename="toplevel_defs.catala_en",
|
||||||
start_line=7, start_column=10,
|
start_line=7, start_column=10,
|
||||||
end_line=7, end_column=11,
|
end_line=7, end_column=11,
|
||||||
law_headings=["Test basic toplevel values defs"]))
|
law_headings=["Test basic toplevel values defs"]))
|
||||||
@ -455,7 +455,7 @@ def s(s_in:SIn):
|
|||||||
law_headings=[]), [], temp_b_1, temp_b)
|
law_headings=[]), [], temp_b_1, temp_b)
|
||||||
except EmptyError:
|
except EmptyError:
|
||||||
temp_b_2 = dead_value
|
temp_b_2 = dead_value
|
||||||
raise NoValueProvided(SourcePosition(filename="tests/test_name_resolution/good/toplevel_defs.catala_en",
|
raise NoValueProvided(SourcePosition(filename="toplevel_defs.catala_en",
|
||||||
start_line=8, start_column=10,
|
start_line=8, start_column=10,
|
||||||
end_line=8, end_column=11,
|
end_line=8, end_column=11,
|
||||||
law_headings=["Test basic toplevel values defs"]))
|
law_headings=["Test basic toplevel values defs"]))
|
||||||
|
@ -13,7 +13,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-6.11:
|
┌─⯈ array_length-empty.catala_en:6.10-6.11:
|
||||||
└─┐
|
└─┐
|
||||||
6 │ output y content boolean
|
6 │ output y content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -14,7 +14,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-6.11:
|
┌─⯈ array_length-overlap.catala_en:6.10-6.11:
|
||||||
└─┐
|
└─┐
|
||||||
6 │ output y content boolean
|
6 │ output y content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -25,7 +25,7 @@ scope Foo:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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:
|
┌─⯈ assert-empty.catala_en:4.11-4.12:
|
||||||
└─┐
|
└─┐
|
||||||
4 │ output x content integer
|
4 │ output x content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -19,14 +19,14 @@ $ catala Proof --disable_counterexamples
|
|||||||
It is impossible to give a definition to a scope variable tagged as input.
|
It is impossible to give a definition to a scope variable tagged as input.
|
||||||
|
|
||||||
Incriminated variable:
|
Incriminated variable:
|
||||||
┌─⯈ tests/test_proof/bad/dates_get_year-empty.catala_en:5.9-5.10:
|
┌─⯈ dates_get_year-empty.catala_en:5.9-5.10:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ input x content date
|
5 │ input x content date
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
|
|
||||||
Incriminated variable definition:
|
Incriminated variable definition:
|
||||||
┌─⯈ tests/test_proof/bad/dates_get_year-empty.catala_en:9.3-9.15:
|
┌─⯈ dates_get_year-empty.catala_en:9.3-9.15:
|
||||||
└─┐
|
└─┐
|
||||||
9 │ definition x equals |2022-01-16|
|
9 │ definition x equals |2022-01-16|
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -16,7 +16,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-6.11:
|
┌─⯈ dates_get_year-overlap.catala_en:6.10-6.11:
|
||||||
└─┐
|
└─┐
|
||||||
6 │ output y content boolean
|
6 │ output y content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -15,7 +15,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-6.11:
|
┌─⯈ dates_simple-empty.catala_en:6.10-6.11:
|
||||||
└─┐
|
└─┐
|
||||||
6 │ output y content boolean
|
6 │ output y content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -16,7 +16,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-6.11:
|
┌─⯈ dates_simple-overlap.catala_en:6.10-6.11:
|
||||||
└─┐
|
└─┐
|
||||||
6 │ output y content boolean
|
6 │ output y content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -13,7 +13,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-6.11:
|
┌─⯈ duration-empty.catala_en:6.10-6.11:
|
||||||
└─┐
|
└─┐
|
||||||
6 │ output y content boolean
|
6 │ output y content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -14,7 +14,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-6.11:
|
┌─⯈ duration-overlap.catala_en:6.10-6.11:
|
||||||
└─┐
|
└─┐
|
||||||
6 │ output y content boolean
|
6 │ output y content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -25,13 +25,13 @@ scope A:
|
|||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary?
|
[WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary?
|
||||||
|
|
||||||
┌─⯈ tests/test_proof/bad/enums-empty.catala_en:7.7-7.8:
|
┌─⯈ enums-empty.catala_en:7.7-7.8:
|
||||||
└─┐
|
└─┐
|
||||||
7 │ -- C content boolean
|
7 │ -- C content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
[WARNING] [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.10-15.11:
|
┌─⯈ enums-empty.catala_en:15.10-15.11:
|
||||||
└──┐
|
└──┐
|
||||||
15 │ output x content integer
|
15 │ output x content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -23,13 +23,13 @@ scope A:
|
|||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary?
|
[WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary?
|
||||||
|
|
||||||
┌─⯈ tests/test_proof/bad/enums-nonbool-empty.catala_en:5.7-5.8:
|
┌─⯈ enums-nonbool-empty.catala_en:5.7-5.8:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ -- C content boolean
|
5 │ -- C content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
[WARNING] [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.10-13.11:
|
┌─⯈ enums-nonbool-empty.catala_en:13.10-13.11:
|
||||||
└──┐
|
└──┐
|
||||||
13 │ output x content integer
|
13 │ output x content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -23,13 +23,13 @@ scope A:
|
|||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary?
|
[WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary?
|
||||||
|
|
||||||
┌─⯈ tests/test_proof/bad/enums-nonbool-overlap.catala_en:5.7-5.8:
|
┌─⯈ enums-nonbool-overlap.catala_en:5.7-5.8:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ -- C content boolean
|
5 │ -- C content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
[WARNING] [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.10-13.11:
|
┌─⯈ enums-nonbool-overlap.catala_en:13.10-13.11:
|
||||||
└──┐
|
└──┐
|
||||||
13 │ output x content integer
|
13 │ output x content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -25,13 +25,13 @@ scope A:
|
|||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary?
|
[WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary?
|
||||||
|
|
||||||
┌─⯈ tests/test_proof/bad/enums-overlap.catala_en:7.7-7.8:
|
┌─⯈ enums-overlap.catala_en:7.7-7.8:
|
||||||
└─┐
|
└─┐
|
||||||
7 │ -- C content boolean
|
7 │ -- C content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Test
|
└─ Test
|
||||||
[WARNING] [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.10-15.11:
|
┌─⯈ enums-overlap.catala_en:15.10-15.11:
|
||||||
└──┐
|
└──┐
|
||||||
15 │ output x content integer
|
15 │ output x content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -18,13 +18,13 @@ scope A:
|
|||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] The constructor "C2" of enumeration "E" is never used; maybe it's unnecessary?
|
[WARNING] The constructor "C2" of enumeration "E" is never used; maybe it's unnecessary?
|
||||||
|
|
||||||
┌─⯈ tests/test_proof/bad/enums_inj-empty.catala_en:6.6-6.8:
|
┌─⯈ enums_inj-empty.catala_en:6.6-6.8:
|
||||||
└─┐
|
└─┐
|
||||||
6 │ -- C2
|
6 │ -- C2
|
||||||
│ ‾‾
|
│ ‾‾
|
||||||
└─ Article
|
└─ Article
|
||||||
[WARNING] [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.10-10.11:
|
┌─⯈ enums_inj-empty.catala_en:10.10-10.11:
|
||||||
└──┐
|
└──┐
|
||||||
10 │ output y content integer
|
10 │ output y content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -19,7 +19,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-10.11:
|
┌─⯈ enums_inj-overlap.catala_en:10.10-10.11:
|
||||||
└──┐
|
└──┐
|
||||||
10 │ output y content integer
|
10 │ output y content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -22,7 +22,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-10.11:
|
┌─⯈ enums_unit-empty.catala_en:10.10-10.11:
|
||||||
└──┐
|
└──┐
|
||||||
10 │ output y content integer
|
10 │ output y content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -22,7 +22,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-10.11:
|
┌─⯈ enums_unit-overlap.catala_en:10.10-10.11:
|
||||||
└──┐
|
└──┐
|
||||||
10 │ output y content integer
|
10 │ output y content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -14,7 +14,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-5.11:
|
┌─⯈ let_in_condition-empty.catala_en:5.10-5.11:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ output x content boolean
|
5 │ output x content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -17,7 +17,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-8.11:
|
┌─⯈ money-empty.catala_en:8.10-8.11:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ output y content boolean
|
8 │ output y content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -18,7 +18,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-8.11:
|
┌─⯈ money-overlap.catala_en:8.10-8.11:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ output y content boolean
|
8 │ output y content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -18,7 +18,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-8.11:
|
┌─⯈ no_vars-conflict.catala_en:8.10-8.11:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ output y content integer
|
8 │ output y content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -17,7 +17,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-7.11:
|
┌─⯈ no_vars-empty.catala_en:7.10-7.11:
|
||||||
└─┐
|
└─┐
|
||||||
7 │ output y content integer
|
7 │ output y content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -127,7 +127,7 @@ $ catala Proof --disable_counterexamples
|
|||||||
It is impossible to give a definition to a subscope variable not tagged as input or context.
|
It is impossible to give a definition to a subscope variable not tagged as input or context.
|
||||||
|
|
||||||
Incriminated subscope:
|
Incriminated subscope:
|
||||||
┌─⯈ tests/test_proof/bad/prolala_motivating_example.catala_en:56.3-56.14:
|
┌─⯈ prolala_motivating_example.catala_en:56.3-56.14:
|
||||||
└──┐
|
└──┐
|
||||||
56 │ eligibility scope Eligibility
|
56 │ eligibility scope Eligibility
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾
|
||||||
@ -135,7 +135,7 @@ Incriminated subscope:
|
|||||||
└─ Amount
|
└─ Amount
|
||||||
|
|
||||||
Incriminated variable:
|
Incriminated variable:
|
||||||
┌─⯈ tests/test_proof/bad/prolala_motivating_example.catala_en:9.12-9.22:
|
┌─⯈ prolala_motivating_example.catala_en:9.12-9.22:
|
||||||
└─┐
|
└─┐
|
||||||
9 │ internal is_student content boolean
|
9 │ internal is_student content boolean
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾
|
||||||
@ -143,7 +143,7 @@ Incriminated variable:
|
|||||||
└─ Eligibility
|
└─ Eligibility
|
||||||
|
|
||||||
Incriminated subscope variable definition:
|
Incriminated subscope variable definition:
|
||||||
┌─⯈ tests/test_proof/bad/prolala_motivating_example.catala_en:64.3-64.36:
|
┌─⯈ prolala_motivating_example.catala_en:64.3-64.36:
|
||||||
└──┐
|
└──┐
|
||||||
64 │ definition eligibility.is_student equals is_student
|
64 │ definition eligibility.is_student equals is_student
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -13,7 +13,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-6.11:
|
┌─⯈ rationals-empty.catala_en:6.10-6.11:
|
||||||
└─┐
|
└─┐
|
||||||
6 │ output y content boolean
|
6 │ output y content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -14,7 +14,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-6.11:
|
┌─⯈ rationals-overlap.catala_en:6.10-6.11:
|
||||||
└─┐
|
└─┐
|
||||||
6 │ output y content boolean
|
6 │ output y content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -41,7 +41,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-15.13:
|
┌─⯈ sat_solving.catala_en:15.10-15.13:
|
||||||
└──┐
|
└──┐
|
||||||
15 │ output x10 content boolean
|
15 │ output x10 content boolean
|
||||||
│ ‾‾‾
|
│ ‾‾‾
|
||||||
|
@ -22,7 +22,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-13.11:
|
┌─⯈ structs-empty.catala_en:13.10-13.11:
|
||||||
└──┐
|
└──┐
|
||||||
13 │ output x content integer
|
13 │ output x content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -22,7 +22,7 @@ scope A:
|
|||||||
```catala-test-inline
|
```catala-test-inline
|
||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] [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.10-13.11:
|
┌─⯈ structs-overlap.catala_en:13.10-13.11:
|
||||||
└──┐
|
└──┐
|
||||||
13 │ output x content integer
|
13 │ output x content integer
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -23,7 +23,7 @@ scope A:
|
|||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary?
|
[WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary?
|
||||||
|
|
||||||
┌─⯈ tests/test_proof/good/enums-arith.catala_en:5.7-5.8:
|
┌─⯈ enums-arith.catala_en:5.7-5.8:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ -- C content boolean
|
5 │ -- C content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -23,7 +23,7 @@ scope A:
|
|||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary?
|
[WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary?
|
||||||
|
|
||||||
┌─⯈ tests/test_proof/good/enums-nonbool.catala_en:5.7-5.8:
|
┌─⯈ enums-nonbool.catala_en:5.7-5.8:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ -- C content boolean
|
5 │ -- C content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -22,7 +22,7 @@ scope A:
|
|||||||
$ catala Proof --disable_counterexamples
|
$ catala Proof --disable_counterexamples
|
||||||
[WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary?
|
[WARNING] The constructor "C" of enumeration "T" is never used; maybe it's unnecessary?
|
||||||
|
|
||||||
┌─⯈ tests/test_proof/good/enums.catala_en:5.7-5.8:
|
┌─⯈ enums.catala_en:5.7-5.8:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ -- C content boolean
|
5 │ -- C content boolean
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -21,21 +21,21 @@ Cyclic dependency detected between the following variables of scope A:
|
|||||||
z → x → y → z
|
z → x → y → z
|
||||||
|
|
||||||
z is used here in the definition of x:
|
z is used here in the definition of x:
|
||||||
┌─⯈ tests/test_scope/bad/cycle_in_scope.catala_en:14.23-14.24:
|
┌─⯈ cycle_in_scope.catala_en:14.23-14.24:
|
||||||
└──┐
|
└──┐
|
||||||
14 │ definition x equals z
|
14 │ definition x equals z
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Article
|
└─ Article
|
||||||
|
|
||||||
x is used here in the definition of y:
|
x is used here in the definition of y:
|
||||||
┌─⯈ tests/test_scope/bad/cycle_in_scope.catala_en:11.32-11.33:
|
┌─⯈ cycle_in_scope.catala_en:11.32-11.33:
|
||||||
└──┐
|
└──┐
|
||||||
11 │ definition y under condition x >= 0 consequence equals x
|
11 │ definition y under condition x >= 0 consequence equals x
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Article
|
└─ Article
|
||||||
|
|
||||||
y is used here in the definition of z:
|
y is used here in the definition of z:
|
||||||
┌─⯈ tests/test_scope/bad/cycle_in_scope.catala_en:13.32-13.33:
|
┌─⯈ cycle_in_scope.catala_en:13.32-13.33:
|
||||||
└──┐
|
└──┐
|
||||||
13 │ definition z under condition y < 1 consequence equals y
|
13 │ definition z under condition y < 1 consequence equals y
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -33,19 +33,19 @@ Cyclic dependency detected between the following scopes:
|
|||||||
S4 → S3 → S2 → S4
|
S4 → S3 → S2 → S4
|
||||||
|
|
||||||
S4 is used here in the definition of S3:
|
S4 is used here in the definition of S3:
|
||||||
┌─⯈ tests/test_scope/bad/cyclic_scope_calls.catala_en:21.24-21.36:
|
┌─⯈ cyclic_scope_calls.catala_en:21.24-21.36:
|
||||||
└──┐
|
└──┐
|
||||||
21 │ definition o equals (output of S4).o
|
21 │ definition o equals (output of S4).o
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
|
||||||
S3 is used here in the definition of S2:
|
S3 is used here in the definition of S2:
|
||||||
┌─⯈ tests/test_scope/bad/cyclic_scope_calls.catala_en:18.43-18.55:
|
┌─⯈ cyclic_scope_calls.catala_en:18.43-18.55:
|
||||||
└──┐
|
└──┐
|
||||||
18 │ definition o equals (output of S1).o + (output of S3).o
|
18 │ definition o equals (output of S1).o + (output of S3).o
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
|
||||||
S2 is used here in the definition of S4:
|
S2 is used here in the definition of S4:
|
||||||
┌─⯈ tests/test_scope/bad/cyclic_scope_calls.catala_en:24.24-24.36:
|
┌─⯈ cyclic_scope_calls.catala_en:24.24-24.36:
|
||||||
└──┐
|
└──┐
|
||||||
24 │ definition o equals (output of S2).o
|
24 │ definition o equals (output of S2).o
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
@ -22,14 +22,14 @@ $ catala Interpret -s A
|
|||||||
Cyclic dependency detected between the following scopes: B → A → B
|
Cyclic dependency detected between the following scopes: B → A → B
|
||||||
|
|
||||||
B is used here in the definition of A:
|
B is used here in the definition of A:
|
||||||
┌─⯈ tests/test_scope/bad/cyclic_scopes.catala_en:5.3-5.4:
|
┌─⯈ cyclic_scopes.catala_en:5.3-5.4:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ b scope B
|
5 │ b scope B
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Article
|
└─ Article
|
||||||
|
|
||||||
A is used here in the definition of B:
|
A is used here in the definition of B:
|
||||||
┌─⯈ tests/test_scope/bad/cyclic_scopes.catala_en:9.3-9.4:
|
┌─⯈ cyclic_scopes.catala_en:9.3-9.4:
|
||||||
└─┐
|
└─┐
|
||||||
9 │ a scope A
|
9 │ a scope A
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -20,14 +20,14 @@ $ catala Interpret -s A
|
|||||||
There is a conflict between multiple valid consequences for assigning the same variable.
|
There is a conflict between multiple valid consequences for assigning the same variable.
|
||||||
|
|
||||||
This consequence has a valid justification:
|
This consequence has a valid justification:
|
||||||
┌─⯈ tests/test_scope/bad/scope.catala_en:13.57-13.61:
|
┌─⯈ scope.catala_en:13.57-13.61:
|
||||||
└──┐
|
└──┐
|
||||||
13 │ definition b under condition not c consequence equals 1337
|
13 │ definition b under condition not c consequence equals 1337
|
||||||
│ ‾‾‾‾
|
│ ‾‾‾‾
|
||||||
└─ Article
|
└─ Article
|
||||||
|
|
||||||
This consequence has a valid justification:
|
This consequence has a valid justification:
|
||||||
┌─⯈ tests/test_scope/bad/scope.catala_en:14.57-14.58:
|
┌─⯈ scope.catala_en:14.57-14.58:
|
||||||
└──┐
|
└──┐
|
||||||
14 │ definition b under condition not c consequence equals 0
|
14 │ definition b under condition not c consequence equals 0
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -19,7 +19,7 @@ $ catala dcalc -s Titi
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
Duplicate definition of scope input variable 'bar'
|
Duplicate definition of scope input variable 'bar'
|
||||||
|
|
||||||
┌─⯈ tests/test_scope/bad/scope_call_duplicate.catala_en:14.70-14.73:
|
┌─⯈ scope_call_duplicate.catala_en:14.70-14.73:
|
||||||
└──┐
|
└──┐
|
||||||
14 │ definition fizz equals output of Toto with {--bar: 1 --baz: 2.1 -- bar: 3}
|
14 │ definition fizz equals output of Toto with {--bar: 1 --baz: 2.1 -- bar: 3}
|
||||||
│ ‾‾‾
|
│ ‾‾‾
|
||||||
|
@ -19,13 +19,13 @@ $ catala dcalc -s Titi
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
Scope Toto has no input variable biz
|
Scope Toto has no input variable biz
|
||||||
|
|
||||||
┌─⯈ tests/test_scope/bad/scope_call_extra.catala_en:14.49-14.52:
|
┌─⯈ scope_call_extra.catala_en:14.49-14.52:
|
||||||
└──┐
|
└──┐
|
||||||
14 │ definition fizz equals output of Toto with {--biz: 1}
|
14 │ definition fizz equals output of Toto with {--biz: 1}
|
||||||
│ ‾‾‾
|
│ ‾‾‾
|
||||||
|
|
||||||
Scope Toto declared here
|
Scope Toto declared here
|
||||||
┌─⯈ tests/test_scope/bad/scope_call_extra.catala_en:2.19-2.23:
|
┌─⯈ scope_call_extra.catala_en:2.19-2.23:
|
||||||
└─┐
|
└─┐
|
||||||
2 │ declaration scope Toto:
|
2 │ declaration scope Toto:
|
||||||
│ ‾‾‾‾
|
│ ‾‾‾‾
|
||||||
|
@ -19,13 +19,13 @@ $ catala dcalc -s Titi
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
Definition of input variable 'baz' missing in this scope call
|
Definition of input variable 'baz' missing in this scope call
|
||||||
|
|
||||||
┌─⯈ tests/test_scope/bad/scope_call_missing.catala_en:14.26-14.56:
|
┌─⯈ scope_call_missing.catala_en:14.26-14.56:
|
||||||
└──┐
|
└──┐
|
||||||
14 │ definition fizz equals output of Toto with {--bar: 1}
|
14 │ definition fizz equals output of Toto with {--bar: 1}
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
|
||||||
Declaration of the missing input variable
|
Declaration of the missing input variable
|
||||||
┌─⯈ tests/test_scope/bad/scope_call_missing.catala_en:4.16-4.19:
|
┌─⯈ scope_call_missing.catala_en:4.16-4.19:
|
||||||
└─┐
|
└─┐
|
||||||
4 │ input output baz content decimal
|
4 │ input output baz content decimal
|
||||||
│ ‾‾‾
|
│ ‾‾‾
|
||||||
|
@ -18,7 +18,7 @@ $ catala Interpret -s A
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
The subscope a is used when defining one of its inputs, but recursion is forbidden in Catala
|
The subscope a is used when defining one of its inputs, but recursion is forbidden in Catala
|
||||||
|
|
||||||
┌─⯈ tests/test_scope/bad/sub_vars_in_sub_var.catala_en:13.28-13.31:
|
┌─⯈ sub_vars_in_sub_var.catala_en:13.28-13.31:
|
||||||
└──┐
|
└──┐
|
||||||
13 │ definition a.y equals if a.x then 0 else 1
|
13 │ definition a.y equals if a.x then 0 else 1
|
||||||
│ ‾‾‾
|
│ ‾‾‾
|
||||||
|
@ -46,9 +46,8 @@ end
|
|||||||
let scope_a (scope_a_in: ScopeAIn.t) : ScopeA.t =
|
let scope_a (scope_a_in: ScopeAIn.t) : ScopeA.t =
|
||||||
let a_: bool = try true with
|
let a_: bool = try true with
|
||||||
EmptyError -> (raise (NoValueProvided
|
EmptyError -> (raise (NoValueProvided
|
||||||
{filename = "tests/test_scope/good/191_fix_record_name_confusion.catala_en";
|
{filename = "191_fix_record_name_confusion.catala_en"; start_line=5;
|
||||||
start_line=5; start_column=10; end_line=5; end_column=11;
|
start_column=10; end_line=5; end_column=11; law_headings=["Article"]})) in
|
||||||
law_headings=["Article"]})) in
|
|
||||||
{ScopeA.a = a_}
|
{ScopeA.a = a_}
|
||||||
|
|
||||||
let scope_b (scope_b_in: ScopeBIn.t) : ScopeB.t =
|
let scope_b (scope_b_in: ScopeBIn.t) : ScopeB.t =
|
||||||
@ -56,9 +55,8 @@ let scope_b (scope_b_in: ScopeBIn.t) : ScopeB.t =
|
|||||||
let scope_a_dot_a_: bool = result_.ScopeA.a in
|
let scope_a_dot_a_: bool = result_.ScopeA.a in
|
||||||
let a_: bool = try scope_a_dot_a_ with
|
let a_: bool = try scope_a_dot_a_ with
|
||||||
EmptyError -> (raise (NoValueProvided
|
EmptyError -> (raise (NoValueProvided
|
||||||
{filename = "tests/test_scope/good/191_fix_record_name_confusion.catala_en";
|
{filename = "191_fix_record_name_confusion.catala_en"; start_line=8;
|
||||||
start_line=8; start_column=10; end_line=8; end_column=11;
|
start_column=10; end_line=8; end_column=11; law_headings=["Article"]})) in
|
||||||
law_headings=["Article"]})) in
|
|
||||||
{ScopeB.a = a_}
|
{ScopeB.a = a_}
|
||||||
let () =
|
let () =
|
||||||
Runtime_ocaml.Runtime.register_module "191_fix_record_name_confusion"
|
Runtime_ocaml.Runtime.register_module "191_fix_record_name_confusion"
|
||||||
|
@ -9,7 +9,7 @@ declaration scope Foo2:
|
|||||||
$ catala Scalc -s Foo2 -O -t
|
$ catala Scalc -s Foo2 -O -t
|
||||||
[WARNING] In scope "Foo2", the variable "bar" is declared but never defined; did you forget something?
|
[WARNING] In scope "Foo2", the variable "bar" is declared but never defined; did you forget something?
|
||||||
|
|
||||||
┌─⯈ tests/test_scope/good/nothing.catala_en:5.10-5.13:
|
┌─⯈ nothing.catala_en:5.10-5.13:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ output bar content integer
|
5 │ output bar content integer
|
||||||
│ ‾‾‾
|
│ ‾‾‾
|
||||||
|
@ -20,7 +20,7 @@ scope RentComputation:
|
|||||||
$ catala Interpret -t -s HousingComputation --debug
|
$ catala Interpret -t -s HousingComputation --debug
|
||||||
[DEBUG] Collecting rules...
|
[DEBUG] Collecting rules...
|
||||||
[DEBUG] Reading files...
|
[DEBUG] Reading files...
|
||||||
[DEBUG] Parsing tests/test_scope/good/scope_call3.catala_en
|
[DEBUG] Parsing scope_call3.catala_en
|
||||||
[DEBUG] Name resolution...
|
[DEBUG] Name resolution...
|
||||||
[DEBUG] Desugaring...
|
[DEBUG] Desugaring...
|
||||||
[DEBUG] Disambiguating...
|
[DEBUG] Disambiguating...
|
||||||
@ -31,14 +31,14 @@ $ catala Interpret -t -s HousingComputation --debug
|
|||||||
[DEBUG] Starting interpretation...
|
[DEBUG] Starting interpretation...
|
||||||
[LOG] ≔ HousingComputation.f: <function>
|
[LOG] ≔ HousingComputation.f: <function>
|
||||||
[LOG] ☛ Definition applied:
|
[LOG] ☛ Definition applied:
|
||||||
┌─⯈ tests/test_scope/good/scope_call3.catala_en:8.14-8.20:
|
┌─⯈ scope_call3.catala_en:8.14-8.20:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ definition result equals f of 1
|
8 │ definition result equals f of 1
|
||||||
│ ‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾
|
||||||
[LOG] → HousingComputation.f
|
[LOG] → HousingComputation.f
|
||||||
[LOG] ≔ HousingComputation.f.input0: 1
|
[LOG] ≔ HousingComputation.f.input0: 1
|
||||||
[LOG] ☛ Definition applied:
|
[LOG] ☛ Definition applied:
|
||||||
┌─⯈ tests/test_scope/good/scope_call3.catala_en:7.14-7.15:
|
┌─⯈ scope_call3.catala_en:7.14-7.15:
|
||||||
└─┐
|
└─┐
|
||||||
7 │ definition f of x equals (output of RentComputation).f of x
|
7 │ definition f of x equals (output of RentComputation).f of x
|
||||||
│ ‾
|
│ ‾
|
||||||
@ -47,7 +47,7 @@ $ catala Interpret -t -s HousingComputation --debug
|
|||||||
[LOG] ≔ RentComputation.g: <function>
|
[LOG] ≔ RentComputation.g: <function>
|
||||||
[LOG] ≔ RentComputation.f: <function>
|
[LOG] ≔ RentComputation.f: <function>
|
||||||
[LOG] ☛ Definition applied:
|
[LOG] ☛ Definition applied:
|
||||||
┌─⯈ tests/test_scope/good/scope_call3.catala_en:7.29-7.54:
|
┌─⯈ scope_call3.catala_en:7.29-7.54:
|
||||||
└─┐
|
└─┐
|
||||||
7 │ definition f of x equals (output of RentComputation).f of x
|
7 │ definition f of x equals (output of RentComputation).f of x
|
||||||
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
@ -56,14 +56,14 @@ $ catala Interpret -t -s HousingComputation --debug
|
|||||||
[LOG] → RentComputation.f
|
[LOG] → RentComputation.f
|
||||||
[LOG] ≔ RentComputation.f.input0: 1
|
[LOG] ≔ RentComputation.f.input0: 1
|
||||||
[LOG] ☛ Definition applied:
|
[LOG] ☛ Definition applied:
|
||||||
┌─⯈ tests/test_scope/good/scope_call3.catala_en:16.14-16.15:
|
┌─⯈ scope_call3.catala_en:16.14-16.15:
|
||||||
└──┐
|
└──┐
|
||||||
16 │ definition f of x equals g of (x + 1)
|
16 │ definition f of x equals g of (x + 1)
|
||||||
│ ‾
|
│ ‾
|
||||||
[LOG] → RentComputation.g
|
[LOG] → RentComputation.g
|
||||||
[LOG] ≔ RentComputation.g.input0: 2
|
[LOG] ≔ RentComputation.g.input0: 2
|
||||||
[LOG] ☛ Definition applied:
|
[LOG] ☛ Definition applied:
|
||||||
┌─⯈ tests/test_scope/good/scope_call3.catala_en:15.14-15.15:
|
┌─⯈ scope_call3.catala_en:15.14-15.15:
|
||||||
└──┐
|
└──┐
|
||||||
15 │ definition g of x equals x + 1
|
15 │ definition g of x equals x + 1
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -26,7 +26,7 @@ scope RentComputation:
|
|||||||
$ catala Interpret -s RentComputation --debug
|
$ catala Interpret -s RentComputation --debug
|
||||||
[DEBUG] Collecting rules...
|
[DEBUG] Collecting rules...
|
||||||
[DEBUG] Reading files...
|
[DEBUG] Reading files...
|
||||||
[DEBUG] Parsing tests/test_scope/good/scope_call4.catala_en
|
[DEBUG] Parsing scope_call4.catala_en
|
||||||
[DEBUG] Name resolution...
|
[DEBUG] Name resolution...
|
||||||
[DEBUG] Desugaring...
|
[DEBUG] Desugaring...
|
||||||
[DEBUG] Disambiguating...
|
[DEBUG] Disambiguating...
|
||||||
@ -51,7 +51,7 @@ f2 = λ (x: integer) →
|
|||||||
$ catala Interpret_Lcalc -s RentComputation --avoid_exceptions --optimize --debug
|
$ catala Interpret_Lcalc -s RentComputation --avoid_exceptions --optimize --debug
|
||||||
[DEBUG] Collecting rules...
|
[DEBUG] Collecting rules...
|
||||||
[DEBUG] Reading files...
|
[DEBUG] Reading files...
|
||||||
[DEBUG] Parsing tests/test_scope/good/scope_call4.catala_en
|
[DEBUG] Parsing scope_call4.catala_en
|
||||||
[DEBUG] Name resolution...
|
[DEBUG] Name resolution...
|
||||||
[DEBUG] Desugaring...
|
[DEBUG] Desugaring...
|
||||||
[DEBUG] Disambiguating...
|
[DEBUG] Disambiguating...
|
||||||
|
@ -22,14 +22,14 @@ $ catala Interpret -s A
|
|||||||
struct name "S" already defined
|
struct name "S" already defined
|
||||||
|
|
||||||
First definition:
|
First definition:
|
||||||
┌─⯈ tests/test_struct/bad/bug_107.catala_en:4.23-4.24:
|
┌─⯈ bug_107.catala_en:4.23-4.24:
|
||||||
└─┐
|
└─┐
|
||||||
4 │ declaration structure S:
|
4 │ declaration structure S:
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ https://github.com/CatalaLang/catala/issues/107
|
└─ https://github.com/CatalaLang/catala/issues/107
|
||||||
|
|
||||||
Second definition:
|
Second definition:
|
||||||
┌─⯈ tests/test_struct/bad/bug_107.catala_en:8.23-8.24:
|
┌─⯈ bug_107.catala_en:8.23-8.24:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ declaration structure S:
|
8 │ declaration structure S:
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -12,7 +12,7 @@ $ catala Typecheck
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
The struct Foo does not have any fields; give it some for Catala to be able to accept it.
|
The struct Foo does not have any fields; give it some for Catala to be able to accept it.
|
||||||
|
|
||||||
┌─⯈ tests/test_struct/bad/empty_struct.catala_en:4.23-4.26:
|
┌─⯈ empty_struct.catala_en:4.23-4.26:
|
||||||
└─┐
|
└─┐
|
||||||
4 │ declaration structure Foo:
|
4 │ declaration structure Foo:
|
||||||
│ ‾‾‾
|
│ ‾‾‾
|
||||||
|
@ -16,7 +16,7 @@ scope A:
|
|||||||
$ catala Interpret -s A
|
$ catala Interpret -s A
|
||||||
[WARNING] The constructor "Rec" of enumeration "E" is never used; maybe it's unnecessary?
|
[WARNING] The constructor "Rec" of enumeration "E" is never used; maybe it's unnecessary?
|
||||||
|
|
||||||
┌─⯈ tests/test_struct/bad/nested.catala_en:6.6-6.9:
|
┌─⯈ nested.catala_en:6.6-6.9:
|
||||||
└─┐
|
└─┐
|
||||||
6 │ -- Rec content E
|
6 │ -- Rec content E
|
||||||
│ ‾‾‾
|
│ ‾‾‾
|
||||||
@ -24,7 +24,7 @@ $ catala Interpret -s A
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
The type E is defined using itself, which is forbidden since Catala does not provide recursive types
|
The type E is defined using itself, which is forbidden since Catala does not provide recursive types
|
||||||
|
|
||||||
┌─⯈ tests/test_struct/bad/nested.catala_en:6.18-6.19:
|
┌─⯈ nested.catala_en:6.18-6.19:
|
||||||
└─┐
|
└─┐
|
||||||
6 │ -- Rec content E
|
6 │ -- Rec content E
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -17,21 +17,21 @@ declaration scope A:
|
|||||||
$ catala Interpret -s A
|
$ catala Interpret -s A
|
||||||
[WARNING] In scope "A", the variable "x" is declared but never defined; did you forget something?
|
[WARNING] In scope "A", the variable "x" is declared but never defined; did you forget something?
|
||||||
|
|
||||||
┌─⯈ tests/test_struct/bad/nested2.catala_en:13.10-13.11:
|
┌─⯈ nested2.catala_en:13.10-13.11:
|
||||||
└──┐
|
└──┐
|
||||||
13 │ output x content E
|
13 │ output x content E
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Article
|
└─ Article
|
||||||
[WARNING] The structure "S" is never used; maybe it's unnecessary?
|
[WARNING] The structure "S" is never used; maybe it's unnecessary?
|
||||||
|
|
||||||
┌─⯈ tests/test_struct/bad/nested2.catala_en:4.23-4.24:
|
┌─⯈ nested2.catala_en:4.23-4.24:
|
||||||
└─┐
|
└─┐
|
||||||
4 │ declaration structure S:
|
4 │ declaration structure S:
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Article
|
└─ Article
|
||||||
[WARNING] The enumeration "E" is never used; maybe it's unnecessary?
|
[WARNING] The enumeration "E" is never used; maybe it's unnecessary?
|
||||||
|
|
||||||
┌─⯈ tests/test_struct/bad/nested2.catala_en:8.25-8.26:
|
┌─⯈ nested2.catala_en:8.25-8.26:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ declaration enumeration E:
|
8 │ declaration enumeration E:
|
||||||
│ ‾
|
│ ‾
|
||||||
@ -40,28 +40,28 @@ $ catala Interpret -s A
|
|||||||
Cyclic dependency detected between types!
|
Cyclic dependency detected between types!
|
||||||
|
|
||||||
Cycle type S, declared:
|
Cycle type S, declared:
|
||||||
┌─⯈ tests/test_struct/bad/nested2.catala_en:4.23-4.24:
|
┌─⯈ nested2.catala_en:4.23-4.24:
|
||||||
└─┐
|
└─┐
|
||||||
4 │ declaration structure S:
|
4 │ declaration structure S:
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Article
|
└─ Article
|
||||||
|
|
||||||
Used here in the definition of another cycle type E:
|
Used here in the definition of another cycle type E:
|
||||||
┌─⯈ tests/test_struct/bad/nested2.catala_en:10.20-10.21:
|
┌─⯈ nested2.catala_en:10.20-10.21:
|
||||||
└──┐
|
└──┐
|
||||||
10 │ -- Case2 content S
|
10 │ -- Case2 content S
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Article
|
└─ Article
|
||||||
|
|
||||||
Cycle type E, declared:
|
Cycle type E, declared:
|
||||||
┌─⯈ tests/test_struct/bad/nested2.catala_en:8.25-8.26:
|
┌─⯈ nested2.catala_en:8.25-8.26:
|
||||||
└─┐
|
└─┐
|
||||||
8 │ declaration enumeration E:
|
8 │ declaration enumeration E:
|
||||||
│ ‾
|
│ ‾
|
||||||
└─ Article
|
└─ Article
|
||||||
|
|
||||||
Used here in the definition of another cycle type S:
|
Used here in the definition of another cycle type S:
|
||||||
┌─⯈ tests/test_struct/bad/nested2.catala_en:5.18-5.19:
|
┌─⯈ nested2.catala_en:5.18-5.19:
|
||||||
└─┐
|
└─┐
|
||||||
5 │ data x content E
|
5 │ data x content E
|
||||||
│ ‾
|
│ ‾
|
||||||
|
@ -18,7 +18,7 @@ $ catala Interpret -s A
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
No struct named Fo found
|
No struct named Fo found
|
||||||
|
|
||||||
┌─⯈ tests/test_struct/bad/nonexisting_struct.catala_en:13.25-13.27:
|
┌─⯈ nonexisting_struct.catala_en:13.25-13.27:
|
||||||
└──┐
|
└──┐
|
||||||
13 │ definition y equals x.Fo.f
|
13 │ definition y equals x.Fo.f
|
||||||
│ ‾‾
|
│ ‾‾
|
||||||
|
@ -22,7 +22,7 @@ $ catala Interpret -s A
|
|||||||
[ERROR]
|
[ERROR]
|
||||||
Field "g" does not belong to structure "Foo", but to "Bar"
|
Field "g" does not belong to structure "Foo", but to "Bar"
|
||||||
|
|
||||||
┌─⯈ tests/test_struct/bad/wrong_qualified_field.catala_en:17.23-17.30:
|
┌─⯈ wrong_qualified_field.catala_en:17.23-17.30:
|
||||||
└──┐
|
└──┐
|
||||||
17 │ definition y equals x.Foo.g
|
17 │ definition y equals x.Foo.g
|
||||||
│ ‾‾‾‾‾‾‾
|
│ ‾‾‾‾‾‾‾
|
||||||
|
@ -20,7 +20,7 @@ scope A:
|
|||||||
$ catala Interpret -s A
|
$ catala Interpret -s A
|
||||||
[WARNING] The structure "Bar" is never used; maybe it's unnecessary?
|
[WARNING] The structure "Bar" is never used; maybe it's unnecessary?
|
||||||
|
|
||||||
┌─⯈ tests/test_struct/good/ambiguous_fields.catala_en:7.23-7.26:
|
┌─⯈ ambiguous_fields.catala_en:7.23-7.26:
|
||||||
└─┐
|
└─┐
|
||||||
7 │ declaration structure Bar:
|
7 │ declaration structure Bar:
|
||||||
│ ‾‾‾
|
│ ‾‾‾
|
||||||
@ -32,7 +32,7 @@ $ catala Interpret -s A
|
|||||||
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
|
$ catala Interpret_Lcalc -s A --avoid_exceptions --optimize
|
||||||
[WARNING] The structure "Bar" is never used; maybe it's unnecessary?
|
[WARNING] The structure "Bar" is never used; maybe it's unnecessary?
|
||||||
|
|
||||||
┌─⯈ tests/test_struct/good/ambiguous_fields.catala_en:7.23-7.26:
|
┌─⯈ ambiguous_fields.catala_en:7.23-7.26:
|
||||||
└─┐
|
└─┐
|
||||||
7 │ declaration structure Bar:
|
7 │ declaration structure Bar:
|
||||||
│ ‾‾‾
|
│ ‾‾‾
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user