diff --git a/build_system/clerk_driver.ml b/build_system/clerk_driver.ml index 015fbc0bf..2db5d5af9 100644 --- a/build_system/clerk_driver.ml +++ b/build_system/clerk_driver.ml @@ -217,6 +217,7 @@ let add_reset_rules_aux Lit redirect; Var "expected_output"; Lit "2>&1"; + Lit "| true"; ] in let reset_with_scope_rule = diff --git a/build_system/tests/test_clerk_driver.ml b/build_system/tests/test_clerk_driver.ml index c413ef5cd..4a3ec496a 100644 --- a/build_system/tests/test_clerk_driver.ml +++ b/build_system/tests/test_clerk_driver.ml @@ -16,7 +16,7 @@ let test_ninja_start () = Buffer.clear Format.stdbuf; Nj.format Format.str_formatter ninja_start; let expected_format = - "rule reset_with_scope\n command = catala -s $scope $catala_cmd $tested_file $extra_flags --unstyled > $expected_output 2>&1\n description = RESET scope $scope of file $tested_file with the $catala_cmd command\n\nrule reset_with_scope_and_output\n command = catala -s $scope $catala_cmd $tested_file $extra_flags --unstyled -o $expected_output 2>&1\n description = RESET scope $scope of file $tested_file with the $catala_cmd command\n\nrule reset_without_scope\n command = catala $catala_cmd $tested_file $extra_flags --unstyled > $expected_output 2>&1\n description = RESET file $tested_file with the $catala_cmd command\n\nrule reset_without_scope_and_output\n command = catala $catala_cmd $tested_file $extra_flags --unstyled -o $expected_output 2>&1\n description = RESET file $tested_file with the $catala_cmd command\n\nrule run_and_display_final_message\n command = :\n description = All tests $test_file_or_folder passed!\n\nrule test_with_scope\n command = catala -s $scope $catala_cmd $tested_file $extra_flags --unstyled 2>&1 | colordiff -u -b $expected_output -\n description = TEST scope $scope of file $tested_file with the $catala_cmd command\n\nrule test_with_scope_and_output\n command = catala -s $scope $catala_cmd $tested_file $extra_flags --unstyled -o $tmp_file ; colordiff -u -b $expected_output $tmp_file\n description = TEST scope $scope of file $tested_file with the $catala_cmd command\n\nrule test_without_scope\n command = catala $catala_cmd $tested_file $extra_flags --unstyled 2>&1 | colordiff -u -b $expected_output -\n description = TEST on file $tested_file with the $catala_cmd command\n\nrule test_without_scope_and_output\n command = catala $catala_cmd $tested_file $extra_flags --unstyled -o $tmp_file ; colordiff -u -b $expected_output $tmp_file\n description = TEST on file $tested_file with the $catala_cmd command\n\n"[@ocamlformat "disable"] + "rule reset_with_scope\n command = catala -s $scope $catala_cmd $tested_file $extra_flags --unstyled > $expected_output 2>&1 | true\n description = RESET scope $scope of file $tested_file with the $catala_cmd command\n\nrule reset_with_scope_and_output\n command = catala -s $scope $catala_cmd $tested_file $extra_flags --unstyled -o $expected_output 2>&1 | true\n description = RESET scope $scope of file $tested_file with the $catala_cmd command\n\nrule reset_without_scope\n command = catala $catala_cmd $tested_file $extra_flags --unstyled > $expected_output 2>&1 | true\n description = RESET file $tested_file with the $catala_cmd command\n\nrule reset_without_scope_and_output\n command = catala $catala_cmd $tested_file $extra_flags --unstyled -o $expected_output 2>&1 | true\n description = RESET file $tested_file with the $catala_cmd command\n\nrule run_and_display_final_message\n command = :\n description = All tests $test_file_or_folder passed!\n\nrule test_with_scope\n command = catala -s $scope $catala_cmd $tested_file $extra_flags --unstyled 2>&1 | colordiff -u -b $expected_output -\n description = TEST scope $scope of file $tested_file with the $catala_cmd command\n\nrule test_with_scope_and_output\n command = catala -s $scope $catala_cmd $tested_file $extra_flags --unstyled -o $tmp_file ; colordiff -u -b $expected_output $tmp_file\n description = TEST scope $scope of file $tested_file with the $catala_cmd command\n\nrule test_without_scope\n command = catala $catala_cmd $tested_file $extra_flags --unstyled 2>&1 | colordiff -u -b $expected_output -\n description = TEST on file $tested_file with the $catala_cmd command\n\nrule test_without_scope_and_output\n command = catala $catala_cmd $tested_file $extra_flags --unstyled -o $tmp_file ; colordiff -u -b $expected_output $tmp_file\n description = TEST on file $tested_file with the $catala_cmd command\n\n"[@ocamlformat "disable"] in let actual_format = Buffer.contents Format.stdbuf in Al.(check string) diff --git a/compiler/dcalc/ast.ml b/compiler/dcalc/ast.ml index c320bdaa4..de6d77ebe 100644 --- a/compiler/dcalc/ast.ml +++ b/compiler/dcalc/ast.ml @@ -1,6 +1,7 @@ (* This file is part of the Catala compiler, a specification language for tax and social benefits computation rules. Copyright (C) 2020 Inria, contributor: - Denis Merigoux + Denis Merigoux , Alain Delaët-Tixeuil + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of @@ -133,26 +134,49 @@ type scope_let_kind = | Assertion type scope_let = { - scope_let_var : expr Bindlib.var Pos.marked; scope_let_kind : scope_let_kind; - scope_let_typ : typ Pos.marked; - scope_let_expr : expr Pos.marked Bindlib.box; + scope_let_typ : typ Utils.Pos.marked; + scope_let_expr : expr Utils.Pos.marked; + scope_let_next : (expr, scope_body_expr) Bindlib.binder; + scope_let_pos : Utils.Pos.t; } +and scope_body_expr = Result of expr Utils.Pos.marked | ScopeLet of scope_let + type scope_body = { - scope_body_lets : scope_let list; - scope_body_result : expr Pos.marked Bindlib.box; - (** {x1 = x1; x2 = x2; x3 = x3; ... } *) - scope_body_arg : expr Bindlib.var; (** x: input_struct *) scope_body_input_struct : StructName.t; scope_body_output_struct : StructName.t; + scope_body_expr : (expr, scope_body_expr) Bindlib.binder; } -type program = { - decl_ctx : decl_ctx; - scopes : (ScopeName.t * expr Bindlib.var * scope_body) list; +type scope_def = { + scope_name : ScopeName.t; + scope_body : scope_body; + scope_next : (expr, scopes) Bindlib.binder; } +and scopes = Nil | ScopeDef of scope_def + +type program = { decl_ctx : decl_ctx; scopes : scopes } + +let rec fold_scope_lets + ~(f : 'a -> scope_let -> 'a) + ~(init : 'a) + (scope_body_expr : scope_body_expr) : 'a = + match scope_body_expr with + | Result _ -> init + | ScopeLet scope_let -> + let _, next = Bindlib.unbind scope_let.scope_let_next in + fold_scope_lets ~f ~init:(f init scope_let) next + +let rec fold_scope_defs + ~(f : 'a -> scope_def -> 'a) ~(init : 'a) (scopes : scopes) : 'a = + match scopes with + | Nil -> init + | ScopeDef scope_def -> + let _, next = Bindlib.unbind scope_def.scope_next in + fold_scope_defs ~f ~init:(f init scope_def) next + module Var = struct type t = expr Bindlib.var @@ -164,36 +188,110 @@ module Var = struct let compare x y = Bindlib.compare_vars x y end -module VarMap = Map.Make (Var) +(** See [Bindlib.box_term] documentation for why we are doing that. *) +let rec box_expr (e : expr Pos.marked) : expr Pos.marked Bindlib.box = + match Pos.unmark e with + | EVar (v, _pos) -> + Bindlib.box_apply (fun v -> (v, Pos.get_position e)) (Bindlib.box_var v) + | EApp (f, args) -> + Bindlib.box_apply2 + (fun f args -> (EApp (f, args), Pos.get_position e)) + (box_expr f) + (Bindlib.box_list (List.map box_expr args)) + | EAbs ((binder, binder_pos), typs) -> + Bindlib.box_apply + (fun binder -> (EAbs ((binder, binder_pos), typs), Pos.get_position e)) + (Bindlib.box_mbinder box_expr binder) + | ETuple (args, s) -> + Bindlib.box_apply + (fun args -> (ETuple (args, s), Pos.get_position e)) + (Bindlib.box_list (List.map box_expr args)) + | ETupleAccess (e1, n, s_name, typs) -> + Bindlib.box_apply + (fun e1 -> (ETupleAccess (e1, n, s_name, typs), Pos.get_position e)) + (box_expr e1) + | EInj (e1, i, e_name, typ) -> + Bindlib.box_apply + (fun e1 -> (EInj (e1, i, e_name, typ), Pos.get_position e)) + (box_expr e1) + | EMatch (arg, arms, e_name) -> + Bindlib.box_apply2 + (fun arg arms -> (EMatch (arg, arms, e_name), Pos.get_position e)) + (box_expr arg) + (Bindlib.box_list (List.map box_expr arms)) + | EArray args -> + Bindlib.box_apply + (fun args -> (EArray args, Pos.get_position e)) + (Bindlib.box_list (List.map box_expr args)) + | ELit l -> Bindlib.box (ELit l, Pos.get_position e) + | EAssert e1 -> + Bindlib.box_apply + (fun e1 -> (EAssert e1, Pos.get_position e)) + (box_expr e1) + | EOp op -> Bindlib.box (EOp op, Pos.get_position e) + | EDefault (excepts, just, cons) -> + Bindlib.box_apply3 + (fun excepts just cons -> + (EDefault (excepts, just, cons), Pos.get_position e)) + (Bindlib.box_list (List.map box_expr excepts)) + (box_expr just) (box_expr cons) + | EIfThenElse (e1, e2, e3) -> + Bindlib.box_apply3 + (fun e1 e2 e3 -> (EIfThenElse (e1, e2, e3), Pos.get_position e)) + (box_expr e1) (box_expr e2) (box_expr e3) + | ErrorOnEmpty e1 -> + Bindlib.box_apply + (fun e1 -> (ErrorOnEmpty e1, Pos.get_position e1)) + (box_expr e1) -let union : unit VarMap.t -> unit VarMap.t -> unit VarMap.t = - VarMap.union (fun _ _ _ -> Some ()) +module VarMap = Map.Make (Var) +module VarSet = Set.Make (Var) -let rec free_vars_set (e : expr Pos.marked) : unit VarMap.t = +let rec free_vars_expr (e : expr Pos.marked) : VarSet.t = match Pos.unmark e with - | EVar (v, _) -> VarMap.singleton v () + | EVar (v, _) -> VarSet.singleton v | ETuple (es, _) | EArray es -> - es |> List.map free_vars_set |> List.fold_left union VarMap.empty + es |> List.map free_vars_expr |> List.fold_left VarSet.union VarSet.empty | ETupleAccess (e1, _, _, _) | EAssert e1 | ErrorOnEmpty e1 | EInj (e1, _, _, _) -> - free_vars_set e1 + free_vars_expr e1 | EApp (e1, es) | EMatch (e1, es, _) -> - e1 :: es |> List.map free_vars_set |> List.fold_left union VarMap.empty + e1 :: es |> List.map free_vars_expr + |> List.fold_left VarSet.union VarSet.empty | EDefault (es, ejust, econs) -> - ejust :: econs :: es |> List.map free_vars_set - |> List.fold_left union VarMap.empty - | EOp _ | ELit _ -> VarMap.empty + ejust :: econs :: es |> List.map free_vars_expr + |> List.fold_left VarSet.union VarSet.empty + | EOp _ | ELit _ -> VarSet.empty | EIfThenElse (e1, e2, e3) -> - [ e1; e2; e3 ] |> List.map free_vars_set - |> List.fold_left union VarMap.empty + [ e1; e2; e3 ] |> List.map free_vars_expr + |> List.fold_left VarSet.union VarSet.empty | EAbs ((binder, _), _) -> let vs, body = Bindlib.unmbind binder in - Array.fold_right VarMap.remove vs (free_vars_set body) - -let free_vars_list (e : expr Pos.marked) : Var.t list = - free_vars_set e |> VarMap.bindings |> List.map fst + Array.fold_right VarSet.remove vs (free_vars_expr body) + +let rec free_vars_scope_body_expr (scope_lets : scope_body_expr) : VarSet.t = + match scope_lets with + | Result e -> free_vars_expr e + | ScopeLet { scope_let_expr = e; scope_let_next = next; _ } -> + let v, body = Bindlib.unbind next in + VarSet.union (free_vars_expr e) + (VarSet.remove v (free_vars_scope_body_expr body)) + +let free_vars_scope_body (scope_body : scope_body) : VarSet.t = + let { scope_body_expr = binder; _ } = scope_body in + let v, body = Bindlib.unbind binder in + VarSet.remove v (free_vars_scope_body_expr body) + +let rec free_vars_scopes (scopes : scopes) : VarSet.t = + match scopes with + | Nil -> VarSet.empty + | ScopeDef { scope_body = body; scope_next = next; _ } -> + let v, next = Bindlib.unbind next in + VarSet.union + (VarSet.remove v (free_vars_scopes next)) + (free_vars_scope_body body) type vars = expr Bindlib.mvar @@ -312,19 +410,31 @@ and equal_exprs_list (es1 : expr Pos.marked list) (es2 : expr Pos.marked list) : assume here that both lists have equal length *) List.for_all (fun (x, y) -> equal_exprs x y) (List.combine es1 es2) +let rec unfold_scope_body_expr (ctx : decl_ctx) (scope_let : scope_body_expr) : + expr Pos.marked Bindlib.box = + match scope_let with + | Result e -> box_expr e + | ScopeLet + { + scope_let_kind = _; + scope_let_typ; + scope_let_expr; + scope_let_next; + scope_let_pos; + } -> + let var, next = Bindlib.unbind scope_let_next in + make_let_in var scope_let_typ (box_expr scope_let_expr) + (unfold_scope_body_expr ctx next) + scope_let_pos + let build_whole_scope_expr (ctx : decl_ctx) (body : scope_body) (pos_scope : Pos.t) = - let body_expr = - List.fold_right - (fun scope_let acc -> - make_let_in - (Pos.unmark scope_let.scope_let_var) - scope_let.scope_let_typ scope_let.scope_let_expr acc - (Pos.get_position scope_let.scope_let_var)) - body.scope_body_lets body.scope_body_result - in + let var, body_expr = Bindlib.unbind body.scope_body_expr in + Cli.debug_format "Getting variable %s_%d" (Bindlib.name_of var) + (Bindlib.uid_of var); + let body_expr = unfold_scope_body_expr ctx body_expr in make_abs - (Array.of_list [ body.scope_body_arg ]) + (Array.of_list [ var ]) body_expr pos_scope [ ( TTuple @@ -352,25 +462,36 @@ let build_scope_typ_from_sig in (TArrow (input_typ, result_typ), pos) -let build_whole_program_expr (p : program) (main_scope : ScopeName.t) = - let end_result = - make_var - (let _, x, _ = - List.find - (fun (s_name, _, _) -> ScopeName.compare main_scope s_name = 0) - p.scopes - in - (x, Pos.no_pos)) - in - List.fold_right - (fun (scope_name, scope_var, scope_body) acc -> - let pos = Pos.get_position (ScopeName.get_info scope_name) in +type scope_name_or_var = ScopeName of ScopeName.t | ScopeVar of Var.t + +let rec unfold_scopes + (ctx : decl_ctx) (s : scopes) (main_scope : scope_name_or_var) : + expr Pos.marked Bindlib.box = + match s with + | Nil -> ( + match main_scope with + | ScopeVar v -> + Bindlib.box_apply (fun v -> (v, Pos.no_pos)) (Bindlib.box_var v) + | ScopeName _ -> failwith "should not happen") + | ScopeDef { scope_name; scope_body; scope_next } -> + let scope_var, scope_next = Bindlib.unbind scope_next in + let scope_pos = Pos.get_position (ScopeName.get_info scope_name) in + let main_scope = + match main_scope with + | ScopeVar v -> ScopeVar v + | ScopeName n -> + if ScopeName.compare n scope_name = 0 then ScopeVar scope_var + else ScopeName n + in make_let_in scope_var - (build_scope_typ_from_sig p.decl_ctx scope_body.scope_body_input_struct - scope_body.scope_body_output_struct pos) - (build_whole_scope_expr p.decl_ctx scope_body pos) - acc pos) - p.scopes end_result + (build_scope_typ_from_sig ctx scope_body.scope_body_input_struct + scope_body.scope_body_output_struct scope_pos) + (build_whole_scope_expr ctx scope_body scope_pos) + (unfold_scopes ctx scope_next main_scope) + scope_pos + +let build_whole_program_expr (p : program) (main_scope : ScopeName.t) = + unfold_scopes p.decl_ctx p.scopes (ScopeName main_scope) let rec expr_size (e : expr Pos.marked) : int = match Pos.unmark e with @@ -396,14 +517,3 @@ let rec expr_size (e : expr Pos.marked) : int = (fun acc except -> acc + expr_size except) (1 + expr_size just + expr_size cons) exceptions - -let variable_types (p : program) : typ Pos.marked VarMap.t = - List.fold_left - (fun acc (_, _, scope) -> - List.fold_left - (fun acc scope_let -> - VarMap.add - (Pos.unmark scope_let.scope_let_var) - scope_let.scope_let_typ acc) - acc scope.scope_body_lets) - VarMap.empty p.scopes diff --git a/compiler/dcalc/ast.mli b/compiler/dcalc/ast.mli index ee8ae42c6..575ff2551 100644 --- a/compiler/dcalc/ast.mli +++ b/compiler/dcalc/ast.mli @@ -1,6 +1,7 @@ (* This file is part of the Catala compiler, a specification language for tax and social benefits computation rules. Copyright (C) 2020 Inria, contributor: - Denis Merigoux + Denis Merigoux , Alain Delaët-Tixeuil + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of @@ -144,33 +145,52 @@ type scope_let_kind = | Assertion (** [let _ = assert e]*) type scope_let = { - scope_let_var : expr Bindlib.var Pos.marked; scope_let_kind : scope_let_kind; - scope_let_typ : typ Pos.marked; - scope_let_expr : expr Pos.marked Bindlib.box; + scope_let_typ : typ Utils.Pos.marked; + scope_let_expr : expr Utils.Pos.marked; + scope_let_next : (expr, scope_body_expr) Bindlib.binder; + scope_let_pos : Utils.Pos.t; } + (** A scope let-binding has all the information necessary to make a proper let-binding expression, plus an annotation for the kind of the let-binding that comes from the compilation of a {!module: Scopelang.Ast} statement. *) +and scope_body_expr = Result of expr Utils.Pos.marked | ScopeLet of scope_let type scope_body = { - scope_body_lets : scope_let list; - scope_body_result : expr Pos.marked Bindlib.box; - scope_body_arg : expr Bindlib.var; scope_body_input_struct : StructName.t; scope_body_output_struct : StructName.t; + scope_body_expr : (expr, scope_body_expr) Bindlib.binder; } (** Instead of being a single expression, we give a little more ad-hoc structure to the scope body by decomposing it in an ordered list of let-bindings, and - a result expression that uses the let-binded variables. *) + a result expression that uses the let-binded variables. The first binder is + the argument of type [scope_body_input_struct]. *) -type program = { - decl_ctx : decl_ctx; - scopes : (ScopeName.t * expr Bindlib.var * scope_body) list; +type scope_def = { + scope_name : ScopeName.t; + scope_body : scope_body; + scope_next : (expr, scopes) Bindlib.binder; } +(** Finally, we do the same transformation for the whole program for the kinded + lets. This permit us to use bindlib variables for scopes names. *) +and scopes = Nil | ScopeDef of scope_def + +type program = { decl_ctx : decl_ctx; scopes : scopes } + (** {1 Helpers} *) +(**{2 Program traversal}*) + +(** Be careful when using these traversal functions, as the bound variables they + open will be different at each traversal. *) + +val fold_scope_lets : + f:('a -> scope_let -> 'a) -> init:'a -> scope_body_expr -> 'a + +val fold_scope_defs : f:('a -> scope_def -> 'a) -> init:'a -> scopes -> 'a + (** {2 Variables}*) module Var : sig @@ -181,9 +201,12 @@ module Var : sig end module VarMap : Map.S with type key = Var.t +module VarSet : Set.S with type elt = Var.t -val free_vars_set : expr Pos.marked -> unit VarMap.t -val free_vars_list : expr Pos.marked -> Var.t list +val free_vars_expr : expr Pos.marked -> VarSet.t +val free_vars_scope_body_expr : scope_body_expr -> VarSet.t +val free_vars_scope_body : scope_body -> VarSet.t +val free_vars_scopes : scopes -> VarSet.t type vars = expr Bindlib.mvar @@ -235,8 +258,3 @@ val build_whole_program_expr : val expr_size : expr Pos.marked -> int (** Used by the optimizer to know when to stop *) - -val variable_types : program -> typ Pos.marked VarMap.t -(** Traverses all the scopes and retrieves all the types for the variables that - may appear in scope or subscope variable definitions, giving them as a big - map. *) diff --git a/compiler/dcalc/binded_representation.ml b/compiler/dcalc/binded_representation.ml deleted file mode 100644 index 90ea6cef0..000000000 --- a/compiler/dcalc/binded_representation.ml +++ /dev/null @@ -1,146 +0,0 @@ -(* This file is part of the Catala compiler, a specification language for tax - and social benefits computation rules. Copyright (C) 2020-2022 Inria, - contributor: Alain Delaët-Tixeuil - - Licensed under the Apache License, Version 2.0 (the "License"); you may not - use this file except in compliance with the License. You may obtain a copy of - the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - License for the specific language governing permissions and limitations under - the License. *) - -open Utils -module D = Ast - -type scope_lets = - | Result of D.expr Pos.marked - | ScopeLet of { - scope_let_kind : D.scope_let_kind; - scope_let_typ : D.typ Pos.marked; - scope_let_expr : D.expr Pos.marked; - scope_let_next : (D.expr, scope_lets) Bindlib.binder; - scope_let_pos : Pos.t; - } - -type scope_body = { - scope_body_input_struct : D.StructName.t; - scope_body_output_struct : D.StructName.t; - scope_body_result : (D.expr, scope_lets) Bindlib.binder; -} - -type scopes = - | Nil - | ScopeDef of { - scope_name : D.ScopeName.t; - scope_body : scope_body; - scope_next : (D.expr, scopes) Bindlib.binder; - } - -let union : unit D.VarMap.t -> unit D.VarMap.t -> unit D.VarMap.t = - D.VarMap.union (fun _ _ _ -> Some ()) - -let rec free_vars_set_scope_lets (scope_lets : scope_lets) : unit D.VarMap.t = - match scope_lets with - | Result e -> D.free_vars_set e - | ScopeLet { scope_let_expr = e; scope_let_next = next; _ } -> - let v, body = Bindlib.unbind next in - union (D.free_vars_set e) - (D.VarMap.remove v (free_vars_set_scope_lets body)) - -let free_vars_set_scope_body (scope_body : scope_body) : unit D.VarMap.t = - let { scope_body_result = binder; _ } = scope_body in - let v, body = Bindlib.unbind binder in - D.VarMap.remove v (free_vars_set_scope_lets body) - -let rec free_vars_set_scopes (scopes : scopes) : unit D.VarMap.t = - match scopes with - | Nil -> D.VarMap.empty - | ScopeDef { scope_body = body; scope_next = next; _ } -> - let v, next = Bindlib.unbind next in - - union - (D.VarMap.remove v (free_vars_set_scopes next)) - (free_vars_set_scope_body body) - -let free_vars_list_scope_lets (scope_lets : scope_lets) : D.Var.t list = - free_vars_set_scope_lets scope_lets |> D.VarMap.bindings |> List.map fst - -let free_vars_list_scope_body (scope_body : scope_body) : D.Var.t list = - free_vars_set_scope_body scope_body |> D.VarMap.bindings |> List.map fst - -let free_vars_list_scopes (scopes : scopes) : D.Var.t list = - free_vars_set_scopes scopes |> D.VarMap.bindings |> List.map fst - -(** Actual transformation for scopes. *) -let bind_scope_lets (acc : scope_lets Bindlib.box) (scope_let : D.scope_let) : - scope_lets Bindlib.box = - let pos = snd scope_let.D.scope_let_var in - - (* Cli.debug_print @@ Format.asprintf "binding let %a. Variable occurs = %b" - Print.format_var (fst scope_let.D.scope_let_var) (Bindlib.occur (fst - scope_let.D.scope_let_var) acc); *) - let binder = Bindlib.bind_var (fst scope_let.D.scope_let_var) acc in - Bindlib.box_apply2 - (fun expr binder -> - (* Cli.debug_print @@ Format.asprintf "free variables in expression: %a" - (Format.pp_print_list Print.format_var) (D.free_vars_list expr); *) - ScopeLet - { - scope_let_kind = scope_let.D.scope_let_kind; - scope_let_typ = scope_let.D.scope_let_typ; - scope_let_expr = expr; - scope_let_next = binder; - scope_let_pos = pos; - }) - scope_let.D.scope_let_expr binder - -let bind_scope_body (body : D.scope_body) : scope_body Bindlib.box = - (* it is a fold_right and not a fold_left. *) - let body_result = - ListLabels.fold_right body.D.scope_body_lets - ~init:(Bindlib.box_apply (fun e -> Result e) body.D.scope_body_result) - ~f:(Fun.flip bind_scope_lets) - in - - (* Cli.debug_print @@ Format.asprintf "binding arg %a" Print.format_var - body.D.scope_body_arg; *) - let scope_body_result = Bindlib.bind_var body.D.scope_body_arg body_result in - - (* Cli.debug_print @@ Format.asprintf "isfinal term is closed: %b" - (Bindlib.is_closed scope_body_result); *) - Bindlib.box_apply - (fun scope_body_result -> - (* Cli.debug_print @@ Format.asprintf "rank of the final term: %i" - (Bindlib.binder_rank scope_body_result); *) - { - scope_body_output_struct = body.D.scope_body_output_struct; - scope_body_input_struct = body.D.scope_body_input_struct; - scope_body_result; - }) - scope_body_result - -let bind_scope - ((scope_name, scope_var, scope_body) : - D.ScopeName.t * D.expr Bindlib.var * D.scope_body) - (acc : scopes Bindlib.box) : scopes Bindlib.box = - Bindlib.box_apply2 - (fun scope_body scope_next -> - ScopeDef { scope_name; scope_body; scope_next }) - (bind_scope_body scope_body) - (Bindlib.bind_var scope_var acc) - -let bind_scopes - (scopes : (D.ScopeName.t * D.expr Bindlib.var * D.scope_body) list) : - scopes Bindlib.box = - let result = - ListLabels.fold_right scopes ~init:(Bindlib.box Nil) ~f:bind_scope - in - (* Cli.debug_print @@ Format.asprintf "free variable in the program : [%a]" - (Format.pp_print_list Print.format_var) (free_vars_list_scopes - (Bindlib.unbox result)); *) - result diff --git a/compiler/dcalc/binded_representation.mli b/compiler/dcalc/binded_representation.mli deleted file mode 100644 index ef81fa691..000000000 --- a/compiler/dcalc/binded_representation.mli +++ /dev/null @@ -1,68 +0,0 @@ -(* This file is part of the Catala compiler, a specification language for tax - and social benefits computation rules. Copyright (C) 2020-2022 Inria, - contributor: Alain Delaët-Tixeuil - - Licensed under the Apache License, Version 2.0 (the "License"); you may not - use this file except in compliance with the License. You may obtain a copy of - the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - License for the specific language governing permissions and limitations under - the License. *) - -module D = Ast - -(** Alternative representation of the Dcalc Ast. It is currently used in the - transformation without exceptions. We make heavy use of bindlib, binding - each scope-let-variable and each scope explicitly. *) - -(** In [Ast], [Ast.scope_lets] is defined as a list of kind, var, and boxed - expression. This representation binds using bindlib the tail of the list - with the variable defined in the let. *) -type scope_lets = - | Result of D.expr Utils.Pos.marked - | ScopeLet of { - scope_let_kind : D.scope_let_kind; - scope_let_typ : D.typ Utils.Pos.marked; - scope_let_expr : D.expr Utils.Pos.marked; - scope_let_next : (D.expr, scope_lets) Bindlib.binder; - scope_let_pos : Utils.Pos.t; - } - -type scope_body = { - scope_body_input_struct : D.StructName.t; - scope_body_output_struct : D.StructName.t; - scope_body_result : (D.expr, scope_lets) Bindlib.binder; -} -(** As a consequence, the scope_body contains only a result and input/output - signature, as the other elements are stored inside the scope_let. The binder - present is the argument of type [scope_body_input_struct]. *) - -(** Finally, we do the same transformation for the whole program for the kinded - lets. This permit us to use bindlib variables for scopes names. *) -type scopes = - | Nil - | ScopeDef of { - scope_name : D.ScopeName.t; - scope_body : scope_body; - scope_next : (D.expr, scopes) Bindlib.binder; - } - -val free_vars_list_scope_lets : scope_lets -> D.Var.t list -(** List of variables not binded inside a scope_lets *) - -val free_vars_list_scope_body : scope_body -> D.Var.t list -(** List of variables not binded inside a scope_body. *) - -val free_vars_list_scopes : scopes -> D.Var.t list -(** List of variables not binded inside scopes*) - -val bind_scopes : - (D.ScopeName.t * D.expr Bindlib.var * D.scope_body) list -> scopes Bindlib.box -(** Transform a list of scopes into our representation of scopes. It requires - that scopes are topologically-well-ordered, and ensure there is no free - variables in the returned [scopes] *) diff --git a/compiler/dcalc/interpreter.ml b/compiler/dcalc/interpreter.ml index 30a03f0be..94cb57189 100644 --- a/compiler/dcalc/interpreter.ml +++ b/compiler/dcalc/interpreter.ml @@ -458,7 +458,7 @@ and evaluate_expr (ctx : Ast.decl_ctx) (e : A.expr Pos.marked) : | ErrorOnEmpty e' -> let e' = evaluate_expr ctx e' in if Pos.unmark e' = A.ELit LEmptyError then - Errors.raise_spanned_error (Pos.get_position e) + Errors.raise_spanned_error (Pos.get_position e') "This variable evaluated to an empty term (no rule that defined it \ applied in this situation)" else e' diff --git a/compiler/dcalc/optimizations.ml b/compiler/dcalc/optimizations.ml index b9b4aaf23..4b8eb6f8f 100644 --- a/compiler/dcalc/optimizations.ml +++ b/compiler/dcalc/optimizations.ml @@ -190,38 +190,71 @@ let rec partial_evaluation (ctx : partial_evaluation_ctx) (e : expr Pos.marked) let optimize_expr (decl_ctx : decl_ctx) (e : expr Pos.marked) = partial_evaluation { var_values = VarMap.empty; decl_ctx } e -let program_map +let rec scope_lets_map (t : 'a -> expr Pos.marked -> expr Pos.marked Bindlib.box) (ctx : 'a) - (p : program) : program = - { - p with - scopes = - List.map - (fun (s_name, s_var, s_body) -> - let new_s_body = + (scope_body_expr : scope_body_expr) : scope_body_expr Bindlib.box = + match scope_body_expr with + | Result e -> Bindlib.box_apply (fun e' -> Result e') (t ctx e) + | ScopeLet scope_let -> + let var, next = Bindlib.unbind scope_let.scope_let_next in + let new_scope_let_expr = t ctx scope_let.scope_let_expr in + let new_next = scope_lets_map t ctx next in + let new_next = Bindlib.bind_var var new_next in + Bindlib.box_apply2 + (fun new_scope_let_expr new_next -> + ScopeLet { - s_body with - scope_body_lets = - List.map - (fun scope_let -> - { - scope_let with - scope_let_expr = - Bindlib.unbox - (Bindlib.box_apply (t ctx) scope_let.scope_let_expr); - }) - s_body.scope_body_lets; - } - in - (s_name, s_var, new_s_body)) - p.scopes; - } + scope_let with + scope_let_expr = new_scope_let_expr; + scope_let_next = new_next; + }) + new_scope_let_expr new_next + +let rec scopes_map + (t : 'a -> expr Pos.marked -> expr Pos.marked Bindlib.box) + (ctx : 'a) + (scopes : scopes) : scopes Bindlib.box = + match scopes with + | Nil -> Bindlib.box Nil + | ScopeDef scope_def -> + let scope_var, scope_next = Bindlib.unbind scope_def.scope_next in + let scope_arg_var, scope_body_expr = + Bindlib.unbind scope_def.scope_body.scope_body_expr + in + let new_scope_body_expr = scope_lets_map t ctx scope_body_expr in + let new_scope_body_expr = + Bindlib.bind_var scope_arg_var new_scope_body_expr + in + let new_scope_next = scopes_map t ctx scope_next in + let new_scope_next = Bindlib.bind_var scope_var new_scope_next in + Bindlib.box_apply2 + (fun new_scope_body_expr new_scope_next -> + ScopeDef + { + scope_def with + scope_next = new_scope_next; + scope_body = + { + scope_def.scope_body with + scope_body_expr = new_scope_body_expr; + }; + }) + new_scope_body_expr new_scope_next + +let program_map + (t : 'a -> expr Pos.marked -> expr Pos.marked Bindlib.box) + (ctx : 'a) + (p : program) : program Bindlib.box = + Bindlib.box_apply + (fun new_scopes -> { p with scopes = new_scopes }) + (scopes_map t ctx p.scopes) let optimize_program (p : program) : program = - program_map partial_evaluation - { var_values = VarMap.empty; decl_ctx = p.decl_ctx } - p + Bindlib.unbox + (program_map partial_evaluation + { var_values = VarMap.empty; decl_ctx = p.decl_ctx } + p) let rec remove_all_logs (e : expr Pos.marked) : expr Pos.marked Bindlib.box = let pos = Pos.get_position e in diff --git a/compiler/driver.ml b/compiler/driver.ml index 05c037e78..abab2d92e 100644 --- a/compiler/driver.ml +++ b/compiler/driver.ml @@ -215,10 +215,17 @@ let driver source_file (options : Cli.options) : int = if Option.is_some options.ex_scope then Format.fprintf fmt "%a\n" (Dcalc.Print.format_scope ~debug:options.debug prgm.decl_ctx) - (let _, _, s = - List.find (fun (name, _, _) -> name = scope_uid) prgm.scopes - in - (scope_uid, s)) + ( scope_uid, + Option.get + (Dcalc.Ast.fold_scope_defs ~init:None + ~f:(fun acc scope_def -> + if + Dcalc.Ast.ScopeName.compare scope_def.scope_name + scope_uid + = 0 + then Some scope_def.scope_body + else acc) + prgm.scopes) ) else Format.fprintf fmt "%a\n" (Dcalc.Print.format_expr prgm.decl_ctx) @@ -228,8 +235,8 @@ let driver source_file (options : Cli.options) : int = end; Cli.debug_print "Typechecking..."; let _typ = Dcalc.Typing.infer_type prgm.decl_ctx prgrm_dcalc_expr in - (* Cli.debug_print (Format.asprintf "Typechecking results :@\n%a" - (Dcalc.Print.format_typ prgm.decl_ctx) typ); *) + (* Cli.debug_format "Typechecking results :@\n%a" + (Dcalc.Print.format_typ prgm.decl_ctx) typ; *) match backend with | Cli.Typecheck -> (* That's it! *) @@ -242,7 +249,7 @@ let driver source_file (options : Cli.options) : int = | None -> None | Some _ -> Some scope_uid) in - Verification.Solver.solve_vc prgm prgm.decl_ctx vcs; + Verification.Solver.solve_vc prgm.decl_ctx vcs; 0 | Cli.Interpret -> Cli.debug_print "Starting interpretation..."; @@ -288,6 +295,23 @@ let driver source_file (options : Cli.options) : int = end else prgm in + let prgm = + if options.closure_conversion then ( + Cli.debug_print "Performing closure conversion..."; + let prgm, closures = + Lcalc.Closure_conversion.closure_conversion prgm + in + let prgm = Bindlib.unbox prgm in + List.iter + (fun closure -> + Cli.debug_format "Closure found:\n%a" + (Lcalc.Print.format_expr ~debug:options.debug + prgm.decl_ctx) + (Bindlib.unbox closure.Lcalc.Closure_conversion.expr)) + closures; + prgm) + else prgm + in if backend = Cli.Lcalc then begin let fmt, at_end = match options.output_file with diff --git a/compiler/lcalc/ast.ml b/compiler/lcalc/ast.ml index 7c7b56ae0..838a49439 100644 --- a/compiler/lcalc/ast.ml +++ b/compiler/lcalc/ast.ml @@ -62,6 +62,7 @@ module Var = struct end module VarMap = Map.Make (Var) +module VarSet = Set.Make (Var) type vars = expr Bindlib.mvar @@ -90,9 +91,16 @@ let make_let_in (e1 : expr Pos.marked Bindlib.box) (e2 : expr Pos.marked Bindlib.box) : expr Pos.marked Bindlib.box = let pos = Pos.get_position (Bindlib.unbox e2) in - make_app (make_abs (Array.of_list [ x ]) e2 pos [ tau ] pos) [ e1 ] pos +let make_multiple_let_in + (xs : Var.t array) + (taus : D.typ Pos.marked list) + (e1 : expr Pos.marked Bindlib.box list) + (e2 : expr Pos.marked Bindlib.box) + (pos : Pos.t) : expr Pos.marked Bindlib.box = + make_app (make_abs xs e2 pos taus pos) e1 pos + let ( let+ ) x f = Bindlib.box_apply f x let ( and+ ) x y = Bindlib.box_pair x y let option_enum : D.EnumName.t = D.EnumName.fresh ("eoption", Pos.no_pos) diff --git a/compiler/lcalc/ast.mli b/compiler/lcalc/ast.mli index 1d46fbd93..9b6027850 100644 --- a/compiler/lcalc/ast.mli +++ b/compiler/lcalc/ast.mli @@ -74,6 +74,7 @@ module Var : sig end module VarMap : Map.S with type key = Var.t +module VarSet : Set.S with type elt = Var.t type vars = expr Bindlib.mvar @@ -100,6 +101,14 @@ val make_let_in : expr Pos.marked Bindlib.box -> expr Pos.marked Bindlib.box +val make_multiple_let_in : + Var.t array -> + Dcalc.Ast.typ Pos.marked list -> + expr Pos.marked Bindlib.box list -> + expr Pos.marked Bindlib.box -> + Pos.t -> + expr Pos.marked Bindlib.box + val option_enum : Dcalc.Ast.EnumName.t val none_constr : Dcalc.Ast.EnumConstructor.t val some_constr : Dcalc.Ast.EnumConstructor.t diff --git a/compiler/lcalc/closure_conversion.ml b/compiler/lcalc/closure_conversion.ml new file mode 100644 index 000000000..9236cd2a3 --- /dev/null +++ b/compiler/lcalc/closure_conversion.ml @@ -0,0 +1,318 @@ +(* This file is part of the Catala compiler, a specification language for tax + and social benefits computation rules. Copyright (C) 2022 Inria, contributor: + Denis Merigoux + + Licensed under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. You may obtain a copy of + the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + License for the specific language governing permissions and limitations under + the License. *) + +open Ast +open Utils + +(** TODO: This version is not yet debugged and ought to be specialized when + Lcalc has more structure. *) + +type closure = { name : Var.t; expr : expr Pos.marked Bindlib.box } +type ctx = { name_context : string; globally_bound_vars : VarSet.t } + +(** Returns the expression with closed closures and the set of free variables + inside this new expression. Implementation guided by + http://gallium.inria.fr/~fpottier/mpri/cours04.pdf#page=9. *) +let rec closure_conversion_expr (ctx : ctx) (e : expr Pos.marked) : + expr Pos.marked Bindlib.box * VarSet.t = + match Pos.unmark e with + | EVar v -> + ( Bindlib.box_apply + (fun new_v -> (new_v, Pos.get_position v)) + (Bindlib.box_var (Pos.unmark v)), + VarSet.diff (VarSet.singleton (Pos.unmark v)) ctx.globally_bound_vars ) + | ETuple (args, s) -> + let new_args, free_vars = + List.fold_left + (fun (new_args, free_vars) arg -> + let new_arg, new_free_vars = closure_conversion_expr ctx arg in + (new_arg :: new_args, VarSet.union new_free_vars free_vars)) + ([], VarSet.empty) args + in + ( Bindlib.box_apply + (fun new_args -> (ETuple (List.rev new_args, s), Pos.get_position e)) + (Bindlib.box_list new_args), + free_vars ) + | ETupleAccess (e1, n, s, typs) -> + let new_e1, free_vars = closure_conversion_expr ctx e1 in + ( Bindlib.box_apply + (fun new_e1 -> + (ETupleAccess (new_e1, n, s, typs), Pos.get_position e)) + new_e1, + free_vars ) + | EInj (e1, n, e_name, typs) -> + let new_e1, free_vars = closure_conversion_expr ctx e1 in + ( Bindlib.box_apply + (fun new_e1 -> (EInj (new_e1, n, e_name, typs), Pos.get_position e)) + new_e1, + free_vars ) + | EMatch (e1, arms, e_name) -> + let new_e1, free_vars = closure_conversion_expr ctx e1 in + (* We do not close the clotures inside the arms of the match expression, + since they get a special treatment at compilation to Scalc. *) + let new_arms, free_vars = + List.fold_right + (fun arm (new_arms, free_vars) -> + match Pos.unmark arm with + | EAbs ((binder, binder_pos), typs) -> + let vars, body = Bindlib.unmbind binder in + let new_body, new_free_vars = + closure_conversion_expr ctx body + in + let new_binder = Bindlib.bind_mvar vars new_body in + ( Bindlib.box_apply + (fun new_binder -> + ( EAbs ((new_binder, binder_pos), typs), + Pos.get_position arm )) + new_binder + :: new_arms, + VarSet.union free_vars new_free_vars ) + | _ -> failwith "should not happen") + arms ([], free_vars) + in + ( Bindlib.box_apply2 + (fun new_e1 new_arms -> + (EMatch (new_e1, new_arms, e_name), Pos.get_position e)) + new_e1 + (Bindlib.box_list new_arms), + free_vars ) + | EArray args -> + let new_args, free_vars = + List.fold_right + (fun arg (new_args, free_vars) -> + let new_arg, new_free_vars = closure_conversion_expr ctx arg in + (new_arg :: new_args, VarSet.union free_vars new_free_vars)) + args ([], VarSet.empty) + in + ( Bindlib.box_apply + (fun new_args -> (EArray new_args, Pos.get_position e)) + (Bindlib.box_list new_args), + free_vars ) + | ELit l -> (Bindlib.box (ELit l, Pos.get_position e), VarSet.empty) + | EApp ((EAbs ((binder, binder_pos), typs_abs), e1_pos), args) -> + (* let-binding, we should not close these *) + let vars, body = Bindlib.unmbind binder in + let new_body, free_vars = closure_conversion_expr ctx body in + let new_binder = Bindlib.bind_mvar vars new_body in + let new_args, free_vars = + List.fold_right + (fun arg (new_args, free_vars) -> + let new_arg, new_free_vars = closure_conversion_expr ctx arg in + (new_arg :: new_args, VarSet.union free_vars new_free_vars)) + args ([], free_vars) + in + ( Bindlib.box_apply2 + (fun new_binder new_args -> + ( EApp + ((EAbs ((new_binder, binder_pos), typs_abs), e1_pos), new_args), + Pos.get_position e )) + new_binder + (Bindlib.box_list new_args), + free_vars ) + | EAbs ((binder, binder_pos), typs) -> + (* λ x.t *) + (* Converting the closure. *) + let vars, body = Bindlib.unmbind binder in + (* t *) + let new_body, body_vars = closure_conversion_expr ctx body in + (* [[t]] *) + let extra_vars = + VarSet.diff body_vars (VarSet.of_list (Array.to_list vars)) + in + let extra_vars_list = VarSet.elements extra_vars in + (* x1, ..., xn *) + let code_var = Var.make (ctx.name_context, binder_pos) in + (* code *) + let inner_c_var = Var.make ("env", binder_pos) in + let new_closure_body = + make_multiple_let_in + (Array.of_list extra_vars_list) + (List.init (List.length extra_vars_list) (fun _ -> + (Dcalc.Ast.TAny, binder_pos))) + (List.mapi + (fun i _ -> + Bindlib.box_apply + (fun inner_c_var -> + ( ETupleAccess + ( (inner_c_var, binder_pos), + i + 1, + None, + List.init + (List.length extra_vars_list + 1) + (fun _ -> (Dcalc.Ast.TAny, binder_pos)) ), + binder_pos )) + (Bindlib.box_var inner_c_var)) + extra_vars_list) + new_body binder_pos + in + let new_closure = + make_abs + (Array.concat [ Array.make 1 inner_c_var; vars ]) + new_closure_body binder_pos + ((Dcalc.Ast.TAny, binder_pos) :: typs) + (Pos.get_position e) + in + ( make_let_in code_var + (Dcalc.Ast.TAny, Pos.get_position e) + new_closure + (Bindlib.box_apply2 + (fun code_var extra_vars -> + ( ETuple + ( (code_var, binder_pos) + :: List.map + (fun extra_var -> (extra_var, binder_pos)) + extra_vars, + None ), + Pos.get_position e )) + (Bindlib.box_var code_var) + (Bindlib.box_list + (List.map + (fun extra_var -> Bindlib.box_var extra_var) + extra_vars_list))), + extra_vars ) + | EApp ((EOp op, pos_op), args) -> + (* This corresponds to an operator call, which we don't want to + transform*) + let new_args, free_vars = + List.fold_right + (fun arg (new_args, free_vars) -> + let new_arg, new_free_vars = closure_conversion_expr ctx arg in + (new_arg :: new_args, VarSet.union free_vars new_free_vars)) + args ([], VarSet.empty) + in + ( Bindlib.box_apply + (fun new_e2 -> (EApp ((EOp op, pos_op), new_e2), Pos.get_position e)) + (Bindlib.box_list new_args), + free_vars ) + | EApp ((EVar (v, _), v_pos), args) when VarSet.mem v ctx.globally_bound_vars + -> + (* This corresponds to a scope call, which we don't want to transform*) + let new_args, free_vars = + List.fold_right + (fun arg (new_args, free_vars) -> + let new_arg, new_free_vars = closure_conversion_expr ctx arg in + (new_arg :: new_args, VarSet.union free_vars new_free_vars)) + args ([], VarSet.empty) + in + ( Bindlib.box_apply2 + (fun new_v new_e2 -> + (EApp ((new_v, v_pos), new_e2), Pos.get_position e)) + (Bindlib.box_var v) + (Bindlib.box_list new_args), + free_vars ) + | EApp (e1, args) -> + let new_e1, free_vars = closure_conversion_expr ctx e1 in + let env_var = Var.make ("env", Pos.get_position e1) in + let code_var = Var.make ("code", Pos.get_position e1) in + let new_args, free_vars = + List.fold_right + (fun arg (new_args, free_vars) -> + let new_arg, new_free_vars = closure_conversion_expr ctx arg in + (new_arg :: new_args, VarSet.union free_vars new_free_vars)) + args ([], free_vars) + in + let call_expr = + make_let_in code_var + (Dcalc.Ast.TAny, Pos.get_position e) + (Bindlib.box_apply + (fun env_var -> + ( ETupleAccess + ((env_var, Pos.get_position e1), 0, None, [ (*TODO: fill?*) ]), + Pos.get_position e )) + (Bindlib.box_var env_var)) + (Bindlib.box_apply3 + (fun code_var env_var new_args -> + ( EApp + ( (code_var, Pos.get_position e1), + (env_var, Pos.get_position e1) :: new_args ), + Pos.get_position e )) + (Bindlib.box_var code_var) (Bindlib.box_var env_var) + (Bindlib.box_list new_args)) + in + ( make_let_in env_var (Dcalc.Ast.TAny, Pos.get_position e) new_e1 call_expr, + free_vars ) + | EAssert e1 -> + let new_e1, free_vars = closure_conversion_expr ctx e1 in + ( Bindlib.box_apply + (fun new_e1 -> (EAssert new_e1, Pos.get_position e)) + new_e1, + free_vars ) + | EOp op -> (Bindlib.box (EOp op, Pos.get_position e), VarSet.empty) + | EIfThenElse (e1, e2, e3) -> + let new_e1, free_vars1 = closure_conversion_expr ctx e1 in + let new_e2, free_vars2 = closure_conversion_expr ctx e2 in + let new_e3, free_vars3 = closure_conversion_expr ctx e3 in + ( Bindlib.box_apply3 + (fun new_e1 new_e2 new_e3 -> + (EIfThenElse (new_e1, new_e2, new_e3), Pos.get_position e)) + new_e1 new_e2 new_e3, + VarSet.union (VarSet.union free_vars1 free_vars2) free_vars3 ) + | ERaise except -> + (Bindlib.box (ERaise except, Pos.get_position e), VarSet.empty) + | ECatch (e1, except, e2) -> + let new_e1, free_vars1 = closure_conversion_expr ctx e1 in + let new_e2, free_vars2 = closure_conversion_expr ctx e2 in + ( Bindlib.box_apply2 + (fun new_e1 new_e2 -> + (ECatch (new_e1, except, new_e2), Pos.get_position e)) + new_e1 new_e2, + VarSet.union free_vars1 free_vars2 ) + +let closure_conversion (p : program) : program Bindlib.box * closure list = + let all_scope_variables = + List.fold_left + (fun acc scope -> VarSet.add scope.scope_body_var acc) + VarSet.empty p.scopes + in + let new_scopes, closures = + List.fold_left + (fun ((acc_new_scopes, acc_closures) : + scope_body Bindlib.box list * closure list) (scope : scope_body) -> + match Pos.unmark scope.scope_body_expr with + | EAbs ((binder, binder_pos), typs) -> + (* We do not hoist the outer-most EAbs which is the scope function + itself *) + let vars, body = Bindlib.unmbind binder in + let ctx = + { + name_context = + Pos.unmark + (Dcalc.Ast.ScopeName.get_info scope.scope_body_name); + globally_bound_vars = + VarSet.union all_scope_variables + (VarSet.of_list [ handle_default; handle_default_opt ]); + } + in + let new_body_expr, _ = closure_conversion_expr ctx body in + let new_binder = Bindlib.bind_mvar vars new_body_expr in + ( Bindlib.box_apply + (fun new_binder -> + { + scope with + scope_body_expr = + ( EAbs ((new_binder, binder_pos), typs), + Pos.get_position scope.scope_body_expr ); + }) + new_binder + :: acc_new_scopes, + [] @ acc_closures ) + | _ -> failwith "should not happen") + ([], []) p.scopes + in + ( Bindlib.box_apply + (fun new_scopes -> { p with scopes = List.rev new_scopes }) + (Bindlib.box_list new_scopes), + closures ) diff --git a/compiler/lcalc/compile_with_exceptions.ml b/compiler/lcalc/compile_with_exceptions.ml index f70682370..3b9c6bf20 100644 --- a/compiler/lcalc/compile_with_exceptions.ml +++ b/compiler/lcalc/compile_with_exceptions.ml @@ -147,32 +147,33 @@ and translate_expr (ctx : ctx) (e : D.expr Pos.marked) : | D.EDefault (exceptions, just, cons) -> translate_default ctx exceptions just cons (Pos.get_position e) +let rec translate_scopes + (decl_ctx : D.decl_ctx) (ctx : A.Var.t D.VarMap.t) (scopes : D.scopes) : + A.scope_body list = + match scopes with + | Nil -> [] + | ScopeDef scope_def -> + let scope_var, scope_next = Bindlib.unbind scope_def.scope_next in + let new_n = A.Var.make (Bindlib.name_of scope_var, Pos.no_pos) in + let new_scope = + { + Ast.scope_body_name = scope_def.scope_name; + scope_body_var = new_n; + scope_body_expr = + Bindlib.unbox + (translate_expr + (D.VarMap.map (fun v -> A.make_var (v, Pos.no_pos)) ctx) + (Bindlib.unbox + (D.build_whole_scope_expr decl_ctx scope_def.scope_body + (Pos.get_position + (Dcalc.Ast.ScopeName.get_info scope_def.scope_name))))); + } + in + let new_ctx = D.VarMap.add scope_var new_n ctx in + new_scope :: translate_scopes decl_ctx new_ctx scope_next + let translate_program (prgm : D.program) : A.program = { - scopes = - (let acc, _ = - List.fold_left - (fun ((acc, ctx) : _ * A.Var.t D.VarMap.t) (scope_name, n, e) -> - let new_n = A.Var.make (Bindlib.name_of n, Pos.no_pos) in - let new_acc = - { - Ast.scope_body_name = scope_name; - scope_body_var = new_n; - scope_body_expr = - Bindlib.unbox - (translate_expr - (D.VarMap.map (fun v -> A.make_var (v, Pos.no_pos)) ctx) - (Bindlib.unbox - (D.build_whole_scope_expr prgm.decl_ctx e - (Pos.get_position - (Dcalc.Ast.ScopeName.get_info scope_name))))); - } - :: acc - in - let new_ctx = D.VarMap.add n new_n ctx in - (new_acc, new_ctx)) - ([], D.VarMap.empty) prgm.scopes - in - List.rev acc); + scopes = translate_scopes prgm.decl_ctx D.VarMap.empty prgm.scopes; decl_ctx = prgm.decl_ctx; } diff --git a/compiler/lcalc/compile_without_exceptions.ml b/compiler/lcalc/compile_without_exceptions.ml index 28baa72fd..1ddd46725 100644 --- a/compiler/lcalc/compile_without_exceptions.ml +++ b/compiler/lcalc/compile_without_exceptions.ml @@ -17,7 +17,6 @@ open Utils module D = Dcalc.Ast module A = Ast -open Dcalc.Binded_representation (** The main idea around this pass is to compile Dcalc to Lcalc without using [raise EmptyError] nor [try _ with EmptyError -> _]. To do so, we use the @@ -392,7 +391,7 @@ and translate_expr ?(append_esome = true) (ctx : ctx) (e : D.expr Pos.marked) : A.make_matchopt pos_hoist v (D.TAny, pos_hoist) c' (A.make_none pos_hoist) acc) -let rec translate_scope_let (ctx : ctx) (lets : scope_lets) = +let rec translate_scope_let (ctx : ctx) (lets : D.scope_body_expr) = match lets with | Result e -> translate_expr ~append_esome:false ctx e | ScopeLet @@ -484,11 +483,11 @@ let rec translate_scope_let (ctx : ctx) (lets : scope_lets) = (translate_expr ctx ~append_esome:false expr) (translate_scope_let ctx' next) -let translate_scope_body (scope_pos : Pos.t) (ctx : ctx) (body : scope_body) : +let translate_scope_body (scope_pos : Pos.t) (ctx : ctx) (body : D.scope_body) : A.expr Pos.marked Bindlib.box = match body with | { - scope_body_result = result; + scope_body_expr = result; scope_body_input_struct = input_struct; scope_body_output_struct = _output_struct; } -> @@ -502,7 +501,7 @@ let translate_scope_body (scope_pos : Pos.t) (ctx : ctx) (body : scope_body) : [ (D.TTuple ([], Some input_struct), Pos.no_pos) ] Pos.no_pos -let rec translate_scopes (ctx : ctx) (scopes : scopes) : +let rec translate_scopes (ctx : ctx) (scopes : D.scopes) : Ast.scope_body list Bindlib.box = match scopes with | Nil -> Bindlib.box [] @@ -528,13 +527,13 @@ let rec translate_scopes (ctx : ctx) (scopes : scopes) : :: tail) new_body tail -let translate_scopes (ctx : ctx) (scopes : scopes) : Ast.scope_body list = +let translate_scopes (ctx : ctx) (scopes : D.scopes) : Ast.scope_body list = Bindlib.unbox (translate_scopes ctx scopes) let translate_program (prgm : D.program) : A.program = let inputs_structs = - ListLabels.fold_left prgm.scopes ~init:[] ~f:(fun acc (_, _, body) -> - body.D.scope_body_input_struct :: acc) + D.fold_scope_defs prgm.scopes ~init:[] ~f:(fun acc scope_def -> + scope_def.D.scope_body.scope_body_input_struct :: acc) in (* Cli.debug_print @@ Format.asprintf "List of structs to modify: [%a]" @@ -566,8 +565,7 @@ let translate_program (prgm : D.program) : A.program = in let scopes = - prgm.scopes |> bind_scopes |> Bindlib.unbox - |> translate_scopes { decl_ctx; vars = D.VarMap.empty } + prgm.scopes |> translate_scopes { decl_ctx; vars = D.VarMap.empty } in { scopes; decl_ctx } diff --git a/compiler/lcalc/optimizations.ml b/compiler/lcalc/optimizations.ml index ebd975343..832fe43b5 100644 --- a/compiler/lcalc/optimizations.ml +++ b/compiler/lcalc/optimizations.ml @@ -149,6 +149,15 @@ let rec peephole_expr (_ : unit) (e : expr Pos.marked) : | EApp ((EOp (Unop (Log _)), _), [ (ELit (LBool false), _) ]) -> e3 | _ -> default_mark @@ EIfThenElse (e1, e2, e3)) + | ECatch (e1, except, e2) -> ( + let+ e1 = peephole_expr () e1 and+ e2 = peephole_expr () e2 in + match (Pos.unmark e1, Pos.unmark e2) with + | ERaise except', ERaise except'' + when except' = except && except = except'' -> + default_mark @@ ERaise except + | ERaise except', _ when except' = except -> e2 + | _, ERaise except' when except' = except -> e1 + | _ -> default_mark @@ ECatch (e1, except, e2)) | _ -> visitor_map peephole_expr () e let peephole_optimizations (p : program) : program = diff --git a/compiler/scalc/compile_from_lambda.ml b/compiler/scalc/compile_from_lambda.ml index a02512d6f..4ffc5c68f 100644 --- a/compiler/scalc/compile_from_lambda.ml +++ b/compiler/scalc/compile_from_lambda.ml @@ -24,6 +24,7 @@ type ctxt = { decl_ctx : D.decl_ctx; var_dict : A.LocalName.t L.VarMap.t; inside_definition_of : A.LocalName.t option; + context_name : string; } (* Expressions can spill out side effect, hence this function also returns a @@ -94,8 +95,26 @@ let rec translate_expr (ctxt : ctxt) (expr : L.expr Pos.marked) : | L.EOp op -> ([], (A.EOp op, Pos.get_position expr)) | L.ELit l -> ([], (A.ELit l, Pos.get_position expr)) | _ -> - let tmp_var = A.LocalName.fresh ("local_var", Pos.get_position expr) in - let ctxt = { ctxt with inside_definition_of = Some tmp_var } in + let tmp_var = + A.LocalName.fresh + ( (*This piece of logic is used to make the code more readable. TODO: + should be removed when + https://github.com/CatalaLang/catala/issues/240 is fixed. *) + (match ctxt.inside_definition_of with + | None -> ctxt.context_name + | Some v -> + let v = Pos.unmark (A.LocalName.get_info v) in + let tmp_rex = Re.Pcre.regexp "^temp_" in + if Re.Pcre.pmatch ~rex:tmp_rex v then v else "temp_" ^ v), + Pos.get_position expr ) + in + let ctxt = + { + ctxt with + inside_definition_of = Some tmp_var; + context_name = Pos.unmark (A.LocalName.get_info tmp_var); + } + in let tmp_stmts = translate_statements ctxt expr in ( ( A.SLocalDecl ((tmp_var, Pos.get_position expr), (D.TAny, Pos.get_position expr)), @@ -150,7 +169,11 @@ and translate_statements (ctxt : ctxt) (block_expr : L.expr Pos.marked) : List.map (fun (x, _tau, arg) -> let ctxt = - { ctxt with inside_definition_of = Some (Pos.unmark x) } + { + ctxt with + inside_definition_of = Some (Pos.unmark x); + context_name = Pos.unmark (A.LocalName.get_info (Pos.unmark x)); + } in let arg_stmts, new_arg = translate_expr ctxt arg in arg_stmts @ [ (A.SLocalDef (x, new_arg), binder_pos) ]) @@ -165,7 +188,8 @@ and translate_statements (ctxt : ctxt) (block_expr : L.expr Pos.marked) : in let closure_name = match ctxt.inside_definition_of with - | None -> A.LocalName.fresh ("closure", Pos.get_position block_expr) + | None -> + A.LocalName.fresh (ctxt.context_name, Pos.get_position block_expr) | Some x -> x in let ctxt = @@ -258,6 +282,7 @@ and translate_statements (ctxt : ctxt) (block_expr : L.expr Pos.marked) : ]) let translate_scope + (scope_name : D.ScopeName.t) (decl_ctx : D.decl_ctx) (func_dict : A.TopLevelName.t L.VarMap.t) (scope_expr : L.expr Pos.marked) : @@ -280,7 +305,13 @@ let translate_scope in let new_body = translate_statements - { decl_ctx; func_dict; var_dict; inside_definition_of = None } + { + decl_ctx; + func_dict; + var_dict; + inside_definition_of = None; + context_name = Pos.unmark (D.ScopeName.get_info scope_name); + } body in (param_list, new_body) @@ -295,8 +326,8 @@ let translate_program (p : L.program) : A.program = List.fold_left (fun (func_dict, new_scopes) body -> let new_scope_params, new_scope_body = - translate_scope p.decl_ctx func_dict - body.Lcalc.Ast.scope_body_expr + translate_scope body.L.scope_body_name p.decl_ctx func_dict + body.L.scope_body_expr in let func_id = A.TopLevelName.fresh diff --git a/compiler/scalc/to_python.ml b/compiler/scalc/to_python.ml index e2b5cdb9c..bf735982f 100644 --- a/compiler/scalc/to_python.ml +++ b/compiler/scalc/to_python.ml @@ -191,10 +191,46 @@ let format_name_cleaned (fmt : Format.formatter) (s : string) : unit = let lowercase_name = avoid_keywords (to_ascii lowercase_name) in Format.fprintf fmt "%s" lowercase_name +module StringMap = Map.Make (String) +module IntMap = Map.Make (Int) + +(** For each `LocalName.t` defined by its string and then by its hash, we keep + track of which local integer id we've given it. This is used to keep + variable naming with low indices rather than one global counter for all + variables. TODO: should be removed when + https://github.com/CatalaLang/catala/issues/240 is fixed. *) +let string_counter_map : int IntMap.t StringMap.t ref = ref StringMap.empty + let format_var (fmt : Format.formatter) (v : LocalName.t) : unit = let v_str = Pos.unmark (LocalName.get_info v) in + let hash = LocalName.hash v in + let local_id = + match StringMap.find_opt v_str !string_counter_map with + | Some ids -> ( + match IntMap.find_opt hash ids with + | None -> + let max_id = + snd + (List.hd + (List.fast_sort + (fun (_, x) (_, y) -> Int.compare y x) + (IntMap.bindings ids))) + in + string_counter_map := + StringMap.add v_str + (IntMap.add hash (max_id + 1) ids) + !string_counter_map; + max_id + 1 + | Some local_id -> local_id) + | None -> + string_counter_map := + StringMap.add v_str (IntMap.singleton hash 0) !string_counter_map; + 0 + in if v_str = "_" then Format.fprintf fmt "_" - else Format.fprintf fmt "%a_%d" format_name_cleaned v_str (LocalName.hash v) + (* special case for the unit pattern *) + else if local_id = 0 then format_name_cleaned fmt v_str + else Format.fprintf fmt "%a_%d" format_name_cleaned v_str local_id let format_toplevel_name (fmt : Format.formatter) (v : TopLevelName.t) : unit = let v_str = Pos.unmark (TopLevelName.get_info v) in diff --git a/compiler/scopelang/scope_to_dcalc.ml b/compiler/scopelang/scope_to_dcalc.ml index dea172751..1fd3319e7 100644 --- a/compiler/scopelang/scope_to_dcalc.ml +++ b/compiler/scopelang/scope_to_dcalc.ml @@ -335,14 +335,16 @@ let rec translate_expr (ctx : ctx) (e : Ast.expr Pos.marked) : (** The result of a rule translation is a list of assignment, with variables and expressions. We also return the new translation context available after the - assignment to use in later rule translations. The list is actually a list of - list because we want to group in assignments that are independent of each - other to speed up the translation by minimizing Bindlib.bind_mvar *) + assignment to use in later rule translations. The list is actually a + continuation yielding a [Dcalc.scope_body_expr] by giving it what should + come later in the chain of let-bindings. *) let translate_rule (ctx : ctx) (rule : Ast.rule) ((sigma_name, pos_sigma) : Utils.Uid.MarkedString.info) : - Dcalc.Ast.scope_let list * ctx = + (Dcalc.Ast.scope_body_expr Bindlib.box -> + Dcalc.Ast.scope_body_expr Bindlib.box) + * ctx = match rule with | Definition ((ScopeVar a, var_def_pos), tau, a_io, e) -> let a_name = Ast.ScopeVar.get_info (Pos.unmark a) in @@ -367,14 +369,19 @@ let translate_rule (Dcalc.Ast.VarDef (Pos.unmark tau)) [ (sigma_name, pos_sigma); a_name ] in - ( [ - { - Dcalc.Ast.scope_let_var = (a_var, Pos.get_position a); - Dcalc.Ast.scope_let_typ = tau; - Dcalc.Ast.scope_let_expr = merged_expr; - Dcalc.Ast.scope_let_kind = Dcalc.Ast.ScopeVarDefinition; - }; - ], + ( (fun next -> + Bindlib.box_apply2 + (fun next merged_expr -> + Dcalc.Ast.ScopeLet + { + Dcalc.Ast.scope_let_next = next; + Dcalc.Ast.scope_let_typ = tau; + Dcalc.Ast.scope_let_expr = merged_expr; + Dcalc.Ast.scope_let_kind = Dcalc.Ast.ScopeVarDefinition; + Dcalc.Ast.scope_let_pos = Pos.get_position a; + }) + (Bindlib.bind_var a_var next) + merged_expr), { ctx with scope_vars = @@ -416,20 +423,25 @@ let translate_rule [ (Dcalc.Ast.TLit TUnit, var_def_pos) ] var_def_pos in - ( [ - { - Dcalc.Ast.scope_let_var = (a_var, Pos.get_position a_name); - Dcalc.Ast.scope_let_typ = - (match Pos.unmark a_io.io_input with - | NoInput -> failwith "should not happen" - | OnlyInput -> tau - | Reentrant -> - ( Dcalc.Ast.TArrow ((TLit TUnit, var_def_pos), tau), - var_def_pos )); - Dcalc.Ast.scope_let_expr = thunked_or_nonempty_new_e; - Dcalc.Ast.scope_let_kind = Dcalc.Ast.SubScopeVarDefinition; - }; - ], + ( (fun next -> + Bindlib.box_apply2 + (fun next thunked_or_nonempty_new_e -> + Dcalc.Ast.ScopeLet + { + Dcalc.Ast.scope_let_next = next; + Dcalc.Ast.scope_let_pos = Pos.get_position a_name; + Dcalc.Ast.scope_let_typ = + (match Pos.unmark a_io.io_input with + | NoInput -> failwith "should not happen" + | OnlyInput -> tau + | Reentrant -> + ( Dcalc.Ast.TArrow ((TLit TUnit, var_def_pos), tau), + var_def_pos )); + Dcalc.Ast.scope_let_expr = thunked_or_nonempty_new_e; + Dcalc.Ast.scope_let_kind = Dcalc.Ast.SubScopeVarDefinition; + }) + (Bindlib.bind_var a_var next) + thunked_or_nonempty_new_e), { ctx with subscope_vars = @@ -543,38 +555,51 @@ let translate_rule Some called_scope_return_struct ), pos_sigma ) in - let call_scope_let = - { - Dcalc.Ast.scope_let_var = (result_tuple_var, pos_sigma); - Dcalc.Ast.scope_let_kind = Dcalc.Ast.CallingSubScope; - Dcalc.Ast.scope_let_typ = result_tuple_typ; - Dcalc.Ast.scope_let_expr = call_expr; - } + let call_scope_let (next : Dcalc.Ast.scope_body_expr Bindlib.box) = + Bindlib.box_apply2 + (fun next call_expr -> + Dcalc.Ast.ScopeLet + { + Dcalc.Ast.scope_let_next = next; + Dcalc.Ast.scope_let_pos = pos_sigma; + Dcalc.Ast.scope_let_kind = Dcalc.Ast.CallingSubScope; + Dcalc.Ast.scope_let_typ = result_tuple_typ; + Dcalc.Ast.scope_let_expr = call_expr; + }) + (Bindlib.bind_var result_tuple_var next) + call_expr in - let result_bindings_lets = - List.mapi - (fun i (var_ctx, v) -> - { - Dcalc.Ast.scope_let_var = (v, pos_sigma); - Dcalc.Ast.scope_let_typ = (var_ctx.scope_var_typ, pos_sigma); - Dcalc.Ast.scope_let_kind = Dcalc.Ast.DestructuringSubScopeResults; - Dcalc.Ast.scope_let_expr = - Bindlib.box_apply - (fun r -> - ( Dcalc.Ast.ETupleAccess - ( r, - i, - Some called_scope_return_struct, - List.map - (fun (var_ctx, _) -> - (var_ctx.scope_var_typ, pos_sigma)) - all_subscope_output_vars_dcalc ), - pos_sigma )) - (Dcalc.Ast.make_var (result_tuple_var, pos_sigma)); - }) + let result_bindings_lets (next : Dcalc.Ast.scope_body_expr Bindlib.box) = + List.fold_right + (fun (var_ctx, v) (next, i) -> + ( Bindlib.box_apply2 + (fun next r -> + Dcalc.Ast.ScopeLet + { + Dcalc.Ast.scope_let_next = next; + Dcalc.Ast.scope_let_pos = pos_sigma; + Dcalc.Ast.scope_let_typ = + (var_ctx.scope_var_typ, pos_sigma); + Dcalc.Ast.scope_let_kind = + Dcalc.Ast.DestructuringSubScopeResults; + Dcalc.Ast.scope_let_expr = + ( Dcalc.Ast.ETupleAccess + ( r, + i, + Some called_scope_return_struct, + List.map + (fun (var_ctx, _) -> + (var_ctx.scope_var_typ, pos_sigma)) + all_subscope_output_vars_dcalc ), + pos_sigma ); + }) + (Bindlib.bind_var v next) + (Dcalc.Ast.make_var (result_tuple_var, pos_sigma)), + i - 1 )) all_subscope_output_vars_dcalc + (next, List.length all_subscope_output_vars_dcalc - 1) in - ( call_scope_let :: result_bindings_lets, + ( (fun next -> call_scope_let (fst (result_bindings_lets next))), { ctx with subscope_vars = @@ -589,24 +614,28 @@ let translate_rule } ) | Assertion e -> let new_e = translate_expr ctx e in - ( [ - { - Dcalc.Ast.scope_let_var = - (Dcalc.Ast.Var.make ("_", Pos.get_position e), Pos.get_position e); - Dcalc.Ast.scope_let_typ = (Dcalc.Ast.TLit TUnit, Pos.get_position e); - Dcalc.Ast.scope_let_expr = - (* To ensure that we throw an error if the value is not defined, - we add an check "ErrorOnEmpty" here. *) - Bindlib.box_apply - (fun new_e -> - Pos.same_pos_as - (Dcalc.Ast.EAssert - (Dcalc.Ast.ErrorOnEmpty new_e, Pos.get_position e)) - e) - new_e; - Dcalc.Ast.scope_let_kind = Dcalc.Ast.Assertion; - }; - ], + ( (fun next -> + Bindlib.box_apply2 + (fun next new_e -> + Dcalc.Ast.ScopeLet + { + Dcalc.Ast.scope_let_next = next; + Dcalc.Ast.scope_let_pos = Pos.get_position e; + Dcalc.Ast.scope_let_typ = + (Dcalc.Ast.TLit TUnit, Pos.get_position e); + Dcalc.Ast.scope_let_expr = + (* To ensure that we throw an error if the value is not + defined, we add an check "ErrorOnEmpty" here. *) + Pos.same_pos_as + (Dcalc.Ast.EAssert + (Dcalc.Ast.ErrorOnEmpty new_e, Pos.get_position e)) + new_e; + Dcalc.Ast.scope_let_kind = Dcalc.Ast.Assertion; + }) + (Bindlib.bind_var + (Dcalc.Ast.Var.make ("_", Pos.get_position e)) + next) + new_e), ctx ) let translate_rules @@ -614,15 +643,16 @@ let translate_rules (rules : Ast.rule list) ((sigma_name, pos_sigma) : Utils.Uid.MarkedString.info) (sigma_return_struct_name : Ast.StructName.t) : - Dcalc.Ast.scope_let list * Dcalc.Ast.expr Pos.marked Bindlib.box * ctx = + Dcalc.Ast.scope_body_expr Bindlib.box * ctx = let scope_lets, new_ctx = List.fold_left (fun (scope_lets, ctx) rule -> let new_scope_lets, new_ctx = translate_rule ctx rule (sigma_name, pos_sigma) in - (scope_lets @ new_scope_lets, new_ctx)) - ([], ctx) rules + ((fun next -> scope_lets (new_scope_lets next)), new_ctx)) + ((fun next -> next), ctx) + rules in let scope_variables = Ast.ScopeVarMap.bindings new_ctx.scope_vars in let scope_output_variables = @@ -640,14 +670,19 @@ let translate_rules Dcalc.Ast.make_var (dcalc_var, pos_sigma)) scope_output_variables)) in - (scope_lets, return_exp, new_ctx) + ( scope_lets + (Bindlib.box_apply + (fun return_exp -> Dcalc.Ast.Result return_exp) + return_exp), + new_ctx ) let translate_scope_decl (struct_ctx : Ast.struct_ctx) (enum_ctx : Ast.enum_ctx) (sctx : scope_sigs_ctx) (scope_name : Ast.ScopeName.t) - (sigma : Ast.scope_decl) : Dcalc.Ast.scope_body * Dcalc.Ast.struct_ctx = + (sigma : Ast.scope_decl) : + Dcalc.Ast.scope_body Bindlib.box * Dcalc.Ast.struct_ctx = let sigma_info = Ast.ScopeName.get_info sigma.scope_decl_name in let scope_sig = Ast.ScopeMap.find sigma.scope_decl_name sctx in let scope_variables = scope_sig.scope_sig_local_vars in @@ -679,7 +714,7 @@ let translate_scope_decl let scope_input_struct_name = scope_sig.scope_sig_input_struct in let scope_return_struct_name = scope_sig.scope_sig_output_struct in let pos_sigma = Pos.get_position sigma_info in - let rules, return_exp, ctx = + let rules_with_return_expr, ctx = translate_rules ctx sigma.scope_decl_rules sigma_info scope_return_struct_name in @@ -716,27 +751,34 @@ let translate_scope_decl pos_sigma ) | NoInput -> failwith "should not happen" in - let input_destructurings = - List.mapi - (fun i (var_ctx, v) -> - { - Dcalc.Ast.scope_let_kind = Dcalc.Ast.DestructuringInputStruct; - Dcalc.Ast.scope_let_var = (v, pos_sigma); - Dcalc.Ast.scope_let_typ = input_var_typ var_ctx; - Dcalc.Ast.scope_let_expr = - Bindlib.box_apply - (fun r -> - ( Dcalc.Ast.ETupleAccess - ( r, - i, - Some scope_input_struct_name, - List.map - (fun (var_ctx, _) -> input_var_typ var_ctx) - scope_input_variables ), - pos_sigma )) - (Dcalc.Ast.make_var (scope_input_var, pos_sigma)); - }) - scope_input_variables + let input_destructurings (next : Dcalc.Ast.scope_body_expr Bindlib.box) = + fst + (List.fold_right + (fun (var_ctx, v) (next, i) -> + ( Bindlib.box_apply2 + (fun next r -> + Dcalc.Ast.ScopeLet + { + Dcalc.Ast.scope_let_kind = + Dcalc.Ast.DestructuringInputStruct; + Dcalc.Ast.scope_let_next = next; + Dcalc.Ast.scope_let_pos = pos_sigma; + Dcalc.Ast.scope_let_typ = input_var_typ var_ctx; + Dcalc.Ast.scope_let_expr = + ( Dcalc.Ast.ETupleAccess + ( r, + i, + Some scope_input_struct_name, + List.map + (fun (var_ctx, _) -> input_var_typ var_ctx) + scope_input_variables ), + pos_sigma ); + }) + (Bindlib.bind_var v next) + (Dcalc.Ast.make_var (scope_input_var, pos_sigma)), + i - 1 )) + scope_input_variables + (next, List.length scope_input_variables - 1)) in let scope_return_struct_fields = List.map @@ -761,13 +803,15 @@ let translate_scope_decl (Ast.StructMap.singleton scope_return_struct_name scope_return_struct_fields) in - ( { - Dcalc.Ast.scope_body_lets = input_destructurings @ rules; - Dcalc.Ast.scope_body_result = return_exp; - Dcalc.Ast.scope_body_input_struct = scope_input_struct_name; - Dcalc.Ast.scope_body_output_struct = scope_return_struct_name; - Dcalc.Ast.scope_body_arg = scope_input_var; - }, + ( Bindlib.box_apply + (fun scope_body_expr -> + { + Dcalc.Ast.scope_body_expr; + Dcalc.Ast.scope_body_input_struct = scope_input_struct_name; + Dcalc.Ast.scope_body_output_struct = scope_return_struct_name; + }) + (Bindlib.bind_var scope_input_var + (input_destructurings rules_with_return_expr)), new_struct_ctx ) let translate_program (prgm : Ast.program) : @@ -844,18 +888,9 @@ let translate_program (prgm : Ast.program) : in (* the resulting expression is the list of definitions of all the scopes, ending with the top-level scope. *) - let (scopes, decl_ctx) - : (Ast.ScopeName.t * Dcalc.Ast.expr Bindlib.var * Dcalc.Ast.scope_body) - list - * _ = + let (scopes, decl_ctx) : Dcalc.Ast.scopes Bindlib.box * _ = List.fold_right - (fun scope_name - ((scopes, decl_ctx) : - (Ast.ScopeName.t - * Dcalc.Ast.expr Bindlib.var - * Dcalc.Ast.scope_body) - list - * _) -> + (fun scope_name (scopes, decl_ctx) -> let scope = Ast.ScopeMap.find scope_name prgm.program_scopes in let scope_body, scope_out_struct = translate_scope_decl struct_ctx enum_ctx sctx scope_name scope @@ -870,7 +905,15 @@ let translate_program (prgm : Ast.program) : decl_ctx.Dcalc.Ast.ctx_structs scope_out_struct; } in - ((scope_name, dvar, scope_body) :: scopes, decl_ctx)) - scope_ordering ([], decl_ctx) + let scope_next = Bindlib.bind_var dvar scopes in + let new_scopes = + Bindlib.box_apply2 + (fun scope_body scope_next -> + Dcalc.Ast.ScopeDef { scope_name; scope_body; scope_next }) + scope_body scope_next + in + (new_scopes, decl_ctx)) + scope_ordering + (Bindlib.box Dcalc.Ast.Nil, decl_ctx) in - ({ scopes; decl_ctx }, types_ordering) + ({ scopes = Bindlib.unbox scopes; decl_ctx }, types_ordering) diff --git a/compiler/utils/cli.ml b/compiler/utils/cli.ml index f64ff46ce..51d837957 100644 --- a/compiler/utils/cli.ml +++ b/compiler/utils/cli.ml @@ -115,6 +115,12 @@ let avoid_exceptions = & info [ "avoid_exceptions" ] ~doc:"Compiles the default calculus without exceptions") +let closure_conversion = + Arg.( + value & flag + & info [ "closure_conversion" ] + ~doc:"Performs closure conversion on the lambda calculus") + let wrap_weaved_output = Arg.( value & flag @@ -186,6 +192,7 @@ type options = { optimize : bool; ex_scope : string option; output_file : string option; + closure_conversion : bool; } let options = @@ -194,6 +201,7 @@ let options = unstyled wrap_weaved_output avoid_exceptions + closure_conversion backend language max_prec_digits @@ -215,11 +223,12 @@ let options = optimize; ex_scope; output_file; + closure_conversion; } in Term.( const make $ debug $ unstyled $ wrap_weaved_output $ avoid_exceptions - $ backend $ language $ max_prec_digits_opt $ trace_opt + $ closure_conversion $ backend $ language $ max_prec_digits_opt $ trace_opt $ disable_counterexamples_opt $ optimize $ ex_scope $ output) let catala_t f = Term.(const f $ file $ options) diff --git a/compiler/utils/cli.mli b/compiler/utils/cli.mli index b2da8f660..d7fa772c8 100644 --- a/compiler/utils/cli.mli +++ b/compiler/utils/cli.mli @@ -90,6 +90,7 @@ type options = { optimize : bool; ex_scope : string option; output_file : string option; + closure_conversion : bool; } (** {2 Command-line application} *) diff --git a/compiler/verification/conditions.ml b/compiler/verification/conditions.ml index 9471f77c6..a62047f72 100644 --- a/compiler/verification/conditions.ml +++ b/compiler/verification/conditions.ml @@ -25,7 +25,12 @@ type vc_return = expr Pos.marked * typ Pos.marked VarMap.t (** The return type of VC generators is the VC expression plus the types of any locally free variable inside that expression. *) -type ctx = { decl : decl_ctx; input_vars : Var.t list } +type ctx = { + current_scope_name : ScopeName.t; + decl : decl_ctx; + input_vars : Var.t list; + scope_variables_typs : typ Pos.marked VarMap.t; +} let conjunction (args : vc_return list) (pos : Pos.t) : vc_return = let acc, list = @@ -298,86 +303,143 @@ type verification_condition = { vc_free_vars_typ : typ Pos.marked VarMap.t; } -let generate_verification_conditions - (p : program) (s : Dcalc.Ast.ScopeName.t option) : +let rec generate_verification_conditions_scope_body_expr + (ctx : ctx) (scope_body_expr : scope_body_expr) : + ctx * verification_condition list = + match scope_body_expr with + | Result _ -> (ctx, []) + | ScopeLet scope_let -> + let scope_let_var, scope_let_next = + Bindlib.unbind scope_let.scope_let_next + in + let new_ctx, vc_list = + match scope_let.scope_let_kind with + | DestructuringInputStruct -> + ({ ctx with input_vars = scope_let_var :: ctx.input_vars }, []) + | ScopeVarDefinition | SubScopeVarDefinition -> + (* For scope variables, we should check both that they never + evaluate to emptyError nor conflictError. But for subscope + variable definitions, what we're really doing is adding + exceptions to something defined in the subscope so we just ought + to verify only that the exceptions overlap. *) + let e = + match_and_ignore_outer_reentrant_default ctx + scope_let.scope_let_expr + in + let vc_confl, vc_confl_typs = + generate_vs_must_not_return_confict ctx e + in + let vc_confl = + if !Cli.optimize_flag then + Bindlib.unbox (Optimizations.optimize_expr ctx.decl vc_confl) + else vc_confl + in + let vc_list = + [ + { + vc_guard = Pos.same_pos_as (Pos.unmark vc_confl) e; + vc_kind = NoOverlappingExceptions; + vc_free_vars_typ = + VarMap.union + (fun _ _ -> failwith "should not happen") + ctx.scope_variables_typs vc_confl_typs; + vc_scope = ctx.current_scope_name; + vc_variable = (scope_let_var, scope_let.scope_let_pos); + }; + ] + in + let vc_list = + match scope_let.scope_let_kind with + | ScopeVarDefinition -> + let vc_empty, vc_empty_typs = + generate_vc_must_not_return_empty ctx e + in + let vc_empty = + if !Cli.optimize_flag then + Bindlib.unbox + (Optimizations.optimize_expr ctx.decl vc_empty) + else vc_empty + in + { + vc_guard = Pos.same_pos_as (Pos.unmark vc_empty) e; + vc_kind = NoEmptyError; + vc_free_vars_typ = + VarMap.union + (fun _ _ -> failwith "should not happen") + ctx.scope_variables_typs vc_empty_typs; + vc_scope = ctx.current_scope_name; + vc_variable = (scope_let_var, scope_let.scope_let_pos); + } + :: vc_list + | _ -> vc_list + in + (ctx, vc_list) + | _ -> (ctx, []) + in + let new_ctx, new_vcs = + generate_verification_conditions_scope_body_expr + { + new_ctx with + scope_variables_typs = + VarMap.add scope_let_var scope_let.scope_let_typ + new_ctx.scope_variables_typs; + } + scope_let_next + in + (new_ctx, vc_list @ new_vcs) + +let rec generate_verification_conditions_scopes + (decl_ctx : decl_ctx) (scopes : scopes) (s : ScopeName.t option) : verification_condition list = - List.fold_left - (fun acc (s_name, _s_var, s_body) -> + match scopes with + | Nil -> [] + | ScopeDef scope_def -> let is_selected_scope = match s with - | Some s when Dcalc.Ast.ScopeName.compare s s_name = 0 -> true + | Some s when Dcalc.Ast.ScopeName.compare s scope_def.scope_name = 0 -> + true | None -> true | _ -> false in - if is_selected_scope then - let ctx = { decl = p.decl_ctx; input_vars = [] } in - let acc, _ = - List.fold_left - (fun (acc, ctx) s_let -> - match s_let.scope_let_kind with - | DestructuringInputStruct -> - ( acc, - { - ctx with - input_vars = - Pos.unmark s_let.scope_let_var :: ctx.input_vars; - } ) - | ScopeVarDefinition | SubScopeVarDefinition -> - (* For scope variables, we should check both that they never - evaluate to emptyError nor conflictError. But for subscope - variable definitions, what we're really doing is adding - exceptions to something defined in the subscope so we just - ought to verify only that the exceptions overlap. *) - let e = - match_and_ignore_outer_reentrant_default ctx - (Bindlib.unbox s_let.scope_let_expr) - in - let vc_confl, vc_confl_typs = - generate_vs_must_not_return_confict ctx e - in - let vc_confl = - if !Cli.optimize_flag then - Bindlib.unbox - (Optimizations.optimize_expr p.decl_ctx vc_confl) - else vc_confl - in - let vc_list = - [ - { - vc_guard = Pos.same_pos_as (Pos.unmark vc_confl) e; - vc_kind = NoOverlappingExceptions; - vc_free_vars_typ = vc_confl_typs; - vc_scope = s_name; - vc_variable = s_let.scope_let_var; - }; - ] - in - let vc_list = - match s_let.scope_let_kind with - | ScopeVarDefinition -> - let vc_empty, vc_empty_typs = - generate_vc_must_not_return_empty ctx e - in - let vc_empty = - if !Cli.optimize_flag then - Bindlib.unbox - (Optimizations.optimize_expr p.decl_ctx vc_empty) - else vc_empty - in - { - vc_guard = Pos.same_pos_as (Pos.unmark vc_empty) e; - vc_kind = NoEmptyError; - vc_free_vars_typ = vc_empty_typs; - vc_scope = s_name; - vc_variable = s_let.scope_let_var; - } - :: vc_list - | _ -> vc_list - in - (vc_list @ acc, ctx) - | _ -> (acc, ctx)) - (acc, ctx) s_body.scope_body_lets - in - acc - else acc) - [] p.scopes + let vcs = + if is_selected_scope then + let _scope_input_var, scope_body_expr = + Bindlib.unbind scope_def.scope_body.scope_body_expr + in + let ctx = + { + current_scope_name = scope_def.scope_name; + decl = decl_ctx; + input_vars = []; + scope_variables_typs = + VarMap.empty + (* We don't need to add the typ of the scope input var here + because it will never appear in an expression for which we + generate a verification conditions (the big struct is + destructured with a series of let bindings just after. )*); + } + in + let _, vcs = + generate_verification_conditions_scope_body_expr ctx scope_body_expr + in + vcs + else [] + in + let _scope_var, next = Bindlib.unbind scope_def.scope_next in + generate_verification_conditions_scopes decl_ctx next s @ vcs + +let generate_verification_conditions + (p : program) (s : Dcalc.Ast.ScopeName.t option) : + verification_condition list = + let vcs = generate_verification_conditions_scopes p.decl_ctx p.scopes s in + (* We sort this list by scope name and then variable name to ensure consistent + output for testing*) + List.sort + (fun vc1 vc2 -> + let to_str vc = + Format.asprintf "%s.%s" + (Format.asprintf "%a" ScopeName.format_t vc.vc_scope) + (Bindlib.name_of (Pos.unmark vc.vc_variable)) + in + String.compare (to_str vc1) (to_str vc2)) + vcs diff --git a/compiler/verification/solver.ml b/compiler/verification/solver.ml index d32376d21..77b533125 100644 --- a/compiler/verification/solver.ml +++ b/compiler/verification/solver.ml @@ -20,9 +20,8 @@ open Dcalc.Ast expressions [vcs] corresponding to verification conditions that must be discharged by Z3, and attempts to solve them **) let solve_vc - (prgm : program) - (decl_ctx : decl_ctx) - (vcs : Conditions.verification_condition list) : unit = + (decl_ctx : decl_ctx) (vcs : Conditions.verification_condition list) : unit + = (* Right now we only use the Z3 backend but the functorial interface should make it easy to mix and match different proof backends. *) Z3backend.Io.init_backend (); @@ -34,12 +33,7 @@ let solve_vc let ctx, z3_vc = Z3backend.Io.translate_expr (Z3backend.Io.make_context decl_ctx - (VarMap.union - (fun _ _ _ -> - failwith - "[Proof encoding]: A Variable cannot be both free \ - and bound") - (variable_types prgm) vc.Conditions.vc_free_vars_typ)) + vc.Conditions.vc_free_vars_typ) (Bindlib.unbox (Dcalc.Optimizations.remove_all_logs vc.Conditions.vc_guard)) in diff --git a/compiler/verification/solver.mli b/compiler/verification/solver.mli index a9ea66cbb..8c972cb1f 100644 --- a/compiler/verification/solver.mli +++ b/compiler/verification/solver.mli @@ -17,7 +17,4 @@ (** Solves verification conditions using various proof backends *) val solve_vc : - Dcalc.Ast.program -> - Dcalc.Ast.decl_ctx -> - Conditions.verification_condition list -> - unit + Dcalc.Ast.decl_ctx -> Conditions.verification_condition list -> unit diff --git a/french_law/js/french_law.js b/french_law/js/french_law.js index 4fe92a56f..d50cd5a24 100644 --- a/french_law/js/french_law.js +++ b/french_law/js/french_law.js @@ -1,136 +1,141 @@ -// Generated by js_of_ocaml 3.8.0 -(function(D){"use strict";var -iu=214,it=" is too large for shifting.",jI="Invalid_argument",is="0.08",ee="Map.bal",ja=640,A="Code de la s\xc3\xa9curit\xc3\xa9 sociale",ki="Article L521-1",ev=123,jH="577500",i$=152,jG="%ni",kh=43200.,fX="ml_z_overflow",V=86400.,aE=2020,i_=139,aQ=0xff,f6=-12,jF=-45,eu="Titre 5 : Dispositions particuli\xc3\xa8res \xc3\xa0 la Guadeloupe, \xc3\xa0 la Guyane, \xc3\xa0 la Martinique, \xc3\xa0 La R\xc3\xa9union, \xc3\xa0 Saint-Barth\xc3\xa9lemy et \xc3\xa0 Saint-Martin",kg="559500",bW="Article 1",dq=122,ir="582700",kf=992015837,k="0",i9="0.5",bB=128,iq="Sys_blocked_io",i8="fd ",ip=548,fW="Chapitre 2 : Champ d'application",io="0.0588",P=248,eE=">",bg=153,ke=1027,jE="562800",bV="Chapitre 5 : Prestations familiales et prestations assimil\xc3\xa9es",im=246,jD=555,ik=598,il="%u",jC="resetLog",cB=2011,f="AllocationsFamiliales",jB=3268,i7=633,ij="./securite_sociale_R.catala_fr",G="Livre 5 : Prestations familiales et prestations assimil\xc3\xa9es",et=108,ax="2",bt=127,di=1024,es=-2147483648,T="1",ey=133,eD="e",fV="Montant de la base mensuelle des allocations familiales",ii=" : flags Open_rdonly and Open_wronly are not compatible",i6="([^/]*)",ih="D\xc3\xa9cret n\xc2\xb0 2019-1387 du 18 d\xc3\xa9cembre 2019 portant rel\xc3\xa8vement du salaire minimum de croissance",aA="-",kd=505,bR=803994948,ie=216,ig=" : file already exists",kc="smic",jA=184,bz=0xffffff,cv=2012,ka=-43,kb=612,ap="./securite_sociale_D.catala_fr",er=86400,i5="Out_of_memory",j$="inf",f5="index out of bounds",eq="_bigarr02",j_="Circulaire interminist\xc3\xa9rielle N\xc2\xb0 DSS/SD2B/2017/352 du 22 d\xc3\xa9cembre 2017 relative \xc3\xa0 la revalorisation au 1er janvier 2018 des plafonds de ressources d\xe2\x80\x99attribution de certaines prestations familiales servies en m\xc3\xa9tropole, en Guadeloupe, en Guyane, en Martinique, \xc3\xa0 la R\xc3\xa9union, \xc3\xa0 Saint-Barth\xc3\xa9lemy, \xc3\xa0 Saint-Martin et \xc3\xa0 Mayotte",i4=0xffffffff,dp=111,f_=2147483647,jz=208,j9=180,id="Martinique",bc=0xffff,ep=417088404,ic=12520,i3=400,j8=619,ib=-46,aI=3600,eo=143,K="Chapitre 1er : Allocations familiales",f9="AllocationFamilialesAvril2008",cp=2016,jy="retrieveLog",bb="\xc3\xa2ge_minimum_alin\xc3\xa9a_1_l521_3",j7="infinity",aW=1000,i2=142,t="",fU="^",bQ=3600.,ia=86400000,i1=264,ag="Partie l\xc3\xa9gislative",co=0x3f,df=124,c9="./epilogue.catala_fr",f4="Article L512-3",u="./decrets_divers.catala_fr",M="Titre 2 : Prestations g\xc3\xa9n\xc3\xa9rales d'entretien",dn=112,h$="Match_failure",jx=140,bS="Montant des plafonds de ressources",L="Annexe",i0=135,ba=2021,iZ="enfant_le_plus_\xc3\xa2g\xc3\xa9",f3=252,bu=".",c8="montant_initial_majoration",bs="+",iY=0xf0,aX="12.",iX="Guadeloupe",ge=110,ao="PrestationsFamiliales",f2=116,h_="%li",iW=576,cx=2015,en=365,by="prise_en_compte",fT="Smic",gd=-32,bf=1023,iV=-1080,ah="./securite_sociale_L.catala_fr",o="./prologue.catala_fr",ed=2299161,iU=969837588,f8="nan",j6=605,h9=0xe0,iT=-1023,j5=117,jw=0xdfff,dm="compl\xc3\xa9ment_d\xc3\xa9gressif",f1="Article L755-12",bx="/",j4="Assert_failure",ec=2400000.5,j3="568400",iS=541,j2="0.32",f7=1073741823,eb=250,de=1582,jv=513,h8=115,ju="src/time_Zone.ml",j1=1e14,iR="Arr\xc3\xaat\xc3\xa9 du 14 d\xc3\xa9cembre 2020 relatif au montant des plafonds de ressources de certaines prestations familiales et aux tranches du bar\xc3\xa8me applicable au recouvrement des indus et \xc3\xa0 la saisie des prestations",jt="Guyane",h7="allocations_familiales",fS=1255,f0="<",iP=196,iQ=0x800,cw=255,aH=2019,fR="jsError",a$=0x8000,js="Partie r\xc3\xa9glementaire - D\xc3\xa9crets en Conseil d'Etat",U="droit_ouvert_majoration",dl=146097,cA=256,iO=0.012,j0="Article L521-3",jr="End_of_file",iN="M\xc3\xa9tropole",em=156,jq="Failure",h6=129,iM=204,dd="conditions_hors_\xc3\xa2ge",jp=218,iL=534,J="Dispositions sp\xc3\xa9ciales relatives \xc3\xa0 Mayotte",iK=562,jZ=315,gc="EnfantLePlus\xc3\x82g\xc3\xa9",fZ=0xf,ea=-48,jo=0xdc00,dc="montant_initial_m\xc3\xa9tropole_majoration",am="camlinternalFormat.ml",iJ="Division_by_zero",fY=520,jn="Sys_error",jX=647,jY="x",jW=335,cn=2017,dh="Article D521-2",eC="Article D755-5",fQ="Titre 1 : Champ d'application - G\xc3\xa9n\xc3\xa9ralit\xc3\xa9s",bw=60.,cu=2014,jV="%d",h5=32082,bU=1900,d$=121,jU="buffer.ml",iI=119,db="montant_avec_garde_altern\xc3\xa9e_majoration",iH="version_avril_2008",bP=120,el=127686388,b7=103,fP="16",cs=2013,ct=102,fO=512,jT=527,cz=113,h4=0x7ff0,s="D\xc3\xa9crets divers",ek=101,ex=132,h3="0x",h2="D\xc3\xa9cret n\xc2\xb0 2020-1598 du 16 d\xc3\xa9cembre 2020 portant rel\xc3\xa8vement du salaire minimum de croissance",b6=1e7,n="Prologue",da=254,aO=100,jm="Article 7",iG=" : flags Open_text and Open_binary are not compatible",jl="%Li",eB="3",an="Partie r\xc3\xa9glementaire - D\xc3\xa9crets simples",h1=105,jR="169.",jS=230,h0="Instruction interminist\xc3\xa9rielle n\xc2\xb0 DSS/SD2B/2018/279 du 17 d\xc3\xa9cembre 2018 relative \xc3\xa0 la revalorisation au 1er janvier 2019 des plafonds de ressources d\xe2\x80\x99attribution de certaines prestations familiales servies en m\xc3\xa9tropole, en Guadeloupe, en Guyane, en Martinique, \xc3\xa0 la R\xc3\xa9union, \xc3\xa0 Saint-Barth\xc3\xa9lemy, \xc3\xa0 Saint-Martin et \xc3\xa0 Mayotte",jk=591,bT=0.5,iF=584,a3="Article D521-1",iE="Instruction interministerielle no DSS/SD2B/2019/261 du 18 d\xc3\xa9cembre 2019 relative \xc3\xa0 la revalorisation au 1er janvier 2020 des plafonds de ressources d\xe2\x80\x99attribution de certaines prestations familiales servies en m\xc3\xa9tropole, en Guadeloupe, en Guyane, en Martinique, \xc3\xa0 La R\xc3\xa9union, \xc3\xa0 Saint-Barth\xc3\xa9lemy, \xc3\xa0 Saint-Martin et \xc3\xa0 Mayotte",iD=188,bA="Livre 7 : R\xc3\xa9gimes divers - Dispositions diverses",aw="input",hZ="str.ml",iC=160,jQ="prestations_familiales",dk="est_enfant_le_plus_\xc3\xa2g\xc3\xa9",iB="0.0463",hY="D\xc3\xa9cret n\xc2\xb0 2018-1173 du 19 d\xc3\xa9cembre 2018 portant rel\xc3\xa8vement du salaire minimum de croissance",ew="_z",jO="Unix.Unix_error",jP="computeAllocationsFamiliales",iA="0.55",c$="droit_ouvert",ej=109,jj=136,jN="Stack_overflow",ei="Interface du programme",c7="Titre 5 : D\xc3\xa9partements d'outre-mer",iz=-97,jM="Not_found",c_=1461,a2="InterfaceAllocationsFamiliales",fN=151,I="D\xc3\xa9cret n\xc2\xb02002-423 du 29 mars 2002 relatif aux prestations familiales \xc3\xa0 Mayotte",cr="1.",jh=32044,ji=", ",hX=626,bd=2018,jg="static/",jL="Mayotte",gb=243,iy=2440588,jf="src/date.ml",jK=32752,eh=141,c6="\xc3\x89pilogue",jJ=1026,be="Article L521-2",eA="Invalid integer: ",eg=2440587.5,je=359,ef=155,jd=258,bv=" ",aY=0x80,jc="Undefined_recursive_module",ay="output",ix=569,iw=215,ez="src/calendar_builder.ml",cq="Montant du salaire minimum de croissance",ga="compare: functional value",fM="0.16",dg="droit_ouvert_forfaitaire",dj="0.",d_=134,jb="%i",f$=114,cy=529348384,iv=426;function -Dm(d,b,e,c,f){if(c<=b)for(var +// Generated by js_of_ocaml 4.0.0 +(function(a){typeof +globalThis!=="object"&&(this?b():(a.defineProperty(a.prototype,"_T_",{configurable:true,get:b}),_T_));function +b(){var +b=this||self;b.globalThis=b;delete +a.prototype._T_}}(Object));(function(s){"use strict";var +Gl=s,Go=typeof +module==="object"&&module.exports||s,jj=214,ji=" is too large for shifting.",lb="Invalid_argument",jh="0.08",eq="Map.bal",jg="@[",kq=640,x="Code de la s\xc3\xa9curit\xc3\xa9 sociale",l3="Article L521-1",kp=123,la="577500",ko=152,k$="%ni",l2=43200.,ga="ml_z_overflow",l1="EMFILE",W=86400.,aE=2020,kn=139,aU=0xff,k_="ENOMEM",gk=-12,k9=-45,eC="Titre 5 : Dispositions particuli\xc3\xa8res \xc3\xa0 la Guadeloupe, \xc3\xa0 la Guyane, \xc3\xa0 la Martinique, \xc3\xa0 La R\xc3\xa9union, \xc3\xa0 Saint-Barth\xc3\xa9lemy et \xc3\xa0 Saint-Martin",l0="559500",b1="Article 1",gC=122,jf="582700",lZ=992015837,k8="EPROTONOSUPPORT",k="0",k7="ENETRESET",lY="EACCES",k6="EINVAL",km="0.5",k5="EDOM",cb=128,je="Sys_blocked_io",kl="fd ",k4="EFBIG",jd=548,f$="Chapitre 2 : Champ d'application",jc="0.0588",J=248,cM=146,jb="EXDEV",eN=">",b0=153,lX=1027,lW="EINPROGRESS",k3="562800",bZ="Chapitre 5 : Prestations familiales et prestations assimil\xc3\xa9es",ja=246,k2=555,i_=598,i$="%u",k1="resetLog",cL=2011,d="AllocationsFamiliales",k0=3268,i9="EHOSTUNREACH",kk=633,dj="./securite_sociale_R.catala_fr",E="Livre 5 : Prestations familiales et prestations assimil\xc3\xa9es",kj=108,ax="2",bD=127,dw=1024,i8="@{",eB=-2147483648,U="1",kZ=133,eM="e",f_="Montant de la base mensuelle des allocations familiales",i7=" : flags Open_rdonly and Open_wronly are not compatible",i6="D\xc3\xa9cret n\xc2\xb0 2019-1387 du 18 d\xc3\xa9cembre 2019 portant rel\xc3\xa8vement du salaire minimum de croissance",az="-",lV=505,bV=803994948,ki="EAGAIN",gj=": Not a directory",i4=216,i5=" : file already exists",lU="smic",kY=184,bH=0xffffff,cE=2012,kh="EDESTADDRREQ",kX="EISCONN",lR=-43,lS=612,aj="./securite_sociale_D.catala_fr",lT="EROFS",eA=86400,kg="Out_of_memory",lQ="inf",gi="index out of bounds",lP="EPIPE",i3="ENOEXEC",ez="_bigarr02",lO="Circulaire interminist\xc3\xa9rielle N\xc2\xb0 DSS/SD2B/2017/352 du 22 d\xc3\xa9cembre 2017 relative \xc3\xa0 la revalorisation au 1er janvier 2018 des plafonds de ressources d\xe2\x80\x99attribution de certaines prestations familiales servies en m\xc3\xa9tropole, en Guadeloupe, en Guyane, en Martinique, \xc3\xa0 la R\xc3\xa9union, \xc3\xa0 Saint-Barth\xc3\xa9lemy, \xc3\xa0 Saint-Martin et \xc3\xa0 Mayotte",kf=0xffffffff,gB=111,gp=2147483647,kW=208,lN=180,i2="Martinique",kV=", characters ",i1="EPFNOSUPPORT",bk=0xffff,ke="EBUSY",ey=417088404,kd="ENETUNREACH",lM="ENOLCK",iZ="ENOTTY",i0=12520,gh=400,kU="ESHUTDOWN",lL=619,iX=-46,iY="ENXIO",aK=3600,kc=143,I="Chapitre 1er : Allocations familiales",go="AllocationFamilialesAvril2008",lK="ERANGE",cz=2016,kT="retrieveLog",bj="\xc3\xa2ge_minimum_alin\xc3\xa9a_1_l521_3",lJ="infinity",a2=1000,kb=142,n="",iW="^",bU=3600.,iV=86400000,ka=264,ag="Partie l\xc3\xa9gislative",cy=0x3f,ds=124,a1="./epilogue.catala_fr",gg="Article L512-3",t="./decrets_divers.catala_fr",K="Titre 2 : Prestations g\xc3\xa9n\xc3\xa9rales d'entretien",gA=112,iU="Match_failure",kS=140,bW="Montant des plafonds de ressources",N="Annexe",j$=135,bh=2021,j_="enfant_le_plus_\xc3\xa2g\xc3\xa9",ex=252,j9="EPROTOTYPE",bi=".",di="montant_initial_majoration",bC="+",j8="EINTR",iT="ESRCH",j7=0xf0,a3="12.",j6="Guadeloupe",lI="ESOCKTNOSUPPORT",gz=110,ao="PrestationsFamiliales",gf=116,iS="%li",j4=576,j5="EALREADY",cH=2015,ew=365,bG="prise_en_compte",f9="Smic",gy=-32,bo=1023,j2=-1080,j3="EAFNOSUPPORT",ai="./securite_sociale_L.catala_fr",z="./prologue.catala_fr",ep=2299161,j1=969837588,gn="nan",lH=605,j0="ENFILE",iR=0xe0,jZ=-1023,lG=117,kQ="ECHILD",kR=0xdfff,dB="compl\xc3\xa9ment_d\xc3\xa9gressif",ge="Article L755-12",kP="ETOOMANYREFS",bm="/",lF="Assert_failure",eo=2400000.5,iQ="ENAMETOOLONG",lE="568400",jY=541,eG="ENOTDIR",lD="0.32",gm=1073741823,kO="ETIMEDOUT",iP="EMSGSIZE",en=250,dr=1582,kN=513,lC="ENOTCONN",iN=115,iO="ECONNREFUSED",kM="src/time_Zone.ml",lB=1e14,jX="Arr\xc3\xaat\xc3\xa9 du 14 d\xc3\xa9cembre 2020 relatif au montant des plafonds de ressources de certaines prestations familiales et aux tranches du bar\xc3\xa8me applicable au recouvrement des indus et \xc3\xa0 la saisie des prestations",ev='"',kK="Guyane",kL="EWOULDBLOCK",iM="allocations_familiales",f8=1255,gd="<",lA="Fatal error: exception %s\n",jV=196,jW=0x800,cG=255,jU="EPERM",aJ=2019,f6="Article R521-1",f7="jsError",bg=0x8000,dv="Partie r\xc3\xa9glementaire - D\xc3\xa9crets en Conseil d'Etat",V="droit_ouvert_majoration",dA=146097,cK=256,jT=0.012,lz="Article L521-3",kJ="End_of_file",jR="M\xc3\xa9tropole",jS=156,gl="Failure",ly="ENOSPC",iL=129,iK="\n",jQ=204,dq="conditions_hors_\xc3\xa2ge",kI=218,eL="ENOENT",jP=534,M="Dispositions sp\xc3\xa9ciales relatives \xc3\xa0 Mayotte",jO=562,lx=288,jN="([^/]+)",lw=315,kH="ENETDOWN",gx="EnfantLePlus\xc3\x82g\xc3\xa9",gc=0xf,lv="EOVERFLOW",em=-48,kG=0xdc00,dp="montant_initial_m\xc3\xa9tropole_majoration",gw="ENOTEMPTY",iJ="EBADF",an="camlinternalFormat.ml",jM="Division_by_zero",gb=520,iH=148,iI="EMLINK",kF="Sys_error",lt=647,lu="x",ls=335,cx=2017,cF="Article D521-2",eK="Article D755-5",el="Titre 1 : Champ d'application - G\xc3\xa9n\xc3\xa9ralit\xc3\xa9s",bF=60.,f5="EEXIST",cD=2014,gv="%d",kE="Printexc.handle_uncaught_exception",iG=32082,bY=1900,iF=121,jL="EADDRNOTAVAIL",lr="buffer.ml",jK=119,dn="montant_avec_garde_altern\xc3\xa9e_majoration",jJ="version_avril_2008",cw=120,eu=127686388,du=103,lq="ENOBUFS",f4="16",cC=2013,et=102,f3=512,lp=527,cJ=113,iE=0x7ff0,q="D\xc3\xa9crets divers",es=101,eF=132,iD="0x",iC="D\xc3\xa9cret n\xc2\xb0 2020-1598 du 16 d\xc3\xa9cembre 2020 portant rel\xc3\xa8vement du salaire minimum de croissance",ca=1e7,y="Prologue",dm=254,aR=100,jH="ECONNABORTED",jI="EFAULT",kC="Article 7",kD="ENODEV",jG=" : flags Open_text and Open_binary are not compatible",kB="%Li",jE="EIO",jF="EDEADLK",eJ="3",ah="Partie r\xc3\xa9glementaire - D\xc3\xa9crets simples",iB=105,ln="169.",lo=230,iA="Instruction interminist\xc3\xa9rielle n\xc2\xb0 DSS/SD2B/2018/279 du 17 d\xc3\xa9cembre 2018 relative \xc3\xa0 la revalorisation au 1er janvier 2019 des plafonds de ressources d\xe2\x80\x99attribution de certaines prestations familiales servies en m\xc3\xa9tropole, en Guadeloupe, en Guyane, en Martinique, \xc3\xa0 la R\xc3\xa9union, \xc3\xa0 Saint-Barth\xc3\xa9lemy, \xc3\xa0 Saint-Martin et \xc3\xa0 Mayotte",kA=591,bX=0.5,jD=584,a_="Article D521-1",jC="Instruction interministerielle no DSS/SD2B/2019/261 du 18 d\xc3\xa9cembre 2019 relative \xc3\xa0 la revalorisation au 1er janvier 2020 des plafonds de ressources d\xe2\x80\x99attribution de certaines prestations familiales servies en m\xc3\xa9tropole, en Guadeloupe, en Guyane, en Martinique, \xc3\xa0 La R\xc3\xa9union, \xc3\xa0 Saint-Barth\xc3\xa9lemy, \xc3\xa0 Saint-Martin et \xc3\xa0 Mayotte",jB=188,bI="Livre 7 : R\xc3\xa9gimes divers - Dispositions diverses",aw="input",iz="str.ml",jA=160,lm="prestations_familiales",dz="est_enfant_le_plus_\xc3\xa2g\xc3\xa9",jz="0.0463",iy="D\xc3\xa9cret n\xc2\xb0 2018-1173 du 19 d\xc3\xa9cembre 2018 portant rel\xc3\xa8vement du salaire minimum de croissance",eE="_z",ll="computeAllocationsFamiliales",dy="Unix.Unix_error",jx="0.55",jy="EHOSTDOWN",jw=109,dl="droit_ouvert",f2="mkdir",jv="ENOTSOCK",kz=136,lk="Stack_overflow",ek=": No such file or directory",a8="Interface du programme",lj="/static/",dh="Titre 5 : D\xc3\xa9partements d'outre-mer",ju=-97,li=253,lh="Not_found",dk=1461,a9="InterfaceAllocationsFamiliales",L="D\xc3\xa9cret n\xc2\xb02002-423 du 29 mars 2002 relatif aux prestations familiales \xc3\xa0 Mayotte",cB="1.",ky=32044,eD=", ",ix=626,bl=2018,lg="Mayotte",jt="EOPNOTSUPP",iw="ENOPROTOOPT",gu=243,js=2440588,gt="rmdir",kx="src/date.ml",lf=32752,jr="ECONNRESET",le="ELOOP",jq=141,jp="ESPIPE",a0="\xc3\x89pilogue",kw="EADDRINUSE",ld=1026,bn="Article L521-2",kv="ENOSYS",eI="Invalid integer: ",er=2440587.5,jo="E2BIG",ku=359,iu="Pervasives.do_at_exit",iv="utf8",jn=155,kt=258,bE=" ",gs="Fatal error: exception ",a4=0x80,ks="Undefined_recursive_module",ay="output",jm=569,jl=215,eH="src/calendar_builder.ml",it="EISDIR",lc="_",cA="Montant du salaire minimum de croissance",gr="compare: functional value",f1="0.16",dt="droit_ouvert_forfaitaire",dx="0.",is=134,kr="%i",gq=114,cI=529348384,jk=426;function +Fq(d,b,e,c,f){if(c<=b)for(var a=1;a<=f;a++)e[c+a]=d[b+a];else for(var a=f;a>=1;a--)e[c+a]=d[b+a];return 0}function -Dp(e,f,d){var +Ft(e,f,d){var a=new Array(d+1);a[0]=0;for(var b=1,c=f+1;b<=d;b++,c++)a[b]=e[c];return a}function -eQ(c,b,a){var +eZ(c,b,a){var d=String.fromCharCode;if(b==0&&a<=4096&&a==c.length)return d.apply(null,c);var -e=t;for(;0=b.l||b.t==2&&c>=b.c.length)){b.c=d.t==4?eQ(d.c,e,c):e==0&&d.c.length==c?d.c:d.c.substr(e,c);b.t=b.c.length==b.l?0:2}else -if(b.t==2&&f==b.c.length){b.c+=d.t==4?eQ(d.c,e,c):e==0&&d.c.length==c?d.c:d.c.substr(e,c);b.t=b.c.length==b.l?0:2}else{if(b.t!=4)eF(b);var +b3(d,e,b,f,c){if(c==0)return 0;if(f==0&&(c>=b.l||b.t==2&&c>=b.c.length)){b.c=d.t==4?eZ(d.c,e,c):e==0&&d.c.length==c?d.c:d.c.substr(e,c);b.t=b.c.length==b.l?0:2}else +if(b.t==2&&f==b.c.length){b.c+=d.t==4?eZ(d.c,e,c):e==0&&d.c.length==c?d.c:d.c.substr(e,c);b.t=b.c.length==b.l?0:2}else{if(b.t!=4)eO(b);var g=d.c,h=b.c;if(d.t==4)if(f<=e)for(var a=0;a=0;a--)h[f+a]=g[e+a];else{var i=Math.min(c,g.length-e);for(var a=0;a>=1;if(b==0)return d;a+=a;c++;if(c==9)a.slice(0,1)}}function -b1(a){if(a.t==2)a.c+=cI(a.l-a.c.length,"\0");else -a.c=eQ(a.c,0,a.c.length);a.t=0}function -ks(a,b){if(a===b)return 1;a.t&6&&b1(a);b.t&6&&b1(b);return a.c==b.c?1:0}function -D5(b,a){throw[0,b,a]}function -kJ(a){if(a.length<24){for(var -b=0;bbt)return false;return true}else +bJ(a){return a}function +b4(a,b,c,d,e){b3(bJ(a),b,c,d,e);return 0}function +cS(b,a){if(b==0)return n;if(a.repeat)return a.repeat(b);var +d=n,c=0;for(;;){if(b&1)d+=a;b>>=1;if(b==0)return d;a+=a;c++;if(c==9)a.slice(0,1)}}function +cc(a){if(a.t==2)a.c+=cS(a.l-a.c.length,"\0");else +a.c=eZ(a.c,0,a.c.length);a.t=0}function +mb(a,b){if(a===b)return 1;a.t&6&&cc(a);b.t&6&&cc(b);return a.c==b.c?1:0}function +Ga(b,a){throw[0,b,a]}function +mx(a){if(a.length<24){for(var +b=0;bbD)return false;return true}else return!/[^\x00-\x7f]/.test(a)}function -gx(e){for(var -j=t,c=t,g,f,h,a,b=0,i=e.length;bfO){c.substr(0,1);j+=c;c=t;j+=e.slice(b,d)}else -c+=e.slice(b,d);if(d==i)break;b=d}a=1;if(++b=0xd7ff&&a<0xe000)a=2}else{a=3;if(++b0x10ffff)a=3}}}}}if(a<4){b-=a;c+="\ufffd"}else -if(a>bc)c+=String.fromCharCode(0xd7c0+(a>>10),jo+(a&0x3FF));else -c+=String.fromCharCode(a);if(c.length>di){c.substr(0,1);j+=c;c=t}}return j+c}function -bC(c,a,b){this.t=c;this.c=a;this.l=b}bC.prototype.toString=function(){switch(this.t){case -9:return this.c;default:b1(this);case -0:if(kJ(this.c)){this.t=9;return this.c}this.t=8;case -8:return this.c}};bC.prototype.toUtf16=function(){var -a=this.toString();if(this.t==9)return a;return gx(a)};bC.prototype.slice=function(){var +gX(e){for(var +j=n,c=n,g,f,h,a,b=0,i=e.length;bf3){c.substr(0,1);j+=c;c=n;j+=e.slice(b,d)}else +c+=e.slice(b,d);if(d==i)break;b=d}a=1;if(++b=0xd7ff&&a<0xe000)a=2}else{a=3;if(++b0x10ffff)a=3}}}}}if(a<4){b-=a;c+="\ufffd"}else +if(a>bk)c+=String.fromCharCode(0xd7c0+(a>>10),kG+(a&0x3FF));else +c+=String.fromCharCode(a);if(c.length>dw){c.substr(0,1);j+=c;c=n}}return j+c}function +bp(c,a,b){this.t=c;this.c=a;this.l=b}bp.prototype.toString=function(){switch(this.t){case +9:return this.c;default:cc(this);case +0:if(mx(this.c)){this.t=9;return this.c}this.t=8;case +8:return this.c}};bp.prototype.toUtf16=function(){var +a=this.toString();if(this.t==9)return a;return gX(a)};bp.prototype.slice=function(){var a=this.t==4?this.c.slice():this.c;return new -bC(this.t,a,this.l)};function -kt(a){return new -bC(0,a,a.length)}function -a(a){return kt(a)}function -gu(c,b){D5(c,a(b))}var -ab=[0];function -ac(a){gu(ab.Invalid_argument,a)}function -kq(){ac(f5)}function -ds(a,b){switch(a.t&6){default:if(b>=a.c.length)return 0;case +bp(this.t,a,this.l)};function +mc(a){return new +bp(0,a,a.length)}function +a(a){return mc(a)}function +gT(c,b){Ga(c,a(b))}var +X=[0];function +ad(a){gT(X.Invalid_argument,a)}function +l$(){ad(gi)}function +dD(a,b){switch(a.t&6){default:if(b>=a.c.length)return 0;case 0:return a.c.charCodeAt(b);case 4:return a.c[b]}}function -b0(b,a){if(a>>>0>=b.l)kq();return ds(b,a)}function -$(a,c,b){b&=aQ;if(a.t!=4){if(c==a.c.length){a.c+=String.fromCharCode(b);if(c+1==a.l)a.t=0;return 0}eF(a)}a.c[c]=b;return 0}function -a0(b,a,c){if(a>>>0>=b.l)kq();return $(b,a,c)}function -bE(c,a){if(c.fun)return bE(c.fun,a);if(typeof +b5(b,a){if(a>>>0>=b.l)l$();return dD(b,a)}function +aa(a,c,b){b&=aU;if(a.t!=4){if(c==a.c.length){a.c+=String.fromCharCode(b);if(c+1==a.l)a.t=0;return 0}eO(a)}a.c[c]=b;return 0}function +a5(b,a,c){if(a>>>0>=b.l)l$();return aa(b,a,c)}function +a$(c,a){if(c.fun)return a$(c.fun,a);if(typeof c!=="function")return c;var b=c.length|0;if(b===0)return c.apply(null,a);var e=a.length|0,d=b-e|0;if(d==0)return c.apply(null,a);else -if(d<0)return bE(c.apply(null,a.slice(0,b)),a.slice(b));else +if(d<0)return a$(c.apply(null,a.slice(0,b)),a.slice(b));else return function(){var e=arguments.length==0?1:arguments.length,d=new Array(a.length+e);for(var b=0;b>>0>=a.length-1)dr();return a}function -Du(a){if(isFinite(a)){if(Math.abs(a)>=2.2250738585072014e-308)return 0;if(a!=0)return 1;return 2}return isNaN(a)?4:3}function -a4(a){if((a.t&6)!=0)b1(a);return a.c}var -Ek=Math.log2&&Math.log2(1.1235582092889474E+307)==1020;function -Ei(a){if(Ek)return Math.floor(Math.log2(a));var +b=0;b>>0>=a.length-1)dC();return a}function +Fy(a){if(isFinite(a)){if(Math.abs(a)>=2.2250738585072014e-308)return 0;if(a!=0)return 1;return 2}return isNaN(a)?4:3}function +br(a){a.t&6&&cc(a);return a.c}var +Gr=Math.log2&&Math.log2(1.1235582092889474E+307)==1020;function +Gp(a){if(Gr)return Math.floor(Math.log2(a));var b=0;if(a==0)return-Infinity;if(a>=1)while(a>=2){a/=2;b++}else while(a<1){a*=2;b--}return b}function -gl(c){var -a=new(D.Float32Array)(1);a[0]=c;var -b=new(D.Int32Array)(a.buffer);return b[0]|0}var -kB=Math.pow(2,-24);function -eP(a){throw a}function -cG(){eP(ab.Division_by_zero)}function -x(b,c,a){this.lo=b&bz;this.mi=c&bz;this.hi=a&bc}x.prototype.caml_custom="_j";x.prototype.copy=function(){return new -x(this.lo,this.mi,this.hi)};x.prototype.ucompare=function(a){if(this.hi>a.hi)return 1;if(this.hia.mi)return 1;if(this.mia.lo)return 1;if(this.loc)return 1;if(ba.mi)return 1;if(this.mia.lo)return 1;if(this.loa.hi)return 1;if(this.hia.mi)return 1;if(this.mia.lo)return 1;if(this.loc)return 1;if(ba.mi)return 1;if(this.mia.lo)return 1;if(this.lo>24),c=-this.hi+(b>>24);return new -x(a,b,c)};x.prototype.add=function(a){var +w(a,b,c)};w.prototype.add=function(a){var b=this.lo+a.lo,c=this.mi+a.mi+(b>>24),d=this.hi+a.hi+(c>>24);return new -x(b,c,d)};x.prototype.sub=function(a){var +w(b,c,d)};w.prototype.sub=function(a){var b=this.lo-a.lo,c=this.mi-a.mi+(b>>24),d=this.hi-a.hi+(c>>24);return new -x(b,c,d)};x.prototype.mul=function(a){var -b=this.lo*a.lo,c=(b*kB|0)+this.mi*a.lo+this.lo*a.mi,d=(c*kB|0)+this.hi*a.lo+this.mi*a.mi+this.lo*a.hi;return new -x(b,c,d)};x.prototype.isZero=function(){return(this.lo|this.mi|this.hi)==0};x.prototype.isNeg=function(){return this.hi<<16<0};x.prototype.and=function(a){return new -x(this.lo&a.lo,this.mi&a.mi,this.hi&a.hi)};x.prototype.or=function(a){return new -x(this.lo|a.lo,this.mi|a.mi,this.hi|a.hi)};x.prototype.xor=function(a){return new -x(this.lo^a.lo,this.mi^a.mi,this.hi^a.hi)};x.prototype.shift_left=function(a){a=a&63;if(a==0)return this;if(a<24)return new -x(this.lo<>24-a,this.hi<>24-a);if(a<48)return new -x(0,this.lo<>48-a);return new -x(0,0,this.lo<>a|this.mi<<24-a,this.mi>>a|this.hi<<24-a,this.hi>>a);if(a<48)return new -x(this.mi>>a-24|this.hi<<48-a,this.hi>>a-24,0);return new -x(this.hi>>a-48,0,0)};x.prototype.shift_right=function(a){a=a&63;if(a==0)return this;var +w(b,c,d)};w.prototype.mul=function(a){var +b=this.lo*a.lo,c=(b*ml|0)+this.mi*a.lo+this.lo*a.mi,d=(c*ml|0)+this.hi*a.lo+this.mi*a.mi+this.lo*a.hi;return new +w(b,c,d)};w.prototype.isZero=function(){return(this.lo|this.mi|this.hi)==0};w.prototype.isNeg=function(){return this.hi<<16<0};w.prototype.and=function(a){return new +w(this.lo&a.lo,this.mi&a.mi,this.hi&a.hi)};w.prototype.or=function(a){return new +w(this.lo|a.lo,this.mi|a.mi,this.hi|a.hi)};w.prototype.xor=function(a){return new +w(this.lo^a.lo,this.mi^a.mi,this.hi^a.hi)};w.prototype.shift_left=function(a){a=a&63;if(a==0)return this;if(a<24)return new +w(this.lo<>24-a,this.hi<>24-a);if(a<48)return new +w(0,this.lo<>48-a);return new +w(0,0,this.lo<>a|this.mi<<24-a,this.mi>>a|this.hi<<24-a,this.hi>>a);if(a<48)return new +w(this.mi>>a-24|this.hi<<48-a,this.hi>>a-24,0);return new +w(this.hi>>a-48,0,0)};w.prototype.shift_right=function(a){a=a&63;if(a==0)return this;var c=this.hi<<16>>16;if(a<24)return new -x(this.lo>>a|this.mi<<24-a,this.mi>>a|c<<24-a,this.hi<<16>>a>>>16);var +w(this.lo>>a|this.mi<<24-a,this.mi>>a|c<<24-a,this.hi<<16>>a>>>16);var b=this.hi<<16>>31;if(a<48)return new -x(this.mi>>a-24|this.hi<<48-a,this.hi<<16>>a-24>>16,b&bc);return new -x(this.hi<<16>>a-32,b,b)};x.prototype.lsl1=function(){this.hi=this.hi<<1|this.mi>>23;this.mi=(this.mi<<1|this.lo>>23)&bz;this.lo=this.lo<<1&bz};x.prototype.lsr1=function(){this.lo=(this.lo>>>1|this.mi<<23)&bz;this.mi=(this.mi>>>1|this.hi<<23)&bz;this.hi=this.hi>>>1};x.prototype.udivmod=function(e){var +w(this.mi>>a-24|this.hi<<48-a,this.hi<<16>>a-24>>16,b&bk);return new +w(this.hi<<16>>a-32,b,b)};w.prototype.lsl1=function(){this.hi=this.hi<<1|this.mi>>23;this.mi=(this.mi<<1|this.lo>>23)&bH;this.lo=this.lo<<1&bH};w.prototype.lsr1=function(){this.lo=(this.lo>>>1|this.mi<<23)&bH;this.mi=(this.mi>>>1|this.hi<<23)&bH;this.hi=this.hi>>>1};w.prototype.udivmod=function(e){var c=0,b=this.copy(),a=e.copy(),d=new -x(0,0,0);while(b.ucompare(a)>0){c++;a.lsl1()}while(c>=0){c--;d.lsl1();if(b.ucompare(a)>=0){d.lo++;b=b.sub(a)}a.lsr1()}return{quotient:d,modulus:b}};x.prototype.div=function(a){var -b=this;if(a.isZero())cG();var -d=b.hi^a.hi;if(b.hi&a$)b=b.neg();if(a.hi&a$)a=a.neg();var -c=b.udivmod(a).quotient;if(d&a$)c=c.neg();return c};x.prototype.mod=function(b){var -a=this;if(b.isZero())cG();var -d=a.hi;if(a.hi&a$)a=a.neg();if(b.hi&a$)b=b.neg();var -c=a.udivmod(b).modulus;if(d&a$)c=c.neg();return c};x.prototype.toInt=function(){return this.lo|this.mi<<24};x.prototype.toFloat=function(){return(this.hi<<16)*Math.pow(2,32)+this.mi*Math.pow(2,24)+this.lo};x.prototype.toArray=function(){return[this.hi>>8,this.hi&aQ,this.mi>>16,this.mi>>8&aQ,this.mi&aQ,this.lo>>16,this.lo>>8&aQ,this.lo&aQ]};x.prototype.lo32=function(){return this.lo|(this.mi&aQ)<<24};x.prototype.hi32=function(){return this.mi>>>8&bc|this.hi<<16};function -b2(b,c,a){return new -x(b,c,a)}function -eI(a){if(!isFinite(a)){if(isNaN(a))return b2(1,0,h4);return a>0?b2(0,0,h4):b2(0,0,0xfff0)}var -f=a==0&&1/a==-Infinity?a$:a>=0?0:a$;if(f)a=-a;var -b=Ei(a)+bf;if(b<=0){b=0;a/=Math.pow(2,-jJ)}else{a/=Math.pow(2,b-ke);if(a<16){a*=2;b-=1}if(b==0)a/=2}var +w(0,0,0);while(b.ucompare(a)>0){c++;a.lsl1()}while(c>=0){c--;d.lsl1();if(b.ucompare(a)>=0){d.lo++;b=b.sub(a)}a.lsr1()}return{quotient:d,modulus:b}};w.prototype.div=function(a){var +b=this;if(a.isZero())cR();var +d=b.hi^a.hi;if(b.hi&bg)b=b.neg();if(a.hi&bg)a=a.neg();var +c=b.udivmod(a).quotient;if(d&bg)c=c.neg();return c};w.prototype.mod=function(b){var +a=this;if(b.isZero())cR();var +d=a.hi;if(a.hi&bg)a=a.neg();if(b.hi&bg)b=b.neg();var +c=a.udivmod(b).modulus;if(d&bg)c=c.neg();return c};w.prototype.toInt=function(){return this.lo|this.mi<<24};w.prototype.toFloat=function(){return(this.hi<<16)*Math.pow(2,32)+this.mi*Math.pow(2,24)+this.lo};w.prototype.toArray=function(){return[this.hi>>8,this.hi&aU,this.mi>>16,this.mi>>8&aU,this.mi&aU,this.lo>>16,this.lo>>8&aU,this.lo&aU]};w.prototype.lo32=function(){return this.lo|(this.mi&aU)<<24};w.prototype.hi32=function(){return this.mi>>>8&bk|this.hi<<16};function +b7(b,c,a){return new +w(b,c,a)}function +eR(a){if(!isFinite(a)){if(isNaN(a))return b7(1,0,iE);return a>0?b7(0,0,iE):b7(0,0,0xfff0)}var +f=a==0&&1/a==-Infinity?bg:a>=0?0:bg;if(f)a=-a;var +b=Gp(a)+bo;if(b<=0){b=0;a/=Math.pow(2,-ld)}else{a/=Math.pow(2,b-lX);if(a<16){a*=2;b-=1}if(b==0)a/=2}var d=Math.pow(2,24),c=a|0;a=(a-c)*d;var e=a|0;a=(a-e)*d;var -g=a|0;c=c&fZ|f|b<<4;return b2(g,e,c)}function -dv(a){return a.toArray()}function -kp(c,b,g){c.write(32,b.dims.length);c.write(32,b.kind|b.layout<<8);if(b.caml_custom==eq)for(var -a=0;a>4;if(c==2047)return(f|g|b&fZ)==0?b&a$?-Infinity:Infinity:NaN;var -e=Math.pow(2,-24),a=(f*e+g)*e+(b&fZ);if(c>0){a+=16;a*=Math.pow(2,c-ke)}else -a*=Math.pow(2,-jJ);if(b&a$)a=-a;return a}function -gf(b){var +a(e*l8(c));return d}function +gL(c){var +a=new(s.Int32Array)(1);a[0]=c;var +b=new(s.Float32Array)(a.buffer);return b[0]}function +dF(a){return new +w(a[7]<<0|a[6]<<8|a[5]<<16,a[4]<<0|a[3]<<8|a[2]<<16,a[1]<<0|a[0]<<8)}function +cQ(d){var +f=d.lo,g=d.mi,b=d.hi,c=(b&0x7fff)>>4;if(c==2047)return(f|g|b&gc)==0?b&bg?-Infinity:Infinity:NaN;var +e=Math.pow(2,-24),a=(f*e+g)*e+(b&gc);if(c>0){a+=16;a*=Math.pow(2,c-lX)}else +a*=Math.pow(2,-ld);if(b&bg)a=-a;return a}function +gD(b){var d=b.length,c=1;for(var -a=0;a>>24&aQ|(a&bc)<<8,a>>>16&bc)}function -gn(a){return a.hi32()}function -go(a){return a.lo32()}var -Dr=eq;function -bX(c,d,b,a){this.kind=c;this.layout=d;this.dims=b;this.data=a}bX.prototype.caml_custom=Dr;bX.prototype.offset=function(b){var +a=0;a>>24&aU|(a&bk)<<8,a>>>16&bk)}function +gM(a){return a.hi32()}function +gN(a){return a.lo32()}var +Fv=ez;function +b2(c,d,b,a){this.kind=c;this.layout=d;this.dims=b;this.data=a}b2.prototype.caml_custom=Fv;b2.prototype.offset=function(b){var c=0;if(typeof b==="number")b=[b];if(!(b instanceof -Array))ac("bigarray.js: invalid offset");if(this.dims.length!=b.length)ac("Bigarray.get/set: bad number of dimensions");if(this.layout==0)for(var -a=0;a=this.dims[a])dr();c=c*this.dims[a]+b[a]}else +Array))ad("bigarray.js: invalid offset");if(this.dims.length!=b.length)ad("Bigarray.get/set: bad number of dimensions");if(this.layout==0)for(var +a=0;a=this.dims[a])dC();c=c*this.dims[a]+b[a]}else for(var -a=this.dims.length-1;a>=0;a--){if(b[a]<1||b[a]>this.dims[a])dr();c=c*this.dims[a]+(b[a]-1)}return c};bX.prototype.get=function(a){switch(this.kind){case +a=this.dims.length-1;a>=0;a--){if(b[a]<1||b[a]>this.dims[a])dC();c=c*this.dims[a]+(b[a]-1)}return c};b2.prototype.get=function(a){switch(this.kind){case 7:var -d=this.data[a*2+0],b=this.data[a*2+1];return kA(d,b);case +d=this.data[a*2+0],b=this.data[a*2+1];return mk(d,b);case 10:case 11:var -e=this.data[a*2+0],c=this.data[a*2+1];return[da,e,c];default:return this.data[a]}};bX.prototype.set=function(a,b){switch(this.kind){case -7:this.data[a*2+0]=go(b);this.data[a*2+1]=gn(b);break;case +e=this.data[a*2+0],c=this.data[a*2+1];return[dm,e,c];default:return this.data[a]}};b2.prototype.set=function(a,b){switch(this.kind){case +7:this.data[a*2+0]=gN(b);this.data[a*2+1]=gM(b);break;case 10:case -11:this.data[a*2+0]=b[1];this.data[a*2+1]=b[2];break;default:this.data[a]=b;break}return 0};bX.prototype.fill=function(b){switch(this.kind){case +11:this.data[a*2+0]=b[1];this.data[a*2+1]=b[2];break;default:this.data[a]=b;break}return 0};b2.prototype.fill=function(b){switch(this.kind){case 7:var -c=go(b),e=gn(b);if(c==e)this.data.fill(c);else +c=gN(b),e=gM(b);if(c==e)this.data.fill(c);else for(var a=0;ab.data[a])return 1}break}return 0};function -cC(c,d,b,a){this.kind=c;this.layout=d;this.dims=b;this.data=a}cC.prototype=new -bX();cC.prototype.offset=function(a){if(typeof +cN(c,d,b,a){this.kind=c;this.layout=d;this.dims=b;this.data=a}cN.prototype=new +b2();cN.prototype.offset=function(a){if(typeof a!=="number")if(a instanceof Array&&a.length==1)a=a[0];else -ac("Ml_Bigarray_c_1_1.offset");if(a<0||a>=this.dims[0])dr();return a};cC.prototype.get=function(a){return this.data[a]};cC.prototype.set=function(a,b){this.data[a]=b;return 0};cC.prototype.fill=function(a){this.data.fill(a);return 0};function -kl(c,d,a,b){var -e=kn(c);if(gf(a)*e!=b.length)ac("length doesn't match dims");if(d==0&&a.length==1&&e==1)return new -cC(c,d,a,b);return new -bX(c,d,a,b)}function -b8(a){gu(ab.Failure,a)}function -km(b,v,r){var -i=b.read32s();if(i<0||i>16)b8("input_value: wrong number of bigarray dimensions");var -p=b.read32s(),j=p&aQ,o=p>>8&1,h=[];if(r==eq)for(var +ad("Ml_Bigarray_c_1_1.offset");if(a<0||a>=this.dims[0])dC();return a};cN.prototype.get=function(a){return this.data[a]};cN.prototype.set=function(a,b){this.data[a]=b;return 0};cN.prototype.fill=function(a){this.data.fill(a);return 0};function +l6(c,d,a,b){var +e=l8(c);if(gD(a)*e!=b.length)ad("length doesn't match dims");if(d==0&&a.length==1&&e==1)return new +cN(c,d,a,b);return new +b2(c,d,a,b)}function +b6(b){if(!X.Failure)X.Failure=[J,a(gl),-3];gT(X.Failure,b)}function +l7(b,v,r){var +i=b.read32s();if(i<0||i>16)b6("input_value: wrong number of bigarray dimensions");var +p=b.read32s(),j=p&aU,o=p>>8&1,h=[];if(r==ez)for(var a=0;a>>32-15;a=a5(a,0x1b873593);b^=a;b=b<<13|b>>>32-13;return(b+(b<<2)|0)+(0xe6546b64|0)|0}function -DB(a,b){a=at(a,go(b));a=at(a,gn(b));return a}function -gj(a,b){return DB(a,eI(b))}function -ko(c){var -b=gf(c.dims),d=0;switch(c.kind){case +l=cQ(dF(e));g.set(a,[dm,m,l])}break}v[0]=(4+i)*4;return l6(j,o,h,f)}function +l5(a,b,c){return a.compare(b,c)}function +ba(a,b){return Math.imul(a,b)}function +at(b,a){a=ba(a,0xcc9e2d51|0);a=a<<15|a>>>32-15;a=ba(a,0x1b873593);b^=a;b=b<<13|b>>>32-13;return(b+(b<<2)|0)+(0xe6546b64|0)|0}function +FI(a,b){a=at(a,gN(b));a=at(a,gM(b));return a}function +gI(a,b){return FI(a,eR(b))}function +l9(c){var +b=gD(c.dims),d=0;switch(c.kind){case 2:case 3:case -12:if(b>cA)b=cA;var +12:if(b>cK)b=cK;var e=0,a=0;for(a=0;a+4<=c.data.length;a+=4){e=c.data[a+0]|c.data[a+1]<<8|c.data[a+2]<<16|c.data[a+3]<<24;d=at(d,e)}e=0;switch(b&3){case 3:e=c.data[a+2]<<16;case 2:e|=c.data[a+1]<<8;case 1:e|=c.data[a+0];d=at(d,e)}break;case 4:case -5:if(b>bB)b=bB;var +5:if(b>cb)b=cb;var e=0,a=0;for(a=0;a+2<=c.data.length;a+=2){e=c.data[a+0]|c.data[a+1]<<16;d=at(d,e)}if((b&1)!=0)d=at(d,c.data[a]);break;case 6:if(b>64)b=64;for(var a=0;a64)b=64;for(var -a=0;a32)b=32;for(var -a=0;a0?b(c,f,e):b(f,c,e);if(e&&a!=a)return d;if(+a!=+a)return+a;if((a|0)!=0)return a|0}return d}function -dw(a){return a +dH(a){return a instanceof -bC}function -eL(a){return dw(a)}function -kw(a){if(typeof -a==="number")return aW;else -if(dw(a))return f3;else -if(eL(a))return 1252;else +bp}function +eU(a){return dH(a)}function +mf(a){if(typeof +a==="number")return a2;else +if(dH(a))return ex;else +if(eU(a))return 1252;else if(a instanceof -Array&&a[0]===a[0]>>>0&&a[0]<=cw){var -b=a[0]|0;return b==da?0:b}else +Array&&a[0]===a[0]>>>0&&a[0]<=cG){var +b=a[0]|0;return b==dm?0:b}else if(a instanceof -String)return ic;else +String)return i0;else if(typeof -a=="string")return ic;else +a=="string")return i0;else if(a instanceof -Number)return aW;else -if(a&&a.caml_custom)return fS;else +Number)return a2;else +if(a&&a.caml_custom)return f8;else if(a&&a.compare)return 1256;else if(typeof a=="function")return 1247;else if(typeof a=="symbol")return 1251;return 1001}function -eK(a,b){if(ab.c?1:0}function -gv(a,b){return kr(a,b)}function -cD(a,b,d){var +eT(a,b){if(ab.c?1:0}function +gV(a,b){return ma(a,b)}function +cO(a,b,d){var e=[];for(;;){if(!(d&&a===b)){var -f=kw(a);if(f==eb){a=a[1];continue}var -g=kw(b);if(g==eb){b=b[1];continue}if(f!==g){if(f==aW){if(g==fS)return kv(a,b,-1,d);return-1}if(g==aW){if(f==fS)return kv(b,a,1,d);return 1}return fb)return 1;if(a!=b){if(!d)return NaN;if(a==a)return 1;if(b==b)return-1}break;case 1251:if(a!==b){if(!d)return NaN;return 1}break;case 1252:var -a=a4(a),b=a4(b);if(a!==b){if(ab)return 1}break;case +a=br(a),b=br(b);if(a!==b){if(ab)return 1}break;case 12520:var a=a.toString(),b=b.toString();if(a!==b){if(ab)return 1}break;case 246:case 254:default:if(a.length!=b.length)return a.length1)e.push(a,b,1);break}}if(e.length==0)return 0;var h=e.pop();b=e.pop();a=e.pop();if(h+10)if(c==0&&(b>=a.l||a.t==2&&b>=a.c.length))if(d==0){a.c=t;a.t=2}else{a.c=cI(b,String.fromCharCode(d));a.t=b==a.l?0:2}else{if(a.t!=4)eF(a);for(b+=c;c31)ac("format_int: format too long");var -a={justify:bs,signstyle:aA,filler:bv,alternate:false,base:0,signedconv:false,width:0,uppercase:false,sign:1,prec:-1,conv:"f"};for(var +md(a,b){return cO(a,b,true)}function +Fz(){return[0]}function +ac(a){if(a<0)ad("Bytes.create");return new +bp(a?2:9,n,a)}function +gF(b,a){if(a==0)cR();return b/a|0}function +A(a,b){return+(cO(a,b,false)==0)}function +FB(a,c,b,d){if(b>0)if(c==0&&(b>=a.l||a.t==2&&b>=a.c.length))if(d==0){a.c=n;a.t=2}else{a.c=cS(b,String.fromCharCode(d));a.t=b==a.l?0:2}else{if(a.t!=4)eO(a);for(b+=c;c31)ad("format_int: format too long");var +a={justify:bC,signstyle:az,filler:bE,alternate:false,base:0,signedconv:false,width:0,uppercase:false,sign:1,prec:-1,conv:"f"};for(var c=0;c=0&&b<=9){a.width=a.width*10+b;c++}c--;break;case".":a.prec=0;c++;while(b=d.charCodeAt(c)-48,b>=0&&b<=9){a.prec=a.prec*10+b;c++}c--;case"d":case"i":a.signedconv=true;case"u":a.base=10;break;case"x":a.base=16;break;case"X":a.base=16;a.uppercase=true;break;case"o":a.base=8;break;case"e":case"f":case"g":a.signedconv=true;a.conv=b;break;case"E":case"F":case"G":a.signedconv=true;a.uppercase=true;a.conv=b.toLowerCase();break}}return a}function -gi(b,f){if(b.uppercase)f=f.toUpperCase();var -e=f.length;if(b.signedconv&&(b.sign<0||b.signstyle!=aA))e++;if(b.alternate){if(b.base==8)e+=1;if(b.base==16)e+=2}var -c=t;if(b.justify==bs&&b.filler==bv)for(var -d=e;d=0&&b<=9){a.width=a.width*10+b;c++}c--;break;case".":a.prec=0;c++;while(b=d.charCodeAt(c)-48,b>=0&&b<=9){a.prec=a.prec*10+b;c++}c--;case"d":case"i":a.signedconv=true;case"u":a.base=10;break;case"x":a.base=16;break;case"X":a.base=16;a.uppercase=true;break;case"o":a.base=8;break;case"e":case"f":case"g":a.signedconv=true;a.conv=b;break;case"E":case"F":case"G":a.signedconv=true;a.uppercase=true;a.conv=b.toLowerCase();break}}return a}function +gG(b,f){if(b.uppercase)f=f.toUpperCase();var +e=f.length;if(b.signedconv&&(b.sign<0||b.signstyle!=az))e++;if(b.alternate){if(b.base==8)e+=1;if(b.base==16)e+=2}var +c=n;if(b.justify==bC&&b.filler==bE)for(var +d=e;d20){c-=20;a/=Math.pow(10,c);a+=new -Array(c+1).join(k);if(b>0)a=a+bu+new +c=parseInt(a.toString().split(bC)[1]);if(c>20){c-=20;a/=Math.pow(10,c);a+=new +Array(c+1).join(k);if(b>0)a=a+bi+new Array(b+1).join(k);return a}else return a.toFixed(b)}}var -a,e=gt(i),d=e.prec<0?6:e.prec;if(c<0||c==0&&1/c==-Infinity){e.sign=-1;c=-c}if(isNaN(c)){a=f8;e.filler=bv}else -if(!isFinite(c)){a=j$;e.filler=bv}else +a,e=gS(i),d=e.prec<0?6:e.prec;if(c<0||c==0&&1/c==-Infinity){e.sign=-1;c=-c}if(isNaN(c)){a=gn;e.filler=bE}else +if(!isFinite(c)){a=lQ;e.filler=bE}else switch(e.conv){case"e":var -a=c.toExponential(d),b=a.length;if(a.charAt(b-3)==eD)a=a.slice(0,b-1)+k+a.slice(b-1);break;case"f":a=j(c,d);break;case"g":d=d?d:1;a=c.toExponential(d-1);var -h=a.indexOf(eD),g=+a.slice(h+1);if(g<-4||c>=1e21||c.toFixed(0).length>d){var -b=h-1;while(a.charAt(b)==k)b--;if(a.charAt(b)==bu)b--;a=a.slice(0,b+1)+a.slice(h);b=a.length;if(a.charAt(b-3)==eD)a=a.slice(0,b-1)+k+a.slice(b-1);break}else{var +a=c.toExponential(d),b=a.length;if(a.charAt(b-3)==eM)a=a.slice(0,b-1)+k+a.slice(b-1);break;case"f":a=j(c,d);break;case"g":d=d?d:1;a=c.toExponential(d-1);var +h=a.indexOf(eM),g=+a.slice(h+1);if(g<-4||c>=1e21||c.toFixed(0).length>d){var +b=h-1;while(a.charAt(b)==k)b--;if(a.charAt(b)==bi)b--;a=a.slice(0,b+1)+a.slice(h);b=a.length;if(a.charAt(b-3)==eM)a=a.slice(0,b-1)+k+a.slice(b-1);break}else{var f=d;if(g<0){f-=g+1;a=c.toFixed(f)}else while(a=c.toFixed(f),a.length>d+1)f--;if(f){var -b=a.length-1;while(a.charAt(b)==k)b--;if(a.charAt(b)==bu)b--;a=a.slice(0,b+1)}}break}return gi(e,a)}function -eG(e,c){if(a4(e)==jV)return a(t+c);var -b=gt(e);if(c<0)if(b.signedconv){b.sign=-1;c=-c}else +b=a.length-1;while(a.charAt(b)==k)b--;if(a.charAt(b)==bi)b--;a=a.slice(0,b+1)}}break}return gG(e,a)}function +eP(e,c){if(br(e)==gv)return a(n+c);var +b=gS(e);if(c<0)if(b.signedconv){b.sign=-1;c=-c}else c>>>=0;var -d=c.toString(b.base);if(b.prec>=0){b.filler=bv;var -f=b.prec-d.length;if(f>0)d=cI(f,k)+d}return gi(b,d)}var -kG=0;function -aj(){return kG++}function -aR(a){return a.toUtf16()}if(D.process&&D.process.cwd)var -dt=D.process.cwd().replace(/\\/g,bx);else +d=c.toString(b.base);if(b.prec>=0){b.filler=bE;var +f=b.prec-d.length;if(f>0)d=cS(f,k)+d}return gG(b,d)}var +mr=0;function +aA(){return mr++}function +aV(a){return a.toUtf16()}function +dL(){return typeof +s.process!=="undefined"&&typeof +s.process.versions!=="undefined"&&typeof +s.process.versions.node!=="undefined"}function +Gs(){function +a(a){if(a.charAt(0)===bm)return[n,a.substring(1)];return}function +b(c){var +g=/^([a-zA-Z]:|[\\/]{2}[^\\/]+[\\/]+[^\\/]+)?([\\/])?([\s\S]*?)$/,a=g.exec(c),b=a[1]||n,e=Boolean(b&&b.charAt(1)!==":");if(Boolean(a[2]||e)){var +d=a[1]||n,f=a[2]||n;return[d,c.substring(d.length+f.length)]}return}return dL()&&s.process&&s.process.platform?s.process.platform==="win32"?b:a:a}var +gZ=Gs();function +mv(a){return a.slice(-1)!==bm?a+bm:a}if(dL()&&s.process&&s.process.cwd)var +dE=s.process.cwd().replace(/\\/g,bm);else var -dt="/static";if(dt.slice(-1)!==bx)dt+=bx;function -DT(a){a=aR(a);if(a.charCodeAt(0)!=47)a=dt+a;var -d=a.split(bx),b=[];for(var -c=0;c1)b.pop();break;case".":break;case"":if(b.length==0)b.push(t);break;default:b.push(d[c]);break}b.orig=a;return b}function -Ds(a){return new -bC(4,a,a.length)}function -Ec(e){for(var -f=t,b=f,a,h,c=0,g=e.length;cfO){b.substr(0,1);f+=b;b=t;f+=e.slice(c,d)}else -b+=e.slice(c,d);if(d==g)break;c=d}if(a>6);b+=String.fromCharCode(aY|a&co)}else -if(a<0xd800||a>=jw)b+=String.fromCharCode(h9|a>>12,aY|a>>6&co,aY|a&co);else -if(a>=0xdbff||c+1==g||(h=e.charCodeAt(c+1))jw)b+="\xef\xbf\xbd";else{c++;a=(a<<10)+h-0x35fdc00;b+=String.fromCharCode(iY|a>>18,aY|a>>12&co,aY|a>>6&co,aY|a&co)}if(b.length>di){b.substr(0,1);f+=b;b=t}}return f+b}function -Dt(a){var -b=9;if(!kJ(a))b=8,a=Ec(a);return new -bC(b,a,a.length)}function -a6(a){return Dt(a)}function -W(a){gu(ab.Sys_error,a)}function -D3(a){a=a4(a);W(a+": No such file or directory")}function -aS(a){return a.l}function -kj(){}function -as(a){this.data=a}as.prototype=new -kj();as.prototype.truncate=function(a){var -b=this.data;this.data=aa(a|0);bY(b,0,this.data,0,a)};as.prototype.length=function(){return aS(this.data)};as.prototype.write=function(b,d,g,a){var +dE="/static";dE=mv(dE);function +F0(a){a=aV(a);if(!gZ(a))a=dE+a;var +e=gZ(a),d=e[1].split(bm),b=[];for(var +c=0;c1)b.pop();break;case".":break;default:b.push(d[c]);break}b.unshift(e[0]);b.orig=a;return b}function +Gi(e){for(var +f=n,b=f,a,h,c=0,g=e.length;cf3){b.substr(0,1);f+=b;b=n;f+=e.slice(c,d)}else +b+=e.slice(c,d);if(d==g)break;c=d}if(a>6);b+=String.fromCharCode(a4|a&cy)}else +if(a<0xd800||a>=kR)b+=String.fromCharCode(iR|a>>12,a4|a>>6&cy,a4|a&cy);else +if(a>=0xdbff||c+1==g||(h=e.charCodeAt(c+1))kR)b+="\xef\xbf\xbd";else{c++;a=(a<<10)+h-0x35fdc00;b+=String.fromCharCode(j7|a>>18,a4|a>>12&cy,a4|a>>6&cy,a4|a&cy)}if(b.length>dw){b.substr(0,1);f+=b;b=n}}return f+b}function +Fx(a){var +b=9;if(!mx(a))b=8,a=Gi(a);return new +bp(b,a,a.length)}function +aL(a){return Fx(a)}var +GH=[jo,lY,ki,iJ,ke,kQ,jF,k5,f5,jI,k4,j8,k6,jE,it,l1,iI,iQ,j0,kD,eL,i3,lM,k_,ly,kv,eG,gw,iZ,iY,jU,lP,lK,lT,jp,iT,jb,kL,lW,j5,jv,kh,iP,j9,iw,k8,lI,jt,i1,j3,kw,jL,kH,kd,k7,jH,jr,lq,kX,lC,kU,kP,kO,iO,jy,i9,le,lv];function +ch(d,f,e,a){var +b=GH.indexOf(d);if(b<0){if(a==null)a=-9999;b=[0,a]}var +c=[b,aL(f||n),aL(e||n)];return c}var +mp={};function +bL(a){return mp[a]}function +cg(b,a){throw[0,b].concat(a)}function +Fw(a){return new +bp(4,a,a.length)}function +Q(a){gT(X.Sys_error,a)}function +F_(a){Q(a+ek)}function +aW(a){return a.l}function +l4(){}function +ar(a){this.data=a}ar.prototype=new +l4();ar.prototype.truncate=function(a){var +b=this.data;this.data=ac(a|0);b3(b,0,this.data,0,a)};ar.prototype.length=function(){return aW(this.data)};ar.prototype.write=function(b,d,g,a){var c=this.length();if(b+a>=c){var -e=aa(b+a),f=this.data;this.data=e;bY(f,0,this.data,0,c)}bZ(d,g,this.data,b,a);return 0};as.prototype.read=function(c,a,d,b){var -e=this.length();bY(this.data,c,a,d,b);return 0};as.prototype.read_one=function(a){return b0(this.data,a)};as.prototype.close=function(){};as.prototype.constructor=as;function -aZ(b,a){this.content={};this.root=b;this.lookupFun=a}aZ.prototype.nm=function(a){return this.root+a};aZ.prototype.lookup=function(b){if(!this.content[b]&&this.lookupFun){var -c=this.lookupFun(a(this.root),a(b));if(c!==0)this.content[b]=new -as(bD(c[1]))}};aZ.prototype.exists=function(a){if(a==t)return 1;var -c=a+bx,d=new -RegExp(fU+c);for(var -b +e=ac(b+a),f=this.data;this.data=e;b3(f,0,this.data,0,c)}b4(d,g,this.data,b,a);return 0};ar.prototype.read=function(c,a,d,b){var +e=this.length();b3(this.data,c,a,d,b);return 0};ar.prototype.read_one=function(a){return b5(this.data,a)};ar.prototype.close=function(){};ar.prototype.constructor=ar;function +aF(b,a){this.content={};this.root=b;this.lookupFun=a}aF.prototype.nm=function(a){return this.root+a};aF.prototype.create_dir_if_needed=function(d){var +c=d.split(bm),b=n;for(var +a=0;a>1|1;if(h=0)}function -gk(d,b){var +a=c}eW[d]=a+1;return h==b[a+1]?b[a]:0}function +mj(a,b){return+(cO(a,b,false)>=0)}function +gJ(d,b){var e=b.length,a,c;for(a=0;a+4<=e;a+=4){c=b.charCodeAt(a)|b.charCodeAt(a+1)<<8|b.charCodeAt(a+2)<<16|b.charCodeAt(a+3)<<24;d=at(d,c)}c=0;switch(e&3){case 3:c=b.charCodeAt(a+2)<<16;case 2:c|=b.charCodeAt(a+1)<<8;case 1:c|=b.charCodeAt(a);d=at(d,c)}d^=e;return d}function -DC(a,b){return gk(a,a4(b))}function -Dz(d,b){var +FJ(a,b){return gJ(a,br(b))}function +FG(d,b){var e=b.length,a,c;for(a=0;a+4<=e;a+=4){c=b[a]|b[a+1]<<8|b[a+2]<<16|b[a+3]<<24;d=at(d,c)}c=0;switch(e&3){case 3:c=b[a+2]<<16;case 2:c|=b[a+1]<<8;case 1:c|=b[a];d=at(d,c)}d^=e;return d}function -Dy(a,b){switch(b.t&6){default:b1(b);case -0:a=gk(a,b.c);break;case -2:a=Dz(a,b.c)}return a}function -DA(a){a^=a>>>16;a=a5(a,0x85ebca6b|0);a^=a>>>13;a=a5(a,0xc2b2ae35|0);a^=a>>>16;return a}function -Dx(j,l,n,m){var -f,g,h,d,c,b,a,e,i;d=l;if(d<0||d>cA)d=cA;c=j;b=n;f=[m];g=0;h=1;while(g0){a=f[g++];if(a&&a.caml_custom){if(cE[a.caml_custom]&&cE[a.caml_custom].hash){var -k=cE[a.caml_custom].hash(a);b=at(b,k);c--}}else +mm(a){switch(a.t&6){default:cc(a);case +0:return a.c;case +4:return a.c}}function +FF(b,c){var +a=mm(c);return typeof +a==="string"?gJ(b,a):FG(b,a)}function +FH(a){a^=a>>>16;a=ba(a,0x85ebca6b|0);a^=a>>>13;a=ba(a,0xc2b2ae35|0);a^=a>>>16;return a}function +FE(j,l,n,m){var +f,g,h,d,c,b,a,e,i;d=l;if(d<0||d>cK)d=cK;c=j;b=n;f=[m];g=0;h=1;while(g0){a=f[g++];if(a&&a.caml_custom){if(cP[a.caml_custom]&&cP[a.caml_custom].hash){var +k=cP[a.caml_custom].hash(a);b=at(b,k);c--}}else if(a instanceof Array&&a[0]===(a[0]|0))switch(a[0]){case 248:b=at(b,a[2]);c--;break;case 250:f[--g]=a[1];break;default:var o=a.length-1<<10|a[0];b=at(b,o);for(e=1,i=a.length;e=d)break;f[h++]=a[e]}break}else -if(dw(a)){b=Dy(b,a);c--}else -if(eL(a)){b=DC(b,a);c--}else +if(dH(a)){b=FF(b,a);c--}else +if(eU(a)){b=FJ(b,a);c--}else if(typeof -a==="string"){b=gk(b,a);c--}else +a==="string"){b=gJ(b,a);c--}else if(a===(a|0)){b=at(b,a+a+1);c--}else -if(a===+a){b=gj(b,a);c--}}b=DA(b);return b&0x3FFFFFFF}function -DD(a,c,l){if(!isFinite(a)){if(isNaN(a))return a6(f8);return a6(a>0?j7:"-infinity")}var +if(a===+a){b=gI(b,a);c--}}b=FH(b);return b&0x3FFFFFFF}function +FK(a,c,l){if(!isFinite(a)){if(isNaN(a))return aL(gn);return aL(a>0?lJ:"-infinity")}var i=a==0&&1/a==-Infinity?1:a>=0?0:1;if(i)a=-a;var d=0;if(a==0);else if(a<1)while(a<1&&d>-1022){a*=2;d--}else while(a>=2){a/=2;d++}var -j=d<0?t:bs,e=t;if(i)e=aA;else +j=d<0?n:bC,e=n;if(i)e=az;else switch(l){case -43:e=bs;break;case -32:e=bv;break;default:break}if(c>=0&&c<13){var +43:e=bC;break;case +32:e=bE;break;default:break}if(c>=0&&c<13){var g=Math.pow(2,c*4);a=Math.round(a*g)/g}var b=a.toString(16);if(c>=0){var -h=b.indexOf(bu);if(h<0)b+=bu+cI(c,k);else{var -f=h+1+c;if(b.length>24&bz,a>>31&bc)}function -DO(a){return a.toInt()}function -DI(a){return+a.isNeg()}function -DL(a){return a.neg()}function -DG(g,c){var -a=gt(g);if(a.signedconv&&DI(c)){a.sign=-1;c=DL(c)}var -b=t,h=DM(a.base),f="0123456789abcdef";do{var -e=c.udivmod(h);c=e.quotient;b=f.charAt(DO(e.modulus))+b}while(!DJ(c));if(a.prec>=0){a.filler=bv;var -d=a.prec-b.length;if(d>0)b=cI(d,k)+b}return gi(a,b)}function -DN(a,b){return a.or(b)}function -eJ(a){return a.toFloat()}function -DQ(){return typeof -module!=="undefined"&&module&&module.exports?module.exports:D}function -b9(a){return a.slice(1)}function -DR(c){var +h=b.indexOf(bi);if(h<0)b+=bi+cS(c,k);else{var +f=h+1+c;if(b.length>24&bH,a>>31&bk)}function +FV(a){return a.toInt()}function +FP(a){return+a.isNeg()}function +FS(a){return a.neg()}function +FN(g,c){var +a=gS(g);if(a.signedconv&&FP(c)){a.sign=-1;c=FS(c)}var +b=n,h=FT(a.base),f="0123456789abcdef";do{var +e=c.udivmod(h);c=e.quotient;b=f.charAt(FV(e.modulus))+b}while(!FQ(c));if(a.prec>=0){a.filler=bE;var +d=a.prec-b.length;if(d>0)b=cS(d,k)+b}return gG(a,b)}function +FU(a,b){return a.or(b)}function +eS(a){return a.toFloat()}function +cd(a){return a.slice(1)}function +FY(c){var d=c.length,b=new Array(d+1);b[0]=0;for(var a=0;a0){var c=new Array(b);for(var -a=0;abf){a-=bf;b*=Math.pow(2,bf);if(a>bf){a-=bf;b*=Math.pow(2,bf)}}if(a<-bf){a+=bf;b*=Math.pow(2,-bf)}b*=Math.pow(2,a);return b}function -DS(a,b){return+(cD(a,b,false)<=0)}function -gr(a,b){return+(cD(a,b,false)<0)}function -bF(a,d){if(a<0)dr();var +a=0;abo){a-=bo;b*=Math.pow(2,bo);if(a>bo){a-=bo;b*=Math.pow(2,bo)}}if(a<-bo){a+=bo;b*=Math.pow(2,-bo)}b*=Math.pow(2,a);return b}function +FZ(a,b){return+(cO(a,b,false)<=0)}function +gQ(a,b){return+(cO(a,b,false)<0)}function +bK(a,d){if(a<0)dC();var a=a+1|0,b=new Array(a);b[0]=0;for(var c=1;c>>32-b,c)}function g(c,b,d,e,h,f,g){return a(b&d|~b&e,c,b,h,f,g)}function @@ -669,41 +717,41 @@ h(d,b,e,c,h,f,g){return a(b&c|e&~c,d,b,h,f,g)}function i(c,b,d,e,h,f,g){return a(b^d^e,c,b,h,f,g)}function j(c,b,d,e,h,f,g){return a(d^(b|~e),c,b,h,f,g)}function k(f,n){var -e=n;f[e>>2]|=aY<<8*(e&3);for(e=(e&~0x3)+8;(e&0x3F)<60;e+=4)f[(e>>2)-1]=0;f[(e>>2)-1]=n<<3;f[e>>2]=n>>29&0x1FFFFFFF;var +e=n;f[e>>2]|=a4<<8*(e&3);for(e=(e&~0x3)+8;(e&0x3F)<60;e+=4)f[(e>>2)-1]=0;f[(e>>2)-1]=n<<3;f[e>>2]=n>>29&0x1FFFFFFF;var k=[0x67452301,0xEFCDAB89,0x98BADCFE,0x10325476];for(e=0;e>8*m&0xFF;return o}return function(h,g,f){var -e=[];switch(h.t&6){default:b1(h);case -0:var -d=h.c;for(var +m=0;m<4;m++)o[e*4+m]=k[e]>>8*m&0xFF;return o}return function(i,g,f){var +e=[],h=mm(i);if(typeof +h==="string"){var +d=h;for(var a=0;a>2]=d.charCodeAt(b)|d.charCodeAt(b+1)<<8|d.charCodeAt(b+2)<<16|d.charCodeAt(b+3)<<24}for(;a>2]|=d.charCodeAt(a+g)<<8*(a&3);break;case -4:var -c=h.c;for(var +b=a+g;e[a>>2]=d.charCodeAt(b)|d.charCodeAt(b+1)<<8|d.charCodeAt(b+2)<<16|d.charCodeAt(b+3)<<24}for(;a>2]|=d.charCodeAt(a+g)<<8*(a&3)}else{var +c=h;for(var a=0;a>2]=c[b]|c[b+1]<<8|c[b+2]<<16|c[b+3]<<24}for(;a>2]|=c[a+g]<<8*(a&3)}return D9(k(e,f))}}();function -DV(c,b,a){return DU(bD(c),b,a)}var -bj=new +b=a+g;e[a>>2]=c[b]|c[b+1]<<8|c[b+2]<<16|c[b+3]<<24}for(;a>2]|=c[a+g]<<8*(a&3)}return Ge(k(e,f))}}();function +F2(c,b,a){return F1(bJ(c),b,a)}function +F3(){return 0}var +bs=new Array();function -gs(c){var -a=bj[c];if(!a.opened)W("Cannot flush a closed channel");if(!a.buffer||a.buffer==t)return 0;if(a.fd&&ab.fds[a.fd]&&ab.fds[a.fd].output){var -b=ab.fds[a.fd].output;switch(b.length){case -2:b(c,a.buffer);break;default:b(a.buffer)}}a.buffer=t;return 0}function -kI(e,f){var -b=bj[e],d=a(f),c=E(d);b.file.write(b.offset,d,0,c);b.offset+=c;return 0}function -Eg(a){var -a=gx(a),b=D;if(b.process&&b.process.stdout&&b.process.stdout.write)b.process.stderr.write(a);else{if(a.charCodeAt(a.length-1)==10)a=a.substr(0,a.length-1);var +ce(c){var +a=bs[c];if(!a.opened)Q("Cannot flush a closed channel");if(!a.buffer||a.buffer==n)return 0;if(a.fd&&X.fds[a.fd]&&X.fds[a.fd].output){var +b=X.fds[a.fd].output;switch(b.length){case +2:b(c,a.buffer);break;default:b(a.buffer)}}a.buffer=n;return 0}function +mt(e,f){var +b=bs[e],d=a(f),c=F(d);b.file.write(b.offset,d,0,c);b.offset+=c;return 0}function +Gm(a){var +a=gX(a),b=s;if(b.process&&b.process.stdout&&b.process.stdout.write)b.process.stderr.write(a);else{if(a.charCodeAt(a.length-1)==10)a=a.substr(0,a.length-1);var c=b.console;c&&c.error&&c.error(a)}}function -Eh(a){var -a=gx(a),b=D;if(b.process&&b.process.stdout&&b.process.stdout.write)b.process.stdout.write(a);else{if(a.charCodeAt(a.length-1)==10)a=a.substr(0,a.length-1);var +Gn(a){var +a=gX(a),b=s;if(b.process&&b.process.stdout&&b.process.stdout.write)b.process.stdout.write(a);else{if(a.charCodeAt(a.length-1)==10)a=a.substr(0,a.length-1);var c=b.console;c&&c.log&&c.log(a)}}function -eS(c,e,d,a){if(ab.fds===undefined)ab.fds=new +e0(c,e,d,a){if(X.fds===undefined)X.fds=new Array();a=a?a:{};var -b={};b.file=d;b.offset=a.append?d.length():0;b.flags=a;b.output=e;ab.fds[c]=b;if(!ab.fd_last_idx||c>ab.fd_last_idx)ab.fd_last_idx=c;return c}function -EA(c,b,g){var +b={};b.file=d;b.offset=a.append?d.length():0;b.flags=a;b.output=e;X.fds[c]=b;if(!X.fd_last_idx||c>X.fd_last_idx)X.fd_last_idx=c;return c}function +GJ(c,b,g){var a={};while(b){switch(b[1]){case 0:a.rdonly=1;break;case 1:a.wronly=1;break;case @@ -713,104 +761,111 @@ a={};while(b){switch(b[1]){case 5:a.excl=1;break;case 6:a.binary=1;break;case 7:a.text=1;break;case -8:a.nonblock=1;break}b=b[2]}if(a.rdonly&&a.wronly)W(a4(c)+ii);if(a.text&&a.binary)W(a4(c)+iG);var -d=kS(c),e=d.device.open(d.rest,a),f=ab.fd_last_idx?ab.fd_last_idx:0;return eS(f+1,kI,e,a)}eS(0,kI,new -as(aa(0)));eS(1,Eh,new -as(aa(0)));eS(2,Eg,new -as(aa(0)));function -DW(c){var -b=ab.fds[c];if(b.flags.wronly)W(i8+c+" is writeonly");var -a={file:b.file,offset:b.offset,fd:c,opened:true,out:false,refill:null};bj[a.fd]=a;return a.fd}function -kC(c){var -b=ab.fds[c];if(b.flags.rdonly)W(i8+c+" is readonly");var -a={file:b.file,offset:b.offset,fd:c,opened:true,out:true,buffer:t};bj[a.fd]=a;return a.fd}function -DX(){var +8:a.nonblock=1;break}b=b[2]}if(a.rdonly&&a.wronly)Q(br(c)+i7);if(a.text&&a.binary)Q(br(c)+jG);var +d=mG(c),e=d.device.open(d.rest,a),f=X.fd_last_idx?X.fd_last_idx:0;return e0(f+1,mt,e,a)}e0(0,mt,new +ar(ac(0)));e0(1,Gn,new +ar(ac(0)));e0(2,Gm,new +ar(ac(0)));function +F4(a){var +c=X.fds[a];if(c.flags.wronly)Q(kl+a+" is writeonly");var +d=null;if(a==0&&dL()){var +e=require("fs");d=function(){return aL(e.readFileSync(0,iv))}}var +b={file:c.file,offset:c.offset,fd:a,opened:true,out:false,refill:d};bs[b.fd]=b;return b.fd}function +mn(c){var +b=X.fds[c];if(b.flags.rdonly)Q(kl+c+" is readonly");var +a={file:b.file,offset:b.offset,fd:c,opened:true,out:true,buffer:n};bs[a.fd]=a;return a.fd}function +F5(){var b=0;for(var -a=0;a>>0)return a[0];else -if(dw(a))return f3;else -if(eL(a))return f3;else +if(dH(a))return ex;else +if(eU(a))return ex;else if(a instanceof Function||typeof a=="function")return 247;else -if(a&&a.caml_custom)return cw;else -return aW}function -a1(b,c,a){if(a&&D.toplevelReloc)b=D.toplevelReloc(a);ab[b+1]=c;if(a)ab[a]=c}var -kD={};function -D6(a,b){kD[a4(a)]=b;return 0}function -D7(a){a[2]=kG++;return a}function -gw(a,b){return ks(a,b)}function -D8(){ac(f5)}function -C(b,a){if(a>>>0>=E(b))D8();return cJ(b,a)}function -ad(a,b){return 1-gw(a,b)}function -D_(){return[0,a("js_of_ocaml")]}function -D$(){return 0x7FFFFFFF/4|0}function -Ea(){return[0,a("Unix"),32,0]}function -D4(){eP(ab.Not_found)}function -eR(c){var -a=D,b=aR(c);if(a.process&&a.process.env&&a.process.env[b]!=undefined)return a6(a.process.env[b]);if(D.jsoo_static_env&&D.jsoo_static_env[b])return a6(D.jsoo_static_env[b]);D4()}function -Eb(){var -a=new -Date().getTime(),b=a^i4*Math.random();return[0,b]}function -dy(a){var +if(a&&a.caml_custom)return cG;else +return a2}function +a6(b,c,a){if(a&&s.toplevelReloc)b=s.toplevelReloc(a);X[b+1]=c;if(a)X[a]=c}function +gU(a,b){mp[br(a)]=b;return 0}function +Gb(a){a[2]=mr++;return a}function +gW(a,b){return mb(a,b)}function +Gd(){ad(gi)}function +D(b,a){if(a>>>0>=F(b))Gd();return cT(b,a)}function +ak(a,b){return 1-gW(a,b)}function +Gf(){return 0x7FFFFFFF/4|0}function +F$(){eX(X.Not_found)}function +mu(c){var +a=s,b=aV(c);if(a.process&&a.process.env&&a.process.env[b]!=undefined)return aL(a.process.env[b]);if(s.jsoo_static_env&&s.jsoo_static_env[b])return aL(s.jsoo_static_env[b]);F$()}function +Gg(){if(s.crypto)if(typeof +s.crypto.getRandomValues==="function"){var +a=new(s.Uint32Array)(1);s.crypto.getRandomValues(a);return[0,a[0]]}else +if(s.crypto.randomBytes==="function"){var +b=s.crypto.randomBytes(4),a=new(s.Uint32Array)(b);return[0,a[0]]}var +c=new +Date().getTime(),d=c^kf*Math.random();return[0,d]}function +dK(a){var b=1;while(a&&a.joo_tramp){a=a.joo_tramp.apply(null,a.joo_args);b++}return a}function -ak(b,a){return{joo_tramp:b,joo_args:a}}function -kH(a){return a}function -eO(a){return kD[a]}function -c(a){if(a +al(b,a){return{joo_tramp:b,joo_args:a}}function +Gh(c,a){if(typeof +a==="function"){c.fun=a;return 0}if(a.fun){c.fun=a.fun;return 0}var +b=a.length;while(b--)c[b]=a[b];return 0}function +ms(a){return a}function +i(a){if(a instanceof -Array)return a;if(D.RangeError&&a +Array)return a;if(s.RangeError&&a instanceof -D.RangeError&&a.message&&a.message.match(/maximum call stack/i))return kH(ab.Stack_overflow);if(D.InternalError&&a +s.RangeError&&a.message&&a.message.match(/maximum call stack/i))return ms(X.Stack_overflow);if(s.InternalError&&a instanceof -D.InternalError&&a.message&&a.message.match(/too much recursion/i))return kH(ab.Stack_overflow);if(a +s.InternalError&&a.message&&a.message.match(/too much recursion/i))return ms(X.Stack_overflow);if(a instanceof -D.Error&&eO(fR))return[0,eO(fR),a];return[0,ab.Failure,a6(String(a))]}var -q=function(A){"use strict";var -f=b6,ac=7,u=9007199254740992,J=p(u),O="0123456789abcdefghijklmnopqrstuvwxyz",g=D.BigInt,H=typeof +s.Error&&bL(f7))return[0,bL(f7),a];return[0,X.Failure,aL(String(a))]}var +p=function(A){"use strict";var +f=ca,ab=7,u=9007199254740992,I=r(u),N="0123456789abcdefghijklmnopqrstuvwxyz",g=Gl.BigInt,G=typeof g==="function";function d(a,b,c,f){if(typeof a==="undefined")return d[0];if(typeof -b!=="undefined")return+b===10&&!c?e(a):ag(a,b,c,f);return e(a)}function -a(b,a){this.value=b;this.sign=a;this.isSmall=false;this.caml_custom=ew}a.prototype=Object.create(d.prototype);function -b(a){this.value=a;this.sign=a<0;this.isSmall=true;this.caml_custom=ew}b.prototype=Object.create(d.prototype);function -c(a){this.value=a;this.caml_custom=ew}c.prototype=Object.create(d.prototype);function +b!=="undefined")return+b===10&&!c?e(a):af(a,b,c,f);return e(a)}function +a(b,a){this.value=b;this.sign=a;this.isSmall=false;this.caml_custom=eE}a.prototype=Object.create(d.prototype);function +b(a){this.value=a;this.sign=a<0;this.isSmall=true;this.caml_custom=eE}b.prototype=Object.create(d.prototype);function +c(a){this.value=a;this.caml_custom=eE}c.prototype=Object.create(d.prototype);function m(a){return-u0)return Math.floor(a);return Math.ceil(a)}function -P(g,h){var +t(a){if(a>0)return Math.floor(a);return Math.ceil(a)}function +O(g,h){var i=g.length,j=h.length,e=new Array(i),b=0,d=f,c,a;for(a=0;a=d?1:0;e[a]=c-b*d}while(a0)e.push(b);return e}function -v(a,b){if(a.length>=b.length)return P(a,b);return P(b,a)}function +v(a,b){if(a.length>=b.length)return O(a,b);return O(b,a)}function B(g,a){var h=g.length,d=new Array(h),c=f,e,b;for(b=0;b0){d[b++]=a%c;a=Math.floor(a/c)}return d}a.prototype.add=function(f){var @@ -820,29 +875,29 @@ a(B(c,Math.abs(d)),this.sign);return new a(v(c,d),this.sign)};a.prototype.plus=a.prototype.add;b.prototype.add=function(g){var f=e(g),c=this.value;if(c<0!==f.sign)return this.subtract(f.negate());var d=f.value;if(f.isSmall){if(m(c+d))return new -b(c+d);d=p(Math.abs(d))}return new +b(c+d);d=r(Math.abs(d))}return new a(B(d,Math.abs(c)),c<0)};b.prototype.plus=b.prototype.add;c.prototype.add=function(a){return new c(this.value+e(a).value)};c.prototype.plus=c.prototype.add;function y(d,h){var g=d.length,i=h.length,c=new Array(g),e=0,j=f,a,b;for(a=0;a=0)c=y(e,f);else{c=y(f,e);d=!d}c=n(c);if(typeof +e=0;c[a]=b}for(a=i;a=0)c=y(e,f);else{c=y(f,e);d=!d}c=o(c);if(typeof c==="number"){if(d)c=-c;return new b(c)}return new a(c,d)}function -G(h,l,k){var +F(h,l,k){var j=h.length,c=new -Array(j),i=-l,g=f,e,d;for(e=0;e=0)};b.prototype.minus=b.prototype.subtract;c.prototype.subtract=function(a){return new +b(a-d);return F(d,Math.abs(a),a>=0)};b.prototype.minus=b.prototype.subtract;c.prototype.subtract=function(a){return new c(this.value-e(a).value)};c.prototype.minus=c.prototype.subtract;a.prototype.negate=function(){return new a(this.value,!this.sign)};b.prototype.negate=function(){var c=this.sign,a=new @@ -851,58 +906,58 @@ c(-this.value)};a.prototype.abs=function(){return new a(this.value,false)};b.prototype.abs=function(){return new b(Math.abs(this.value))};c.prototype.abs=function(){return new c(this.value>=0?this.value:-this.value)};function -N(g,j){var +M(g,j){var i=g.length,l=j.length,n=i+l,c=C(n),m=f,e,d,a,h,k;for(a=0;a0){e[b++]=a%c;a=Math.floor(a/c)}return e}function -Z(c,b){var +Y(c,b){var a=[];while(b-->0)a.push(0);return a.concat(c)}function -E(b,c){var -a=Math.max(b.length,c.length);if(a<=30)return N(b,c);a=Math.ceil(a/2);var -f=b.slice(a),d=b.slice(0,a),i=c.slice(a),h=c.slice(0,a),e=E(d,h),g=E(f,i),k=E(v(d,f),v(h,i)),j=v(v(e,Z(y(y(k,e),g),a)),Z(g,2*a));r(j);return j}function -al(a,b){return-(iO*a)-iO*b+0.000015*a*b>0}a.prototype.multiply=function(j){var +D(b,c){var +a=Math.max(b.length,c.length);if(a<=30)return M(b,c);a=Math.ceil(a/2);var +f=b.slice(a),d=b.slice(0,a),i=c.slice(a),h=c.slice(0,a),e=D(d,h),g=D(f,i),k=D(v(d,f),v(h,i)),j=v(v(e,Y(y(y(k,e),g),a)),Y(g,2*a));s(j);return j}function +ak(a,b){return-(jT*a)-jT*b+0.000015*a*b>0}a.prototype.multiply=function(j){var h=e(j),c=this.value,b=h.value,i=this.sign!==h.sign,g;if(h.isSmall){if(b===0)return d[0];if(b===1)return this;if(b===-1)return this.negate();g=Math.abs(b);if(g=0;d--){j=g-1;if(b[d+h]!==l)j=Math.floor((b[d+h]*g+b[d+h-1])/l);c=0;e=0;m=i.length;for(a=0;ah)d=(d+1)*i;c=Math.ceil(d/m);do{j=w(b,c);if(o(j,a)<=0)break;c--}while(c);e.push(c);a=y(a,j)}e.reverse();return[n(e),n(a)]}function -Q(i,e){var -g=i.length,h=C(g),j=f,a,d,b,c;b=0;for(a=g-1;a>=0;--a){c=b*j+i[a];d=s(c/e);b=c-d*e;h[a]=d|0}return[h,b|0]}function +ac(q,k){var +r=q.length,h=k.length,g=f,s=C(k.length),l=k[h-1],n=Math.ceil(g/(2*l)),b=w(q,n),i=w(k,n),j,d,c,e,a,m,p;if(b.length<=r)b.push(0);i.push(0);l=i[h-1];for(d=r-h;d>=0;d--){j=g-1;if(b[d+h]!==l)j=Math.floor((b[d+h]*g+b[d+h-1])/l);c=0;e=0;m=i.length;for(a=0;ah)d=(d+1)*i;c=Math.ceil(d/m);do{j=w(b,c);if(q(j,a)<=0)break;c--}while(c);e.push(c);a=y(a,j)}e.reverse();return[o(e),o(a)]}function +P(i,e){var +g=i.length,h=C(g),j=f,a,d,b,c;b=0;for(a=g-1;a>=0;--a){c=b*j+i[a];d=t(c/e);b=c-d*e;h[a]=d|0}return[h,b|0]}function i(h,w){var -m,j=e(w);if(H)return[new +m,j=e(w);if(G)return[new c(h.value/j.value),new c(h.value%j.value)];var l=h.value,i=j.value,g;if(i===0)throw new Error("Cannot divide by zero");if(h.isSmall){if(j.isSmall)return[new -b(s(l/i)),new +b(t(l/i)),new b(l%i)];return[d[0],h]}if(j.isSmall){if(i===1)return[h,d[0]];if(i==-1)return[h.negate(),d[0]];var -r=Math.abs(i);if(rc.length?1:-1;for(var +q(b,c){if(b.length!==c.length)return b.length>c.length?1:-1;for(var a=b.length-1;a>=0;a--)if(b[a]!==c[a])return b[a]>c[a]?1:-1;return 0}a.prototype.compareAbs=function(d){var -a=e(d),b=this.value,c=a.value;if(a.isSmall)return 1;return o(b,c)};b.prototype.compareAbs=function(d){var +a=e(d),b=this.value,c=a.value;if(a.isSmall)return 1;return q(b,c)};b.prototype.compareAbs=function(d){var c=e(d),b=Math.abs(this.value),a=c.value;if(c.isSmall){a=Math.abs(a);return b===a?0:b>a?1:-1}return-1};c.prototype.compareAbs=function(c){var a=this.value,b=e(c).value;a=a>=0?a:-a;b=b>=0?b:-b;return a===b?0:a>b?1:-1};a.prototype.compare=function(b){if(b===Infinity)return-1;if(b===-Infinity)return 1;var -a=e(b),c=this.value,d=a.value;if(this.sign!==a.sign)return a.sign?1:-1;if(a.isSmall)return this.sign?-1:1;return o(c,d)*(this.sign?-1:1)};a.prototype.compareTo=a.prototype.compare;b.prototype.compare=function(c){if(c===Infinity)return-1;if(c===-Infinity)return 1;var +a=e(b),c=this.value,d=a.value;if(this.sign!==a.sign)return a.sign?1:-1;if(a.isSmall)return this.sign?-1:1;return q(c,d)*(this.sign?-1:1)};a.prototype.compareTo=a.prototype.compare;b.prototype.compare=function(c){if(c===Infinity)return-1;if(c===-Infinity)return 1;var b=e(c),a=this.value,d=b.value;if(b.isSmall)return a==d?0:a>d?1:-1;if(a<0!==b.sign)return a<0?-1:1;return a<0?1:-1};b.prototype.compareTo=b.prototype.compare;c.prototype.compare=function(a){if(a===Infinity)return-1;if(a===-Infinity)return 1;var b=this.value,c=e(a).value;return b===c?0:b>c?1:-1};c.prototype.compareTo=c.prototype.compare;a.prototype.equals=function(a){return this.compare(a)===0};c.prototype.eq=c.prototype.equals=b.prototype.eq=b.prototype.equals=a.prototype.eq=a.prototype.equals;a.prototype.notEquals=function(a){return this.compare(a)!==0};c.prototype.neq=c.prototype.notEquals=b.prototype.neq=b.prototype.notEquals=a.prototype.neq=a.prototype.notEquals;a.prototype.greater=function(a){return this.compare(a)>0};c.prototype.gt=c.prototype.greater=b.prototype.gt=b.prototype.greater=a.prototype.gt=a.prototype.greater;a.prototype.lesser=function(a){return this.compare(a)<0};c.prototype.lt=c.prototype.lesser=b.prototype.lt=b.prototype.lesser=a.prototype.lt=a.prototype.lesser;a.prototype.greaterOrEquals=function(a){return this.compare(a)>=0};c.prototype.geq=c.prototype.greaterOrEquals=b.prototype.geq=b.prototype.greaterOrEquals=a.prototype.geq=a.prototype.greaterOrEquals;a.prototype.lesserOrEquals=function(a){return this.compare(a)<=0};c.prototype.leq=c.prototype.lesserOrEquals=b.prototype.leq=b.prototype.lesserOrEquals=a.prototype.leq=a.prototype.lesserOrEquals;a.prototype.isEven=function(){return(this.value[0]&1)===0};b.prototype.isEven=function(){return(this.value&1)===0};c.prototype.isEven=function(){return(this.value&g(1))===g(0)};a.prototype.isOdd=function(){return(this.value[0]&1)===1};b.prototype.isOdd=function(){return(this.value&1)===1};c.prototype.isOdd=function(){return(this.value&g(1))===g(1)};a.prototype.isPositive=function(){return!this.sign};b.prototype.isPositive=function(){return this.value>0};c.prototype.isPositive=b.prototype.isPositive;a.prototype.isNegative=function(){return this.sign};b.prototype.isNegative=function(){return this.value<0};c.prototype.isNegative=b.prototype.isNegative;a.prototype.isUnit=function(){return false};b.prototype.isUnit=function(){return Math.abs(this.value)===1};c.prototype.isUnit=function(){return this.abs().value===g(1)};a.prototype.isZero=function(){return false};b.prototype.isZero=function(){return this.value===0};c.prototype.isZero=function(){return this.value===g(0)};a.prototype.isDivisibleBy=function(b){var a=e(b);if(a.isZero())return false;if(a.isUnit())return true;if(a.compareAbs(2)===0)return this.isEven();return this.mod(a).isZero()};c.prototype.isDivisibleBy=b.prototype.isDivisibleBy=a.prototype.isDivisibleBy;function -U(b){var +S(b){var a=b.abs();if(a.isUnit())return false;if(a.equals(2)||a.equals(3)||a.equals(5))return true;if(a.isEven()||a.isDivisibleBy(3)||a.isDivisibleBy(5))return false;if(a.lesser(49))return true}function -L(d,e){var -g=d.prev(),c=g,h=0,f,i,b,a;while(c.isEven())c=c.divide(2),h++;next:for(b=0;b-u)return new b(c-1);return new -a(J,true)};c.prototype.prev=function(){return new +a(I,true)};c.prototype.prev=function(){return new c(this.value-g(1))};var h=[1];while(2*h[h.length-1]<=f)h.push(2*h[h.length-1]);var x=h.length,j=h[x-1];function -_(a){return Math.abs(a)<=f}a.prototype.shiftLeft=function(c){var -a=e(c).toJSNumber();if(!_(a))throw new -Error(String(a)+it);if(a<0)return this.shiftRight(-a);var +Z(a){return Math.abs(a)<=f}a.prototype.shiftLeft=function(c){var +a=e(c).toJSNumber();if(!Z(a))throw new +Error(String(a)+ji);if(a<0)return this.shiftRight(-a);var b=this;if(b.isZero())return b;while(a>=x){b=b.multiply(j);a-=x-1}return b.multiply(h[a])};c.prototype.shiftLeft=b.prototype.shiftLeft=a.prototype.shiftLeft;a.prototype.shiftRight=function(d){var -a,b=e(d).toJSNumber();if(!_(b))throw new -Error(String(b)+it);if(b<0)return this.shiftLeft(-b);var +a,b=e(d).toJSNumber();if(!Z(b))throw new +Error(String(b)+ji);if(b<0)return this.shiftLeft(-b);var c=this;while(b>=x){if(c.isZero()||c.isNegative()&&c.isUnit())return c;a=i(c,j);c=a[1].isNegative()?a[0].prev():a[0];b-=x-1}a=i(c,h[b]);return a[1].isNegative()?a[0].prev():a[0]};c.prototype.shiftRight=b.prototype.shiftRight=a.prototype.shiftRight;function -K(h,a,r){a=e(a);var -m=h.isNegative(),p=a.isNegative(),l=m?h.not():h,o=p?a.not():a,b=0,c=0,k=null,n=null,f=[];while(!l.isZero()||!o.isZero()){k=i(l,j);b=k[1].toJSNumber();if(m)b=j-1-b;n=i(o,j);c=n[1].toJSNumber();if(p)c=j-1-c;l=k[0];o=n[0];f.push(r(b,c))}var -g=r(m?1:0,p?1:0)!==0?q(-1):q(0);for(var -d=f.length-1;d>=0;d-=1)g=g.multiply(j).add(q(f[d]));return g}a.prototype.not=function(){return this.negate().prev()};c.prototype.not=b.prototype.not=a.prototype.not;a.prototype.and=function(a){return K(this,a,function(a,b){return a&b})};c.prototype.and=b.prototype.and=a.prototype.and;a.prototype.or=function(a){return K(this,a,function(a,b){return a|b})};c.prototype.or=b.prototype.or=a.prototype.or;a.prototype.xor=function(a){return K(this,a,function(a,b){return a^b})};c.prototype.xor=b.prototype.xor=a.prototype.xor;var -I=1<<30,ab=(f&-f)*(f&-f)|I;function -F(c){var +J(h,a,r){a=e(a);var +m=h.isNegative(),q=a.isNegative(),l=m?h.not():h,o=q?a.not():a,b=0,c=0,k=null,n=null,f=[];while(!l.isZero()||!o.isZero()){k=i(l,j);b=k[1].toJSNumber();if(m)b=j-1-b;n=i(o,j);c=n[1].toJSNumber();if(q)c=j-1-c;l=k[0];o=n[0];f.push(r(b,c))}var +g=r(m?1:0,q?1:0)!==0?p(-1):p(0);for(var +d=f.length-1;d>=0;d-=1)g=g.multiply(j).add(p(f[d]));return g}a.prototype.not=function(){return this.negate().prev()};c.prototype.not=b.prototype.not=a.prototype.not;a.prototype.and=function(a){return J(this,a,function(a,b){return a&b})};c.prototype.and=b.prototype.and=a.prototype.and;a.prototype.or=function(a){return J(this,a,function(a,b){return a|b})};c.prototype.or=b.prototype.or=a.prototype.or;a.prototype.xor=function(a){return J(this,a,function(a,b){return a^b})};c.prototype.xor=b.prototype.xor=a.prototype.xor;var +H=1<<30,aa=(f&-f)*(f&-f)|H;function +E(c){var a=c.value,b=typeof -a==="number"?a|I:typeof -a==="bigint"?a|g(I):a[0]+a[1]*f|ab;return b&-b}function -S(b,a){if(a.compareTo(b)<=0){var -f=S(b,a.square(a)),d=f.p,c=f.e,e=d.multiply(a);return e.compareTo(b)<=0?{p:e,e:c*2+1}:{p:d,e:c*2}}return{p:q(1),e:0}}a.prototype.bitLength=function(){var -a=this;if(a.compareTo(q(0))<0)a=a.negate().subtract(q(1));if(a.compareTo(q(0))===0)return q(0);return q(S(a,q(2)).e).add(q(1))};c.prototype.bitLength=b.prototype.bitLength=a.prototype.bitLength;function -V(a,b){a=e(a);b=e(b);return a.greater(b)?a:b}function -M(a,b){a=e(a);b=e(b);return a.lesser(b)?a:b}function -R(a,b){a=e(a).abs();b=e(b).abs();if(a.equals(b))return a;if(a.isZero())return b;if(b.isZero())return a;var -c=d[1],f,g;while(a.isEven()&&b.isEven()){f=M(F(a),F(b));a=a.divide(f);b=b.divide(f);c=c.multiply(f)}while(a.isEven())a=a.divide(F(a));do{while(b.isEven())b=b.divide(F(b));if(a.greater(b)){g=b;b=a;a=g}b=b.subtract(a)}while(!b.isZero());return c.isUnit()?a:a.multiply(c)}function -af(a,b){a=e(a).abs();b=e(b).abs();return a.divide(R(a,b)).multiply(b)}function -ai(a,b){a=e(a);b=e(b);var -g=M(a,b),n=V(a,b),h=n.subtract(g).add(1);if(h.isSmall)return g.add(Math.floor(Math.random()*h));var +a==="number"?a|H:typeof +a==="bigint"?a|g(H):a[0]+a[1]*f|aa;return b&-b}function +R(b,a){if(a.compareTo(b)<=0){var +f=R(b,a.square(a)),d=f.p,c=f.e,e=d.multiply(a);return e.compareTo(b)<=0?{p:e,e:c*2+1}:{p:d,e:c*2}}return{p:p(1),e:0}}a.prototype.bitLength=function(){var +a=this;if(a.compareTo(p(0))<0)a=a.negate().subtract(p(1));if(a.compareTo(p(0))===0)return p(0);return p(R(a,p(2)).e).add(p(1))};c.prototype.bitLength=b.prototype.bitLength=a.prototype.bitLength;function +T(a,b){a=e(a);b=e(b);return a.greater(b)?a:b}function +L(a,b){a=e(a);b=e(b);return a.lesser(b)?a:b}function +Q(a,b){a=e(a).abs();b=e(b).abs();if(a.equals(b))return a;if(a.isZero())return b;if(b.isZero())return a;var +c=d[1],f,g;while(a.isEven()&&b.isEven()){f=L(E(a),E(b));a=a.divide(f);b=b.divide(f);c=c.multiply(f)}while(a.isEven())a=a.divide(E(a));do{while(b.isEven())b=b.divide(E(b));if(a.greater(b)){g=b;b=a;a=g}b=b.subtract(a)}while(!b.isZero());return c.isUnit()?a:a.multiply(c)}function +ae(a,b){a=e(a).abs();b=e(b).abs();return a.divide(Q(a,b)).multiply(b)}function +ah(a,b){a=e(a);b=e(b);var +g=L(a,b),n=T(a,b),h=n.subtract(g).add(1);if(h.isSmall)return g.add(Math.floor(Math.random()*h));var j=z(h,f).value,l=[],k=true;for(var c=0;c=i){if(c===T&&i===1)continue;throw new -Error(c+" is not a valid digit in base "+g+bu)}}g=e(g);var -h=[],j=b[0]===aA;for(a=j?1:0;a=i){if(c===U&&i===1)continue;throw new +Error(c+" is not a valid digit in base "+g+bi)}}g=e(g);var +h=[],j=b[0]===az;for(a=j?1:0;a=0;a--){b=b.add(e[a].times(c));c=c.times(f)}return g?b.negate():b}function -aj(b,a){a=a||O;if(b=0){e=c.divmod(b);c=e.quotient;var d=e.remainder;if(d.isNegative()){d=b.minus(d).abs();c=c.next()}g.push(d.toJSNumber())}g.push(c.toJSNumber());return{value:g.reverse(),isNegative:f}}function -aa(d,c,b){var -a=z(d,c);return(a.isNegative?aA:t)+a.value.map(function(a){return aj(a,b)}).join(t)}a.prototype.toArray=function(a){return z(this,a)};b.prototype.toArray=function(a){return z(this,a)};c.prototype.toArray=function(a){return z(this,a)};a.prototype.toString=function(a,f){if(a===A)a=10;if(a!==10)return aa(this,a,f);var +$(d,c,b){var +a=z(d,c);return(a.isNegative?az:n)+a.value.map(function(a){return ai(a,b)}).join(n)}a.prototype.toArray=function(a){return z(this,a)};b.prototype.toArray=function(a){return z(this,a)};c.prototype.toArray=function(a){return z(this,a)};a.prototype.toString=function(a,f){if(a===A)a=10;if(a!==10)return $(this,a,f);var d=this.value,c=d.length,e=String(d[--c]),h="0000000",b;while(--c>=0){b=String(d[c]);e+=h.slice(b.length)+b}var -g=this.sign?aA:t;return g+e};b.prototype.toString=function(a,b){if(a===A)a=10;if(a!=10)return aa(this,a,b);return String(this.value)};c.prototype.toString=b.prototype.toString;c.prototype.toJSON=a.prototype.toJSON=b.prototype.toJSON=function(){return this.toString()};a.prototype.valueOf=function(){return parseInt(this.toString(),10)};a.prototype.toJSNumber=a.prototype.valueOf;b.prototype.valueOf=function(){return this.value};b.prototype.toJSNumber=b.prototype.valueOf;c.prototype.valueOf=c.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function -Y(d){if(m(+d)){var -n=+d;if(n===s(n))return H?new +g=this.sign?az:n;return g+e};b.prototype.toString=function(a,b){if(a===A)a=10;if(a!=10)return $(this,a,b);return String(this.value)};c.prototype.toString=b.prototype.toString;c.prototype.toJSON=a.prototype.toJSON=b.prototype.toJSON=function(){return this.toString()};a.prototype.valueOf=function(){return parseInt(this.toString(),10)};a.prototype.toJSNumber=a.prototype.valueOf;b.prototype.valueOf=function(){return this.value};b.prototype.toJSNumber=b.prototype.valueOf;c.prototype.valueOf=c.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function +X(d){if(m(+d)){var +n=+d;if(n===t(n))return G?new c(g(n)):new b(n);throw new -Error(eA+d)}var -q=d[0]===aA;if(q)d=d.slice(1);var +Error(eI+d)}var +q=d[0]===az;if(q)d=d.slice(1);var h=d.split(/e/i);if(h.length>2)throw new -Error(eA+h.join(eD));if(h.length===2){var -e=h[1];if(e[0]===bs)e=e.slice(1);e=+e;if(e!==s(e)||!m(e))throw new -Error(eA+e+" is not a valid exponent.");var -f=h[0],i=f.indexOf(bu);if(i>=0){e-=f.length-i-1;f=f.slice(0,i)+f.slice(i+1)}if(e<0)throw new +Error(eI+h.join(eM));if(h.length===2){var +e=h[1];if(e[0]===bC)e=e.slice(1);e=+e;if(e!==t(e)||!m(e))throw new +Error(eI+e+" is not a valid exponent.");var +f=h[0],i=f.indexOf(bi);if(i>=0){e-=f.length-i-1;f=f.slice(0,i)+f.slice(i+1)}if(e<0)throw new Error("Cannot include negative exponent part for integers");f+=new Array(e+1).join(k);d=f}var -t=/^([0-9][0-9]*)$/.test(d);if(!t)throw new -Error(eA+d);if(H)return new -c(g(q?aA+d:d));var -p=[],j=d.length,o=ac,l=j-o;while(j>0){p.push(+d.slice(l,j));l-=o;if(l<0)l=0;j-=o}r(p);return new +r=/^([0-9][0-9]*)$/.test(d);if(!r)throw new +Error(eI+d);if(G)return new +c(g(q?az+d:d));var +p=[],j=d.length,o=ab,l=j-o;while(j>0){p.push(+d.slice(l,j));l-=o;if(l<0)l=0;j-=o}s(p);return new a(p,q)}function -ah(a){if(H)return new -c(g(a));if(m(a)){if(a!==s(a))throw new +ag(a){if(G)return new +c(g(a));if(m(a)){if(a!==t(a))throw new Error(a+" is not an integer.");return new -b(a)}return Y(a.toString())}function +b(a)}return X(a.toString())}function e(a){if(typeof -a==="number")return ah(a);if(typeof -a==="string")return Y(a);if(typeof +a==="number")return ag(a);if(typeof +a==="string")return X(a);if(typeof a==="bigint")return new c(a);return a}for(var -l=0;l0)d[-l]=e(-l)}d.one=d[1];d.zero=d[0];d.minusOne=d[-1];d.max=V;d.min=M;d.gcd=R;d.lcm=af;d.isInstance=function(d){return d +l=0;l0)d[-l]=e(-l)}d.one=d[1];d.zero=d[0];d.minusOne=d[-1];d.max=T;d.min=L;d.gcd=Q;d.lcm=ae;d.isInstance=function(d){return d instanceof a||d instanceof b||d instanceof -c};d.randBetween=ai;d.fromArray=function(b,a,c){return X(b.map(e),e(a||10),c)};return d}();function -aF(a){var -b=a.toJSNumber()|0;if(a.equals(q(b)))return b;return a}function -kK(a){return aF(q(a).abs())}function -kL(a,b){return aF(q(a).add(q(b)))}function -b$(a,b){return q(a).compare(q(b))}function -kM(b,a){a=q(a);if(a.equals(q(0)))cG();return aF(q(b).divide(q(a)))}function -Ev(b,a){a=q(a);if(a.equals(q(0)))cG();return aF(q(b).mod(a))}function -kN(a,b){return[0,kM(a,b),Ev(a,b)]}function -kO(a,b){return kM(a,b)}function -El(a,b){return q(a).equals(q(b))}function -En(a,b){return aF(q.gcd(q(a),q(b)).abs())}function -Ed(c,e,g){e=q(e);var +c};d.randBetween=ah;d.fromArray=function(b,a,c){return W(b.map(e),e(a||10),c)};return d}();function +aG(a){var +b=a.toJSNumber()|0;if(a.equals(p(b)))return b;return a}function +my(a){return aG(p(a).abs())}function +mz(a,b){return aG(p(a).add(p(b)))}function +ci(a,b){return p(a).compare(p(b))}function +mA(b,a){a=p(a);if(a.equals(p(0)))cR();return aG(p(b).divide(p(a)))}function +GD(b,a){a=p(a);if(a.equals(p(0)))cR();return aG(p(b).mod(a))}function +mB(a,b){return[0,mA(a,b),GD(a,b)]}function +mC(a,b){return mA(a,b)}function +Gt(a,b){return p(a).equals(p(b))}function +Gv(a,b){return aG(p.gcd(p(a),p(b)).abs())}function +Gj(c,e,g){e=p(e);var a=e.toArray(Math.pow(2,32));c.write(8,a.isNegative?1:0);var f=a.value.length,d=f*4;c.write(32,d);for(var -b=f-1;b>=0;b--){c.write(8,a.value[b]>>>0&aQ);c.write(8,a.value[b]>>>8&aQ);c.write(8,a.value[b]>>>16&aQ);c.write(8,a.value[b]>>>24&aQ)}g[0]=4*(1+((d+3)/4|0));g[1]=8*(1+((d+7)/8|0))}function -Ee(b,g){var +b=f-1;b>=0;b--){c.write(8,a.value[b]>>>0&aU);c.write(8,a.value[b]>>>8&aU);c.write(8,a.value[b]>>>16&aU);c.write(8,a.value[b]>>>24&aU)}g[0]=4*(1+((d+3)/4|0));g[1]=8*(1+((d+7)/8|0))}function +Gk(b,g){var e;switch(b.read8u()){case 1:e=true;break;case -0:e=false;break;default:b8("input_value: z (malformed input)")}var -f=b.read32u(),c=q(0);for(var +0:e=false;break;default:b6("input_value: z (malformed input)")}var +f=b.read32u(),c=p(0);for(var d=0;d>>0);c=a.shiftLeft(d*32).add(c)}if(e)c=c.negate();g[0]=f+4;return aF(c)}function -Eo(d){var -b=q(d).toArray(Math.pow(2,32)),a=0;for(var +a=p(b.read8u());a=a.add(b.read8u()<<8);a=a.add(b.read8u()<<16);a=a.add(b.read8u()<<24>>>0);c=a.shiftLeft(d*32).add(c)}if(e)c=c.negate();g[0]=f+4;return aG(c)}function +Gw(d){var +b=p(d).toArray(Math.pow(2,32)),a=0;for(var c=0;c=48&&a<=57)return a-48;if(a>=97&&a<=ct)return a-97+10;if(a>=65&&a<=70)return a-65+10}var -e=0;if(a[e]==aA)e++;for(;e=c)ac("Z.of_substring_base: invalid digit")}return aF(q(a,c))}function -ca(d,a,b,c){a=a4(a);if(b!=0||c!=a.length){if(a.length-b=0?1:0}function -eT(a){a=q(a);if(!Em(a))eP(eO(fX));var -b=q(i4),d=a.and(b).toJSNumber(),c=a.shiftRight(32).and(b).toJSNumber(),e=kA(d,c);return e}function -eU(){return new -Date().getTime()/aW}function -cK(e){var +if(d==lu||d=="X")c=16;else +if(d=="b"||d=="B")c=2;if(c!=10){a=a.substring(b+1);if(g==-1)a=az+a}}}}if(a[0]==bC)a=a.substring(1);a=a.replace(/^0+/,n);if(a==az||a==n)a=k;function +h(a){if(a>=48&&a<=57)return a-48;if(a>=97&&a<=et)return a-97+10;if(a>=65&&a<=70)return a-65+10}var +e=0;if(a[e]==az)e++;for(;e=c)ad("Z.of_substring_base: invalid digit")}return aG(p(a,c))}function +cj(d,a,b,c){a=br(a);if(b!=0||c!=a.length){if(a.length-b=0?1:0}function +e1(a){a=p(a);if(!Gu(a))eX(bL(ga));var +b=p(kf),d=a.and(b).toJSNumber(),c=a.shiftRight(32).and(b).toJSNumber(),e=mk(d,c);return e}function +e2(){return new +Date().getTime()/a2}function +cV(e){var a=new -Date(e*aW),b=a.getTime(),d=new -Date(Date.UTC(a.getUTCFullYear(),0,1)).getTime(),c=Math.floor((b-d)/ia);return[0,a.getUTCSeconds(),a.getUTCMinutes(),a.getUTCHours(),a.getUTCDate(),a.getUTCMonth(),a.getUTCFullYear()-bU,a.getUTCDay(),c,false|0]}function -eV(){return 0}function -Ez(h){var +Date(e*a2),b=a.getTime(),d=new +Date(Date.UTC(a.getUTCFullYear(),0,1)).getTime(),c=Math.floor((b-d)/iV);return[0,a.getUTCSeconds(),a.getUTCMinutes(),a.getUTCHours(),a.getUTCDate(),a.getUTCMonth(),a.getUTCFullYear()-bY,a.getUTCDay(),c,false|0]}function +e3(){return 0}function +GI(h){var a=new -Date(h*aW),b=a.getTime(),e=new -Date(a.getFullYear(),0,1).getTime(),c=Math.floor((b-e)/ia),d=new +Date(h*a2),b=a.getTime(),e=new +Date(a.getFullYear(),0,1).getTime(),c=Math.floor((b-e)/iV),d=new Date(a.getFullYear(),0,1),f=new -Date(a.getFullYear(),6,1),g=Math.max(d.getTimezoneOffset(),f.getTimezoneOffset());return[0,a.getSeconds(),a.getMinutes(),a.getHours(),a.getDate(),a.getMonth(),a.getFullYear()-bU,a.getDay(),c,a.getTimezoneOffset()f)a+=eD;var +c=e[d];if(typeof +c=="number")a+=c.toString();else +if(c +instanceof +bp)a+=ev+c.toString()+ev;else +if(typeof +c=="string")a+=ev+c.toString()+ev;else +a+=lc}a+=")"}else +if(b[0]==J)a+=b[1];return a}function +mg(a){if(a +instanceof +Array&&(a[0]==0||a[0]==J)){var +c=bL(kE);if(c)c(a,false);else{var +d=FC(a),b=bL(iu);if(b)b(0);s.console.error(gs+d+iK)}}else +throw a}function +Gc(){var +a=s;if(a.process&&a.process.on)a.process.on("uncaughtException",function(b,c){mg(b);a.process.exit(2)});else +if(a.addEventListener)a.addEventListener("error",function(a){if(a.error)mg(a.error)})}Gc();function +b(a,b){return a.length==1?a(b):a$(a,[b])}function +e(a,b,c){return a.length==2?a(b,c):a$(a,[b,c])}function +P(a,b,c,d){return a.length==3?a(b,c,d):a$(a,[b,c,d])}function +f0(a,b,c,d,e,f){return a.length==5?a(b,c,d,e,f):a$(a,[b,c,d,e,f])}function +Fp(a,b,c,d,e,f,g,h){return a.length==7?a(b,c,d,e,f,g,h):a$(a,[b,c,d,e,f,g,h])}FD();var +e5=[J,a(kg),-1],g5=[J,a(kF),-2],dM=[J,a(gl),-3],g1=[J,a(lb),-4],g6=[J,a(jM),-6],aH=[J,a(lh),-7],g3=[J,a(iU),-8],g4=[J,a(lk),-9],G=[J,a(lF),-11],g7=[J,a(ks),gk],Fo=[4,0,0,0,[12,45,[4,0,0,0,0]]],fe=[0,[11,a('File "'),[2,0,[11,a('", line '),[4,0,0,0,[11,a(kV),[4,0,0,0,[12,45,[4,0,0,0,[11,a(": "),[2,0,0]]]]]]]]]],a('File "%s", line %d, characters %d-%d: %s')],cs=[0,0,0],ej=[0,a(k1),a(kT),a(ll)];a6(11,g7,ks);a6(10,G,lF);a6(9,[J,a(je),-10],je);a6(8,g4,lk);a6(7,g3,iU);a6(6,aH,lh);a6(5,g6,jM);a6(4,[J,a(kJ),-5],kJ);a6(3,g1,lb);a6(2,dM,gl);a6(1,g5,kF);a6(0,e5,kg);var +mW=a("output_substring"),mT=a("%.12g"),mS=a(bi),mQ=a("true"),mR=a("false"),mH=a("Stdlib.Exit"),mJ=b7(0,0,lf),mL=b7(0,0,65520),mN=b7(1,0,lf),mZ=a("\\\\"),m0=a("\\'"),m1=a("\\b"),m2=a("\\t"),m3=a("\\n"),m4=a("\\r"),mY=a("Char.chr"),m5=a("hd"),m8=a("String.blit / Bytes.blit_string"),m7=a("Bytes.blit"),m6=a("String.sub / Bytes.sub"),m_=a("String.contains_from / Bytes.contains_from"),nb=a("Array.blit"),na=a("Array.sub"),ng=a("Map.remove_min_elt"),nh=[0,0,0,0],ni=[0,a("map.ml"),gh,10],nj=[0,0,0],nc=a(eq),nd=a(eq),ne=a(eq),nf=a(eq),nk=a("Stdlib.Queue.Empty"),nm=a("CamlinternalLazy.Undefined"),nt=a("Buffer.add_substring/add_subbytes"),ns=a("Buffer.add: cannot grow buffer"),nr=[0,a(lr),93,2],nq=[0,a(lr),94,2],nC=a("%c"),nD=a("%s"),nE=a(kr),nF=a(iS),nG=a(k$),nH=a(kB),nI=a("%f"),nJ=a("%B"),nK=a("%{"),nL=a("%}"),nM=a("%("),nN=a("%)"),nO=a("%a"),nP=a("%t"),nQ=a("%?"),nR=a("%r"),nS=a("%_r"),nT=[0,a(an),850,23],n4=[0,a(an),814,21],nW=[0,a(an),815,21],n5=[0,a(an),818,21],nX=[0,a(an),819,21],n6=[0,a(an),822,19],nY=[0,a(an),823,19],n7=[0,a(an),826,22],nZ=[0,a(an),827,22],n8=[0,a(an),831,30],n0=[0,a(an),832,30],n2=[0,a(an),836,26],nU=[0,a(an),837,26],n3=[0,a(an),846,28],nV=[0,a(an),847,28],n1=[0,a(an),851,23],o$=a(i$),o9=[0,a(an),1558,4],o_=a("Printf: bad conversion %["),pa=[0,a(an),1626,39],pb=[0,a(an),1649,31],pc=[0,a(an),1650,31],pd=a("Printf: bad conversion %_"),pe=a(i8),pf=a(jg),pg=a(i8),ph=a(jg),o7=a(gn),o5=a("neg_infinity"),o6=a(lJ),o4=a(bi),oZ=[0,du],oN=a("%+nd"),oO=a("% nd"),oQ=a("%+ni"),oR=a("% ni"),oS=a("%nx"),oT=a("%#nx"),oU=a("%nX"),oV=a("%#nX"),oW=a("%no"),oX=a("%#no"),oM=a("%nd"),oP=a(k$),oY=a("%nu"),oA=a("%+ld"),oB=a("% ld"),oD=a("%+li"),oE=a("% li"),oF=a("%lx"),oG=a("%#lx"),oH=a("%lX"),oI=a("%#lX"),oJ=a("%lo"),oK=a("%#lo"),oz=a("%ld"),oC=a(iS),oL=a("%lu"),on=a("%+Ld"),oo=a("% Ld"),oq=a("%+Li"),or=a("% Li"),os=a("%Lx"),ot=a("%#Lx"),ou=a("%LX"),ov=a("%#LX"),ow=a("%Lo"),ox=a("%#Lo"),om=a("%Ld"),op=a(kB),oy=a("%Lu"),oa=a("%+d"),ob=a("% d"),od=a("%+i"),oe=a("% i"),of=a("%x"),og=a("%#x"),oh=a("%X"),oi=a("%#X"),oj=a("%o"),ok=a("%#o"),n$=a(gv),oc=a(kr),ol=a(i$),nu=a("@]"),nv=a("@}"),nw=a("@?"),nx=a("@\n"),ny=a("@."),nz=a("@@"),nA=a("@%"),nB=a("@"),n9=a("CamlinternalFormat.Type_mismatch"),pl=a(n),pm=[0,[11,a(eD),[2,0,[2,0,0]]],a(", %s%s")],pL=[0,[11,a(gs),[2,0,[12,10,0]]],a(lA)],pM=[0,[11,a("Fatal error in uncaught exception handler: exception "),[2,0,[12,10,0]]],a("Fatal error in uncaught exception handler: exception %s\n")],pK=a("Fatal error: out of memory in uncaught exception handler"),pI=[0,[11,a(gs),[2,0,[12,10,0]]],a(lA)],pE=[0,[2,0,[12,10,0]],a("%s\n")],pw=a("Raised at"),px=a("Re-raised at"),py=a("Raised by primitive operation at"),pz=a("Called from"),pA=a(" (inlined)"),pC=a(n),pB=[0,[2,0,[12,32,[2,0,[11,a(' in file "'),[2,0,[12,34,[2,0,[11,a(", line "),[4,0,0,0,[11,a(kV),Fo]]]]]]]]]],a('%s %s in file "%s"%s, line %d, characters %d-%d')],pD=[0,[2,0,[11,a(" unknown location"),0]],a("%s unknown location")],pr=a("Out of memory"),ps=a("Stack overflow"),pt=a("Pattern matching failed"),pu=a("Assertion failed"),pv=a("Undefined recursive module"),pn=[0,[12,40,[2,0,[2,0,[12,41,0]]]],a("(%s%s)")],po=a(n),pp=a(n),pq=[0,[12,40,[2,0,[12,41,0]]],a("(%s)")],pk=[0,[4,0,0,0,0],a(gv)],pi=[0,[3,0,0],a("%S")],pj=a(lc),pF=[0,a(n),a("(Cannot print locations:\n bytecode executable program file not found)"),a("(Cannot print locations:\n bytecode executable program file appears to be corrupt)"),a("(Cannot print locations:\n bytecode executable program file has wrong magic number)"),a("(Cannot print locations:\n bytecode executable program file cannot be opened;\n -- too many open files. Try running with OCAMLRUNPARAM=b=2)")],pP=a("Fun.Finally_raised: "),pN=a("Stdlib.Fun.Finally_raised"),pQ=a(lu),Fm=a("OCAMLRUNPARAM"),Fk=a("CAMLRUNPARAM"),pR=a(n),qc=[3,0,3],qd=a(bi),p9=a(eN),p_=a("<\/"),p$=a(n),p5=a(eN),p6=a(gd),p7=a(n),p3=a("\n"),p2=[0,a(n)],pY=a(n),pZ=a(n),p0=a(n),p1=a(n),pW=[0,a(n),0,a(n)],pV=a(n),pU=a("Stdlib.Format.String_tag"),qq=a(n),qv=a(jo),qx=a(lY),qy=a(ki),qz=a(iJ),qA=a(ke),qB=a(kQ),qC=a(jF),qD=a(k5),qE=a(f5),qF=a(jI),qG=a(k4),qH=a(j8),qI=a(k6),qJ=a(jE),qK=a(it),qL=a(l1),qM=a(iI),qN=a(iQ),qO=a(j0),qP=a(kD),qQ=a(eL),qR=a(i3),qS=a(lM),qT=a(k_),qU=a(ly),qV=a(kv),qW=a(eG),qX=a(gw),qY=a(iZ),qZ=a(iY),q0=a(jU),q1=a(lP),q2=a(lK),q3=a(lT),q4=a(jp),q5=a(iT),q6=a(jb),q7=a(kL),q8=a(lW),q9=a(j5),q_=a(jv),q$=a(kh),ra=a(iP),rb=a(j9),rc=a(iw),rd=a(k8),re=a(lI),rf=a(jt),rg=a(i1),rh=a(j3),ri=a(kw),rj=a(jL),rk=a(kH),rl=a(kd),rm=a(k7),rn=a(jH),ro=a(jr),rp=a(lq),rq=a(kX),rr=a(lC),rs=a(kU),rt=a(kP),ru=a(kO),rv=a(iO),rw=a(jy),rx=a(i9),ry=a(le),rz=a(lv),rA=[0,[11,a("EUNKNOWNERR "),[4,0,0,0,0]],a("EUNKNOWNERR %d")],qw=[0,[11,a("Unix.Unix_error(Unix."),[2,0,[11,a(eD),[3,0,[11,a(eD),[3,0,[12,41,0]]]]]]],a("Unix.Unix_error(Unix.%s, %S, %S)")],qr=a(dy),qs=a(n),qt=a(n),qu=a(dy),rB=a("0.0.0.0"),rC=a("127.0.0.1"),Fj=a("::"),Fi=a("::1"),rS=a(n),rT=a(n),rZ=[0,92],r1=a("\\( group not closed by \\)"),r0=[0,a(iz),gb,10],r2=a("[ class not closed by ]"),r3=a("spurious \\) in regular expression"),rV=a("too many r* or r+ where r is nullable"),rW=a(n),rX=a(n),rU=[0,a(iz),213,11],r9=[0,a(kM),52,4],r8=[0,a(kM),58,34],r7=a("Not a valid time zone"),uj=a("Not a month"),uh=a("Not a day"),ue=a("from_business: bad week"),uf=a("from_business: bad date"),tr=[0,a(kx),jK,4],tq=[0,a(kx),gC,4],tj=[0,-4713,12,31],tk=[0,k0,1,23],tl=[0,dr,10,14],tm=[0,dr,10,5],th=a("Date.Out_of_bounds"),ti=a("Date.Undefined"),tH=a("Date.Period.Not_computable"),tQ=[0,31,59,90,cw,151,181,212,gu,273,304,334,ew],un=[0,a(eH),429,6],um=[0,a(eH),lo,4],ul=[0,a(eH),167,6],uk=[0,a(eH),67,4],ur=a("[a-zA-Z]+"),uw=b7(1,0,0),us=a("Z.Overflow"),ut=a(ga),uA=a(n),uB=a("+inf"),uC=a("-inf"),uD=a(lQ),uE=a("undef"),uG=[0,a("q.ml"),486,25],uF=a("Q.of_string: invalid digit"),uy=a("impossible case"),uH=a("Runtime.EmptyError"),uI=a("Runtime.AssertionFailed"),uK=a("Runtime.ConflictError"),uM=a("Runtime.ImpossibleDate"),uO=a("Runtime.NoValueProvided"),D$=[0,0],Ea=[1,0],Eb=[2,0],D_=[0,a(a1),74,11,74,27,[0,a(a8),[0,a(a0),[0,a(q),0]]]],Ec=[0,a(a9),[0,a("enfants_\xc3\xa0_charge"),0]],Ew=[0,a(a1),90,20,90,69,[0,a(a8),[0,a(a0),[0,a(q),0]]]],Ee=[0,a(a9),[0,a("allocations_familiales.personne_charge_effective_permanente_est_parent"),0]],Ed=[0,a(a1),75,3,75,25,[0,a(a8),[0,a(a0),[0,a(q),0]]]],Ev=[0,a(a1),93,20,93,74,[0,a(a8),[0,a(a0),[0,a(q),0]]]],Eg=[0,a(a9),[0,a("allocations_familiales.personne_charge_effective_permanente_remplit_titre_I"),0]],Ef=[0,a(a1),75,3,75,25,[0,a(a8),[0,a(a0),[0,a(q),0]]]],Ei=[0,a(a9),[0,a("allocations_familiales.ressources_m\xc3\xa9nage"),0]],Eh=[0,a(a1),75,3,75,25,[0,a(a8),[0,a(a0),[0,a(q),0]]]],Ek=[0,a(a9),[0,a("allocations_familiales.r\xc3\xa9sidence"),0]],Ej=[0,a(a1),75,3,75,25,[0,a(a8),[0,a(a0),[0,a(q),0]]]],Em=[0,a(a9),[0,a("allocations_familiales.date_courante"),0]],El=[0,a(a1),75,3,75,25,[0,a(a8),[0,a(a0),[0,a(q),0]]]],Eo=[0,a(a9),[0,a("allocations_familiales.enfants_\xc3\xa0_charge"),0]],En=[0,a(a1),75,3,75,25,[0,a(a8),[0,a(a0),[0,a(q),0]]]],Eu=[0,a(a1),96,20,96,66,[0,a(a8),[0,a(a0),[0,a(q),0]]]],Eq=[0,a(a9),[0,a("allocations_familiales.avait_enfant_\xc3\xa0_charge_avant_1er_janvier_2012"),0]],Ep=[0,a(a1),75,3,75,25,[0,a(a8),[0,a(a0),[0,a(q),0]]]],Er=[0,a(a9),[0,a(iM),[0,a(d),0]]],Es=[0,a(a9),[0,a(iM),[0,a(d),0]]],Et=[0,a(a9),[0,a("i_montant_vers\xc3\xa9"),0]],DD=[0,a(d),[0,a(dn),[0,a(aw),0]]],DE=[0,a(d),[0,a(dn),0]],DF=[0,a(d),[0,a(dn),[0,a(ay),0]]],DG=[0,a(d),[0,a(dn),0]],Dn=[0,a(d),[0,a(bG),[0,a(aw),0]]],Do=[0,a(d),[0,a(bG),0]],Dp=[0,a(d),[0,a(bG),[0,a(ay),0]]],Dq=[0,a(d),[0,a(bG),0]],Dr=a(cB),Dw=a(km),Dx=a(dx),Ds=[0,a(d),[0,a(di),[0,a(aw),0]]],Dt=[0,a(d),[0,a(di),0]],Du=[0,a(d),[0,a(di),[0,a(ay),0]]],Dv=[0,a(d),[0,a(di),0]],Dm=[0,a(z),j$,11,j$,49,[0,a(y),0]],De=a(a3),Df=[0,a(aj),272,5,274,41,[0,a(cF),[0,a(I),[0,a(K),[0,a(E),[0,a(ah),[0,a(x),0]]]]]]],Dg=a(a3),Dh=a(cB),Di=a(a3),C$=a(a3),Da=[0,a(aj),262,5,ka,42,[0,a(cF),[0,a(I),[0,a(K),[0,a(E),[0,a(ah),[0,a(x),0]]]]]]],Db=a(a3),Dc=a(cB),Dd=a(a3),C_=a(k),C0=[0,a(d),[0,a(V),[0,a(aw),0]]],C1=[0,a(d),[0,a(V),0]],C2=[0,a(d),[0,a(V),[0,a(ay),0]]],C3=[0,a(d),[0,a(V),0]],C4=a(U),C5=a(f4),C6=[0,a(aj),382,5,385,23,[0,a(eK),[0,a(bZ),[0,a(dh),[0,a(bI),[0,a(ah),[0,a(x),0]]]]]]],C7=a("0.0567"),CR=[0,a(d),[0,a(V),[0,a(aw),0]]],CS=[0,a(d),[0,a(V),0]],CT=[0,a(d),[0,a(V),[0,a(ay),0]]],CU=[0,a(d),[0,a(V),0]],CV=a(U),CW=a("11"),CX=a(f4),CY=[0,a(aj),373,5,376,42,[0,a(eK),[0,a(bZ),[0,a(dh),[0,a(bI),[0,a(ah),[0,a(x),0]]]]]]],CZ=a("0.0369"),CN=[0,a(d),[0,a(dp),[0,a(aw),0]]],CO=[0,a(d),[0,a(dp),0]],CP=[0,a(d),[0,a(dp),[0,a(ay),0]]],CQ=[0,a(d),[0,a(dp),0]],CM=[0,a(z),is,11,is,37,[0,a(y),0]],CJ=[8,0],CK=[0,a(t),ls,5,ls,24,[0,a(kC),[0,a(L),[0,a(M),[0,a(q),0]]]]],CH=a(U),CI=[0,a(aj),350,5,351,69,[0,a(eK),[0,a(bZ),[0,a(dh),[0,a(bI),[0,a(ah),[0,a(x),0]]]]]]],CA=[0,a(d),[0,a(dt),[0,a(aw),0]]],CB=[0,a(d),[0,a(dt),0]],CC=[0,a(d),[0,a(dt),[0,a(ay),0]]],CD=[0,a(d),[0,a(dt),0]],CE=a(U),Cr=[0,a(d),[0,a(V),[0,a(aw),0]]],Cs=[0,a(d),[0,a(V),0]],Ct=[0,a(d),[0,a(V),[0,a(ay),0]]],Cu=[0,a(d),[0,a(V),0]],Cv=[0,a(a1),27,5,27,44,[0,a("R\xc3\xa8gles diverses"),[0,a(a0),[0,a(q),0]]]],Cw=a(k),Cl=[0,a(d),[0,a(V),[0,a(aw),0]]],Cm=[0,a(d),[0,a(V),0]],Cn=[0,a(d),[0,a(V),[0,a(ay),0]]],Co=[0,a(d),[0,a(V),0]],Cp=[0,a(aj),eF,3,eF,41,[0,a(a_),[0,a(I),[0,a(K),[0,a(E),[0,a(ah),[0,a(x),0]]]]]]],Cq=a("0.04"),Cf=[0,a(d),[0,a(V),[0,a(aw),0]]],Cg=[0,a(d),[0,a(V),0]],Ch=[0,a(d),[0,a(V),[0,a(ay),0]]],Ci=[0,a(d),[0,a(V),0]],Cj=[0,a(aj),95,3,96,44,[0,a(a_),[0,a(I),[0,a(K),[0,a(E),[0,a(ah),[0,a(x),0]]]]]]],Ck=a(jh),B$=[0,a(d),[0,a(V),[0,a(aw),0]]],Ca=[0,a(d),[0,a(V),0]],Cb=[0,a(d),[0,a(V),[0,a(ay),0]]],Cc=[0,a(d),[0,a(V),0]],Cd=[0,a(aj),55,3,55,41,[0,a(a_),[0,a(I),[0,a(K),[0,a(E),[0,a(ah),[0,a(x),0]]]]]]],Ce=a(f1),B_=[0,a(z),kZ,11,kZ,47,[0,a(y),0]],B1=[0,a(aj),cJ,3,cJ,41,[0,a(a_),[0,a(I),[0,a(K),[0,a(E),[0,a(ah),[0,a(x),0]]]]]]],B2=a(U),B3=a(jh),B4=a(k),BX=[0,a(aj),74,3,75,44,[0,a(a_),[0,a(I),[0,a(K),[0,a(E),[0,a(ah),[0,a(x),0]]]]]]],BY=a(U),BZ=a(f1),B0=a(k),BT=[0,a(aj),35,3,35,41,[0,a(a_),[0,a(I),[0,a(K),[0,a(E),[0,a(ah),[0,a(x),0]]]]]]],BU=a(U),BV=a(lD),BW=a(k),BM=[0,a(aj),cJ,3,cJ,41,[0,a(a_),[0,a(I),[0,a(K),[0,a(E),[0,a(ah),[0,a(x),0]]]]]]],BN=a(ax),BO=a(ax),BP=a("0.1025"),BQ=a(k),BH=[0,a(aj),74,3,75,44,[0,a(a_),[0,a(I),[0,a(K),[0,a(E),[0,a(ah),[0,a(x),0]]]]]]],BI=a(ax),BJ=a(ax),BK=a("0.205"),BL=a(k),BC=[0,a(aj),35,3,35,41,[0,a(a_),[0,a(I),[0,a(K),[0,a(E),[0,a(ah),[0,a(x),0]]]]]]],BD=a(ax),BE=a(ax),BF=a("0.41"),BG=a(k),By=[0,a(aj),gu,5,gu,43,[0,a(cF),[0,a(I),[0,a(K),[0,a(E),[0,a(ah),[0,a(x),0]]]]]]],Bz=a("0.0559"),Bw=[0,a(aj),229,5,lo,46,[0,a(cF),[0,a(I),[0,a(K),[0,a(E),[0,a(ah),[0,a(x),0]]]]]]],Bx=a("0.1117"),Bu=[0,a(aj),jl,5,jl,43,[0,a(cF),[0,a(I),[0,a(K),[0,a(E),[0,a(ah),[0,a(x),0]]]]]]],Bv=a("0.20234"),Bn=a(a3),Bo=[0,a(aj),170,5,171,68,[0,a(a_),[0,a(I),[0,a(K),[0,a(E),[0,a(ah),[0,a(x),0]]]]]]],Bp=a(a3),Bq=a(cB),Br=a(a3),Bi=a(a3),Bj=[0,a(aj),162,5,163,68,[0,a(a_),[0,a(I),[0,a(K),[0,a(E),[0,a(ah),[0,a(x),0]]]]]]],Bk=a(a3),Bl=a(cB),Bm=a(a3),Bh=a(k),Bg=[0,a(z),jq,11,jq,31,[0,a(y),0]],Ba=[0,a(d),[0,a(bj),[0,a(aw),0]]],Bb=[0,a(d),[0,a(bj),0]],Bc=[0,a(d),[0,a(bj),[0,a(ay),0]]],Bd=[0,a(d),[0,a(bj),0]],Be=[0,a(ai),313,5,lw,58,[0,a(lz),[0,a(I),[0,a(K),[0,a(E),[0,a(ag),[0,a(x),0]]]]]]],A3=[0,a(d),[0,a(dz),[0,a(aw),0]]],A4=[0,a(d),[0,a(dz),0]],A5=[0,a(d),[0,a(dz),[0,a(ay),0]]],A6=[0,a(d),[0,a(dz),0]],A7=[0,a(d),[0,a(bj),[0,a(aw),0]]],A8=[0,a(d),[0,a(bj),0]],A9=[0,a(d),[0,a(bj),[0,a(ay),0]]],A_=[0,a(d),[0,a(bj),0]],A$=[0,a(ai),299,5,300,58,[0,a(lz),[0,a(I),[0,a(K),[0,a(E),[0,a(ag),[0,a(x),0]]]]]]],A2=[0,a(z),eF,11,eF,34,[0,a(y),0]],D0=[8,0],D1=a(U),D2=[0,a(t),344,5,345,72,[0,a(kC),[0,a(L),[0,a(M),[0,a(q),0]]]]],DY=a(U),DZ=[0,a(ai),406,5,407,72,[0,a(ge),[0,a(bZ),[0,a(eC),[0,a(bI),[0,a(ag),[0,a(x),0]]]]]]],DW=a(ax),DX=[0,a(ai),es,5,es,70,[0,a(l3),[0,a(I),[0,a(K),[0,a(E),[0,a(ag),[0,a(x),0]]]]]]],AP=[0,a(d),[0,a(bG),[0,a(aw),0]]],AQ=[0,a(d),[0,a(bG),0]],AR=[0,a(d),[0,a(bG),[0,a(ay),0]]],AS=[0,a(d),[0,a(bG),0]],AT=a(cB),AU=a(km),AV=a(dx),AG=[0,a(t),lV,5,lV,49,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],AH=a(k),AI=a("5728"),AJ=a(k),AC=[0,a(t),497,5,498,53,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],AD=a(k),AE=a("0.0717"),AF=a(k),Ay=[0,a(t),489,5,490,53,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],Az=a(k),AA=a("0.0847"),AB=a(k),Au=[0,a(t),481,5,482,53,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],Av=a(k),Aw=a("0.0976"),Ax=a(k),Aq=[0,a(t),473,5,474,53,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],Ar=a(k),As=a("0.115"),At=a(k),Am=[0,a(t),465,5,466,53,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],An=a(k),Ao=a("0.1163"),Ap=a(k),Ai=[0,a(t),457,5,458,53,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],Aj=a(k),Ak=a("0.122"),Al=a(k),Ae=[0,a(t),449,5,450,53,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],Af=a(k),Ag=a("0.1278"),Ah=a(k),Aa=[0,a(t),441,5,442,53,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],Ab=a(k),Ac=a("0.1335"),Ad=a(k),z8=[0,a(t),433,5,434,53,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],z9=a(k),z_=a("0.1393"),z$=a(k),z4=[0,a(t),425,5,jk,53,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],z5=a(k),z6=a("0.145"),z7=a(k),z1=a(k),z2=a(jc),z3=a(k),zV=[0,a(t),j4,5,j4,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],zW=a(U),zX=a("0.3068"),zY=a(k),zR=[0,a(t),jm,5,jm,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],zS=a(U),zT=a("0.2936"),zU=a(k),zN=[0,a(t),jO,5,jO,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],zO=a(U),zP=a("0.284"),zQ=a(k),zJ=[0,a(t),k2,5,k2,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],zK=a(U),zL=a("0.2672"),zM=a(k),zF=[0,a(t),jd,5,jd,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],zG=a(U),zH=a("0.273"),zI=a(k),zB=[0,a(t),jY,5,jY,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],zC=a(U),zD=a("0.2555"),zE=a(k),zx=[0,a(t),jP,5,jP,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],zy=a(U),zz=a("0.2496"),zA=a(k),zt=[0,a(t),lp,5,lp,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],zu=a(U),zv=a("0.2437"),zw=a(k),zp=[0,a(t),gb,5,gb,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],zq=a(U),zr=a("0.2379"),zs=a(k),zl=[0,a(t),kN,5,kN,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],zm=a(U),zn=a("0.232"),zo=a(k),zi=a(U),zj=a(lD),zk=a(k),zc=[0,a(t),lt,5,lt,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],zd=a(ax),ze=a("0.143"),zf=a(k),y_=[0,a(t),kq,5,kq,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],y$=a(ax),za=a("0.1259"),zb=a(k),y6=[0,a(t),kk,5,kk,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],y7=a(ax),y8=a("0.1089"),y9=a(k),y2=[0,a(t),ix,5,ix,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],y3=a(ax),y4=a("0.0918"),y5=a(k),yY=[0,a(t),lL,5,lL,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],yZ=a(ax),y0=a("0.0842"),y1=a(k),yU=[0,a(t),lS,5,lS,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],yV=a(ax),yW=a("0.0766"),yX=a(k),yQ=[0,a(t),lH,5,lH,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],yR=a(ax),yS=a("0.069"),yT=a(k),yM=[0,a(t),i_,5,i_,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],yN=a(ax),yO=a("0.075"),yP=a(k),yI=[0,a(t),kA,5,kA,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],yJ=a(ax),yK=a("0.0539"),yL=a(k),yE=[0,a(t),jD,5,jD,69,[0,a(N),[0,a(L),[0,a(M),[0,a(q),0]]]]],yF=a(ax),yG=a(jz),yH=a(k),yB=a(ax),yC=a(f1),yD=a(k),ys=a(U),yt=[0,a(ai),420,6,421,72,[0,a(ge),[0,a(bZ),[0,a(eC),[0,a(bI),[0,a(ag),[0,a(x),0]]]]]]],yn=[0,a(ao),[0,a(dq),[0,a(aw),0]]],yo=[0,a(ao),[0,a(dq),0]],yp=[0,a(ao),[0,a(dq),[0,a(ay),0]]],yq=[0,a(ao),[0,a(dq),0]],yr=[0,a(ai),jK,5,125,59,[0,a(l3),[0,a(I),[0,a(K),[0,a(E),[0,a(ag),[0,a(x),0]]]]]]],ym=[0,a(z),bD,11,bD,35,[0,a(y),0]],yg=[0,a(t),lN,5,lN,69,[0,a(b1),[0,a(jX),[0,a(bW),[0,a(q),0]]]]],yh=a(jf),yi=a("5827900"),yd=[0,a(t),b0,5,b0,69,[0,a(jC),[0,a(bW),[0,a(q),0]]]],ye=a(la),yf=a("5775900"),ya=[0,a(t),cw,5,cw,69,[0,a(iA),[0,a(bW),[0,a(q),0]]]],yb=a(lE),yc=a("5684900"),x9=[0,a(t),87,5,87,69,[0,a(lO),[0,a(bW),[0,a(q),0]]]],x_=a(k3),x$=a("5628600"),x7=a(l0),x8=a("5595000"),x2=[0,a(t),jV,5,jV,69,[0,a(b1),[0,a(jX),[0,a(bW),[0,a(q),0]]]]],x3=a(jf),x4=a("8155800"),xZ=[0,a(t),jA,5,jA,69,[0,a(jC),[0,a(bW),[0,a(q),0]]]],x0=a(la),x1=a("8083100"),xW=[0,a(t),bD,5,bD,69,[0,a(iA),[0,a(bW),[0,a(q),0]]]],xX=a(lE),xY=a("7955800"),xT=[0,a(t),94,5,94,69,[0,a(lO),[0,a(bW),[0,a(q),0]]]],xU=a(k3),xV=a("7877000"),xR=a(l0),xS=a("7830000"),xK=[0,a(ao),[0,a(dl),[0,a(aw),0]]],xL=[0,a(ao),[0,a(dl),0]],xM=[0,a(ao),[0,a(dl),[0,a(ay),0]]],xN=[0,a(ao),[0,a(dl),0]],xH=[0,a(dj),83,19,83,69,[0,a(f6),[0,a(I),[0,a(K),[0,a(E),[0,a(dv),[0,a(x),0]]]]]]],xG=a("14"),xF=[0,a(z),ko,11,ko,38,[0,a(y),0]],xh=[0,a(ai),269,5,270,48,[0,a(bn),[0,a(I),[0,a(K),[0,a(E),[0,a(ag),[0,a(x),0]]]]]]],xi=[0,0],xf=[0,a(ai),kt,5,259,56,[0,a(bn),[0,a(I),[0,a(K),[0,a(E),[0,a(ag),[0,a(x),0]]]]]]],xg=[1,0],xd=[0,a(ai),kI,5,kI,70,[0,a(bn),[0,a(I),[0,a(K),[0,a(E),[0,a(ag),[0,a(x),0]]]]]]],xe=[0,0],xb=[0,a(ai),kW,5,kW,69,[0,a(bn),[0,a(I),[0,a(K),[0,a(E),[0,a(ag),[0,a(x),0]]]]]]],xc=[0,0],w$=[0,a(ai),jB,5,jB,60,[0,a(bn),[0,a(I),[0,a(K),[0,a(E),[0,a(ag),[0,a(x),0]]]]]]],xa=[0,0],w_=[0,a(z),du,11,du,20,[0,a(y),0]],w7=[0,a(ai),263,5,ka,48,[0,a(bn),[0,a(I),[0,a(K),[0,a(E),[0,a(ag),[0,a(x),0]]]]]]],w8=[0,0],w5=[0,a(ai),li,5,dm,56,[0,a(bn),[0,a(I),[0,a(K),[0,a(E),[0,a(ag),[0,a(x),0]]]]]]],w6=[2,0],w3=[0,a(ai),jj,5,jj,70,[0,a(bn),[0,a(I),[0,a(K),[0,a(E),[0,a(ag),[0,a(x),0]]]]]]],w4=[1,0],w1=[0,a(ai),jQ,5,jQ,69,[0,a(bn),[0,a(I),[0,a(K),[0,a(E),[0,a(ag),[0,a(x),0]]]]]]],w2=[0,0],wZ=[0,a(ai),kY,5,kY,60,[0,a(bn),[0,a(I),[0,a(K),[0,a(E),[0,a(ag),[0,a(x),0]]]]]]],w0=[0,0],wY=[0,a(z),et,11,et,26,[0,a(y),0]],w9=[0,a(d),[0,a(bG),0]],xj=[0,a(d),[0,a("versement"),0]],xl=a(eJ),xk=[0,a(aj),lx,43,lx,44,[0,a(cF),[0,a(I),[0,a(K),[0,a(E),[0,a(ah),[0,a(x),0]]]]]]],xm=[0,a(d),[0,a("nombre_enfants_l521_1"),0]],xo=a(eJ),xn=[0,a(dj),64,52,64,53,[0,a(f6),[0,a(I),[0,a(K),[0,a(E),[0,a(dv),[0,a(x),0]]]]]]],xp=[0,a(d),[0,a("nombre_enfants_alin\xc3\xa9a_2_l521_3"),0]],xq=[0,a(d),[0,a(jJ),[0,a(go),0]]],xr=[0,a(d),[0,a(jJ),[0,a(go),0]]],xt=[0,a(d),[0,a("prestations_familiales.date_courante"),0]],xs=[0,a(z),cM,3,cM,25,[0,a(y),0]],xv=[1,0],xw=[0,a(d),[0,a("prestations_familiales.prestation_courante"),0]],xu=[0,a(z),cM,3,cM,25,[0,a(y),0]],xy=[0,a(d),[0,a("prestations_familiales.r\xc3\xa9sidence"),0]],xx=[0,a(z),cM,3,cM,25,[0,a(y),0]],xz=[0,a(d),[0,a(lm),[0,a(ao),0]]],xA=[0,a(d),[0,a(lm),[0,a(ao),0]]],xC=[0,a(d),[0,a("enfant_le_plus_\xc3\xa2g\xc3\xa9.enfants"),0]],xB=[0,a(z),iH,3,iH,21,[0,a(y),0]],xD=[0,a(d),[0,a(j_),[0,a(gx),0]]],xE=[0,a(d),[0,a(j_),[0,a(gx),0]]],xI=[0,a(d),[0,a(bj),0]],xJ=[0,a(z),aR,11,aR,61,[0,a(y),0]],xO=[0,a(d),[0,a("enfants_\xc3\xa0_charge_droit_ouvert_prestation_familiale"),0]],xP=[0,a(d),[0,a(dz),0]],xQ=[0,a(z),jS,11,jS,28,[0,a(y),0]],x5=[0,a(d),[0,a("plafond_II_d521_3"),0]],x6=[0,a(z),jn,11,jn,27,[0,a(y),0]],yj=[0,a(d),[0,a("plafond_I_d521_3"),0]],D7=a(U),D8=[0,a(ai),jk,5,427,71,[0,a(ge),[0,a(bZ),[0,a(eC),[0,a(bI),[0,a(ag),[0,a(x),0]]]]]]],yk=[0,a(z),kn,11,kn,34,[0,a(y),0]],yl=[0,a(d),[0,a("droit_ouvert_compl\xc3\xa9ment"),0]],yu=[0,a(d),[0,a(dt),0]],yw=a(eJ),yx=a(eJ),yy=a(jz),D6=a(k),yv=[0,a(z),ds,11,ds,64,[0,a(y),0]],yz=[0,a(d),[0,a("montant_initial_base_quatri\xc3\xa8me_enfant_et_plus_mayotte"),0]],yA=[0,a(z),kp,11,kp,56,[0,a(y),0]],zg=[0,a(d),[0,a("montant_initial_base_troisi\xc3\xa8me_enfant_mayotte"),0]],zh=[0,a(z),gC,11,gC,55,[0,a(y),0]],zZ=[0,a(d),[0,a("montant_initial_base_deuxi\xc3\xa8me_enfant_mayotte"),0]],z0=[0,a(z),iF,11,iF,54,[0,a(y),0]],AK=[0,a(d),[0,a("montant_initial_base_premier_enfant_mayotte"),0]],AL=[0,a(z),iN,11,iN,31,[0,a(y),0]],AM=[0,a(d),[0,a("nombre_total_enfants"),0]],AO=a(dx),AN=[0,a(z),gq,11,gq,31,[0,a(y),0]],AW=[0,a(d),[0,a("nombre_moyen_enfants"),0]],D3=a(U),D4=[0,a(aj),ku,5,360,71,[0,a(eK),[0,a(bZ),[0,a(dh),[0,a(bI),[0,a(ah),[0,a(x),0]]]]]]],D5=a(jc),AY=a(k),AX=[0,a(z),gz,11,gz,46,[0,a(y),0]],AZ=[0,a(d),[0,a("montant_initial_base_premier_enfant"),0]],A0=[0,a(z),kj,11,kj,28,[0,a(y),0]],A1=[0,a(d),[0,a("droit_ouvert_base"),0]],Bf=[0,a(d),[0,a(V),0]],Bs=[0,a(d),[0,a(dB),0]],Bt=[0,a(z),cb,11,cb,47,[0,a(y),0]],BA=[0,a(d),[0,a("montant_vers\xc3\xa9_forfaitaire_par_enfant"),0]],BB=[0,a(z),gA,11,gA,56,[0,a(y),0]],BR=[0,a(d),[0,a("montant_initial_base_troisi\xc3\xa8me_enfant_et_plus"),0]],BS=[0,a(z),gB,11,gB,47,[0,a(y),0]],B5=[0,a(d),[0,a("montant_initial_base_deuxi\xc3\xa8me_enfant"),0]],B7=a(dx),B8=a(dx),B6=[0,a(z),cJ,11,cJ,38,[0,a(y),0]],B9=[0,a(d),[0,a("rapport_enfants_total_moyen"),0]],Cx=[0,a(d),[0,a(dp),0]],Cz=a(k),Cy=[0,a(z),iL,11,iL,36,[0,a(y),0]],CF=[0,a(d),[0,a("montant_vers\xc3\xa9_forfaitaire"),0]],CG=[0,a(z),jw,11,jw,31,[0,a(y),0]],CL=[0,a(d),[0,a("montant_initial_base"),0]],C8=[0,a(d),[0,a(di),0]],C9=[0,a(z),kc,11,kc,52,[0,a(y),0]],Dj=[0,a(d),[0,a("montant_vers\xc3\xa9_compl\xc3\xa9ment_pour_forfaitaire"),0]],Dk=[0,a(z),gf,11,gf,43,[0,a(y),0]],Dl=[0,a(d),[0,a("montant_avec_garde_altern\xc3\xa9e_base"),0]],Dy=[0,a(d),[0,a(dn),0]],DV=a(k),Dz=[0,a(z),lG,11,lG,29,[0,a(y),0]],DA=[0,a(d),[0,a("montant_vers\xc3\xa9_base"),0]],DC=a(k),DU=a(k),DB=[0,a(z),kz,11,kz,35,[0,a(y),0]],DH=[0,a(d),[0,a("montant_vers\xc3\xa9_majoration"),0]],DI=[0,a(z),kS,11,kS,58,[0,a(y),0]],DJ=[0,a(d),[0,a("montant_base_compl\xc3\xa9ment_pour_base_et_majoration"),0]],DL=[0,a(d),[0,a(dB),[0,a(aw),0]]],DM=[0,a(d),[0,a(dB),0]],DN=[0,a(d),[0,a(dB),[0,a(ay),0]]],DO=[0,a(d),[0,a(dB),0]],DT=a(k),DK=[0,a(z),kb,11,kb,59,[0,a(y),0]],DP=[0,a(d),[0,a("montant_vers\xc3\xa9_compl\xc3\xa9ment_pour_base_et_majoration"),0]],DS=a(k),DQ=[0,a(z),iB,10,iB,23,[0,a(y),0]],DR=[0,a(d),[0,a("montant_vers\xc3\xa9"),0]],wL=[0,a(ai),60,5,62,32,[0,a(gg),[0,a(f$),[0,a(el),[0,a(E),[0,a(ag),[0,a(x),0]]]]]]],wK=[0,a(ai),49,5,50,50,[0,a(gg),[0,a(f$),[0,a(el),[0,a(E),[0,a(ag),[0,a(x),0]]]]]]],wJ=[0,a(z),65,10,65,22,[0,a(y),0]],wH=[0,a(ai),68,5,71,57,[0,a(gg),[0,a(f$),[0,a(el),[0,a(E),[0,a(ag),[0,a(x),0]]]]]]],wG=[0,a(z),66,10,66,29,[0,a(y),0]],wr=[0,a(t),60,5,61,34,[0,a("Instruction interminist\xc3\xa9rielle n\xc2\xb0DSS/2B/2021/65 du 19 mars 2021 relative \xc3\xa0 la revalorisation au 1er avril 2021 des prestations familiales servies en m\xc3\xa9tropole, en Guadeloupe, en Guyane, en Martinique, \xc3\xa0 la R\xc3\xa9union, \xc3\xa0 Saint-Barth\xc3\xa9lemy, \xc3\xa0 Saint-Martin et dans le d\xc3\xa9partement de Mayotte"),[0,a(f_),[0,a(q),0]]]],ws=a("41481"),wp=[0,a(t),44,5,45,34,[0,a("Instruction interminist\xc3\xa9rielle no DSS/SD2B/2020/33 du 18 f\xc3\xa9vrier 2020 relative \xc3\xa0 la revalorisation au 1er avril 2020 des prestations familiales servies en m\xc3\xa9tropole, en Guadeloupe, en Guyane, en Martinique, \xc3\xa0 La R\xc3\xa9union, \xc3\xa0 Saint-Barth\xc3\xa9lemy, \xc3\xa0 Saint-Martin et dans le d\xc3\xa9partement de Mayotte"),[0,a(f_),[0,a(q),0]]]],wq=a("41404"),wn=[0,a(t),24,5,25,34,[0,a("Instruction minist\xc3\xa9rielle N\xc2\xb0DSS/SD2B/2019/65 du 25 mars 2019 relative \xc3\xa0 la revalorisation au 1er avril 2019 des prestations familiales servies en m\xc3\xa9tropole"),[0,a(f_),[0,a(q),0]]]],wo=a("41316"),wk=a("20"),wj=[0,a(dj),21,34,21,36,[0,a("Article R512-2"),[0,a("Chapitre 2 : Champ d'application."),[0,a(el),[0,a(E),[0,a(dv),[0,a(x),0]]]]]]],wl=[0,a(ao),[0,a("\xc3\xa2ge_l512_3_2"),0]],wm=[0,a(z),74,10,74,24,[0,a(y),0]],wt=[0,a(ao),[0,a("base_mensuelle"),0]],wv=[0,a(ao),[0,a("smic.date_courante"),0]],wu=[0,a(z),73,3,73,7,[0,a(y),0]],wx=[0,a(ao),[0,a("smic.r\xc3\xa9sidence"),0]],ww=[0,a(z),73,3,73,7,[0,a(y),0]],wy=[0,a(ao),[0,a(lU),[0,a(f9),0]]],wz=[0,a(ao),[0,a(lU),[0,a(f9),0]]],wQ=[0,0],wS=[1,0],wT=[2,0],wU=[3,0],wV=[4,0],wW=[5,0],wR=[0,a(ai),354,5,ku,30,[0,a("Article L751-1"),[0,a("Chapitre 1er : G\xc3\xa9n\xc3\xa9ralit\xc3\xa9s"),[0,a(eC),[0,a(bI),[0,a(ag),[0,a(x),0]]]]]]],wA=[0,a(z),69,10,69,33,[0,a(y),0]],wB=[0,a(ao),[0,a("r\xc3\xa9gime_outre_mer_l751_1"),0]],wN=[0,a(dj),i4,18,i4,41,[0,a("Article R755-0-2"),[0,a(bZ),[0,a(dh),[0,a(bI),[0,a(dv),[0,a(x),0]]]]]]],wO=a(ln),wP=a(jx),wD=a(ln),wE=a(jx),wC=[0,a(z),67,11,67,27,[0,a(y),0]],wF=[0,a(ao),[0,a("plafond_l512_3_2"),0]],wI=[0,a(ao),[0,a(dq),0]],wM=[0,a(ao),[0,a(dl),0]],wc=[2,0],wd=a(k),we=a(k),wf=[1,0],wg=a(U),wb=[0,a(z),85,10,85,21,[0,a(y),0]],wh=[0,a(gx),[0,a("le_plus_\xc3\xa2g\xc3\xa9"),0]],v_=a(f4),v9=[0,a(dj),78,49,78,51,[0,a(f6),[0,a(I),[0,a(K),[0,a(E),[0,a(dv),[0,a(x),0]]]]]]],v$=[0,a(go),[0,a(bj),0]],v4=[8,0],v5=[0,a(t),lw,5,317,6,[0,a(b1),[0,a(iC),[0,a(cA),[0,a(q),0]]]]],v6=a("774"),vU=[6,0],vX=[0,0],vY=[1,0],vZ=[2,0],v0=[3,0],v1=[4,0],v2=[5,0],v3=[7,0],vV=[0,a(t),297,5,306,6,[0,a(b1),[0,a(iC),[0,a(cA),[0,a(q),0]]]]],vW=a("1025"),vR=[8,0],vS=[0,a(t),276,5,278,6,[0,a(b1),[0,a(i6),[0,a(cA),[0,a(q),0]]]]],vT=a("766"),vH=[6,0],vK=[0,0],vL=[1,0],vM=[2,0],vN=[3,0],vO=[4,0],vP=[5,0],vQ=[7,0],vI=[0,a(t),kt,5,267,6,[0,a(b1),[0,a(i6),[0,a(cA),[0,a(q),0]]]]],vJ=a("1015"),vE=[8,0],vF=[0,a(t),237,5,239,6,[0,a(b1),[0,a(iy),[0,a(cA),[0,a(q),0]]]]],vG=a("757"),vu=[6,0],vx=[0,0],vy=[1,0],vz=[2,0],vA=[3,0],vB=[4,0],vC=[5,0],vD=[7,0],vv=[0,a(t),219,5,228,6,[0,a(b1),[0,a(iy),[0,a(cA),[0,a(q),0]]]]],vw=a("1003"),vt=[0,a(z),43,10,43,22,[0,a(y),0]],v7=[0,a(f9),[0,a("brut_horaire"),0]],vk=a("a_d\xc3\xa9j\xc3\xa0_ouvert_droit_aux_allocations_familiales"),vl=a("prise_en_charge"),vm=a("\xc3\xa2ge"),vn=a("date_de_naissance"),vo=a("r\xc3\xa9muneration_mensuelle"),vp=a("obligation_scolaire"),vq=a("identifiant"),vr=[0,a("Enfant"),0],vb=a("PrestationAccueilJeuneEnfant"),vd=a(d),ve=a("Compl\xc3\xa9mentFamilial"),vf=a("AllocationLogement"),vg=a("Allocation\xc3\x89ducationEnfantHandicap\xc3\xa9"),vh=a("AllocationSoutienFamilial"),vi=a("AllocationRentr\xc3\xa9eScolaire"),vj=a("AllocationJournali\xc3\xa8rePresenceParentale"),vc=[0,a("\xc3\x89l\xc3\xa9mentPrestationsFamiliales"),0],u2=a(j6),u4=a(kK),u5=a(i2),u6=a("LaR\xc3\xa9union"),u7=a("SaintBarth\xc3\xa9lemy"),u8=a("SaintMartin"),u9=a(jR),u_=a("SaintPierreEtMiquelon"),u$=a(lg),u3=[0,a("Collectivit\xc3\xa9"),0],uY=a("Avant"),u0=a("Pendant"),u1=a("Apr\xc3\xa8s"),uZ=[0,a("SituationObligationScolaire"),0],uS=a("GardeAltern\xc3\xa9ePartageAllocations"),uU=a("GardeAltern\xc3\xa9eAllocataireUnique"),uV=a("EffectiveEtPermanente"),uW=a("ServicesSociauxAllocationVers\xc3\xa9e\xc3\x80LaFamille"),uX=a("ServicesSociauxAllocationVers\xc3\xa9eAuxServicesSociaux"),uT=[0,a("PriseEnCharge"),0],Ex=a("Jsoo_runtime.Error.Exn"),Ey=a(f7),Fc=a("Begin call"),Fd=a("End call"),Fe=a("Variable definition"),Ff=a("Decision taken"),ET=a("Confi\xc3\xa9 aux service sociaux, allocation vers\xc3\xa9e aux services sociaux"),EU=a("Confi\xc3\xa9 aux service sociaux, allocation vers\xc3\xa9e \xc3\xa0 la famille"),EV=a("Effective et permanente"),EW=a("Garde altern\xc3\xa9e, allocataire unique"),EX=a("Garde altern\xc3\xa9e, partage des allocations"),EZ=[0,0],E0=[1,0],E1=[2,0],E2=[3,0],E3=[4,0],EY=a("Unknown prise en charge"),EJ=a(j6),EK=a(kK),EL=a("La R\xc3\xa9union"),EM=a(i2),EN=a(lg),EO=a(jR),EP=a("Saint Barth\xc3\xa9lemy"),EQ=a("Saint Martin"),ER=a("Saint Pierre et Miquelon"),E4=[7,0],E5=[5,0],E6=[4,0],E7=[6,0],E8=[8,0],E9=[2,0],E_=[3,0],E$=[1,0],Fa=[0,0],ES=a("unknown collectivite!"),EH=a(n),EF=[0,[4,0,0,0,[12,68,[4,0,0,0,[12,77,[4,0,0,0,[12,89,0]]]]]],a("%dD%dM%dY")],EE=[0,a(kT),a(k1),a(ll)];function +Y(a){if(typeof a==="number")return 0;else switch(a[0]){case -0:return[0,X(a[1])];case -1:return[1,X(a[1])];case -2:return[2,X(a[1])];case -3:return[3,X(a[1])];case -4:return[4,X(a[1])];case -5:return[5,X(a[1])];case -6:return[6,X(a[1])];case -7:return[7,X(a[1])];case +0:return[0,Y(a[1])];case +1:return[1,Y(a[1])];case +2:return[2,Y(a[1])];case +3:return[3,Y(a[1])];case +4:return[4,Y(a[1])];case +5:return[5,Y(a[1])];case +6:return[6,Y(a[1])];case +7:return[7,Y(a[1])];case 8:var -c=a[1];return[8,c,X(a[2])];case +c=a[1];return[8,c,Y(a[2])];case 9:var -b=a[1];return[9,b,b,X(a[3])];case -10:return[10,X(a[1])];case -11:return[11,X(a[1])];case -12:return[12,X(a[1])];case -13:return[13,X(a[1])];default:return[14,X(a[1])]}}function +b=a[1];return[9,b,b,Y(a[3])];case +10:return[10,Y(a[1])];case +11:return[11,Y(a[1])];case +12:return[12,Y(a[1])];case +13:return[13,Y(a[1])];default:return[14,Y(a[1])]}}function aC(a,b){if(typeof a==="number")return b;else switch(a[0]){case @@ -1161,287 +1243,290 @@ d=a[2],e=a[1];return[9,e,d,aC(a[3],b)];case 11:return[11,aC(a[1],b)];case 12:return[12,aC(a[1],b)];case 13:return[13,aC(a[1],b)];default:return[14,aC(a[1],b)]}}function -S(a,b){if(typeof +T(a,b){if(typeof a==="number")return b;else switch(a[0]){case -0:return[0,S(a[1],b)];case -1:return[1,S(a[1],b)];case +0:return[0,T(a[1],b)];case +1:return[1,T(a[1],b)];case 2:var -c=a[1];return[2,c,S(a[2],b)];case +c=a[1];return[2,c,T(a[2],b)];case 3:var -d=a[1];return[3,d,S(a[2],b)];case +d=a[1];return[3,d,T(a[2],b)];case 4:var -e=a[3],f=a[2],g=a[1];return[4,g,f,e,S(a[4],b)];case +e=a[3],f=a[2],g=a[1];return[4,g,f,e,T(a[4],b)];case 5:var -h=a[3],i=a[2],j=a[1];return[5,j,i,h,S(a[4],b)];case +h=a[3],i=a[2],j=a[1];return[5,j,i,h,T(a[4],b)];case 6:var -k=a[3],l=a[2],m=a[1];return[6,m,l,k,S(a[4],b)];case +k=a[3],l=a[2],m=a[1];return[6,m,l,k,T(a[4],b)];case 7:var -n=a[3],o=a[2],p=a[1];return[7,p,o,n,S(a[4],b)];case +n=a[3],o=a[2],p=a[1];return[7,p,o,n,T(a[4],b)];case 8:var -q=a[3],r=a[2],s=a[1];return[8,s,r,q,S(a[4],b)];case +q=a[3],r=a[2],s=a[1];return[8,s,r,q,T(a[4],b)];case 9:var -t=a[1];return[9,t,S(a[2],b)];case -10:return[10,S(a[1],b)];case +t=a[1];return[9,t,T(a[2],b)];case +10:return[10,T(a[1],b)];case 11:var -u=a[1];return[11,u,S(a[2],b)];case +u=a[1];return[11,u,T(a[2],b)];case 12:var -v=a[1];return[12,v,S(a[2],b)];case +v=a[1];return[12,v,T(a[2],b)];case 13:var -w=a[2],x=a[1];return[13,x,w,S(a[3],b)];case +w=a[2],x=a[1];return[13,x,w,T(a[3],b)];case 14:var -y=a[2],z=a[1];return[14,z,y,S(a[3],b)];case -15:return[15,S(a[1],b)];case -16:return[16,S(a[1],b)];case +y=a[2],z=a[1];return[14,z,y,T(a[3],b)];case +15:return[15,T(a[1],b)];case +16:return[16,T(a[1],b)];case 17:var -A=a[1];return[17,A,S(a[2],b)];case +A=a[1];return[17,A,T(a[2],b)];case 18:var -B=a[1];return[18,B,S(a[2],b)];case -19:return[19,S(a[1],b)];case +B=a[1];return[18,B,T(a[2],b)];case +19:return[19,T(a[1],b)];case 20:var -C=a[2],D=a[1];return[20,D,C,S(a[3],b)];case +C=a[2],D=a[1];return[20,D,C,T(a[3],b)];case 21:var -E=a[1];return[21,E,S(a[2],b)];case -22:return[22,S(a[1],b)];case +E=a[1];return[21,E,T(a[2],b)];case +22:return[22,T(a[1],b)];case 23:var -F=a[1];return[23,F,S(a[2],b)];default:var -G=a[2],H=a[1];return[24,H,G,S(a[3],b)]}}function -bl(a){throw[0,dA,a]}function -ae(a){throw[0,gA,a]}var -gB=[P,kT,aj(0)];function -dB(b,a){return kz(b,a)?b:a}function -dC(a){return 0<=a?a:-a|0}var -kU=f_,kW=cF(kV),kY=cF(kX),k0=cF(kZ);function -bG(d,c){var -a=E(d),e=E(c),b=aa(a+e|0);bZ(d,0,b,0,a);bZ(c,0,b,a,e);return aB(b)}function -k1(a){return a?k2:k3}DW(0);var -k4=kC(1),k5=kC(2),eW=[0,function(b){function +F=a[1];return[23,F,T(a[2],b)];default:var +G=a[2],H=a[1];return[24,H,G,T(a[3],b)]}}function +e4(a,c,b){return a[1]===c?(a[1]=b,1):0}function +bu(a){throw[0,dM,a]}function +ae(a){throw[0,g1,a]}var +g2=[J,mH,aA(0)];function +dN(b,a){return mj(b,a)?b:a}function +cW(a){return 0<=a?a:-a|0}var +mI=gp,mK=cQ(mJ),mM=cQ(mL),mO=cQ(mN);function +a7(d,c){var +a=F(d),e=F(c),b=ac(a+e|0);b4(d,0,b,0,a);b4(c,0,b,a,e);return aB(b)}function +mP(a){return a?mQ:mR}F4(0);var +mU=mn(1),bb=mn(2);function +mV(b){function a(b){var a=b;for(;;){if(a){var -d=a[2],e=a[1];try{gs(e)}catch(a){a=c(a);if(a[1]!==gC)throw a;var -f=a}var -a=d;continue}return 0}}return a(DX(0))}];function -k7(b){var -a=[0,0],c=eW[1];eW[1]=function(e){if(1-a[1]){a[1]=1;d(b,0)}return d(c,0)};return 0}function -k8(a){return d(eW[1],0)}function -cb(a){if(0<=a&&!(cw>>0){if(!(25<(b+bt|0)>>>0))c=1}else +c=a[2],d=a[1];try{ce(d)}catch(a){a=i(a);if(a[1]!==g5)throw a;var +e=a}var +a=c;continue}return 0}}return a(F5(0))}function +cX(b,a){return gR(b,a,0,F(a))}function +g8(a){cX(bb,a);mo(bb,10);return ce(bb)}var +e6=[0,mV];function +mX(d){for(;;){var +a=e6[1],e=[0,1],c=1-e4(e6,a,function(a,c){return function(e){if(e4(a,1,0))b(d,0);return b(c,0)}}(e,a));if(c)continue;return c}}function +e7(a){return b(e6[1],0)}gU(a(iu),e7);function +ck(a){if(0<=a&&!(cG>>0){if(!(25>>0))c=1}else if(23!==b)c=1;return c?a+32|0:a}var -gF=Ea(0)[1],gG=D$(0),cL=(4*gG|0)-1|0;aj(0);var -le=D_(0);function -gH(c){var +g_=Gf(0),cY=(4*g_|0)-1|0;function +g$(c){var b=0,a=c;for(;;){if(a){var b=b+1|0,a=a[2];continue}return b}}function -gI(a){return a?a[1]:bl(lf)}function -dD(d){var +ha(a){return a?a[1]:bu(m5)}function +dO(d){var a=d,b=0;for(;;){if(a){var -c=[0,a[1],b],a=a[2],b=c;continue}return b}}typeof -le==="number";function -b3(b,a){if(a){var -c=a[2],e=d(b,a[1]);return[0,e,b3(b,c)]}return 0}function -a7(a,c){var -b=aa(a);Dv(b,0,a,c);return b}function -gJ(a){var -b=aS(a),c=aa(b);bY(a,0,c,0,b);return c}function -dE(a){return aB(gJ(a))}function -gK(c,b,a){if(0<=b&&0<=a&&!((aS(c)-a|0)>>0))e=1}else +f=0;if(1>>0))e=1}else if(65<=d)e=1}else{var -f=0;if(32!==d)if(43<=d)switch(d+ka|0){case +f=0;if(32!==d)if(43<=d)switch(d+lR|0){case 5:if(a<(c+2|0)&&1>>0){if(33<(n-61|0)>>>0)p=1}else +n=cT(k,j)+gy|0,p=0;if(59>>0){if(33>>0)p=1}else if(2===n)p=1;if(!p){var j=j+1|0;continue}var -e=bD(k),a=[0,0],r=aS(e)-1|0,w=0;if(!(r<0)){var +e=bJ(k),a=[0,0],r=aW(e)-1|0,w=0;if(!(r<0)){var i=w;for(;;){var -f=ds(e,i),g=0;if(32<=f){var +f=dD(e,i),g=0;if(32<=f){var l=f-34|0,q=0;if(58>>0){if(93<=l)q=1}else -if(56<(l-1|0)>>>0){g=1;q=1}if(!q){var +if(56>>0){g=1;q=1}if(!q){var m=1;g=2}}else if(11<=f){if(13===f)g=1}else if(8<=f)g=1;switch(g){case @@ -1978,40 +2081,40 @@ m=4;break;case 1:var m=2;break}a[1]=a[1]+m|0;var z=i+1|0;if(r!==i){var -i=z;continue}break}}if(a[1]===aS(e))var -t=gJ(e);else{var -b=aa(a[1]);a[1]=0;var -s=aS(e)-1|0,x=0;if(!(s<0)){var +i=z;continue}break}}if(a[1]===aW(e))var +t=hb(e);else{var +b=ac(a[1]);a[1]=0;var +s=aW(e)-1|0,x=0;if(!(s<0)){var h=x;for(;;){var -c=ds(e,h),d=0;if(35<=c)if(92===c)d=2;else -if(bt<=c)d=1;else +c=dD(e,h),d=0;if(35<=c)if(92===c)d=2;else +if(bD<=c)d=1;else d=3;else if(32<=c)if(34<=c)d=2;else d=3;else if(14<=c)d=1;else switch(c){case -8:$(b,a[1],92);a[1]++;$(b,a[1],98);break;case -9:$(b,a[1],92);a[1]++;$(b,a[1],f2);break;case -10:$(b,a[1],92);a[1]++;$(b,a[1],ge);break;case -13:$(b,a[1],92);a[1]++;$(b,a[1],f$);break;default:d=1}switch(d){case -1:$(b,a[1],92);a[1]++;$(b,a[1],48+(c/aO|0)|0);a[1]++;$(b,a[1],48+((c/10|0)%10|0)|0);a[1]++;$(b,a[1],48+(c%10|0)|0);break;case -2:$(b,a[1],92);a[1]++;$(b,a[1],c);break;case -3:$(b,a[1],c);break}a[1]++;var +8:aa(b,a[1],92);a[1]++;aa(b,a[1],98);break;case +9:aa(b,a[1],92);a[1]++;aa(b,a[1],gf);break;case +10:aa(b,a[1],92);a[1]++;aa(b,a[1],gz);break;case +13:aa(b,a[1],92);a[1]++;aa(b,a[1],gq);break;default:d=1}switch(d){case +1:aa(b,a[1],92);a[1]++;aa(b,a[1],48+(c/aR|0)|0);a[1]++;aa(b,a[1],48+((c/10|0)%10|0)|0);a[1]++;aa(b,a[1],48+(c%10|0)|0);break;case +2:aa(b,a[1],92);a[1]++;aa(b,a[1],c);break;case +3:aa(b,a[1],c);break}a[1]++;var y=h+1|0;if(s!==h){var h=y;continue}break}}var t=b}var o=aB(t)}var -u=E(o),v=a7(u+2|0,34);bZ(o,0,v,1,u);return aB(v)}}function -gX(d,f){var -g=dC(f),e=gY?gY[1]:70;switch(d[2]){case +u=F(o),v=bc(u+2|0,34);b4(o,0,v,1,u);return aB(v)}}function +hq(d,f){var +g=cW(f),e=oZ[1];switch(d[2]){case 0:var -b=ct;break;case +b=et;break;case 1:var -b=ek;break;case +b=es;break;case 2:var b=69;break;case 3:var -b=b7;break;case +b=du;break;case 4:var b=71;break;case 5:var @@ -2021,733 +2124,789 @@ b=104;break;case 7:var b=72;break;default:var b=70}var -c=gU(16);cg(c,37);switch(d[1]){case +c=hm(16);cp(c,37);switch(d[1]){case 0:break;case -1:cg(c,43);break;default:cg(c,32)}if(8<=d[2])cg(c,35);cg(c,46);au(c,a(t+g));cg(c,b);return gW(c)}function -dI(m,a){if(13<=m){var -g=[0,0],h=E(a)-1|0,n=0;if(!(h<0)){var -c=n;for(;;){if(!(9<(cJ(a,c)+ea|0)>>>0))g[1]++;var +1:cp(c,43);break;default:cp(c,32)}if(8<=d[2])cp(c,35);cp(c,46);au(c,a(n+g));cp(c,b);return ho(c)}function +dT(m,a){if(13<=m){var +g=[0,0],h=F(a)-1|0,n=0;if(!(h<0)){var +c=n;for(;;){if(!(9>>0))g[1]++;var q=c+1|0;if(h!==c){var c=q;continue}break}}var -i=g[1],j=aa(E(a)+((i-1|0)/3|0)|0),k=[0,0],d=function(a){a0(j,k[1],a);k[1]++;return 0},e=[0,((i-1|0)%3|0)+1|0],l=E(a)-1|0,o=0;if(!(l<0)){var +i=g[1],j=ac(F(a)+((i-1|0)/3|0)|0),k=[0,0],d=function(a){a5(j,k[1],a);k[1]++;return 0},e=[0,((i-1|0)%3|0)+1|0],l=F(a)-1|0,o=0;if(!(l<0)){var b=o;for(;;){var -f=cJ(a,b);if(9<(f+ea|0)>>>0)d(f);else{if(0===e[1]){d(95);e[1]=3}e[1]+=-1;d(f)}var +f=cT(a,b);if(9>>0)d(f);else{if(0===e[1]){d(95);e[1]=3}e[1]+=-1;d(f)}var p=b+1|0;if(l!==b){var b=p;continue}break}}return aB(j)}return a}function -m$(b,c){switch(b){case +o0(b,c){switch(b){case 1:var -a=mm;break;case +a=oa;break;case 2:var -a=mn;break;case +a=ob;break;case 4:var -a=mp;break;case +a=od;break;case 5:var -a=mq;break;case +a=oe;break;case 6:var -a=mr;break;case +a=of;break;case 7:var -a=ms;break;case +a=og;break;case 8:var -a=mt;break;case +a=oh;break;case 9:var -a=mu;break;case +a=oi;break;case 10:var -a=mv;break;case +a=oj;break;case 11:var -a=mw;break;case +a=ok;break;case 0:case 13:var -a=ml;break;case +a=n$;break;case 3:case 14:var -a=mo;break;default:var -a=mx}return dI(b,eG(a,c))}function -na(b,c){switch(b){case +a=oc;break;default:var +a=ol}return dT(b,eP(a,c))}function +o1(b,c){switch(b){case 1:var -a=mM;break;case +a=oA;break;case 2:var -a=mN;break;case +a=oB;break;case 4:var -a=mP;break;case +a=oD;break;case 5:var -a=mQ;break;case +a=oE;break;case 6:var -a=mR;break;case +a=oF;break;case 7:var -a=mS;break;case +a=oG;break;case 8:var -a=mT;break;case +a=oH;break;case 9:var -a=mU;break;case +a=oI;break;case 10:var -a=mV;break;case +a=oJ;break;case 11:var -a=mW;break;case +a=oK;break;case 0:case 13:var -a=mL;break;case +a=oz;break;case 3:case 14:var -a=mO;break;default:var -a=mX}return dI(b,eG(a,c))}function -nb(b,c){switch(b){case +a=oC;break;default:var +a=oL}return dT(b,eP(a,c))}function +o2(b,c){switch(b){case 1:var -a=mZ;break;case +a=oN;break;case 2:var -a=m0;break;case +a=oO;break;case 4:var -a=m2;break;case +a=oQ;break;case 5:var -a=m3;break;case +a=oR;break;case 6:var -a=m4;break;case +a=oS;break;case 7:var -a=m5;break;case +a=oT;break;case 8:var -a=m6;break;case +a=oU;break;case 9:var -a=m7;break;case +a=oV;break;case 10:var -a=m8;break;case +a=oW;break;case 11:var -a=m9;break;case +a=oX;break;case 0:case 13:var -a=mY;break;case +a=oM;break;case 3:case 14:var -a=m1;break;default:var -a=m_}return dI(b,eG(a,c))}function -nc(b,c){switch(b){case +a=oP;break;default:var +a=oY}return dT(b,eP(a,c))}function +o3(b,c){switch(b){case 1:var -a=mz;break;case +a=on;break;case 2:var -a=mA;break;case +a=oo;break;case 4:var -a=mC;break;case +a=oq;break;case 5:var -a=mD;break;case +a=or;break;case 6:var -a=mE;break;case +a=os;break;case 7:var -a=mF;break;case +a=ot;break;case 8:var -a=mG;break;case +a=ou;break;case 9:var -a=mH;break;case +a=ov;break;case 10:var -a=mI;break;case +a=ow;break;case 11:var -a=mJ;break;case +a=ox;break;case 0:case 13:var -a=my;break;case +a=om;break;case 3:case 14:var -a=mB;break;default:var -a=mK}return dI(b,DG(a,c))}function -bn(c,i,b){function +a=op;break;default:var +a=oy}return dT(b,FN(a,c))}function +bw(c,i,b){function j(d){switch(c[1]){case 0:var a=45;break;case 1:var a=43;break;default:var -a=32}return DD(b,i,a)}function +a=32}return FK(b,i,a)}function q(c){var -a=Du(b);return 3===a?b<0.?ne:nf:4<=a?ng:c}switch(c[2]){case +a=Fy(b);return 3===a?b<0.?o5:o6:4<=a?o7:c}switch(c[2]){case 5:var -e=ky(gX(c,i),b),d=0,u=E(e);for(;;){if(d===u)var +e=gH(hq(c,i),b),d=0,u=F(e);for(;;){if(d===u)var p=0;else{var -k=C(e,d)+ib|0,l=0;if(23>>0){if(55===k)l=1}else -if(21<(k-1|0)>>>0)l=1;if(!l){var +k=D(e,d)+iX|0,l=0;if(23>>0){if(55===k)l=1}else +if(21>>0)l=1;if(!l){var d=d+1|0;continue}var p=1}var -v=p?e:bG(e,nd);return q(v)}case +v=p?e:a7(e,o4);return q(v)}case 6:return j(0);case 7:var -h=bD(j(0)),f=aS(h);if(0===f)var +h=bJ(j(0)),f=aW(h);if(0===f)var o=h;else{var -m=aa(f),n=f-1|0,r=0;if(!(n<0)){var +m=ac(f),n=f-1|0,r=0;if(!(n<0)){var a=r;for(;;){var -g=ds(h,a),s=25<(g+iz|0)>>>0?g:g+gd|0;$(m,a,s);var +g=dD(h,a),s=25>>0?g:g+gy|0;aa(m,a,s);var t=a+1|0;if(n!==a){var a=t;continue}break}}var o=m}return aB(o);case -8:return q(j(0));default:return ky(gX(c,i),b)}}function -c5(e,y,x,w){var -b=y,a=x,c=w;for(;;)if(typeof -c==="number")return d(b,a);else -switch(c[0]){case +8:return q(j(0));default:return gH(hq(c,i),b)}}function +dg(f,y,x,w){var +c=y,a=x,d=w;for(;;)if(typeof +d==="number")return b(c,a);else +switch(d[0]){case 0:var -z=c[1];return function(c){return H(b,[5,a,c],z)};case +z=d[1];return function(b){return H(c,[5,a,b],z)};case 1:var -A=c[1];return function(c){var -e=0;if(40<=c)if(92===c)var -d=k_;else -if(bt<=c)e=1;else +A=d[1];return function(b){var +e=0;if(40<=b)if(92===b)var +d=mZ;else +if(bD<=b)e=1;else e=2;else -if(32<=c)if(39<=c)var -d=k$;else +if(32<=b)if(39<=b)var +d=m0;else e=2;else -if(14<=c)e=1;else -switch(c){case +if(14<=b)e=1;else +switch(b){case 8:var -d=la;break;case +d=m1;break;case 9:var -d=lb;break;case +d=m2;break;case 10:var -d=lc;break;case +d=m3;break;case 13:var -d=ld;break;default:e=1}switch(e){case +d=m4;break;default:e=1}switch(e){case 1:var -f=aa(4);$(f,0,92);$(f,1,48+(c/aO|0)|0);$(f,2,48+((c/10|0)%10|0)|0);$(f,3,48+(c%10|0)|0);var +f=ac(4);aa(f,0,92);aa(f,1,48+(b/aR|0)|0);aa(f,2,48+((b/10|0)%10|0)|0);aa(f,3,48+(b%10|0)|0);var d=aB(f);break;case 2:var -g=aa(1);$(g,0,c);var +g=ac(1);aa(g,0,b);var d=aB(g);break}var -h=E(d),i=a7(h+2|0,39);bZ(d,0,i,1,h);return H(b,[4,a,aB(i)],A)};case +h=F(d),i=bc(h+2|0,39);b4(d,0,i,1,h);return H(c,[4,a,aB(i)],A)};case 2:var -B=c[2],C=c[1];return e2(b,a,B,C,function(a){return a});case -3:return e2(b,a,c[2],c[1],mk);case -4:return dJ(b,a,c[4],c[2],c[3],m$,c[1]);case -5:return dJ(b,a,c[4],c[2],c[3],na,c[1]);case -6:return dJ(b,a,c[4],c[2],c[3],nb,c[1]);case -7:return dJ(b,a,c[4],c[2],c[3],nc,c[1]);case +B=d[2],C=d[1];return fb(c,a,B,C,function(a){return a});case +3:return fb(c,a,d[2],d[1],n_);case +4:return dU(c,a,d[4],d[2],d[3],o0,d[1]);case +5:return dU(c,a,d[4],d[2],d[3],o1,d[1]);case +6:return dU(c,a,d[4],d[2],d[3],o2,d[1]);case +7:return dU(c,a,d[4],d[2],d[3],o3,d[1]);case 8:var -i=c[4],j=c[3],k=c[2],h=c[1];if(typeof +i=d[4],j=d[3],k=d[2],h=d[1];if(typeof k==="number"){if(typeof -j==="number")return j?function(d,c){return H(b,[4,a,bn(h,d,c)],i)}:function(c){return H(b,[4,a,bn(h,e0(h),c)],i)};var -_=j[1];return function(c){return H(b,[4,a,bn(h,_,c)],i)}}else{if(0===k[0]){var +j==="number")return j?function(d,b){return H(c,[4,a,bw(h,d,b)],i)}:function(b){return H(c,[4,a,bw(h,e$(h),b)],i)};var +_=j[1];return function(b){return H(c,[4,a,bw(h,_,b)],i)}}else{if(0===k[0]){var n=k[2],o=k[1];if(typeof -j==="number")return j?function(d,c){return H(b,[4,a,aK(o,n,bn(h,d,c))],i)}:function(c){return H(b,[4,a,aK(o,n,bn(h,e0(h),c))],i)};var -ab=j[1];return function(c){return H(b,[4,a,aK(o,n,bn(h,ab,c))],i)}}var +j==="number")return j?function(d,b){return H(c,[4,a,aN(o,n,bw(h,d,b))],i)}:function(b){return H(c,[4,a,aN(o,n,bw(h,e$(h),b))],i)};var +$=j[1];return function(b){return H(c,[4,a,aN(o,n,bw(h,$,b))],i)}}var p=k[1];if(typeof -j==="number")return j?function(e,d,c){return H(b,[4,a,aK(p,e,bn(h,d,c))],i)}:function(d,c){return H(b,[4,a,aK(p,d,bn(h,e0(h),c))],i)};var -ac=j[1];return function(d,c){return H(b,[4,a,aK(p,d,bn(h,ac,c))],i)}}case -9:return e2(b,a,c[2],c[1],k1);case +j==="number")return j?function(e,d,b){return H(c,[4,a,aN(p,e,bw(h,d,b))],i)}:function(d,b){return H(c,[4,a,aN(p,d,bw(h,e$(h),b))],i)};var +ab=j[1];return function(d,b){return H(c,[4,a,aN(p,d,bw(h,ab,b))],i)}}case +9:return fb(c,a,d[2],d[1],mP);case 10:var -a=[7,a],c=c[1];continue;case +a=[7,a],d=d[1];continue;case 11:var -a=[2,a,c[1]],c=c[2];continue;case +a=[2,a,d[1]],d=d[2];continue;case 12:var -a=[3,a,c[1]],c=c[2];continue;case +a=[3,a,d[1]],d=d[2];continue;case 13:var -D=c[3],G=c[2],q=gU(16);e1(q,G);var -v=gW(q);return function(c){return H(b,[4,a,v],D)};case +D=d[3],E=d[2],q=hm(16);fa(q,E);var +v=ho(q);return function(b){return H(c,[4,a,v],D)};case 14:var -I=c[3],J=c[2];return function(d){var -e=d[1],c=Q(e,X(af(J)));if(typeof -c[2]==="number")return H(b,a,S(c[1],I));throw aq};case +I=d[3],J=d[2];return function(d){var +e=d[1],b=R(e,Y(af(J)));if(typeof +b[2]==="number")return H(c,a,T(b[1],I));throw ap};case 15:var -K=c[1];return function(d,c){return H(b,[6,a,function(a){return g(d,a,c)}],K)};case +K=d[1];return function(d,b){return H(c,[6,a,function(a){return e(d,a,b)}],K)};case 16:var -L=c[1];return function(c){return H(b,[6,a,c],L)};case +L=d[1];return function(b){return H(c,[6,a,b],L)};case 17:var -a=[0,a,c[1]],c=c[2];continue;case +a=[0,a,d[1]],d=d[2];continue;case 18:var -m=c[1];if(0===m[0]){var -M=c[2],O=m[1][1],P=0,b=function(b,c,d){return function(a){return H(c,[1,b,[0,a]],d)}}(a,b,M),a=P,c=O;continue}var -R=c[2],T=m[1][1],U=0,b=function(b,c,d){return function(a){return H(c,[1,b,[1,a]],d)}}(a,b,R),a=U,c=T;continue;case -19:throw[0,F,ni];case +m=d[1];if(0===m[0]){var +M=d[2],N=m[1][1],P=0,c=function(b,c,d){return function(a){return H(c,[1,b,[0,a]],d)}}(a,c,M),a=P,d=N;continue}var +Q=d[2],S=m[1][1],U=0,c=function(b,c,d){return function(a){return H(c,[1,b,[1,a]],d)}}(a,c,Q),a=U,d=S;continue;case +19:throw[0,G,o9];case 20:var -V=c[3],W=[8,a,nj];return function(a){return H(b,W,V)};case +V=d[3],W=[8,a,o_];return function(a){return H(c,W,V)};case 21:var -Y=c[2];return function(c){return H(b,[4,a,eG(nk,c)],Y)};case +X=d[2];return function(b){return H(c,[4,a,eP(o$,b)],X)};case 22:var -Z=c[1];return function(c){return H(b,[5,a,c],Z)};case +Z=d[1];return function(b){return H(c,[5,a,b],Z)};case 23:var -f=c[2],l=c[1];if(typeof +g=d[2],l=d[1];if(typeof l==="number")switch(l){case -0:return e<50?N(e+1|0,b,a,f):ak(N,[0,b,a,f]);case -1:return e<50?N(e+1|0,b,a,f):ak(N,[0,b,a,f]);case -2:throw[0,F,nl];default:return e<50?N(e+1|0,b,a,f):ak(N,[0,b,a,f])}else +0:return f<50?O(f+1|0,c,a,g):al(O,[0,c,a,g]);case +1:return f<50?O(f+1|0,c,a,g):al(O,[0,c,a,g]);case +2:throw[0,G,pa];default:return f<50?O(f+1|0,c,a,g):al(O,[0,c,a,g])}else switch(l[0]){case -0:return e<50?N(e+1|0,b,a,f):ak(N,[0,b,a,f]);case -1:return e<50?N(e+1|0,b,a,f):ak(N,[0,b,a,f]);case -2:return e<50?N(e+1|0,b,a,f):ak(N,[0,b,a,f]);case -3:return e<50?N(e+1|0,b,a,f):ak(N,[0,b,a,f]);case -4:return e<50?N(e+1|0,b,a,f):ak(N,[0,b,a,f]);case -5:return e<50?N(e+1|0,b,a,f):ak(N,[0,b,a,f]);case -6:return e<50?N(e+1|0,b,a,f):ak(N,[0,b,a,f]);case -7:return e<50?N(e+1|0,b,a,f):ak(N,[0,b,a,f]);case -8:return e<50?N(e+1|0,b,a,f):ak(N,[0,b,a,f]);case +0:return f<50?O(f+1|0,c,a,g):al(O,[0,c,a,g]);case +1:return f<50?O(f+1|0,c,a,g):al(O,[0,c,a,g]);case +2:return f<50?O(f+1|0,c,a,g):al(O,[0,c,a,g]);case +3:return f<50?O(f+1|0,c,a,g):al(O,[0,c,a,g]);case +4:return f<50?O(f+1|0,c,a,g):al(O,[0,c,a,g]);case +5:return f<50?O(f+1|0,c,a,g):al(O,[0,c,a,g]);case +6:return f<50?O(f+1|0,c,a,g):al(O,[0,c,a,g]);case +7:return f<50?O(f+1|0,c,a,g):al(O,[0,c,a,g]);case +8:return f<50?O(f+1|0,c,a,g):al(O,[0,c,a,g]);case 9:var -u=l[2];return e<50?fJ(e+1|0,b,a,u,f):ak(fJ,[0,b,a,u,f]);case -10:return e<50?N(e+1|0,b,a,f):ak(N,[0,b,a,f]);default:return e<50?N(e+1|0,b,a,f):ak(N,[0,b,a,f])}default:var -r=c[3],s=c[1],t=d(c[2],0);return e<50?fI(e+1|0,b,a,r,s,t):ak(fI,[0,b,a,r,s,t])}}function -fJ(e,d,c,a,b){if(typeof -a==="number")return e<50?N(e+1|0,d,c,b):ak(N,[0,d,c,b]);else +u=l[2];return f<50?fX(f+1|0,c,a,u,g):al(fX,[0,c,a,u,g]);case +10:return f<50?O(f+1|0,c,a,g):al(O,[0,c,a,g]);default:return f<50?O(f+1|0,c,a,g):al(O,[0,c,a,g])}default:var +r=d[3],s=d[1],t=b(d[2],0);return f<50?fW(f+1|0,c,a,r,s,t):al(fW,[0,c,a,r,s,t])}}function +fX(e,d,c,a,b){if(typeof +a==="number")return e<50?O(e+1|0,d,c,b):al(O,[0,d,c,b]);else switch(a[0]){case 0:var -f=a[1];return function(a){return aP(d,c,f,b)};case +f=a[1];return function(a){return aS(d,c,f,b)};case 1:var -g=a[1];return function(a){return aP(d,c,g,b)};case +g=a[1];return function(a){return aS(d,c,g,b)};case 2:var -h=a[1];return function(a){return aP(d,c,h,b)};case +h=a[1];return function(a){return aS(d,c,h,b)};case 3:var -i=a[1];return function(a){return aP(d,c,i,b)};case +i=a[1];return function(a){return aS(d,c,i,b)};case 4:var -j=a[1];return function(a){return aP(d,c,j,b)};case +j=a[1];return function(a){return aS(d,c,j,b)};case 5:var -k=a[1];return function(a){return aP(d,c,k,b)};case +k=a[1];return function(a){return aS(d,c,k,b)};case 6:var -l=a[1];return function(a){return aP(d,c,l,b)};case +l=a[1];return function(a){return aS(d,c,l,b)};case 7:var -m=a[1];return function(a){return aP(d,c,m,b)};case +m=a[1];return function(a){return aS(d,c,m,b)};case 8:var -n=a[2];return function(a){return aP(d,c,n,b)};case +n=a[2];return function(a){return aS(d,c,n,b)};case 9:var -o=a[3],p=a[2],q=al(af(a[1]),p);return function(a){return aP(d,c,aC(q,o),b)};case +o=a[3],p=a[2],q=am(af(a[1]),p);return function(a){return aS(d,c,aC(q,o),b)};case 10:var -r=a[1];return function(e,a){return aP(d,c,r,b)};case +r=a[1];return function(e,a){return aS(d,c,r,b)};case 11:var -s=a[1];return function(a){return aP(d,c,s,b)};case +s=a[1];return function(a){return aS(d,c,s,b)};case 12:var -t=a[1];return function(a){return aP(d,c,t,b)};case -13:throw[0,F,nm];default:throw[0,F,nn]}}function -N(d,b,e,a){var -c=[8,e,no];return d<50?c5(d+1|0,b,c,a):ak(c5,[0,b,c,a])}function -fI(h,b,f,a,e,c){if(e){var -i=e[1];return function(e){return nh(b,f,a,i,d(c,e))}}var -g=[4,f,c];return h<50?c5(h+1|0,b,g,a):ak(c5,[0,b,g,a])}function -H(a,b,c){return dy(c5(0,a,b,c))}function -aP(a,b,c,d){return dy(fJ(0,a,b,c,d))}function -nh(a,b,c,d,e){return dy(fI(0,a,b,c,d,e))}function -e2(f,e,c,a,b){if(typeof -a==="number")return function(a){return H(f,[4,e,d(b,a)],c)};else{if(0===a[0]){var -g=a[2],h=a[1];return function(a){return H(f,[4,e,aK(h,g,d(b,a))],c)}}var -i=a[1];return function(g,a){return H(f,[4,e,aK(i,g,d(b,a))],c)}}}function -dJ(f,e,d,h,c,b,a){if(typeof +t=a[1];return function(a){return aS(d,c,t,b)};case +13:throw[0,G,pb];default:throw[0,G,pc]}}function +O(d,b,e,a){var +c=[8,e,pd];return d<50?dg(d+1|0,b,c,a):al(dg,[0,b,c,a])}function +fW(h,c,f,a,e,d){if(e){var +i=e[1];return function(e){return o8(c,f,a,i,b(d,e))}}var +g=[4,f,d];return h<50?dg(h+1|0,c,g,a):al(dg,[0,c,g,a])}function +H(a,b,c){return dK(dg(0,a,b,c))}function +aS(a,b,c,d){return dK(fX(0,a,b,c,d))}function +o8(a,b,c,d,e){return dK(fW(0,a,b,c,d,e))}function +fb(f,e,d,a,c){if(typeof +a==="number")return function(a){return H(f,[4,e,b(c,a)],d)};else{if(0===a[0]){var +g=a[2],h=a[1];return function(a){return H(f,[4,e,aN(h,g,b(c,a))],d)}}var +i=a[1];return function(g,a){return H(f,[4,e,aN(i,g,b(c,a))],d)}}}function +dU(g,f,d,h,c,b,a){if(typeof h==="number"){if(typeof -c==="number")return c?function(h,c){return H(f,[4,e,ch(h,g(b,a,c))],d)}:function(c){return H(f,[4,e,g(b,a,c)],d)};var -l=c[1];return function(c){return H(f,[4,e,ch(l,g(b,a,c))],d)}}else{if(0===h[0]){var +c==="number")return c?function(h,c){return H(g,[4,f,cq(h,e(b,a,c))],d)}:function(c){return H(g,[4,f,e(b,a,c)],d)};var +l=c[1];return function(c){return H(g,[4,f,cq(l,e(b,a,c))],d)}}else{if(0===h[0]){var i=h[2],j=h[1];if(typeof -c==="number")return c?function(h,c){return H(f,[4,e,aK(j,i,ch(h,g(b,a,c)))],d)}:function(c){return H(f,[4,e,aK(j,i,g(b,a,c))],d)};var -m=c[1];return function(c){return H(f,[4,e,aK(j,i,ch(m,g(b,a,c)))],d)}}var +c==="number")return c?function(h,c){return H(g,[4,f,aN(j,i,cq(h,e(b,a,c)))],d)}:function(c){return H(g,[4,f,aN(j,i,e(b,a,c))],d)};var +m=c[1];return function(c){return H(g,[4,f,aN(j,i,cq(m,e(b,a,c)))],d)}}var k=h[1];if(typeof -c==="number")return c?function(i,h,c){return H(f,[4,e,aK(k,i,ch(h,g(b,a,c)))],d)}:function(h,c){return H(f,[4,e,aK(k,h,g(b,a,c))],d)};var -n=c[1];return function(h,c){return H(f,[4,e,aK(k,h,ch(n,g(b,a,c)))],d)}}}function -bH(b,h){var -a=h;for(;;)if(typeof +c==="number")return c?function(i,h,c){return H(g,[4,f,aN(k,i,cq(h,e(b,a,c)))],d)}:function(h,c){return H(g,[4,f,aN(k,h,e(b,a,c))],d)};var +n=c[1];return function(h,c){return H(g,[4,f,aN(k,h,cq(n,e(b,a,c)))],d)}}}function +bx(c,f){var +a=f;for(;;)if(typeof a==="number")return 0;else switch(a[0]){case 0:var -e=a[2],i=a[1];if(typeof -e==="number")switch(e){case -0:var -c=lG;break;case +g=a[1],h=hp(a[2]);bx(c,g);return cX(c,h);case 1:var -c=lH;break;case -2:var -c=lI;break;case -3:var -c=lJ;break;case +d=a[2],e=a[1];if(0===d[0]){var +i=d[1];bx(c,e);cX(c,pe);var +a=i;continue}var +j=d[1];bx(c,e);cX(c,pf);var +a=j;continue;case +6:var +m=a[2];bx(c,a[1]);return b(m,c);case +7:bx(c,a[1]);return ce(c);case +8:var +n=a[2];bx(c,a[1]);return ae(n);case +2:case 4:var -c=lK;break;case -5:var -c=lL;break;default:var -c=lM}else -switch(e[0]){case +k=a[2];bx(c,a[1]);return cX(c,k);default:var +l=a[2];bx(c,a[1]);return mo(c,l)}}function +bM(c,f){var +a=f;for(;;)if(typeof +a==="number")return 0;else +switch(a[0]){case 0:var -c=e[1];break;case -1:var -c=e[1];break;default:var -c=bG(lN,gN(1,e[1]))}bH(b,i);return cP(b,c);case +g=a[1],h=hp(a[2]);bM(c,g);return c2(c,h);case 1:var -f=a[2],g=a[1];if(0===f[0]){var -j=f[1];bH(b,g);cP(b,np);var -a=j;continue}var -k=f[1];bH(b,g);cP(b,nq);var -a=k;continue;case +d=a[2],e=a[1];if(0===d[0]){var +i=d[1];bM(c,e);c2(c,pg);var +a=i;continue}var +j=d[1];bM(c,e);c2(c,ph);var +a=j;continue;case 6:var -n=a[2];bH(b,a[1]);return cP(b,d(n,0));case +m=a[2];bM(c,a[1]);return c2(c,b(m,0));case 7:var a=a[1];continue;case 8:var -o=a[2];bH(b,a[1]);return ae(o);case +n=a[2];bM(c,a[1]);return ae(n);case 2:case 4:var -l=a[2];bH(b,a[1]);return cP(b,l);default:var -m=a[2];bH(b,a[1]);return gT(b,m)}}function -e3(b){var +k=a[2];bM(c,a[1]);return c2(c,k);default:var +l=a[2];bM(c,a[1]);return hl(c,l)}}function +hr(d,c){var +a=c[1],b=0;return H(function(a){bx(d,a);return 0},b,a)}function +fc(a){return hr(bb,a)}function +aT(b){var a=b[1];return H(function(b){var -a=eY(64);bH(a,b);return gS(a)},0,a)}var -gZ=[0,0];function -e4(a){gZ[1]=[0,a,gZ[1]];return 0}try{var -Dl=eR(Dk),g1=Dl}catch(a){a=c(a);if(a!==az)throw a;try{var -Dj=eR(Di),g0=Dj}catch(a){a=c(a);if(a!==az)throw a;var -g0=ns}var -g1=g0}var -nt=ll(g1,82),dK=[im,function(x){var -m=Eb(0),c=[0,bF(55,0),0],i=0===m.length-1?[0,0]:m,j=i.length-1,b=0;for(;;){ai(c[1],b)[1+b]=b;var +a=e9(64);bM(a,b);return hk(a)},0,a)}var +fd=[0,0];function +ff(i,h){var +a=i[1+h];if(1-(typeof +a==="number"?1:0)){if(dJ(a)===ex)return b(aT(pi),a);if(dJ(a)===li){var +d=gH(mT,a),c=0,g=F(d);for(;;){if(g<=c)return a7(d,mS);var +e=D(d,c),f=0;if(48<=e){if(!(58<=e))f=1}else +if(45===e)f=1;if(f){var +c=c+1|0;continue}return d}}return pj}return b(aT(pk),a)}function +hs(b,a){if(b.length-1<=a)return pl;var +c=hs(b,a+1|0),d=ff(b,a);return e(aT(pm),d,c)}function +dV(a){function +p(f){var +c=f;for(;;){if(c){var +g=c[2],h=c[1];try{var +e=0,d=b(h,a);e=1}catch(a){}if(e&&d)return[0,d[1]];var +c=g;continue}return 0}}var +i=p(fd[1]);if(i)return i[1];if(a===e5)return pr;if(a===g4)return ps;if(a[1]===g3){var +d=a[2],j=d[3],q=d[2],r=d[1];return f0(aT(fe),r,q,j,j+5|0,pt)}if(a[1]===G){var +f=a[2],k=f[3],s=f[2],t=f[1];return f0(aT(fe),t,s,k,k+6|0,pu)}if(a[1]===g7){var +g=a[2],l=g[3],u=g[2],v=g[1];return f0(aT(fe),v,u,l,l+6|0,pv)}if(0===dJ(a)){var +h=a.length-1,w=a[1][1];if(2>>0)var +m=hs(a,2),n=ff(a,1),c=e(aT(pn),n,m);else +switch(h){case +0:var +c=po;break;case +1:var +c=pp;break;default:var +o=ff(a,1),c=b(aT(pq),o)}return a7(w,c)}return a[1]}function +fg(t,s){var +e=Fz(s),g=e.length-1-1|0,p=0;if(!(g<0)){var +c=p;for(;;){var +a=ab(e,c)[1+c],f=function(a){return function(b){return b?0===a?pw:px:0===a?py:pz}}(c);if(0===a[0])var +h=a[5],i=a[4],j=a[3],k=a[6]?pA:pC,l=a[2],m=a[7],n=f(a[1]),d=[0,Fp(aT(pB),n,m,l,k,j,i,h)];else +if(a[1])var +d=0;else +var +o=f(0),d=[0,b(aT(pD),o)];if(d){var +q=d[1];b(hr(t,pE),q)}var +r=c+1|0;if(g!==c){var +c=r;continue}break}}return 0}function +dW(c){for(;;){var +a=fd[1],b=1-e4(fd,a,[0,c,a]);if(b)continue;return b}}var +pG=pF.slice();function +pH(e,d){var +f=dV(e);b(fc(pI),f);fg(bb,d);var +a=F3(0);if(a<0){var +c=cW(a);g8(ab(pG,c)[1+c])}return ce(bb)}var +pJ=[0];gU(a(kE),function(e,j){try{try{var +c=j?pJ:mh(0);try{e7(0)}catch(a){}try{var +a=pH(e,c),d=a}catch(a){a=i(a);var +g=dV(e);b(fc(pL),g);fg(bb,c);var +h=dV(a);b(fc(pM),h);fg(bb,mh(0));var +d=ce(bb)}var +f=d}catch(a){a=i(a);if(a!==e5)throw a;var +f=g8(pK)}return f}catch(a){return 0}});var +pO=[J,pN,aA(0)];dW(function(a){return a[1]===pO?[0,a7(pP,dV(a[2]))]:0});try{var +Fn=mu(Fm),hu=Fn}catch(a){a=i(a);if(a!==aH)throw a;try{var +Fl=mu(Fk),ht=Fl}catch(a){a=i(a);if(a!==aH)throw a;var +ht=pR}var +hu=ht}var +pS=m$(hu,82),dX=[ja,function(x){var +m=Gg(0),c=[0,bK(55,0),0],i=0===m.length-1?[0,0]:m,j=i.length-1,b=0;for(;;){ab(c[1],b)[1+b]=b;var w=b+1|0;if(54!==b){var b=w;continue}var -g=[0,nr],k=54+dB(55,j)|0,r=0;if(!(k<0)){var -d=r;for(;;){var -e=d%55|0,l=D0(d,j),s=ai(i,l)[1+l],h=bG(g[1],a(t+s));g[1]=DV(h,0,E(h));var -f=g[1],n=C(f,3)<<24,o=C(f,2)<<16,p=C(f,1)<<8,q=((C(f,0)+p|0)+o|0)+n|0,u=(ai(c[1],e)[1+e]^q)&f7;ai(c[1],e)[1+e]=u;var +g=[0,pQ],k=54+dN(55,j)|0,s=0;if(!(k<0)){var +d=s;for(;;){var +e=d%55|0,l=F7(d,j),t=ab(i,l)[1+l],h=a7(g[1],a(n+t));g[1]=F2(h,0,F(h));var +f=g[1],o=D(f,3)<<24,p=D(f,2)<<16,q=D(f,1)<<8,r=((D(f,0)+q|0)+p|0)+o|0,u=(ab(c[1],e)[1+e]^r)&gm;ab(c[1],e)[1+e]=u;var v=d+1|0;if(k!==d){var d=v;continue}break}}c[2]=0;return c}}];function -nu(h,k){var -l=h?h[1]:nt,b=16;for(;;){if(!(k<=b)&&!(gG<(b*2|0))){var +pT(h,k){var +l=h?h[1]:pS,b=16;for(;;){if(!(k<=b)&&!(g_<(b*2|0))){var b=b*2|0;continue}if(l){var -i=kF(dK),a=eb===i?dK[1]:im===i?lB(dK):dK;a[2]=(a[2]+1|0)%55|0;var -c=a[2],d=ai(a[1],c)[1+c],e=(a[2]+24|0)%55|0,f=(ai(a[1],e)[1+e]+(d^(d>>>25|0)&31)|0)&f7,g=a[2];ai(a[1],g)[1+g]=f;var +i=dJ(dX),a=en===i?dX[1]:ja===i?np(dX):dX;a[2]=(a[2]+1|0)%55|0;var +c=a[2],d=ab(a[1],c)[1+c],e=(a[2]+24|0)%55|0,f=(ab(a[1],e)[1+e]+(d^(d>>>25|0)&31)|0)&gm,g=a[2];ab(a[1],g)[1+g]=f;var j=f}else var -j=0;return[0,0,bF(b,0),j,b]}}function -a8(a){return Dx(10,aO,0,a)}var -g4=[P,nv,aj(0)],g2=0,g3=-1;function -dL(a,b){a[13]=a[13]+b[3]|0;return gR(b,a[28])}var -g5=1000000010;function -e5(b,a){return O(b[17],a,0,E(a))}function -e6(a){return d(a[19],0)}function -g6(a,c,b){a[9]=a[9]-c|0;e5(a,b);a[11]=0;return 0}function -dM(c,a){var -b=ad(a,nw);return b?g6(c,E(a),a):b}function -ci(a,b,f){var -g=b[3],h=b[2];dM(a,b[1]);e6(a);a[11]=1;var -c=(a[6]-f|0)+h|0,e=a[8],i=DS(e,c)?e:c;a[10]=i;a[9]=a[6]-a[10]|0;d(a[21],a[10]);return dM(a,g)}function -g7(b,a){return ci(b,nx,a)}function -cR(a,b){var -c=b[2],e=b[3];dM(a,b[1]);a[9]=a[9]-c|0;d(a[20],c);return dM(a,e)}function -g8(a){for(;;){var -r=a[28][2],O=r?[0,r[1]]:0;if(O){var -p=O[1],q=p[1],b=p[2],ac=0<=q?1:0,aa=p[3],ab=a[13]-a[12]|0,P=ac||(a[9]<=ab?1:0);if(P){var -g=a[28],m=g[2];if(m){if(m[2]){var -Q=m[2];g[1]=g[1]-1|0;g[2]=Q}else -eX(g);var -l=0<=q?q:g5;if(typeof -b==="number")switch(b){case +j=0;return[0,0,bK(b,0),j,b]}}function +bd(a){return FE(10,aR,0,a)}var +hx=[J,pU,aA(0)],hv=0,hw=-1;function +dY(a,b){a[13]=a[13]+b[3]|0;return hj(b,a[28])}var +hy=1000000010;function +fh(b,a){return P(b[17],a,0,F(a))}function +fi(a){return b(a[19],0)}function +hz(a,c,b){a[9]=a[9]-c|0;fh(a,b);a[11]=0;return 0}function +dZ(c,a){var +b=ak(a,pV);return b?hz(c,F(a),a):b}function +b_(a,c,f){var +g=c[3],h=c[2];dZ(a,c[1]);fi(a);a[11]=1;var +d=(a[6]-f|0)+h|0,e=a[8],i=FZ(e,d)?e:d;a[10]=i;a[9]=a[6]-a[10]|0;b(a[21],a[10]);return dZ(a,g)}function +hA(b,a){return b_(b,pW,a)}function +cr(a,c){var +d=c[2],e=c[3];dZ(a,c[1]);a[9]=a[9]-d|0;b(a[20],d);return dZ(a,e)}function +pX(a,j,c){if(typeof +c==="number")switch(c){case 0:var -x=cf(a[3]);if(x){var -y=x[1][1],z=function(b,a){if(a){var -c=a[1],d=a[2];return gr(b,c)?[0,b,a]:[0,c,z(b,d)]}return[0,b,0]};y[1]=z(a[6]-a[9]|0,y[1])}break;case -1:ce(a[2]);break;case -2:ce(a[3]);break;case +s=co(a[3]);if(s){var +t=s[1][1],u=function(b,a){if(a){var +c=a[1],d=a[2];return gQ(b,c)?[0,b,a]:[0,c,u(b,d)]}return[0,b,0]};t[1]=u(a[6]-a[9]|0,t[1]);return 0}return 0;case +1:cn(a[2]);return 0;case +2:cn(a[3]);return 0;case 3:var -A=cf(a[2]);if(A)g7(a,A[1][2]);else -e6(a);break;case -4:if(a[10]!==(a[6]-a[9]|0)){var -e=a[28],h=e[2];if(h){var -s=h[1];if(h[2]){var -R=h[2];e[1]=e[1]-1|0;e[2]=R;var -i=[0,s]}else{eX(e);var -i=[0,s]}}else +v=co(a[2]);return v?hA(a,v[1][2]):fi(a);case +4:var +w=a[10]!==(a[6]-a[9]|0)?1:0;if(w){var +f=a[28],h=f[2];if(h){var +n=h[1];if(h[2]){var +K=h[2];f[1]=f[1]-1|0;f[2]=K;var +i=[0,n]}else{e8(f);var +i=[0,n]}}else var i=0;if(i){var -w=i[1],T=w[1];a[12]=a[12]-w[3]|0;a[9]=a[9]+T|0}}break;default:var -B=ce(a[5]);if(B)e5(a,d(a[25],B[1]))}else -switch(b[0]){case -0:g6(a,l,b[1]);break;case +r=i[1],M=r[1];a[12]=a[12]-r[3]|0;a[9]=a[9]+M|0;return 0}return 0}return w;default:var +x=cn(a[5]);return x?fh(a,b(a[25],x[1])):0}else +switch(c[0]){case +0:return hz(a,j,c[1]);case 1:var -c=b[2],j=b[1],C=c[1],U=c[2],D=cf(a[2]);if(D){var -F=D[1],f=F[2];switch(F[1]){case -0:cR(a,j);break;case -1:ci(a,c,f);break;case -2:ci(a,c,f);break;case -3:if(a[9]<(l+E(C)|0))ci(a,c,f);else -cR(a,j);break;case -4:if(a[11]||!(a[9]<(l+E(C)|0)||((a[6]-f|0)+U|0)>>0))g7(a,v)}else -e6(a)}var -_=a[9]-Z|0,$=1===M?1:a[9]>>0))hA(a,q)}else +fi(a)}var +T=a[9]-S|0,U=1===I?1:a[9]>>3|0,cb(b0(b,a>>>3|0)|1<<(a&7)))}function -dQ(b){var -a=fa(0);cS(a,b);return a}function -dR(c){var -b=aa(32),a=0;for(;;){a0(b,a,cb(b0(c,a)^cw));var +h=d[1],a=b(aT(rA),h);return[0,P(aT(qw),a,g,f)]}return 0});e3(rB);e3(rC);try{e3(Fj)}catch(a){a=i(a);if(a[1]!==dM)throw a}try{e3(Fi)}catch(a){a=i(a);if(a[1]!==dM)throw a}pT(0,7);function +rD(b,a){return dQ(b,0,a)}function +rE(b,a){return dQ(b,a,F(b)-a|0)}var +by=bc(32,cG);function +fo(a){return bc(32,0)}function +c4(b,a){return a5(b,a>>>3|0,ck(b5(b,a>>>3|0)|1<<(a&7)))}function +d3(b){var +a=fo(0);c4(a,b);return a}function +d4(c){var +b=ac(32),a=0;for(;;){a5(b,a,ck(b5(c,a)^cG));var d=a+1|0;if(31!==a){var a=d;continue}return b}}function -fb(d,c){var -b=aa(32),a=0;for(;;){var -e=b0(c,a);a0(b,a,cb(b0(d,a)|e));var +fp(d,c){var +b=ac(32),a=0;for(;;){var +e=b5(c,a);a5(b,a,ck(b5(d,a)|e));var f=a+1|0;if(31!==a){var a=f;continue}return b}}function -ph(d,b){try{var +rF(c,b){try{var a=0;for(;;){var -f=b0(b,a);if(0!==(b0(d,a)&f))throw gB;var -g=a+1|0;if(31!==a){var -a=g;continue}var -e=1;return e}}catch(a){a=c(a);if(a===gB)return 0;throw a}}function -hi(f,e){var +e=b5(b,a);if(0!==(b5(c,a)&e))throw g2;var +f=a+1|0;if(31!==a){var +a=f;continue}var +d=1;return d}}catch(a){a=i(a);if(a===g2)return 0;throw a}}function +hN(f,e){var a=0;for(;;){var -c=b0(e,a);if(0!==c){var -b=0;for(;;){if(0!==(c&1<>>0){if(!(25<(b+bt|0)>>>0))d=1}else +c=fo(0);hN(function(a){c4(c,g9(a));var +b=a-224|0,d=0;if(30>>0){if(!(25>>0))d=1}else if(23!==b)d=1;var -e=d?a+gd|0:a;return cS(c,e)},b);var +e=d?a+gy|0:a;return c4(c,e)},b);var d=c}else var d=b;var -h=f?dR(d):d;return dE(h)}throw[0,F,pw]}var -hm=aa(cA),c4=0;for(;;){a0(hm,c4,gE(cb(c4)));var -Dd=c4+1|0;if(cw!==c4){var -c4=Dd;continue}dE(hm);var -dU=dG([0,gv]),hn=function(a){var -b=gS(a[1]);a[1][2]=0;var -c=E(b);if(0===c)return 0;if(1===c){var -d=a[2];a[2]=[0,[0,C(b,0)],d];return 0}a[2]=[0,[1,b],a[2]];return 0},pA=dR(dQ(10)),fg=y,fh=ku,pG=function(b){var -f=E(b),z=[0,1];function -D(g){var -d=fa(0),a=g;for(;;){if(f<=a)bl(pE);if(93===C(b,a)&&g>>0)if(9<=r)var -j=[0,[9,k+ea|0],g+1|0];else +j=[0,[9,k+em|0],g+1|0];else l=1;else if(r)l=2;else{var I=z[1];z[1]++;var -t=A(g+1|0),o=t[2],y=0,J=t[1];if((o+1|0)>>0)){if(q){var +q=D(b,d)-42|0;if(!(1>>0)){if(q){var c=[6,c],d=d+1|0;continue}var c=[5,c],d=d+1|0;continue}if(21===q){var c=[7,c],d=d+1|0;continue}}var B=0;if(typeof -c!=="number"&&0===c[0]){gT(h[1],c[1]);B=1}if(!B){hn(h);h[2]=[0,c,h[2]]}var -a=d;continue a}}}hn(h);return[0,[3,dD(h[2])],a]}}function +c!=="number"&&0===c[0]){hl(h[1],c[1]);B=1}if(!B){hS(h);h[2]=[0,c,h[2]]}var +a=d;continue a}}}hS(h);return[0,[3,dO(h[2])],a]}}function A(g){var -d=B(g),c=d[1],a=d[2];for(;;){if((a+2|0)<=f&&92===C(b,a)&&df===C(b,a+1|0)){var +d=B(g),c=d[1],a=d[2];for(;;){if((a+2|0)<=f&&92===D(b,a)&&ds===D(b,a+1|0)){var e=B(a+2|0),c=[4,c,e[1]],a=e[2];continue}return[0,c,a]}}var -G=A(0),P=G[1],H=G[2]===f?P:bl(pF),h=[0,bF(32,0)],d=[0,0],m=[0,dU[1]],n=[0,0],j=[0,1],o=[0,0],r=0;function -a(f,e){if(h[1].length-1<=d[1]){var -a=[0,h[1].length-1];for(;;){if(a[1]<=d[1]){a[1]=a[1]*2|0;continue}var -b=bF(a[1],0);gQ(h[1],0,b,0,h[1].length-1);h[1]=b;break}}var -g=hl(f,e),c=d[1];ai(h[1],c)[1+c]=g;d[1]++;return 0}function -k(c){var -b=d[1];a(dS,0);return b}function +E=A(0),O=E[1],H=E[2]===f?O:bu(r3),g=[0,bK(32,0)],c=[0,0],m=[0,d7[1]],n=[0,0],j=[0,1],o=[0,0],r=0;function +a(f,e){if(g[1].length-1<=c[1]){var +a=[0,g[1].length-1];for(;;){if(a[1]<=c[1]){a[1]=a[1]*2|0;continue}var +b=bK(a[1],0);hi(g[1],0,b,0,g[1].length-1);g[1]=b;break}}var +h=hQ(f,e),d=c[1];ab(g[1],d)[1+d]=h;c[1]++;return 0}function +k(d){var +b=c[1];a(d5,0);return b}function l(a,c,b){var -d=hl(c,fd(b,a));ai(h[1],a)[1+a]=d;return 0}function -i(b){try{var -a=g(dU[28],b,m[1]);return a}catch(a){a=c(a);if(a===az){var -d=n[1];m[1]=O(dU[4],b,d,m[1]);n[1]++;return d}throw a}}function -t(b){if(fe(b)){var -a=o[1];if(64<=a)bl(px);o[1]++;return a}return-1}function -p(b,a){return ph(b,a)}function -e(b){if(typeof +d=hQ(c,fr(b,a));ab(g[1],a)[1+a]=d;return 0}function +h(b){try{var +a=e(d7[28],b,m[1]);return a}catch(a){a=i(a);if(a===aH){var +c=n[1];m[1]=P(d7[4],b,c,m[1]);n[1]++;return c}throw a}}function +t(b){if(fs(b)){var +a=o[1];if(64<=a)bu(rV);o[1]++;return a}return-1}function +p(b,a){return rF(b,a)}function +d(b){if(typeof b==="number")switch(b){case -0:return a(pk,0);case -1:return a(pl,0);default:return a(pm,0)}else +0:return a(rI,0);case +1:return a(rJ,0);default:return a(rK,0)}else switch(b[0]){case -0:return a(dS,b[1]);case +0:return a(d5,b[1]);case 1:var -f=b[1],n=E(f);if(0===n)return 0;if(1===n)return a(dS,C(f,0));try{var -o=gP(f,0);e([1,pf(f,o)]);a(dS,0);var -v=e([1,pg(f,o+1|0)]);return v}catch(b){b=c(b);if(b===az)return a(pi,i(f));throw b}case +e=b[1],n=F(e);if(0===n)return 0;if(1===n)return a(d5,D(e,0));try{var +o=hh(e,0);d([1,rD(e,o)]);a(d5,0);var +v=d([1,rE(e,o+1|0)]);return v}catch(b){b=i(b);if(b===aH)return a(rG,h(e));throw b}case 2:var -p=b[1],w=b[2]?dR(p):p;return a(pj,i(dE(w)));case +p=b[1],w=b[2]?d4(p):p;return a(rH,h(dP(w)));case 3:return J(b[1]);case 4:var -x=b[2],y=b[1],z=k(0);e(y);var -A=k(0),B=d[1];e(x);var -D=d[1];l(z,dT,B);return l(A,fc,D);case +x=b[2],y=b[1],z=k(0);d(y);var +A=k(0),B=c[1];d(x);var +C=c[1];l(z,d6,B);return l(A,fq,C);case 5:var -q=b[1],g=t(q),r=k(0);if(0<=g)a(hj,g);e(q);if(0<=g)a(hk,g);a(fc,fd(r,d[1]));return l(r,dT,d[1]);case +q=b[1],f=t(q),r=k(0);if(0<=f)a(hO,f);d(q);if(0<=f)a(hP,f);a(fq,fr(r,c[1]));return l(r,d6,c[1]);case 6:var -s=b[1],h=t(s),F=d[1];e(s);if(0<=h)a(hk,h);var -G=k(0);if(0<=h)a(hj,h);a(fc,fd(F,d[1]));return l(G,dT,d[1]);case +s=b[1],g=t(s),E=c[1];d(s);if(0<=g)a(hP,g);var +G=k(0);if(0<=g)a(hO,g);a(fq,fr(E,c[1]));return l(G,d6,c[1]);case 7:var -H=b[1],I=k(0);e(H);return l(I,dT,d[1]);case +H=b[1],I=k(0);d(H);return l(I,d6,c[1]);case 8:var -m=b[1],K=b[2];a(pn,m);e(K);a(po,m);j[1]=dB(j[1],m+1|0);return 0;default:var -u=b[1];a(pp,u);j[1]=dB(j[1],u+1|0);return 0}}function +m=b[1],K=b[2];a(rL,m);d(K);a(rM,m);j[1]=dN(j[1],m+1|0);return 0;default:var +u=b[1];a(rN,u);j[1]=dN(j[1],u+1|0);return 0}}function J(o){var b=o;for(;;){if(b){var c=b[1];if(typeof c!=="number")switch(c[0]){case 5:var -d=c[1],l=0;if(typeof -d==="number")l=1;else -switch(d[0]){case +e=c[1],l=0;if(typeof +e==="number")l=1;else +switch(e[0]){case 0:case 2:var -h=b[2],s=cT(h);if(p(bI(d),s)){a(ps,i(ff(r,d)));var -b=h;continue}break;default:l=1}break;case +i=b[2],s=c5(i);if(p(bN(e),s)){a(rQ,h(ft(r,e)));var +b=i;continue}break;default:l=1}break;case 6:var f=c[1],m=0;if(typeof f==="number")m=1;else switch(f[0]){case 0:case 2:var -j=b[2],t=cT(j);if(p(bI(f),t)){a(pt,i(ff(r,f)));var +j=b[2],t=c5(j);if(p(bN(f),t)){a(rR,h(ft(r,f)));var b=j;continue}break;default:m=1}break;case 7:var g=c[1],n=0;if(typeof @@ -2937,412 +3096,411 @@ g==="number")n=1;else switch(g[0]){case 0:case 2:var -k=b[2],u=cT(k);if(p(bI(g),u)){a(pr,i(ff(r,g)));var +k=b[2],u=c5(k);if(p(bN(g),u)){a(rP,h(ft(r,g)));var b=k;continue}break;default:n=1}break}var -q=b[2];e(c);var -b=q;continue}return 0}}e(H);a(pq,0);var -u=bI(H);if(ks(u,bo))var +q=b[2];d(c);var +b=q;continue}return 0}}d(H);a(rO,0);var +u=bN(H);if(mb(u,by))var v=-1;else{var -s=a7(cA,0);hi(function(a){return a0(s,a,1)},u);var -v=i(dE(s))}var -w=bF(n[1],py),K=m[1];function -L(b,a){ai(w,a)[1+a]=b;return 0}g(dU[12],L,K);var -q=d[1],x=h[1],I=0,M=o[1],N=j[1];if(0<=q&&!((x.length-1-q|0)<0)){var -y=Dp(x,0,q);I=1}if(!I)var -y=ae(lm);return[0,y,w,pz,N,M,v]},dV=function(b,a){return Math.abs(b-a)<0.001?1:0},fi=function(b,a){return dV(b,a)?0:b>a===b?c:kQ(b,a)}return kQ(b,a)},hM=function(a){return typeof -a==="number"?a:Ey(a)},bq=0,ft=1,r9=-1,hN=function(a){return ca(0,a,0,E(a))},r_=function(b,a){return ca(b,a,0,E(a))},fu=function(a){if(typeof +c=b<>a===b?c:mE(b,a)}return mE(b,a)},ig=function(a){return typeof +a==="number"?a:GG(a)},bA=0,fH=1,uu=-1,ih=function(a){return cj(0,a,0,F(a))},uv=function(b,a){return cj(b,a,0,F(a))},fI=function(a){if(typeof a==="number")return a;var -e=gy(a);if(63>g;f=1}if(!f)var -c=Ew(a,b);var -i=El(a,cl(c,b)),d=eT(c),h=i?d:DN(d,r$);return gq(eJ(h),b)}return eJ(eT(a))},c1=function(a,b){if(a!==0&&b!==1){var -c=En(a,b);if(c===1)return[0,a,b];var -d=hL(b,c);return[0,hL(a,c),d]}return[0,a,ft]},hO=function(b,a){var -c=bk(a);if(0===c)return[0,bk(b),bq];if(0>>0))switch(b){case +c=GE(a,b);var +i=Gt(a,cu(c,b)),d=e1(c),h=i?d:FU(d,uw);return gP(eS(h),b)}return eS(e1(a))},db=function(a,b){if(a!==0&&b!==1){var +c=Gv(a,b);if(c===1)return[0,a,b];var +d=ie(b,c);return[0,ie(a,c),d]}return[0,a,fH]},ii=function(b,a){var +c=bt(a);if(0===c)return[0,bt(b),bA];if(0>>0))switch(b){case 0:return 2;case -1:break;default:return 1}return 3}return a[1]===0?0:4},sa=function(a){var -b=a[2];return[0,ck(a[1]),b]},fx=function(b,a){if(b[2]!==0&&a[2]!==0){var -c=bO(b[2],a[2]);return c1(bO(b[1],a[1]),c)}return[0,a5(bk(b[1]),bk(a[1])),bq]},fy=function(a){switch(a){case +1:break;default:return 1}return 3}return a[1]===0?0:4},ux=function(a){var +b=a[2];return[0,ct(a[1]),b]},fL=function(b,a){if(b[2]!==0&&a[2]!==0){var +c=bT(b[2],a[2]);return db(bT(b[1],a[1]),c)}return[0,ba(bt(b[1]),bt(a[1])),bA]},fM=function(a){switch(a){case 0:return 2;case 1:return 8;case -2:return 10;default:return 16}},fz=function(f,e,c,b){var -a=e;for(;;){if(c<=a)return 0;if(d(b,C(f,a)))return[0,a];var -a=a+1|0;continue}},sc=function(a){if(ad(a,sd)){if(ad(a,se)){if(!ad(a,sf))return hR;if(ad(a,sg)){if(ad(a,sh))try{var -l=gP(a,47),Z=ca(0,a,l+1|0,(E(a)-l|0)-1|0),_=hO(ca(0,a,0,l),Z);return _}catch(l){l=c(l);if(l===az){var -j=E(a),x=0;if(j<1)var +2:return 10;default:return 16}},fN=function(f,e,d,c){var +a=e;for(;;){if(d<=a)return 0;if(b(c,D(f,a)))return[0,a];var +a=a+1|0;continue}},c=[J,uH,aA(0)],r=[J,uO,aA(0)],uz=function(a){if(ak(a,uA)){if(ak(a,uB)){if(!ak(a,uC))return il;if(ak(a,uD)){if(ak(a,uE))try{var +l=hh(a,47),Z=cj(0,a,l+1|0,(F(a)-l|0)-1|0),_=ii(cj(0,a,0,l),Z);return _}catch(l){l=i(l);if(l===aH){var +j=F(a),x=0;if(j<1)var s=[0,0,x];else{var -P=C(a,0)+ka|0,S=0;if(!(2

>>0)){var +P=D(a,0)+lR|0,S=0;if(!(2

>>0)){var T=0;switch(P){case 0:var R=[0,0,1];break;case @@ -3351,538 +3509,488 @@ R=[0,1,1]}if(!T){var Q=R;S=1}}if(!S)var Q=[0,0,x];var s=Q}var -d=s[2];if(j<(d+2|0))var -t=[0,2,d];else{var -Y=C(a,d),h=C(a,d+1|0),r=0;if(48===Y){var -i=0;if(89<=h){if(98===h)i=2;else -if(dp===h)i=1;else -if(bP!==h){r=1;i=3}}else -if(66===h)i=2;else -if(79===h)i=1;else -if(!(88<=h)){r=1;i=3}switch(i){case +c=s[2];if(j<(c+2|0))var +t=[0,2,c];else{var +Y=D(a,c),g=D(a,c+1|0),r=0;if(48===Y){var +h=0;if(89<=g){if(98===g)h=2;else +if(gB===g)h=1;else +if(cw!==g){r=1;h=3}}else +if(66===g)h=2;else +if(79===g)h=1;else +if(!(88<=g)){r=1;h=3}switch(h){case 3:break;case 0:var -q=[0,3,d+2|0];break;case +q=[0,3,c+2|0];break;case 1:var -q=[0,1,d+2|0];break;default:var -q=[0,0,d+2|0]}}else +q=[0,1,c+2|0];break;default:var +q=[0,0,c+2|0]}}else r=1;if(r)var -q=[0,2,d];var +q=[0,2,c];var t=q}var -e=t[2],b=t[1],U=2===b?function(a){if(69!==a&&ek!==a)return 0;return 1}:3<=b?function(a){if(80!==a&&dn!==a)return 0;return 1}:function(a){return 0},y=fz(a,e,j,U);if(y)var -z=y[1],A=z+1|0,f=z,B=hM(ca(10,a,A,j-A|0));else +d=t[2],b=t[1],U=2===b?function(a){if(69!==a&&es!==a)return 0;return 1}:3<=b?function(a){if(80!==a&&gA!==a)return 0;return 1}:function(a){return 0},y=fN(a,d,j,U);if(y)var +z=y[1],A=z+1|0,e=z,B=ig(cj(10,a,A,j-A|0));else var -f=j,B=0;if(2<=b){var -D=fz(a,e,f,function(a){return 46===a?1:0});if(D){var -u=D[1];if(2===b)var -G=1;else{if(!(3<=b))throw[0,F,sj];var -G=4}var -I=u+1|0,J=f-1|0,H=0;if(J - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 315; - start_column = 5; - end_line = 317; - end_column = 6; - law_headings = - [ - "Article 1"; - "Décret n° 2020-1598 du 16 décembre 2020 portant \ - relèvement du salaire minimum de croissance"; - "Montant du salaire minimum de croissance"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2021 1 1 - && date_courante_ <=@ date_of_numbers 2021 12 31 - && residence_ = Mayotte ()) - then money_of_cents_string "774" - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 315; + start_column = 5; + end_line = 317; + end_column = 6; + law_headings = + [ + "Article 1"; + "Décret n° 2020-1598 du 16 décembre 2020 portant \ + relèvement du salaire minimum de croissance"; + "Montant du salaire minimum de croissance"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2021 1 1 + && date_courante_ <=@ date_of_numbers 2021 12 31 + && residence_ = Mayotte ()) + then money_of_cents_string "774" + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 297; - start_column = 5; - end_line = 306; - end_column = 6; - law_headings = - [ - "Article 1"; - "Décret n° 2020-1598 du 16 décembre 2020 portant \ - relèvement du salaire minimum de croissance"; - "Montant du salaire minimum de croissance"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2021 1 1 - && date_courante_ <=@ date_of_numbers 2021 12 31 - && (residence_ = Metropole () || residence_ = Guadeloupe () - || residence_ = Guyane () || residence_ = Martinique () - || residence_ = LaReunion () - || residence_ = SaintBarthelemy () - || residence_ = SaintMartin () - || residence_ = SaintPierreEtMiquelon ())) - then money_of_cents_string "1025" - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 297; + start_column = 5; + end_line = 306; + end_column = 6; + law_headings = + [ + "Article 1"; + "Décret n° 2020-1598 du 16 décembre 2020 portant \ + relèvement du salaire minimum de croissance"; + "Montant du salaire minimum de croissance"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2021 1 1 + && date_courante_ <=@ date_of_numbers 2021 12 31 + && (residence_ = Metropole () || residence_ = Guadeloupe () + || residence_ = Guyane () || residence_ = Martinique () + || residence_ = LaReunion () + || residence_ = SaintBarthelemy () + || residence_ = SaintMartin () + || residence_ = SaintPierreEtMiquelon ())) + then money_of_cents_string "1025" + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 276; - start_column = 5; - end_line = 278; - end_column = 6; - law_headings = - [ - "Article 1"; - "Décret n° 2019-1387 du 18 décembre 2019 portant \ - relèvement du salaire minimum de croissance"; - "Montant du salaire minimum de croissance"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2020 1 1 - && date_courante_ <=@ date_of_numbers 2020 12 31 - && residence_ = Mayotte ()) - then money_of_cents_string "766" - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 276; + start_column = 5; + end_line = 278; + end_column = 6; + law_headings = + [ + "Article 1"; + "Décret n° 2019-1387 du 18 décembre 2019 portant \ + relèvement du salaire minimum de croissance"; + "Montant du salaire minimum de croissance"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2020 1 1 + && date_courante_ <=@ date_of_numbers 2020 12 31 + && residence_ = Mayotte ()) + then money_of_cents_string "766" + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 258; - start_column = 5; - end_line = 267; - end_column = 6; - law_headings = - [ - "Article 1"; - "Décret n° 2019-1387 du 18 décembre 2019 portant \ - relèvement du salaire minimum de croissance"; - "Montant du salaire minimum de croissance"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2020 1 1 - && date_courante_ <=@ date_of_numbers 2020 12 31 - && (residence_ = Metropole () || residence_ = Guadeloupe () - || residence_ = Guyane () || residence_ = Martinique () - || residence_ = LaReunion () - || residence_ = SaintBarthelemy () - || residence_ = SaintMartin () - || residence_ = SaintPierreEtMiquelon ())) - then money_of_cents_string "1015" - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 258; + start_column = 5; + end_line = 267; + end_column = 6; + law_headings = + [ + "Article 1"; + "Décret n° 2019-1387 du 18 décembre 2019 portant \ + relèvement du salaire minimum de croissance"; + "Montant du salaire minimum de croissance"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2020 1 1 + && date_courante_ <=@ date_of_numbers 2020 12 31 + && (residence_ = Metropole () || residence_ = Guadeloupe () + || residence_ = Guyane () || residence_ = Martinique () + || residence_ = LaReunion () + || residence_ = SaintBarthelemy () + || residence_ = SaintMartin () + || residence_ = SaintPierreEtMiquelon ())) + then money_of_cents_string "1015" + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 237; - start_column = 5; - end_line = 239; - end_column = 6; - law_headings = - [ - "Article 1"; - "Décret n° 2018-1173 du 19 décembre 2018 portant \ - relèvement du salaire minimum de croissance"; - "Montant du salaire minimum de croissance"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2019 1 1 - && date_courante_ <=@ date_of_numbers 2019 12 31 - && residence_ = Mayotte ()) - then money_of_cents_string "757" - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 237; + start_column = 5; + end_line = 239; + end_column = 6; + law_headings = + [ + "Article 1"; + "Décret n° 2018-1173 du 19 décembre 2018 portant \ + relèvement du salaire minimum de croissance"; + "Montant du salaire minimum de croissance"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2019 1 1 + && date_courante_ <=@ date_of_numbers 2019 12 31 + && residence_ = Mayotte ()) + then money_of_cents_string "757" + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 219; - start_column = 5; - end_line = 228; - end_column = 6; - law_headings = - [ - "Article 1"; - "Décret n° 2018-1173 du 19 décembre 2018 portant \ - relèvement du salaire minimum de croissance"; - "Montant du salaire minimum de croissance"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2019 1 1 - && date_courante_ <=@ date_of_numbers 2019 12 31 - && (residence_ = Metropole () || residence_ = Guadeloupe () - || residence_ = Guyane () || residence_ = Martinique () - || residence_ = LaReunion () - || residence_ = SaintBarthelemy () - || residence_ = SaintMartin () - || residence_ = SaintPierreEtMiquelon ())) - then money_of_cents_string "1003" - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 219; + start_column = 5; + end_line = 228; + end_column = 6; + law_headings = + [ + "Article 1"; + "Décret n° 2018-1173 du 19 décembre 2018 portant \ + relèvement du salaire minimum de croissance"; + "Montant du salaire minimum de croissance"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2019 1 1 + && date_courante_ <=@ date_of_numbers 2019 12 31 + && (residence_ = Metropole () || residence_ = Guadeloupe () + || residence_ = Guyane () || residence_ = Martinique () + || residence_ = LaReunion () + || residence_ = SaintBarthelemy () + || residence_ = SaintMartin () + || residence_ = SaintPierreEtMiquelon ())) + then money_of_cents_string "1003" + else raise EmptyError); |] - (fun (_ : _) -> - log_decision_taken - { - filename = "./prologue.catala_fr"; - start_line = 43; - start_column = 10; - end_line = 43; - end_column = 22; - law_headings = [ "Prologue" ]; - } - true) + (fun (_ : _) -> true) (fun (_ : _) -> raise EmptyError) with EmptyError -> raise @@ -529,12 +507,20 @@ let allocation_familiales_avril2008 raise (NoValueProvided { - filename = "./prologue.catala_fr"; - start_line = 81; - start_column = 10; - end_line = 81; - end_column = 37; - law_headings = [ "Prologue" ]; + filename = "./securite_sociale_R.catala_fr"; + start_line = 78; + start_column = 49; + end_line = 78; + end_column = 51; + law_headings = + [ + "Article R521-1"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations assimilées"; + "Partie réglementaire - Décrets en Conseil d'Etat"; + "Code de la sécurité sociale"; + ]; })) in { age_minimum_alinea_1_l521_3_out = age_minimum_alinea_1_l521_3_ } @@ -546,23 +532,19 @@ let enfant_le_plus_age (enfant_le_plus_age_in : enfant_le_plus_age_in) = [ "EnfantLePlusÂgé"; "le_plus_âgé" ] embed_enfant (try - try - try - Array.fold_left - (fun (acc_ : _) (item_ : _) -> - if acc_.age >! item_.age then acc_ else item_) - { - identifiant = ~-!(integer_of_string "1"); - obligation_scolaire = Pendant (); - remuneration_mensuelle = money_of_cents_string "0"; - date_de_naissance = date_of_numbers 1900 1 1; - age = integer_of_string "0"; - prise_en_charge = EffectiveEtPermanente (); - a_deja_ouvert_droit_aux_allocations_familiales = false; - } - enfants_ - with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError + Array.fold_left + (fun (acc_ : _) (item_ : _) -> + if acc_.age >! item_.age then acc_ else item_) + { + identifiant = ~-!(integer_of_string "1"); + obligation_scolaire = Pendant (); + remuneration_mensuelle = money_of_cents_string "0"; + date_de_naissance = date_of_numbers 1900 1 1; + age = integer_of_string "0"; + prise_en_charge = EffectiveEtPermanente (); + a_deja_ouvert_droit_aux_allocations_familiales = false; + } + enfants_ with EmptyError -> raise (NoValueProvided @@ -593,12 +575,20 @@ let prestations_familiales raise (NoValueProvided { - filename = "./prologue.catala_fr"; - start_line = 68; - start_column = 10; - end_line = 68; - end_column = 22; - law_headings = [ "Prologue" ]; + filename = "./securite_sociale_R.catala_fr"; + start_line = 21; + start_column = 34; + end_line = 21; + end_column = 36; + law_headings = + [ + "Article R512-2"; + "Chapitre 2 : Champ d'application."; + "Titre 1 : Champ d'application - Généralités"; + "Livre 5 : Prestations familiales et prestations assimilées"; + "Partie réglementaire - Décrets en Conseil d'Etat"; + "Code de la sécurité sociale"; + ]; })) in let base_mensuelle_ : money = @@ -609,99 +599,82 @@ let prestations_familiales handle_default [| (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 60; - start_column = 5; - end_line = 61; - end_column = 34; - law_headings = - [ - "Instruction interministérielle n°DSS/2B/2021/65 du \ - 19 mars 2021 relative à la revalorisation au 1er \ - avril 2021 des prestations familiales servies en \ - métropole, en Guadeloupe, en Guyane, en \ - Martinique, à la Réunion, à Saint-Barthélemy, à \ - Saint-Martin et dans le département de Mayotte"; - "Montant de la base mensuelle des allocations \ - familiales"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2021 4 1 - && date_courante_ <@ date_of_numbers 2022 4 1) - then money_of_cents_string "41481" - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 60; + start_column = 5; + end_line = 61; + end_column = 34; + law_headings = + [ + "Instruction interministérielle n°DSS/2B/2021/65 du \ + 19 mars 2021 relative à la revalorisation au 1er \ + avril 2021 des prestations familiales servies en \ + métropole, en Guadeloupe, en Guyane, en Martinique, \ + à la Réunion, à Saint-Barthélemy, à Saint-Martin et \ + dans le département de Mayotte"; + "Montant de la base mensuelle des allocations \ + familiales"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2021 4 1 + && date_courante_ <@ date_of_numbers 2022 4 1) + then money_of_cents_string "41481" + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 44; - start_column = 5; - end_line = 45; - end_column = 34; - law_headings = - [ - "Instruction interministérielle no DSS/SD2B/2020/33 \ - du 18 février 2020 relative à la revalorisation au \ - 1er avril 2020 des prestations familiales servies \ - en métropole, en Guadeloupe, en Guyane, en \ - Martinique, à La Réunion, à Saint-Barthélemy, à \ - Saint-Martin et dans le département de Mayotte"; - "Montant de la base mensuelle des allocations \ - familiales"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2020 4 1 - && date_courante_ <@ date_of_numbers 2021 4 1) - then money_of_cents_string "41404" - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 44; + start_column = 5; + end_line = 45; + end_column = 34; + law_headings = + [ + "Instruction interministérielle no DSS/SD2B/2020/33 \ + du 18 février 2020 relative à la revalorisation au \ + 1er avril 2020 des prestations familiales servies en \ + métropole, en Guadeloupe, en Guyane, en Martinique, \ + à La Réunion, à Saint-Barthélemy, à Saint-Martin et \ + dans le département de Mayotte"; + "Montant de la base mensuelle des allocations \ + familiales"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2020 4 1 + && date_courante_ <@ date_of_numbers 2021 4 1) + then money_of_cents_string "41404" + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 24; - start_column = 5; - end_line = 25; - end_column = 34; - law_headings = - [ - "Instruction ministérielle N°DSS/SD2B/2019/65 du 25 \ - mars 2019 relative à la revalorisation au 1er \ - avril 2019 des prestations familiales servies en \ - métropole"; - "Montant de la base mensuelle des allocations \ - familiales"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2019 4 1 - && date_courante_ <@ date_of_numbers 2020 4 1) - then money_of_cents_string "41316" - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 24; + start_column = 5; + end_line = 25; + end_column = 34; + law_headings = + [ + "Instruction ministérielle N°DSS/SD2B/2019/65 du 25 \ + mars 2019 relative à la revalorisation au 1er avril \ + 2019 des prestations familiales servies en métropole"; + "Montant de la base mensuelle des allocations \ + familiales"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2019 4 1 + && date_courante_ <@ date_of_numbers 2020 4 1) + then money_of_cents_string "41316" + else raise EmptyError); |] - (fun (_ : _) -> - log_decision_taken - { - filename = "./prologue.catala_fr"; - start_line = 74; - start_column = 10; - end_line = 74; - end_column = 24; - law_headings = [ "Prologue" ]; - } - true) + (fun (_ : _) -> true) (fun (_ : _) -> raise EmptyError) with EmptyError -> raise @@ -719,18 +692,16 @@ let prestations_familiales try log_variable_definition [ "PrestationsFamiliales"; "smic.date_courante" ] - embed_date - (try try date_courante_ with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError) + embed_date date_courante_ with EmptyError -> raise (NoValueProvided { filename = "./prologue.catala_fr"; - start_line = 41; - start_column = 10; - end_line = 41; - end_column = 23; + start_line = 73; + start_column = 3; + end_line = 73; + end_column = 7; law_headings = [ "Prologue" ]; }) in @@ -738,18 +709,16 @@ let prestations_familiales try log_variable_definition [ "PrestationsFamiliales"; "smic.résidence" ] - embed_collectivite - (try try residence_ with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError) + embed_collectivite residence_ with EmptyError -> raise (NoValueProvided { filename = "./prologue.catala_fr"; - start_line = 42; - start_column = 10; - end_line = 42; - end_column = 19; + start_line = 73; + start_column = 3; + end_line = 73; + end_column = 7; law_headings = [ "Prologue" ]; }) in @@ -771,34 +740,32 @@ let prestations_familiales embed_bool (try try - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 354; - start_column = 5; - end_line = 359; - end_column = 30; - law_headings = - [ - "Article L751-1"; - "Chapitre 1er : Généralités"; - "Titre 5 : Dispositions particulières à la Guadeloupe, \ - à la Guyane, à la Martinique, à La Réunion, à \ - Saint-Barthélemy et à Saint-Martin"; - "Livre 7 : Régimes divers - Dispositions diverses"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - (residence_ = Guadeloupe () || residence_ = Guyane () - || residence_ = Martinique () || residence_ = LaReunion () - || residence_ = SaintBarthelemy () - || residence_ = SaintMartin ()) - then true - else raise EmptyError - with EmptyError -> raise EmptyError + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 354; + start_column = 5; + end_line = 359; + end_column = 30; + law_headings = + [ + "Article L751-1"; + "Chapitre 1er : Généralités"; + "Titre 5 : Dispositions particulières à la Guadeloupe, à \ + la Guyane, à la Martinique, à La Réunion, à \ + Saint-Barthélemy et à Saint-Martin"; + "Livre 7 : Régimes divers - Dispositions diverses"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + (residence_ = Guadeloupe () || residence_ = Guyane () + || residence_ = Martinique () || residence_ = LaReunion () + || residence_ = SaintBarthelemy () + || residence_ = SaintMartin ()) + then true + else raise EmptyError with EmptyError -> false with EmptyError -> raise @@ -818,39 +785,33 @@ let prestations_familiales embed_money (try try - try - try - if - log_decision_taken - { - filename = "./securite_sociale_R.catala_fr"; - start_line = 216; - start_column = 18; - end_line = 216; - end_column = 41; - law_headings = - [ - "Article R755-0-2"; - "Chapitre 5 : Prestations familiales et prestations \ - assimilées"; - "Titre 5 : Départements d'outre-mer"; - "Livre 7 : Régimes divers - Dispositions diverses"; - "Partie réglementaire - Décrets en Conseil d'Etat"; - "Code de la sécurité sociale"; - ]; - } - regime_outre_mer_l751_1_ - then - smic_dot_brut_horaire_ *$ decimal_of_string "0.55" - *$ decimal_of_string "169." - else raise EmptyError - with EmptyError -> raise EmptyError - with EmptyError -> ( - try - smic_dot_brut_horaire_ *$ decimal_of_string "0.55" - *$ decimal_of_string "169." - with EmptyError -> raise EmptyError) - with EmptyError -> raise EmptyError + if + log_decision_taken + { + filename = "./securite_sociale_R.catala_fr"; + start_line = 216; + start_column = 18; + end_line = 216; + end_column = 41; + law_headings = + [ + "Article R755-0-2"; + "Chapitre 5 : Prestations familiales et prestations \ + assimilées"; + "Titre 5 : Départements d'outre-mer"; + "Livre 7 : Régimes divers - Dispositions diverses"; + "Partie réglementaire - Décrets en Conseil d'Etat"; + "Code de la sécurité sociale"; + ]; + } + regime_outre_mer_l751_1_ + then + smic_dot_brut_horaire_ *$ decimal_of_string "0.55" + *$ decimal_of_string "169." + else raise EmptyError + with EmptyError -> + smic_dot_brut_horaire_ *$ decimal_of_string "0.55" + *$ decimal_of_string "169." with EmptyError -> raise (NoValueProvided @@ -871,43 +832,41 @@ let prestations_familiales fun (param_ : enfant) -> try try - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 68; - start_column = 5; - end_line = 71; - end_column = 57; - law_headings = - [ - "Article L512-3"; - "Chapitre 2 : Champ d'application"; - "Titre 1 : Champ d'application - Généralités"; - "Livre 5 : Prestations familiales et prestations \ - assimilées"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - (((match param_.obligation_scolaire with - | Avant _ -> true - | Pendant _ -> false + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 68; + start_column = 5; + end_line = 71; + end_column = 57; + law_headings = + [ + "Article L512-3"; + "Chapitre 2 : Champ d'application"; + "Titre 1 : Champ d'application - Généralités"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + (((match param_.obligation_scolaire with + | Avant _ -> true + | Pendant _ -> false + | Apres _ -> false) + || (match param_.obligation_scolaire with + | Avant _ -> false + | Pendant _ -> true | Apres _ -> false) - || (match param_.obligation_scolaire with - | Avant _ -> false - | Pendant _ -> true - | Apres _ -> false) - || - match param_.obligation_scolaire with - | Avant _ -> false - | Pendant _ -> false - | Apres _ -> true) - && param_.remuneration_mensuelle <=$ plafond_l512_3_2_) - then true - else raise EmptyError - with EmptyError -> raise EmptyError + || + match param_.obligation_scolaire with + | Avant _ -> false + | Pendant _ -> false + | Apres _ -> true) + && param_.remuneration_mensuelle <=$ plafond_l512_3_2_) + then true + else raise EmptyError with EmptyError -> false with EmptyError -> raise @@ -942,80 +901,66 @@ let prestations_familiales handle_default [| (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 60; - start_column = 5; - end_line = 62; - end_column = 32; - law_headings = - [ - "Article L512-3"; - "Chapitre 2 : Champ d'application"; - "Titre 1 : Champ d'application - Généralités"; - "Livre 5 : Prestations familiales et \ - prestations assimilées"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - ((match param_.obligation_scolaire with - | Avant _ -> false - | Pendant _ -> false - | Apres _ -> true) - && param_.remuneration_mensuelle <=$ plafond_l512_3_2_ - && param_.age raise EmptyError); + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 60; + start_column = 5; + end_line = 62; + end_column = 32; + law_headings = + [ + "Article L512-3"; + "Chapitre 2 : Champ d'application"; + "Titre 1 : Champ d'application - Généralités"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + ((match param_.obligation_scolaire with + | Avant _ -> false + | Pendant _ -> false + | Apres _ -> true) + && param_.remuneration_mensuelle <=$ plafond_l512_3_2_ + && param_.age - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 49; - start_column = 5; - end_line = 50; - end_column = 50; - law_headings = - [ - "Article L512-3"; - "Chapitre 2 : Champ d'application"; - "Titre 1 : Champ d'application - Généralités"; - "Livre 5 : Prestations familiales et \ - prestations assimilées"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - ((match param_.obligation_scolaire with - | Avant _ -> true - | Pendant _ -> false - | Apres _ -> false) - || - match param_.obligation_scolaire with - | Avant _ -> false - | Pendant _ -> true - | Apres _ -> false) - then true - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 49; + start_column = 5; + end_line = 50; + end_column = 50; + law_headings = + [ + "Article L512-3"; + "Chapitre 2 : Champ d'application"; + "Titre 1 : Champ d'application - Généralités"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + ((match param_.obligation_scolaire with + | Avant _ -> true + | Pendant _ -> false + | Apres _ -> false) + || + match param_.obligation_scolaire with + | Avant _ -> false + | Pendant _ -> true + | Apres _ -> false) + then true + else raise EmptyError); |] - (fun (_ : _) -> - log_decision_taken - { - filename = "./prologue.catala_fr"; - start_line = 65; - start_column = 10; - end_line = 65; - end_column = 22; - law_headings = [ "Prologue" ]; - } - true) + (fun (_ : _) -> true) (fun (_ : _) -> false) with EmptyError -> raise @@ -1078,177 +1023,152 @@ let allocations_familiales handle_default [| (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 263; - start_column = 5; - end_line = 264; - end_column = 48; - law_headings = - [ - "Article L521-2"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et \ - prestations assimilées"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - (match param_.prise_en_charge with - | GardeAlterneePartageAllocations _ -> false - | GardeAlterneeAllocataireUnique _ -> false - | EffectiveEtPermanente _ -> false - | ServicesSociauxAllocationVerseeALaFamille _ -> true - | ServicesSociauxAllocationVerseeAuxServicesSociaux _ - -> - false) - then Complete () - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 263; + start_column = 5; + end_line = 264; + end_column = 48; + law_headings = + [ + "Article L521-2"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + (match param_.prise_en_charge with + | GardeAlterneePartageAllocations _ -> false + | GardeAlterneeAllocataireUnique _ -> false + | EffectiveEtPermanente _ -> false + | ServicesSociauxAllocationVerseeALaFamille _ -> true + | ServicesSociauxAllocationVerseeAuxServicesSociaux _ -> + false) + then Complete () + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 253; - start_column = 5; - end_line = 254; - end_column = 56; - law_headings = - [ - "Article L521-2"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et \ - prestations assimilées"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - (match param_.prise_en_charge with - | GardeAlterneePartageAllocations _ -> false - | GardeAlterneeAllocataireUnique _ -> false - | EffectiveEtPermanente _ -> false - | ServicesSociauxAllocationVerseeALaFamille _ -> false - | ServicesSociauxAllocationVerseeAuxServicesSociaux _ - -> - true) - then Zero () - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 253; + start_column = 5; + end_line = 254; + end_column = 56; + law_headings = + [ + "Article L521-2"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + (match param_.prise_en_charge with + | GardeAlterneePartageAllocations _ -> false + | GardeAlterneeAllocataireUnique _ -> false + | EffectiveEtPermanente _ -> false + | ServicesSociauxAllocationVerseeALaFamille _ -> false + | ServicesSociauxAllocationVerseeAuxServicesSociaux _ -> + true) + then Zero () + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 214; - start_column = 5; - end_line = 214; - end_column = 70; - law_headings = - [ - "Article L521-2"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et \ - prestations assimilées"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - (match param_.prise_en_charge with - | GardeAlterneePartageAllocations _ -> true - | GardeAlterneeAllocataireUnique _ -> false - | EffectiveEtPermanente _ -> false - | ServicesSociauxAllocationVerseeALaFamille _ -> false - | ServicesSociauxAllocationVerseeAuxServicesSociaux _ - -> - false) - then Partagee () - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 214; + start_column = 5; + end_line = 214; + end_column = 70; + law_headings = + [ + "Article L521-2"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + (match param_.prise_en_charge with + | GardeAlterneePartageAllocations _ -> true + | GardeAlterneeAllocataireUnique _ -> false + | EffectiveEtPermanente _ -> false + | ServicesSociauxAllocationVerseeALaFamille _ -> false + | ServicesSociauxAllocationVerseeAuxServicesSociaux _ -> + false) + then Partagee () + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 204; - start_column = 5; - end_line = 204; - end_column = 69; - law_headings = - [ - "Article L521-2"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et \ - prestations assimilées"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - (match param_.prise_en_charge with - | GardeAlterneePartageAllocations _ -> false - | GardeAlterneeAllocataireUnique _ -> true - | EffectiveEtPermanente _ -> false - | ServicesSociauxAllocationVerseeALaFamille _ -> false - | ServicesSociauxAllocationVerseeAuxServicesSociaux _ - -> - false) - then Complete () - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 204; + start_column = 5; + end_line = 204; + end_column = 69; + law_headings = + [ + "Article L521-2"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + (match param_.prise_en_charge with + | GardeAlterneePartageAllocations _ -> false + | GardeAlterneeAllocataireUnique _ -> true + | EffectiveEtPermanente _ -> false + | ServicesSociauxAllocationVerseeALaFamille _ -> false + | ServicesSociauxAllocationVerseeAuxServicesSociaux _ -> + false) + then Complete () + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 184; - start_column = 5; - end_line = 184; - end_column = 60; - law_headings = - [ - "Article L521-2"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et \ - prestations assimilées"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - (match param_.prise_en_charge with - | GardeAlterneePartageAllocations _ -> false - | GardeAlterneeAllocataireUnique _ -> false - | EffectiveEtPermanente _ -> true - | ServicesSociauxAllocationVerseeALaFamille _ -> false - | ServicesSociauxAllocationVerseeAuxServicesSociaux _ - -> - false) - then Complete () - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 184; + start_column = 5; + end_line = 184; + end_column = 60; + law_headings = + [ + "Article L521-2"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + (match param_.prise_en_charge with + | GardeAlterneePartageAllocations _ -> false + | GardeAlterneeAllocataireUnique _ -> false + | EffectiveEtPermanente _ -> true + | ServicesSociauxAllocationVerseeALaFamille _ -> false + | ServicesSociauxAllocationVerseeAuxServicesSociaux _ -> + false) + then Complete () + else raise EmptyError); |] - (fun (_ : _) -> - log_decision_taken - { - filename = "./prologue.catala_fr"; - start_line = 102; - start_column = 11; - end_line = 102; - end_column = 26; - law_headings = [ "Prologue" ]; - } - true) + (fun (_ : _) -> true) (fun (_ : _) -> raise EmptyError) with EmptyError -> raise @@ -1283,177 +1203,152 @@ let allocations_familiales handle_default [| (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 269; - start_column = 5; - end_line = 270; - end_column = 48; - law_headings = - [ - "Article L521-2"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et \ - prestations assimilées"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - (match param_.prise_en_charge with - | GardeAlterneePartageAllocations _ -> false - | GardeAlterneeAllocataireUnique _ -> false - | EffectiveEtPermanente _ -> false - | ServicesSociauxAllocationVerseeALaFamille _ -> true - | ServicesSociauxAllocationVerseeAuxServicesSociaux _ - -> - false) - then Normal () - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 269; + start_column = 5; + end_line = 270; + end_column = 48; + law_headings = + [ + "Article L521-2"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + (match param_.prise_en_charge with + | GardeAlterneePartageAllocations _ -> false + | GardeAlterneeAllocataireUnique _ -> false + | EffectiveEtPermanente _ -> false + | ServicesSociauxAllocationVerseeALaFamille _ -> true + | ServicesSociauxAllocationVerseeAuxServicesSociaux _ -> + false) + then Normal () + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 258; - start_column = 5; - end_line = 259; - end_column = 56; - law_headings = - [ - "Article L521-2"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et \ - prestations assimilées"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - (match param_.prise_en_charge with - | GardeAlterneePartageAllocations _ -> false - | GardeAlterneeAllocataireUnique _ -> false - | EffectiveEtPermanente _ -> false - | ServicesSociauxAllocationVerseeALaFamille _ -> false - | ServicesSociauxAllocationVerseeAuxServicesSociaux _ - -> - true) - then AllocationVerseeAuxServicesSociaux () - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 258; + start_column = 5; + end_line = 259; + end_column = 56; + law_headings = + [ + "Article L521-2"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + (match param_.prise_en_charge with + | GardeAlterneePartageAllocations _ -> false + | GardeAlterneeAllocataireUnique _ -> false + | EffectiveEtPermanente _ -> false + | ServicesSociauxAllocationVerseeALaFamille _ -> false + | ServicesSociauxAllocationVerseeAuxServicesSociaux _ -> + true) + then AllocationVerseeAuxServicesSociaux () + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 218; - start_column = 5; - end_line = 218; - end_column = 70; - law_headings = - [ - "Article L521-2"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et \ - prestations assimilées"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - (match param_.prise_en_charge with - | GardeAlterneePartageAllocations _ -> true - | GardeAlterneeAllocataireUnique _ -> false - | EffectiveEtPermanente _ -> false - | ServicesSociauxAllocationVerseeALaFamille _ -> false - | ServicesSociauxAllocationVerseeAuxServicesSociaux _ - -> - false) - then Normal () - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 218; + start_column = 5; + end_line = 218; + end_column = 70; + law_headings = + [ + "Article L521-2"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + (match param_.prise_en_charge with + | GardeAlterneePartageAllocations _ -> true + | GardeAlterneeAllocataireUnique _ -> false + | EffectiveEtPermanente _ -> false + | ServicesSociauxAllocationVerseeALaFamille _ -> false + | ServicesSociauxAllocationVerseeAuxServicesSociaux _ -> + false) + then Normal () + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 208; - start_column = 5; - end_line = 208; - end_column = 69; - law_headings = - [ - "Article L521-2"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et \ - prestations assimilées"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - (match param_.prise_en_charge with - | GardeAlterneePartageAllocations _ -> false - | GardeAlterneeAllocataireUnique _ -> true - | EffectiveEtPermanente _ -> false - | ServicesSociauxAllocationVerseeALaFamille _ -> false - | ServicesSociauxAllocationVerseeAuxServicesSociaux _ - -> - false) - then Normal () - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 208; + start_column = 5; + end_line = 208; + end_column = 69; + law_headings = + [ + "Article L521-2"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + (match param_.prise_en_charge with + | GardeAlterneePartageAllocations _ -> false + | GardeAlterneeAllocataireUnique _ -> true + | EffectiveEtPermanente _ -> false + | ServicesSociauxAllocationVerseeALaFamille _ -> false + | ServicesSociauxAllocationVerseeAuxServicesSociaux _ -> + false) + then Normal () + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 188; - start_column = 5; - end_line = 188; - end_column = 60; - law_headings = - [ - "Article L521-2"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et \ - prestations assimilées"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - (match param_.prise_en_charge with - | GardeAlterneePartageAllocations _ -> false - | GardeAlterneeAllocataireUnique _ -> false - | EffectiveEtPermanente _ -> true - | ServicesSociauxAllocationVerseeALaFamille _ -> false - | ServicesSociauxAllocationVerseeAuxServicesSociaux _ - -> - false) - then Normal () - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 188; + start_column = 5; + end_line = 188; + end_column = 60; + law_headings = + [ + "Article L521-2"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + (match param_.prise_en_charge with + | GardeAlterneePartageAllocations _ -> false + | GardeAlterneeAllocataireUnique _ -> false + | EffectiveEtPermanente _ -> true + | ServicesSociauxAllocationVerseeALaFamille _ -> false + | ServicesSociauxAllocationVerseeAuxServicesSociaux _ -> + false) + then Normal () + else raise EmptyError); |] - (fun (_ : _) -> - log_decision_taken - { - filename = "./prologue.catala_fr"; - start_line = 103; - start_column = 11; - end_line = 103; - end_column = 20; - law_headings = [ "Prologue" ]; - } - true) + (fun (_ : _) -> true) (fun (_ : _) -> raise EmptyError) with EmptyError -> raise @@ -1487,12 +1382,20 @@ let allocations_familiales raise (NoValueProvided { - filename = "./prologue.catala_fr"; - start_line = 151; - start_column = 11; - end_line = 151; - end_column = 32; - law_headings = [ "Prologue" ]; + filename = "./securite_sociale_D.catala_fr"; + start_line = 288; + start_column = 43; + end_line = 288; + end_column = 44; + law_headings = + [ + "Article D521-2"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations assimilées"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; })) in let nombre_enfants_alinea_2_l521_3_ : integer = @@ -1504,12 +1407,20 @@ let allocations_familiales raise (NoValueProvided { - filename = "./prologue.catala_fr"; - start_line = 153; - start_column = 11; - end_line = 153; - end_column = 41; - law_headings = [ "Prologue" ]; + filename = "./securite_sociale_R.catala_fr"; + start_line = 64; + start_column = 52; + end_line = 64; + end_column = 53; + law_headings = + [ + "Article R521-1"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations assimilées"; + "Partie réglementaire - Décrets en Conseil d'Etat"; + "Code de la sécurité sociale"; + ]; })) in let result_ : allocation_familiales_avril2008_out = @@ -1534,18 +1445,16 @@ let allocations_familiales try log_variable_definition [ "AllocationsFamiliales"; "prestations_familiales.date_courante" ] - embed_date - (try try date_courante_ with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError) + embed_date date_courante_ with EmptyError -> raise (NoValueProvided { filename = "./prologue.catala_fr"; - start_line = 70; - start_column = 10; - end_line = 70; - end_column = 23; + start_line = 146; + start_column = 3; + end_line = 146; + end_column = 25; law_headings = [ "Prologue" ]; }) in @@ -1556,18 +1465,16 @@ let allocations_familiales [ "AllocationsFamiliales"; "prestations_familiales.prestation_courante"; ] - embed_element_prestations_familiales - (try try AllocationsFamiliales () with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError) + embed_element_prestations_familiales (AllocationsFamiliales ()) with EmptyError -> raise (NoValueProvided { filename = "./prologue.catala_fr"; - start_line = 71; - start_column = 10; - end_line = 71; - end_column = 29; + start_line = 146; + start_column = 3; + end_line = 146; + end_column = 25; law_headings = [ "Prologue" ]; }) in @@ -1575,18 +1482,16 @@ let allocations_familiales try log_variable_definition [ "AllocationsFamiliales"; "prestations_familiales.résidence" ] - embed_collectivite - (try try residence_ with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError) + embed_collectivite residence_ with EmptyError -> raise (NoValueProvided { filename = "./prologue.catala_fr"; - start_line = 72; - start_column = 10; - end_line = 72; - end_column = 19; + start_line = 146; + start_column = 3; + end_line = 146; + end_column = 25; law_headings = [ "Prologue" ]; }) in @@ -1630,18 +1535,16 @@ let allocations_familiales try log_variable_definition [ "AllocationsFamiliales"; "enfant_le_plus_âgé.enfants" ] - (embed_array embed_enfant) - (try try enfants_a_charge_ with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError) + (embed_array embed_enfant) enfants_a_charge_ with EmptyError -> raise (NoValueProvided { filename = "./prologue.catala_fr"; - start_line = 84; - start_column = 10; - end_line = 84; - end_column = 17; + start_line = 148; + start_column = 3; + end_line = 148; + end_column = 21; law_headings = [ "Prologue" ]; }) in @@ -1662,40 +1565,36 @@ let allocations_familiales fun (param_ : enfant) -> try try - try - try - if - log_decision_taken - { - filename = "./securite_sociale_R.catala_fr"; - start_line = 83; - start_column = 19; - end_line = 83; - end_column = 69; - law_headings = - [ - "Article R521-1"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et prestations \ - assimilées"; - "Partie réglementaire - Décrets en Conseil d'Etat"; - "Code de la sécurité sociale"; - ]; - } - (param_.date_de_naissance +@ duration_of_numbers 11 0 0 - <=@ date_of_numbers 2008 4 30) - then version_avril_2008_dot_age_minimum_alinea_1_l521_3_ - else raise EmptyError - with EmptyError -> raise EmptyError - with EmptyError -> integer_of_string "14" - with EmptyError -> raise EmptyError - with EmptyError -> - raise - (NoValueProvided - { - filename = "./prologue.catala_fr"; - start_line = 152; + if + log_decision_taken + { + filename = "./securite_sociale_R.catala_fr"; + start_line = 83; + start_column = 19; + end_line = 83; + end_column = 69; + law_headings = + [ + "Article R521-1"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie réglementaire - Décrets en Conseil d'Etat"; + "Code de la sécurité sociale"; + ]; + } + (param_.date_de_naissance +@ duration_of_numbers 11 0 0 + <=@ date_of_numbers 2008 4 30) + then version_avril_2008_dot_age_minimum_alinea_1_l521_3_ + else raise EmptyError + with EmptyError -> integer_of_string "14" + with EmptyError -> + raise + (NoValueProvided + { + filename = "./prologue.catala_fr"; + start_line = 152; start_column = 11; end_line = 152; end_column = 38; @@ -1721,24 +1620,20 @@ let allocations_familiales ] (embed_array embed_enfant) (try - try - try - array_filter - (fun (enfant_ : _) -> - log_end_call - [ "PrestationsFamiliales"; "droit_ouvert" ] - (log_variable_definition - [ "PrestationsFamiliales"; "droit_ouvert"; "output" ] - unembeddable - (log_begin_call - [ "PrestationsFamiliales"; "droit_ouvert" ] - prestations_familiales_dot_droit_ouvert_ - (log_variable_definition - [ "PrestationsFamiliales"; "droit_ouvert"; "input" ] - unembeddable enfant_)))) - enfants_a_charge_ - with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError + array_filter + (fun (enfant_ : _) -> + log_end_call + [ "PrestationsFamiliales"; "droit_ouvert" ] + (log_variable_definition + [ "PrestationsFamiliales"; "droit_ouvert"; "output" ] + unembeddable + (log_begin_call + [ "PrestationsFamiliales"; "droit_ouvert" ] + prestations_familiales_dot_droit_ouvert_ + (log_variable_definition + [ "PrestationsFamiliales"; "droit_ouvert"; "input" ] + unembeddable enfant_)))) + enfants_a_charge_ with EmptyError -> raise (NoValueProvided @@ -1757,11 +1652,7 @@ let allocations_familiales unembeddable (try fun (param_ : enfant) -> - try - try - try enfant_le_plus_age_dot_le_plus_age_ = param_ - with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError + try enfant_le_plus_age_dot_le_plus_age_ = param_ with EmptyError -> raise (NoValueProvided @@ -1790,164 +1681,139 @@ let allocations_familiales [ "AllocationsFamiliales"; "plafond_II_d521_3" ] embed_money (try - try - handle_default - [| - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 196; - start_column = 5; - end_line = 196; - end_column = 69; - law_headings = - [ - "Article 1"; - "Arrêté du 14 décembre 2020 relatif au montant \ - des plafonds de ressources de certaines \ - prestations familiales et aux tranches du barème \ - applicable au recouvrement des indus et à la \ - saisie des prestations"; - "Montant des plafonds de ressources"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2021 1 1 - && date_courante_ <=@ date_of_numbers 2021 12 31) - then - money_of_cents_string "8155800" - +$ money_of_cents_string "582700" - *$ decimal_of_integer - (array_length - enfants_a_charge_droit_ouvert_prestation_familiale_) - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 160; - start_column = 5; - end_line = 160; - end_column = 69; - law_headings = - [ - "Instruction interministerielle no \ - DSS/SD2B/2019/261 du 18 décembre 2019 relative à \ - la revalorisation au 1er janvier 2020 des \ - plafonds de ressources d’attribution de \ - certaines prestations familiales servies en \ - métropole, en Guadeloupe, en Guyane, en \ - Martinique, à La Réunion, à Saint-Barthélemy, à \ - Saint-Martin et à Mayotte"; - "Montant des plafonds de ressources"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2020 1 1 - && date_courante_ <=@ date_of_numbers 2020 12 31) - then - money_of_cents_string "8083100" - +$ money_of_cents_string "577500" - *$ decimal_of_integer - (array_length - enfants_a_charge_droit_ouvert_prestation_familiale_) - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 127; - start_column = 5; - end_line = 127; - end_column = 69; - law_headings = - [ - "Instruction interministérielle n° \ - DSS/SD2B/2018/279 du 17 décembre 2018 relative à \ - la revalorisation au 1er janvier 2019 des \ - plafonds de ressources d’attribution de \ - certaines prestations familiales servies en \ - métropole, en Guadeloupe, en Guyane, en \ - Martinique, à la Réunion, à Saint-Barthélemy, à \ - Saint-Martin et à Mayotte"; - "Montant des plafonds de ressources"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2019 1 1 - && date_courante_ <=@ date_of_numbers 2019 12 31) - then - money_of_cents_string "7955800" - +$ money_of_cents_string "568400" - *$ decimal_of_integer - (array_length - enfants_a_charge_droit_ouvert_prestation_familiale_) - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 94; - start_column = 5; - end_line = 94; - end_column = 69; - law_headings = - [ - "Circulaire interministérielle N° \ - DSS/SD2B/2017/352 du 22 décembre 2017 relative à \ - la revalorisation au 1er janvier 2018 des \ - plafonds de ressources d’attribution de \ - certaines prestations familiales servies en \ - métropole, en Guadeloupe, en Guyane, en \ - Martinique, à la Réunion, à Saint-Barthélemy, à \ - Saint-Martin et à Mayotte"; - "Montant des plafonds de ressources"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2018 1 1 - && date_courante_ <=@ date_of_numbers 2018 12 31) - then - money_of_cents_string "7877000" - +$ money_of_cents_string "562800" - *$ decimal_of_integer - (array_length - enfants_a_charge_droit_ouvert_prestation_familiale_) - else raise EmptyError - with EmptyError -> raise EmptyError); - |] + handle_default + [| (fun (_ : _) -> - log_decision_taken - { - filename = "./prologue.catala_fr"; - start_line = 156; - start_column = 11; - end_line = 156; - end_column = 28; - law_headings = [ "Prologue" ]; - } - true) + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 196; + start_column = 5; + end_line = 196; + end_column = 69; + law_headings = + [ + "Article 1"; + "Arrêté du 14 décembre 2020 relatif au montant des \ + plafonds de ressources de certaines prestations \ + familiales et aux tranches du barème applicable au \ + recouvrement des indus et à la saisie des \ + prestations"; + "Montant des plafonds de ressources"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2021 1 1 + && date_courante_ <=@ date_of_numbers 2021 12 31) + then + money_of_cents_string "8155800" + +$ money_of_cents_string "582700" + *$ decimal_of_integer + (array_length + enfants_a_charge_droit_ouvert_prestation_familiale_) + else raise EmptyError); (fun (_ : _) -> - try - money_of_cents_string "7830000" - +$ money_of_cents_string "559500" + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 160; + start_column = 5; + end_line = 160; + end_column = 69; + law_headings = + [ + "Instruction interministerielle no DSS/SD2B/2019/261 \ + du 18 décembre 2019 relative à la revalorisation au \ + 1er janvier 2020 des plafonds de ressources \ + d’attribution de certaines prestations familiales \ + servies en métropole, en Guadeloupe, en Guyane, en \ + Martinique, à La Réunion, à Saint-Barthélemy, à \ + Saint-Martin et à Mayotte"; + "Montant des plafonds de ressources"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2020 1 1 + && date_courante_ <=@ date_of_numbers 2020 12 31) + then + money_of_cents_string "8083100" + +$ money_of_cents_string "577500" + *$ decimal_of_integer + (array_length + enfants_a_charge_droit_ouvert_prestation_familiale_) + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 127; + start_column = 5; + end_line = 127; + end_column = 69; + law_headings = + [ + "Instruction interministérielle n° DSS/SD2B/2018/279 \ + du 17 décembre 2018 relative à la revalorisation au \ + 1er janvier 2019 des plafonds de ressources \ + d’attribution de certaines prestations familiales \ + servies en métropole, en Guadeloupe, en Guyane, en \ + Martinique, à la Réunion, à Saint-Barthélemy, à \ + Saint-Martin et à Mayotte"; + "Montant des plafonds de ressources"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2019 1 1 + && date_courante_ <=@ date_of_numbers 2019 12 31) + then + money_of_cents_string "7955800" + +$ money_of_cents_string "568400" + *$ decimal_of_integer + (array_length + enfants_a_charge_droit_ouvert_prestation_familiale_) + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 94; + start_column = 5; + end_line = 94; + end_column = 69; + law_headings = + [ + "Circulaire interministérielle N° DSS/SD2B/2017/352 \ + du 22 décembre 2017 relative à la revalorisation au \ + 1er janvier 2018 des plafonds de ressources \ + d’attribution de certaines prestations familiales \ + servies en métropole, en Guadeloupe, en Guyane, en \ + Martinique, à la Réunion, à Saint-Barthélemy, à \ + Saint-Martin et à Mayotte"; + "Montant des plafonds de ressources"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2018 1 1 + && date_courante_ <=@ date_of_numbers 2018 12 31) + then + money_of_cents_string "7877000" + +$ money_of_cents_string "562800" *$ decimal_of_integer (array_length enfants_a_charge_droit_ouvert_prestation_familiale_) - with EmptyError -> raise EmptyError) - with EmptyError -> raise EmptyError + else raise EmptyError); + |] + (fun (_ : _) -> true) + (fun (_ : _) -> + money_of_cents_string "7830000" + +$ money_of_cents_string "559500" + *$ decimal_of_integer + (array_length + enfants_a_charge_droit_ouvert_prestation_familiale_)) with EmptyError -> raise (NoValueProvided @@ -1965,164 +1831,139 @@ let allocations_familiales [ "AllocationsFamiliales"; "plafond_I_d521_3" ] embed_money (try - try - handle_default - [| - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 180; - start_column = 5; - end_line = 180; - end_column = 69; - law_headings = - [ - "Article 1"; - "Arrêté du 14 décembre 2020 relatif au montant \ - des plafonds de ressources de certaines \ - prestations familiales et aux tranches du barème \ - applicable au recouvrement des indus et à la \ - saisie des prestations"; - "Montant des plafonds de ressources"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2021 1 1 - && date_courante_ <=@ date_of_numbers 2021 12 31) - then - money_of_cents_string "5827900" - +$ money_of_cents_string "582700" - *$ decimal_of_integer - (array_length - enfants_a_charge_droit_ouvert_prestation_familiale_) - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 153; - start_column = 5; - end_line = 153; - end_column = 69; - law_headings = - [ - "Instruction interministerielle no \ - DSS/SD2B/2019/261 du 18 décembre 2019 relative à \ - la revalorisation au 1er janvier 2020 des \ - plafonds de ressources d’attribution de \ - certaines prestations familiales servies en \ - métropole, en Guadeloupe, en Guyane, en \ - Martinique, à La Réunion, à Saint-Barthélemy, à \ - Saint-Martin et à Mayotte"; - "Montant des plafonds de ressources"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2020 1 1 - && date_courante_ <=@ date_of_numbers 2020 12 31) - then - money_of_cents_string "5775900" - +$ money_of_cents_string "577500" - *$ decimal_of_integer - (array_length - enfants_a_charge_droit_ouvert_prestation_familiale_) - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 120; - start_column = 5; - end_line = 120; - end_column = 69; - law_headings = - [ - "Instruction interministérielle n° \ - DSS/SD2B/2018/279 du 17 décembre 2018 relative à \ - la revalorisation au 1er janvier 2019 des \ - plafonds de ressources d’attribution de \ - certaines prestations familiales servies en \ - métropole, en Guadeloupe, en Guyane, en \ - Martinique, à la Réunion, à Saint-Barthélemy, à \ - Saint-Martin et à Mayotte"; - "Montant des plafonds de ressources"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2019 1 1 - && date_courante_ <=@ date_of_numbers 2019 12 31) - then - money_of_cents_string "5684900" - +$ money_of_cents_string "568400" - *$ decimal_of_integer - (array_length - enfants_a_charge_droit_ouvert_prestation_familiale_) - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 87; - start_column = 5; - end_line = 87; - end_column = 69; - law_headings = - [ - "Circulaire interministérielle N° \ - DSS/SD2B/2017/352 du 22 décembre 2017 relative à \ - la revalorisation au 1er janvier 2018 des \ - plafonds de ressources d’attribution de \ - certaines prestations familiales servies en \ - métropole, en Guadeloupe, en Guyane, en \ - Martinique, à la Réunion, à Saint-Barthélemy, à \ - Saint-Martin et à Mayotte"; - "Montant des plafonds de ressources"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2018 1 1 - && date_courante_ <=@ date_of_numbers 2018 12 31) - then - money_of_cents_string "5628600" - +$ money_of_cents_string "562800" - *$ decimal_of_integer - (array_length - enfants_a_charge_droit_ouvert_prestation_familiale_) - else raise EmptyError - with EmptyError -> raise EmptyError); - |] + handle_default + [| (fun (_ : _) -> - log_decision_taken - { - filename = "./prologue.catala_fr"; - start_line = 155; - start_column = 11; - end_line = 155; - end_column = 27; - law_headings = [ "Prologue" ]; - } - true) + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 180; + start_column = 5; + end_line = 180; + end_column = 69; + law_headings = + [ + "Article 1"; + "Arrêté du 14 décembre 2020 relatif au montant des \ + plafonds de ressources de certaines prestations \ + familiales et aux tranches du barème applicable au \ + recouvrement des indus et à la saisie des \ + prestations"; + "Montant des plafonds de ressources"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2021 1 1 + && date_courante_ <=@ date_of_numbers 2021 12 31) + then + money_of_cents_string "5827900" + +$ money_of_cents_string "582700" + *$ decimal_of_integer + (array_length + enfants_a_charge_droit_ouvert_prestation_familiale_) + else raise EmptyError); (fun (_ : _) -> - try - money_of_cents_string "5595000" - +$ money_of_cents_string "559500" + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 153; + start_column = 5; + end_line = 153; + end_column = 69; + law_headings = + [ + "Instruction interministerielle no DSS/SD2B/2019/261 \ + du 18 décembre 2019 relative à la revalorisation au \ + 1er janvier 2020 des plafonds de ressources \ + d’attribution de certaines prestations familiales \ + servies en métropole, en Guadeloupe, en Guyane, en \ + Martinique, à La Réunion, à Saint-Barthélemy, à \ + Saint-Martin et à Mayotte"; + "Montant des plafonds de ressources"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2020 1 1 + && date_courante_ <=@ date_of_numbers 2020 12 31) + then + money_of_cents_string "5775900" + +$ money_of_cents_string "577500" + *$ decimal_of_integer + (array_length + enfants_a_charge_droit_ouvert_prestation_familiale_) + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 120; + start_column = 5; + end_line = 120; + end_column = 69; + law_headings = + [ + "Instruction interministérielle n° DSS/SD2B/2018/279 \ + du 17 décembre 2018 relative à la revalorisation au \ + 1er janvier 2019 des plafonds de ressources \ + d’attribution de certaines prestations familiales \ + servies en métropole, en Guadeloupe, en Guyane, en \ + Martinique, à la Réunion, à Saint-Barthélemy, à \ + Saint-Martin et à Mayotte"; + "Montant des plafonds de ressources"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2019 1 1 + && date_courante_ <=@ date_of_numbers 2019 12 31) + then + money_of_cents_string "5684900" + +$ money_of_cents_string "568400" + *$ decimal_of_integer + (array_length + enfants_a_charge_droit_ouvert_prestation_familiale_) + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 87; + start_column = 5; + end_line = 87; + end_column = 69; + law_headings = + [ + "Circulaire interministérielle N° DSS/SD2B/2017/352 \ + du 22 décembre 2017 relative à la revalorisation au \ + 1er janvier 2018 des plafonds de ressources \ + d’attribution de certaines prestations familiales \ + servies en métropole, en Guadeloupe, en Guyane, en \ + Martinique, à la Réunion, à Saint-Barthélemy, à \ + Saint-Martin et à Mayotte"; + "Montant des plafonds de ressources"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2018 1 1 + && date_courante_ <=@ date_of_numbers 2018 12 31) + then + money_of_cents_string "5628600" + +$ money_of_cents_string "562800" *$ decimal_of_integer (array_length enfants_a_charge_droit_ouvert_prestation_familiale_) - with EmptyError -> raise EmptyError) - with EmptyError -> raise EmptyError + else raise EmptyError); + |] + (fun (_ : _) -> true) + (fun (_ : _) -> + money_of_cents_string "5595000" + +$ money_of_cents_string "559500" + *$ decimal_of_integer + (array_length + enfants_a_charge_droit_ouvert_prestation_familiale_)) with EmptyError -> raise (NoValueProvided @@ -2142,35 +1983,33 @@ let allocations_familiales (try try try - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 426; - start_column = 5; - end_line = 427; - end_column = 71; - law_headings = - [ - "Article L755-12"; - "Chapitre 5 : Prestations familiales et prestations \ - assimilées"; - "Titre 5 : Dispositions particulières à la \ - Guadeloupe, à la Guyane, à la Martinique, à La \ - Réunion, à Saint-Barthélemy et à Saint-Martin"; - "Livre 7 : Régimes divers - Dispositions diverses"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - (prestations_familiales_dot_regime_outre_mer_l751_1_ - && array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - = integer_of_string "1") - then false - else raise EmptyError - with EmptyError -> raise EmptyError + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 426; + start_column = 5; + end_line = 427; + end_column = 71; + law_headings = + [ + "Article L755-12"; + "Chapitre 5 : Prestations familiales et prestations \ + assimilées"; + "Titre 5 : Dispositions particulières à la Guadeloupe, \ + à la Guyane, à la Martinique, à La Réunion, à \ + Saint-Barthélemy et à Saint-Martin"; + "Livre 7 : Régimes divers - Dispositions diverses"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + (prestations_familiales_dot_regime_outre_mer_l751_1_ + && array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + = integer_of_string "1") + then false + else raise EmptyError with EmptyError -> true with EmptyError -> false with EmptyError -> @@ -2194,85 +2033,80 @@ let allocations_familiales try try try - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 420; - start_column = 6; - end_line = 421; - end_column = 72; - law_headings = - [ - "Article L755-12"; - "Chapitre 5 : Prestations familiales et \ - prestations assimilées"; - "Titre 5 : Dispositions particulières à la \ - Guadeloupe, à la Guyane, à la Martinique, à La \ - Réunion, à Saint-Barthélemy et à Saint-Martin"; - "Livre 7 : Régimes divers - Dispositions diverses"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - (prestations_familiales_dot_regime_outre_mer_l751_1_ - && array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - = integer_of_string "1") - then false - else raise EmptyError - with EmptyError -> raise EmptyError - with EmptyError -> ( - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 119; - start_column = 5; - end_line = 125; - end_column = 59; - law_headings = - [ - "Article L521-1"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et prestations \ - assimilées"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - (array_length enfants_a_charge_ - >=! nombre_enfants_alinea_2_l521_3_ - && param_.age = prestations_familiales_dot_age_l512_3_2_ - && param_.a_deja_ouvert_droit_aux_allocations_familiales - && log_end_call - [ "PrestationsFamiliales"; "conditions_hors_âge" ] - (log_variable_definition - [ - "PrestationsFamiliales"; - "conditions_hors_âge"; - "output"; - ] - unembeddable - (log_begin_call - [ - "PrestationsFamiliales"; - "conditions_hors_âge"; - ] - prestations_familiales_dot_conditions_hors_age_ - (log_variable_definition - [ - "PrestationsFamiliales"; - "conditions_hors_âge"; - "input"; - ] - unembeddable param_)))) - then true - else raise EmptyError - with EmptyError -> raise EmptyError) + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 420; + start_column = 6; + end_line = 421; + end_column = 72; + law_headings = + [ + "Article L755-12"; + "Chapitre 5 : Prestations familiales et prestations \ + assimilées"; + "Titre 5 : Dispositions particulières à la \ + Guadeloupe, à la Guyane, à la Martinique, à La \ + Réunion, à Saint-Barthélemy et à Saint-Martin"; + "Livre 7 : Régimes divers - Dispositions diverses"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + (prestations_familiales_dot_regime_outre_mer_l751_1_ + && array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + = integer_of_string "1") + then false + else raise EmptyError + with EmptyError -> + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 119; + start_column = 5; + end_line = 125; + end_column = 59; + law_headings = + [ + "Article L521-1"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + (array_length enfants_a_charge_ + >=! nombre_enfants_alinea_2_l521_3_ + && param_.age = prestations_familiales_dot_age_l512_3_2_ + && param_.a_deja_ouvert_droit_aux_allocations_familiales + && log_end_call + [ "PrestationsFamiliales"; "conditions_hors_âge" ] + (log_variable_definition + [ + "PrestationsFamiliales"; + "conditions_hors_âge"; + "output"; + ] + unembeddable + (log_begin_call + [ + "PrestationsFamiliales"; "conditions_hors_âge"; + ] + prestations_familiales_dot_conditions_hors_age_ + (log_variable_definition + [ + "PrestationsFamiliales"; + "conditions_hors_âge"; + "input"; + ] + unembeddable param_)))) + then true + else raise EmptyError with EmptyError -> false with EmptyError -> raise @@ -2305,21 +2139,17 @@ let allocations_familiales ] embed_money (try - try - try - if - array_length enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "3" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.0463" - *$ decimal_of_integer - (array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - -! integer_of_string "3") - else money_of_cents_string "0" - with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError + if + array_length enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "3" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.0463" + *$ decimal_of_integer + (array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + -! integer_of_string "3") + else money_of_cents_string "0" with EmptyError -> raise (NoValueProvided @@ -2339,358 +2169,323 @@ let allocations_familiales ] embed_money (try - try - handle_default - [| - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 647; - start_column = 5; - end_line = 647; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2020 1 1 - && date_courante_ <=@ date_of_numbers 2020 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "2" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.143" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 640; - start_column = 5; - end_line = 640; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2019 1 1 - && date_courante_ <=@ date_of_numbers 2019 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "2" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.1259" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 633; - start_column = 5; - end_line = 633; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2018 1 1 - && date_courante_ <=@ date_of_numbers 2018 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "2" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.1089" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 626; - start_column = 5; - end_line = 626; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2017 1 1 - && date_courante_ <=@ date_of_numbers 2017 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "2" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.0918" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 619; - start_column = 5; - end_line = 619; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2016 1 1 - && date_courante_ <=@ date_of_numbers 2016 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "2" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.0842" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 612; - start_column = 5; - end_line = 612; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2015 1 1 - && date_courante_ <=@ date_of_numbers 2015 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "2" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.0766" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 605; - start_column = 5; - end_line = 605; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2014 1 1 - && date_courante_ <=@ date_of_numbers 2014 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "2" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.069" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 598; - start_column = 5; - end_line = 598; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2013 1 1 - && date_courante_ <=@ date_of_numbers 2013 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "2" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.075" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 591; - start_column = 5; - end_line = 591; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2012 1 1 - && date_courante_ <=@ date_of_numbers 2012 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "2" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.0539" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 584; - start_column = 5; - end_line = 584; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2011 1 1 - && date_courante_ <=@ date_of_numbers 2011 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "2" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.0463" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - |] + handle_default + [| (fun (_ : _) -> - log_decision_taken - { - filename = "./prologue.catala_fr"; - start_line = 123; - start_column = 11; - end_line = 123; - end_column = 56; - law_headings = [ "Prologue" ]; - } - true) + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 647; + start_column = 5; + end_line = 647; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2020 1 1 + && date_courante_ <=@ date_of_numbers 2020 12 31) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "2" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.143" + else money_of_cents_string "0" + else raise EmptyError); (fun (_ : _) -> - try + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 640; + start_column = 5; + end_line = 640; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2019 1 1 + && date_courante_ <=@ date_of_numbers 2019 12 31) + then if array_length enfants_a_charge_droit_ouvert_prestation_familiale_ >! integer_of_string "2" then prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.16" + *$ decimal_of_string "0.1259" else money_of_cents_string "0" - with EmptyError -> raise EmptyError) - with EmptyError -> raise EmptyError - with EmptyError -> - raise - (NoValueProvided - { - filename = "./prologue.catala_fr"; + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 633; + start_column = 5; + end_line = 633; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2018 1 1 + && date_courante_ <=@ date_of_numbers 2018 12 31) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "2" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.1089" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 626; + start_column = 5; + end_line = 626; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2017 1 1 + && date_courante_ <=@ date_of_numbers 2017 12 31) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "2" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.0918" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 619; + start_column = 5; + end_line = 619; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2016 1 1 + && date_courante_ <=@ date_of_numbers 2016 12 31) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "2" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.0842" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 612; + start_column = 5; + end_line = 612; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2015 1 1 + && date_courante_ <=@ date_of_numbers 2015 12 31) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "2" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.0766" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 605; + start_column = 5; + end_line = 605; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2014 1 1 + && date_courante_ <=@ date_of_numbers 2014 12 31) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "2" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.069" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 598; + start_column = 5; + end_line = 598; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2013 1 1 + && date_courante_ <=@ date_of_numbers 2013 12 31) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "2" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.075" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 591; + start_column = 5; + end_line = 591; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2012 1 1 + && date_courante_ <=@ date_of_numbers 2012 12 31) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "2" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.0539" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 584; + start_column = 5; + end_line = 584; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2011 1 1 + && date_courante_ <=@ date_of_numbers 2011 12 31) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "2" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.0463" + else money_of_cents_string "0" + else raise EmptyError); + |] + (fun (_ : _) -> true) + (fun (_ : _) -> + if + array_length enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "2" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.16" + else money_of_cents_string "0") + with EmptyError -> + raise + (NoValueProvided + { + filename = "./prologue.catala_fr"; start_line = 123; start_column = 11; end_line = 123; @@ -2705,353 +2500,318 @@ let allocations_familiales ] embed_money (try - try - handle_default - [| - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 576; - start_column = 5; - end_line = 576; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2020 1 1 - && date_courante_ <=@ date_of_numbers 2020 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "1" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.3068" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 569; - start_column = 5; - end_line = 569; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2019 1 1 - && date_courante_ <=@ date_of_numbers 2019 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "1" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.2936" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 562; - start_column = 5; - end_line = 562; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2018 1 1 - && date_courante_ <=@ date_of_numbers 2018 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "1" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.284" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 555; - start_column = 5; - end_line = 555; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2017 1 1 - && date_courante_ <=@ date_of_numbers 2017 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "1" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.2672" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 548; - start_column = 5; - end_line = 548; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2016 1 1 - && date_courante_ <=@ date_of_numbers 2016 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "1" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.273" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 541; - start_column = 5; - end_line = 541; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2015 1 1 - && date_courante_ <=@ date_of_numbers 2015 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "1" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.2555" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 534; - start_column = 5; - end_line = 534; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2014 1 1 - && date_courante_ <=@ date_of_numbers 2014 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "1" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.2496" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 527; - start_column = 5; - end_line = 527; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2013 1 1 - && date_courante_ <=@ date_of_numbers 2013 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "1" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.2437" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 520; - start_column = 5; - end_line = 520; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2012 1 1 - && date_courante_ <=@ date_of_numbers 2012 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "1" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.2379" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 513; - start_column = 5; - end_line = 513; - end_column = 69; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2011 1 1 - && date_courante_ <=@ date_of_numbers 2011 12 31) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "1" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.232" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - |] + handle_default + [| (fun (_ : _) -> - log_decision_taken - { - filename = "./prologue.catala_fr"; - start_line = 122; - start_column = 11; - end_line = 122; - end_column = 55; - law_headings = [ "Prologue" ]; - } - true) + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 576; + start_column = 5; + end_line = 576; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2020 1 1 + && date_courante_ <=@ date_of_numbers 2020 12 31) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "1" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.3068" + else money_of_cents_string "0" + else raise EmptyError); (fun (_ : _) -> - try + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 569; + start_column = 5; + end_line = 569; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2019 1 1 + && date_courante_ <=@ date_of_numbers 2019 12 31) + then if array_length enfants_a_charge_droit_ouvert_prestation_familiale_ >! integer_of_string "1" then prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.32" + *$ decimal_of_string "0.2936" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 562; + start_column = 5; + end_line = 562; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2018 1 1 + && date_courante_ <=@ date_of_numbers 2018 12 31) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "1" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.284" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 555; + start_column = 5; + end_line = 555; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2017 1 1 + && date_courante_ <=@ date_of_numbers 2017 12 31) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "1" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.2672" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 548; + start_column = 5; + end_line = 548; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2016 1 1 + && date_courante_ <=@ date_of_numbers 2016 12 31) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "1" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.273" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 541; + start_column = 5; + end_line = 541; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2015 1 1 + && date_courante_ <=@ date_of_numbers 2015 12 31) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "1" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.2555" else money_of_cents_string "0" - with EmptyError -> raise EmptyError) - with EmptyError -> raise EmptyError + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 534; + start_column = 5; + end_line = 534; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2014 1 1 + && date_courante_ <=@ date_of_numbers 2014 12 31) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "1" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.2496" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 527; + start_column = 5; + end_line = 527; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2013 1 1 + && date_courante_ <=@ date_of_numbers 2013 12 31) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "1" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.2437" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 520; + start_column = 5; + end_line = 520; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2012 1 1 + && date_courante_ <=@ date_of_numbers 2012 12 31) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "1" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.2379" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 513; + start_column = 5; + end_line = 513; + end_column = 69; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2011 1 1 + && date_courante_ <=@ date_of_numbers 2011 12 31) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "1" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.232" + else money_of_cents_string "0" + else raise EmptyError); + |] + (fun (_ : _) -> true) + (fun (_ : _) -> + if + array_length enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "1" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.32" + else money_of_cents_string "0") with EmptyError -> raise (NoValueProvided @@ -3069,392 +2829,355 @@ let allocations_familiales [ "AllocationsFamiliales"; "montant_initial_base_premier_enfant_mayotte" ] embed_money (try - try - handle_default - [| - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 505; - start_column = 5; - end_line = 505; - end_column = 49; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - avait_enfant_a_charge_avant_1er_janvier_2012_ - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "0" - then money_of_cents_string "5728" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 497; - start_column = 5; - end_line = 498; - end_column = 53; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2020 1 1 - && date_courante_ <=@ date_of_numbers 2020 12 31 - && not avait_enfant_a_charge_avant_1er_janvier_2012_) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "0" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.0717" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 489; - start_column = 5; - end_line = 490; - end_column = 53; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2019 1 1 - && date_courante_ <=@ date_of_numbers 2019 12 31 - && not avait_enfant_a_charge_avant_1er_janvier_2012_) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "0" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.0847" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 481; - start_column = 5; - end_line = 482; - end_column = 53; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2018 1 1 - && date_courante_ <=@ date_of_numbers 2018 12 31 - && not avait_enfant_a_charge_avant_1er_janvier_2012_) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "0" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.0976" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 473; - start_column = 5; - end_line = 474; - end_column = 53; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2017 1 1 - && date_courante_ <=@ date_of_numbers 2017 12 31 - && not avait_enfant_a_charge_avant_1er_janvier_2012_) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "0" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.115" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 465; - start_column = 5; - end_line = 466; - end_column = 53; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2016 1 1 - && date_courante_ <=@ date_of_numbers 2016 12 31 - && not avait_enfant_a_charge_avant_1er_janvier_2012_) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "0" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.1163" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 457; - start_column = 5; - end_line = 458; - end_column = 53; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2015 1 1 - && date_courante_ <=@ date_of_numbers 2015 12 31 - && not avait_enfant_a_charge_avant_1er_janvier_2012_) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "0" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.122" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 449; - start_column = 5; - end_line = 450; - end_column = 53; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2014 1 1 - && date_courante_ <=@ date_of_numbers 2014 12 31 - && not avait_enfant_a_charge_avant_1er_janvier_2012_) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "0" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.1278" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 441; - start_column = 5; - end_line = 442; - end_column = 53; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2013 1 1 - && date_courante_ <=@ date_of_numbers 2013 12 31 - && not avait_enfant_a_charge_avant_1er_janvier_2012_) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "0" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.1335" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 433; - start_column = 5; - end_line = 434; - end_column = 53; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2012 1 1 - && date_courante_ <=@ date_of_numbers 2012 12 31 - && not avait_enfant_a_charge_avant_1er_janvier_2012_) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "0" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.1393" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 425; - start_column = 5; - end_line = 426; - end_column = 53; - law_headings = - [ - "Annexe"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (date_courante_ >=@ date_of_numbers 2011 1 1 - && date_courante_ <=@ date_of_numbers 2011 12 31 - && not avait_enfant_a_charge_avant_1er_janvier_2012_) - then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "0" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.145" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - |] + handle_default + [| + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 505; + start_column = 5; + end_line = 505; + end_column = 49; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + avait_enfant_a_charge_avant_1er_janvier_2012_ + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "0" + then money_of_cents_string "5728" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 497; + start_column = 5; + end_line = 498; + end_column = 53; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2020 1 1 + && date_courante_ <=@ date_of_numbers 2020 12 31 + && not avait_enfant_a_charge_avant_1er_janvier_2012_) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "0" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.0717" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 489; + start_column = 5; + end_line = 490; + end_column = 53; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2019 1 1 + && date_courante_ <=@ date_of_numbers 2019 12 31 + && not avait_enfant_a_charge_avant_1er_janvier_2012_) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "0" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.0847" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 481; + start_column = 5; + end_line = 482; + end_column = 53; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2018 1 1 + && date_courante_ <=@ date_of_numbers 2018 12 31 + && not avait_enfant_a_charge_avant_1er_janvier_2012_) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "0" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.0976" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 473; + start_column = 5; + end_line = 474; + end_column = 53; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2017 1 1 + && date_courante_ <=@ date_of_numbers 2017 12 31 + && not avait_enfant_a_charge_avant_1er_janvier_2012_) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "0" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.115" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 465; + start_column = 5; + end_line = 466; + end_column = 53; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2016 1 1 + && date_courante_ <=@ date_of_numbers 2016 12 31 + && not avait_enfant_a_charge_avant_1er_janvier_2012_) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "0" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.1163" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 457; + start_column = 5; + end_line = 458; + end_column = 53; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2015 1 1 + && date_courante_ <=@ date_of_numbers 2015 12 31 + && not avait_enfant_a_charge_avant_1er_janvier_2012_) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "0" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.122" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 449; + start_column = 5; + end_line = 450; + end_column = 53; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2014 1 1 + && date_courante_ <=@ date_of_numbers 2014 12 31 + && not avait_enfant_a_charge_avant_1er_janvier_2012_) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "0" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.1278" + else money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 441; + start_column = 5; + end_line = 442; + end_column = 53; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2013 1 1 + && date_courante_ <=@ date_of_numbers 2013 12 31 + && not avait_enfant_a_charge_avant_1er_janvier_2012_) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "0" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.1335" + else money_of_cents_string "0" + else raise EmptyError); (fun (_ : _) -> - log_decision_taken - { - filename = "./prologue.catala_fr"; - start_line = 121; - start_column = 11; - end_line = 121; - end_column = 54; - law_headings = [ "Prologue" ]; - } - true) + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 433; + start_column = 5; + end_line = 434; + end_column = 53; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2012 1 1 + && date_courante_ <=@ date_of_numbers 2012 12 31 + && not avait_enfant_a_charge_avant_1er_janvier_2012_) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "0" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.1393" + else money_of_cents_string "0" + else raise EmptyError); (fun (_ : _) -> - try + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 425; + start_column = 5; + end_line = 426; + end_column = 53; + law_headings = + [ + "Annexe"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (date_courante_ >=@ date_of_numbers 2011 1 1 + && date_courante_ <=@ date_of_numbers 2011 12 31 + && not avait_enfant_a_charge_avant_1er_janvier_2012_) + then if array_length enfants_a_charge_droit_ouvert_prestation_familiale_ >! integer_of_string "0" then prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.0588" + *$ decimal_of_string "0.145" else money_of_cents_string "0" - with EmptyError -> raise EmptyError) - with EmptyError -> raise EmptyError + else raise EmptyError); + |] + (fun (_ : _) -> true) + (fun (_ : _) -> + if + array_length enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "0" + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.0588" + else money_of_cents_string "0") with EmptyError -> raise (NoValueProvided @@ -3472,12 +3195,8 @@ let allocations_familiales [ "AllocationsFamiliales"; "nombre_total_enfants" ] embed_decimal (try - try - try - decimal_of_integer - (array_length enfants_a_charge_droit_ouvert_prestation_familiale_) - with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError + decimal_of_integer + (array_length enfants_a_charge_droit_ouvert_prestation_familiale_) with EmptyError -> raise (NoValueProvided @@ -3495,36 +3214,30 @@ let allocations_familiales [ "AllocationsFamiliales"; "nombre_moyen_enfants" ] embed_decimal (try - try - try - Array.fold_left - (fun (acc_ : decimal) (enfant_ : _) -> - acc_ - +& - match - log_end_call - [ "AllocationsFamiliales"; "prise_en_compte" ] - (log_variable_definition - [ "AllocationsFamiliales"; "prise_en_compte"; "output" ] - unembeddable - (log_begin_call - [ "AllocationsFamiliales"; "prise_en_compte" ] - prise_en_compte_ - (log_variable_definition - [ - "AllocationsFamiliales"; - "prise_en_compte"; - "input"; - ] - unembeddable enfant_))) - with - | Complete _ -> decimal_of_string "1." - | Partagee _ -> decimal_of_string "0.5" - | Zero _ -> decimal_of_string "0.") - (decimal_of_string "0.") - enfants_a_charge_droit_ouvert_prestation_familiale_ - with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError + Array.fold_left + (fun (acc_ : decimal) (enfant_ : _) -> + acc_ + +& + match + log_end_call + [ "AllocationsFamiliales"; "prise_en_compte" ] + (log_variable_definition + [ "AllocationsFamiliales"; "prise_en_compte"; "output" ] + unembeddable + (log_begin_call + [ "AllocationsFamiliales"; "prise_en_compte" ] + prise_en_compte_ + (log_variable_definition + [ + "AllocationsFamiliales"; "prise_en_compte"; "input"; + ] + unembeddable enfant_))) + with + | Complete _ -> decimal_of_string "1." + | Partagee _ -> decimal_of_string "0.5" + | Zero _ -> decimal_of_string "0.") + (decimal_of_string "0.") + enfants_a_charge_droit_ouvert_prestation_familiale_ with EmptyError -> raise (NoValueProvided @@ -3543,38 +3256,34 @@ let allocations_familiales embed_money (try try - try - try - if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 359; - start_column = 5; - end_line = 360; - end_column = 71; - law_headings = - [ - "Article D755-5"; - "Chapitre 5 : Prestations familiales et prestations \ - assimilées"; - "Titre 5 : Départements d'outre-mer"; - "Livre 7 : Régimes divers - Dispositions diverses"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - (prestations_familiales_dot_regime_outre_mer_l751_1_ - && array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - = integer_of_string "1") - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.0588" - else raise EmptyError - with EmptyError -> raise EmptyError - with EmptyError -> money_of_cents_string "0" - with EmptyError -> raise EmptyError + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 359; + start_column = 5; + end_line = 360; + end_column = 71; + law_headings = + [ + "Article D755-5"; + "Chapitre 5 : Prestations familiales et prestations \ + assimilées"; + "Titre 5 : Départements d'outre-mer"; + "Livre 7 : Régimes divers - Dispositions diverses"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + (prestations_familiales_dot_regime_outre_mer_l751_1_ + && array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + = integer_of_string "1") + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.0588" + else raise EmptyError + with EmptyError -> money_of_cents_string "0" with EmptyError -> raise (NoValueProvided @@ -3596,100 +3305,84 @@ let allocations_familiales handle_default [| (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 344; - start_column = 5; - end_line = 345; - end_column = 72; - law_headings = - [ - "Article 7"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (residence_ = Mayotte () - && array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >=! integer_of_string "1") - then true - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 344; + start_column = 5; + end_line = 345; + end_column = 72; + law_headings = + [ + "Article 7"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (residence_ = Mayotte () + && array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >=! integer_of_string "1") + then true + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 406; - start_column = 5; - end_line = 407; - end_column = 72; - law_headings = - [ - "Article L755-12"; - "Chapitre 5 : Prestations familiales et \ - prestations assimilées"; - "Titre 5 : Dispositions particulières à la \ - Guadeloupe, à la Guyane, à la Martinique, à La \ - Réunion, à Saint-Barthélemy et à Saint-Martin"; - "Livre 7 : Régimes divers - Dispositions diverses"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - (prestations_familiales_dot_regime_outre_mer_l751_1_ - && array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >=! integer_of_string "1") - then true - else raise EmptyError - with EmptyError -> raise EmptyError); - |] - (fun (_ : _) -> - log_decision_taken - { - filename = "./prologue.catala_fr"; - start_line = 108; - start_column = 11; - end_line = 108; - end_column = 28; - law_headings = [ "Prologue" ]; - } - true) - (fun (_ : _) -> - try if log_decision_taken { filename = "./securite_sociale_L.catala_fr"; - start_line = 101; + start_line = 406; start_column = 5; - end_line = 101; - end_column = 70; + end_line = 407; + end_column = 72; law_headings = [ - "Article L521-1"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et prestations \ + "Article L755-12"; + "Chapitre 5 : Prestations familiales et prestations \ assimilées"; + "Titre 5 : Dispositions particulières à la \ + Guadeloupe, à la Guyane, à la Martinique, à La \ + Réunion, à Saint-Barthélemy et à Saint-Martin"; + "Livre 7 : Régimes divers - Dispositions diverses"; "Partie législative"; "Code de la sécurité sociale"; ]; } - (array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >=! integer_of_string "2") + (prestations_familiales_dot_regime_outre_mer_l751_1_ + && array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >=! integer_of_string "1") then true - else raise EmptyError - with EmptyError -> raise EmptyError) + else raise EmptyError); + |] + (fun (_ : _) -> true) + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 101; + start_column = 5; + end_line = 101; + end_column = 70; + law_headings = + [ + "Article L521-1"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + (array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >=! integer_of_string "2") + then true + else raise EmptyError) with EmptyError -> false with EmptyError -> raise @@ -3712,134 +3405,129 @@ let allocations_familiales try try try - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 313; - start_column = 5; - end_line = 315; - end_column = 58; - law_headings = - [ - "Article L521-3"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et prestations \ - assimilées"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - (array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >=! nombre_enfants_alinea_2_l521_3_ - && param_.age - >=! log_end_call - [ - "AllocationsFamiliales"; - "âge_minimum_alinéa_1_l521_3"; - ] - (log_variable_definition - [ - "AllocationsFamiliales"; - "âge_minimum_alinéa_1_l521_3"; - "output"; - ] - unembeddable - (log_begin_call - [ - "AllocationsFamiliales"; - "âge_minimum_alinéa_1_l521_3"; - ] - age_minimum_alinea_1_l521_3_ - (log_variable_definition - [ - "AllocationsFamiliales"; - "âge_minimum_alinéa_1_l521_3"; - "input"; - ] - unembeddable param_)))) - then true - else raise EmptyError - with EmptyError -> raise EmptyError - with EmptyError -> ( - try - if - log_decision_taken - { - filename = "./securite_sociale_L.catala_fr"; - start_line = 299; - start_column = 5; - end_line = 300; - end_column = 58; - law_headings = - [ - "Article L521-3"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et prestations \ - assimilées"; - "Partie législative"; - "Code de la sécurité sociale"; - ]; - } - ((not - (log_end_call + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 313; + start_column = 5; + end_line = 315; + end_column = 58; + law_headings = + [ + "Article L521-3"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + (array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >=! nombre_enfants_alinea_2_l521_3_ + && param_.age + >=! log_end_call + [ + "AllocationsFamiliales"; + "âge_minimum_alinéa_1_l521_3"; + ] + (log_variable_definition + [ + "AllocationsFamiliales"; + "âge_minimum_alinéa_1_l521_3"; + "output"; + ] + unembeddable + (log_begin_call + [ + "AllocationsFamiliales"; + "âge_minimum_alinéa_1_l521_3"; + ] + age_minimum_alinea_1_l521_3_ + (log_variable_definition + [ + "AllocationsFamiliales"; + "âge_minimum_alinéa_1_l521_3"; + "input"; + ] + unembeddable param_)))) + then true + else raise EmptyError + with EmptyError -> + if + log_decision_taken + { + filename = "./securite_sociale_L.catala_fr"; + start_line = 299; + start_column = 5; + end_line = 300; + end_column = 58; + law_headings = + [ + "Article L521-3"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie législative"; + "Code de la sécurité sociale"; + ]; + } + ((not + (log_end_call + [ + "AllocationsFamiliales"; "est_enfant_le_plus_âgé"; + ] + (log_variable_definition + [ + "AllocationsFamiliales"; + "est_enfant_le_plus_âgé"; + "output"; + ] + unembeddable + (log_begin_call + [ + "AllocationsFamiliales"; + "est_enfant_le_plus_âgé"; + ] + est_enfant_le_plus_age_ + (log_variable_definition + [ + "AllocationsFamiliales"; + "est_enfant_le_plus_âgé"; + "input"; + ] + unembeddable param_))))) + && param_.age + >=! log_end_call [ "AllocationsFamiliales"; - "est_enfant_le_plus_âgé"; + "âge_minimum_alinéa_1_l521_3"; ] (log_variable_definition [ "AllocationsFamiliales"; - "est_enfant_le_plus_âgé"; + "âge_minimum_alinéa_1_l521_3"; "output"; ] unembeddable (log_begin_call [ "AllocationsFamiliales"; - "est_enfant_le_plus_âgé"; + "âge_minimum_alinéa_1_l521_3"; ] - est_enfant_le_plus_age_ + age_minimum_alinea_1_l521_3_ (log_variable_definition [ "AllocationsFamiliales"; - "est_enfant_le_plus_âgé"; + "âge_minimum_alinéa_1_l521_3"; "input"; ] - unembeddable param_))))) - && param_.age - >=! log_end_call - [ - "AllocationsFamiliales"; - "âge_minimum_alinéa_1_l521_3"; - ] - (log_variable_definition - [ - "AllocationsFamiliales"; - "âge_minimum_alinéa_1_l521_3"; - "output"; - ] - unembeddable - (log_begin_call - [ - "AllocationsFamiliales"; - "âge_minimum_alinéa_1_l521_3"; - ] - age_minimum_alinea_1_l521_3_ - (log_variable_definition - [ - "AllocationsFamiliales"; - "âge_minimum_alinéa_1_l521_3"; - "input"; - ] - unembeddable param_)))) - then true - else raise EmptyError - with EmptyError -> raise EmptyError) + unembeddable param_)))) + then true + else raise EmptyError with EmptyError -> false with EmptyError -> raise @@ -3871,87 +3559,71 @@ let allocations_familiales (try fun (param_ : money) -> try - try - handle_default - [| - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 170; - start_column = 5; - end_line = 171; - end_column = 68; - law_headings = - [ - "Article D521-1"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et \ - prestations assimilées"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - (ressources_menage_ >$ plafond__i_i_d521_3_ - && ressources_menage_ - <=$ plafond__i_i_d521_3_ - +$ (param_ *$ decimal_of_string "12.")) - then - (plafond__i_i_d521_3_ - +$ ((param_ *$ decimal_of_string "12.") - -$ ressources_menage_)) - *$ (decimal_of_string "1." /& decimal_of_string "12.") - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 162; - start_column = 5; - end_line = 163; - end_column = 68; - law_headings = - [ - "Article D521-1"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et \ - prestations assimilées"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - (ressources_menage_ >$ plafond__i_d521_3_ - && ressources_menage_ - <=$ plafond__i_d521_3_ - +$ (param_ *$ decimal_of_string "12.")) - then - (plafond__i_d521_3_ - +$ ((param_ *$ decimal_of_string "12.") - -$ ressources_menage_)) - *$ (decimal_of_string "1." /& decimal_of_string "12.") - else raise EmptyError - with EmptyError -> raise EmptyError); - |] + handle_default + [| (fun (_ : _) -> - log_decision_taken - { - filename = "./prologue.catala_fr"; - start_line = 141; - start_column = 11; - end_line = 141; - end_column = 31; - law_headings = [ "Prologue" ]; - } - true) - (fun (_ : _) -> money_of_cents_string "0") - with EmptyError -> raise EmptyError + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 170; + start_column = 5; + end_line = 171; + end_column = 68; + law_headings = + [ + "Article D521-1"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + (ressources_menage_ >$ plafond__i_i_d521_3_ + && ressources_menage_ + <=$ plafond__i_i_d521_3_ + +$ (param_ *$ decimal_of_string "12.")) + then + (plafond__i_i_d521_3_ + +$ ((param_ *$ decimal_of_string "12.") + -$ ressources_menage_)) + *$ (decimal_of_string "1." /& decimal_of_string "12.") + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 162; + start_column = 5; + end_line = 163; + end_column = 68; + law_headings = + [ + "Article D521-1"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + (ressources_menage_ >$ plafond__i_d521_3_ + && ressources_menage_ + <=$ plafond__i_d521_3_ + +$ (param_ *$ decimal_of_string "12.")) + then + (plafond__i_d521_3_ + +$ ((param_ *$ decimal_of_string "12.") + -$ ressources_menage_)) + *$ (decimal_of_string "1." /& decimal_of_string "12.") + else raise EmptyError); + |] + (fun (_ : _) -> true) + (fun (_ : _) -> money_of_cents_string "0") with EmptyError -> raise (NoValueProvided @@ -3983,99 +3655,83 @@ let allocations_familiales handle_default [| (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 243; - start_column = 5; - end_line = 243; - end_column = 43; - law_headings = - [ - "Article D521-2"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et prestations \ - assimilées"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - (ressources_menage_ >$ plafond__i_i_d521_3_) - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.0559" - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 243; + start_column = 5; + end_line = 243; + end_column = 43; + law_headings = + [ + "Article D521-2"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + (ressources_menage_ >$ plafond__i_i_d521_3_) + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.0559" + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 229; - start_column = 5; - end_line = 230; - end_column = 46; - law_headings = - [ - "Article D521-2"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et prestations \ - assimilées"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - (ressources_menage_ >$ plafond__i_d521_3_ - && ressources_menage_ <=$ plafond__i_i_d521_3_) - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.1117" - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 229; + start_column = 5; + end_line = 230; + end_column = 46; + law_headings = + [ + "Article D521-2"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + (ressources_menage_ >$ plafond__i_d521_3_ + && ressources_menage_ <=$ plafond__i_i_d521_3_) + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.1117" + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 215; - start_column = 5; - end_line = 215; - end_column = 43; - law_headings = - [ - "Article D521-2"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et prestations \ - assimilées"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - (ressources_menage_ <=$ plafond__i_d521_3_) - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.20234" - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 215; + start_column = 5; + end_line = 215; + end_column = 43; + law_headings = + [ + "Article D521-2"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + (ressources_menage_ <=$ plafond__i_d521_3_) + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.20234" + else raise EmptyError); |] - (fun (_ : _) -> - log_decision_taken - { - filename = "./prologue.catala_fr"; - start_line = 128; - start_column = 11; - end_line = 128; - end_column = 47; - law_headings = [ "Prologue" ]; - } - true) + (fun (_ : _) -> true) (fun (_ : _) -> raise EmptyError) with EmptyError -> raise @@ -4099,129 +3755,113 @@ let allocations_familiales handle_default [| (fun (_ : _) -> - try + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 113; + start_column = 3; + end_line = 113; + end_column = 41; + law_headings = + [ + "Article D521-1"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + (ressources_menage_ >$ plafond__i_i_d521_3_) + then if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 113; - start_column = 3; - end_line = 113; - end_column = 41; - law_headings = - [ - "Article D521-1"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et prestations \ - assimilées"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - (ressources_menage_ >$ plafond__i_i_d521_3_) + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "2" then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "2" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.1025" - *$ decimal_of_integer - (array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - -! integer_of_string "2") - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.1025" + *$ decimal_of_integer + (array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + -! integer_of_string "2") + else money_of_cents_string "0" + else raise EmptyError); (fun (_ : _) -> - try + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 74; + start_column = 3; + end_line = 75; + end_column = 44; + law_headings = + [ + "Article D521-1"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + (ressources_menage_ >$ plafond__i_d521_3_ + && ressources_menage_ <=$ plafond__i_i_d521_3_) + then if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 74; - start_column = 3; - end_line = 75; - end_column = 44; - law_headings = - [ - "Article D521-1"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et prestations \ - assimilées"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - (ressources_menage_ >$ plafond__i_d521_3_ - && ressources_menage_ <=$ plafond__i_i_d521_3_) + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "2" then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "2" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.205" - *$ decimal_of_integer - (array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - -! integer_of_string "2") - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.205" + *$ decimal_of_integer + (array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + -! integer_of_string "2") + else money_of_cents_string "0" + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 35; - start_column = 3; - end_line = 35; - end_column = 41; - law_headings = - [ - "Article D521-1"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et prestations \ - assimilées"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - (ressources_menage_ <=$ plafond__i_d521_3_) + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 35; + start_column = 3; + end_line = 35; + end_column = 41; + law_headings = + [ + "Article D521-1"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + (ressources_menage_ <=$ plafond__i_d521_3_) + then + if + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "2" then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "2" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.41" - *$ decimal_of_integer - (array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - -! integer_of_string "2") - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.41" + *$ decimal_of_integer + (array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + -! integer_of_string "2") + else money_of_cents_string "0" + else raise EmptyError); |] - (fun (_ : _) -> - log_decision_taken - { - filename = "./prologue.catala_fr"; - start_line = 112; - start_column = 11; - end_line = 112; - end_column = 56; - law_headings = [ "Prologue" ]; - } - true) + (fun (_ : _) -> true) (fun (_ : _) -> raise EmptyError) with EmptyError -> raise @@ -4243,117 +3883,101 @@ let allocations_familiales handle_default [| (fun (_ : _) -> - try + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 113; + start_column = 3; + end_line = 113; + end_column = 41; + law_headings = + [ + "Article D521-1"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + (ressources_menage_ >$ plafond__i_i_d521_3_) + then if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 113; - start_column = 3; - end_line = 113; - end_column = 41; - law_headings = - [ - "Article D521-1"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et prestations \ - assimilées"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - (ressources_menage_ >$ plafond__i_i_d521_3_) + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "1" then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "1" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.08" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.08" + else money_of_cents_string "0" + else raise EmptyError); (fun (_ : _) -> - try + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 74; + start_column = 3; + end_line = 75; + end_column = 44; + law_headings = + [ + "Article D521-1"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + (ressources_menage_ >$ plafond__i_d521_3_ + && ressources_menage_ <=$ plafond__i_i_d521_3_) + then if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 74; - start_column = 3; - end_line = 75; - end_column = 44; - law_headings = - [ - "Article D521-1"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et prestations \ - assimilées"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - (ressources_menage_ >$ plafond__i_d521_3_ - && ressources_menage_ <=$ plafond__i_i_d521_3_) + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "1" then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "1" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.16" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.16" + else money_of_cents_string "0" + else raise EmptyError); (fun (_ : _) -> - try + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 35; + start_column = 3; + end_line = 35; + end_column = 41; + law_headings = + [ + "Article D521-1"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + (ressources_menage_ <=$ plafond__i_d521_3_) + then if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 35; - start_column = 3; - end_line = 35; - end_column = 41; - law_headings = - [ - "Article D521-1"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et prestations \ - assimilées"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - (ressources_menage_ <=$ plafond__i_d521_3_) + array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + >! integer_of_string "1" then - if - array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - >! integer_of_string "1" - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.32" - else money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.32" + else money_of_cents_string "0" + else raise EmptyError); |] - (fun (_ : _) -> - log_decision_taken - { - filename = "./prologue.catala_fr"; - start_line = 111; - start_column = 11; - end_line = 111; - end_column = 47; - law_headings = [ "Prologue" ]; - } - true) + (fun (_ : _) -> true) (fun (_ : _) -> raise EmptyError) with EmptyError -> raise @@ -4372,13 +3996,9 @@ let allocations_familiales [ "AllocationsFamiliales"; "rapport_enfants_total_moyen" ] embed_decimal (try - try - try - if nombre_total_enfants_ = decimal_of_string "0." then - decimal_of_string "0." - else nombre_moyen_enfants_ /& nombre_total_enfants_ - with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError + if nombre_total_enfants_ = decimal_of_string "0." then + decimal_of_string "0." + else nombre_moyen_enfants_ /& nombre_total_enfants_ with EmptyError -> raise (NoValueProvided @@ -4401,216 +4021,195 @@ let allocations_familiales handle_default [| (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./epilogue.catala_fr"; - start_line = 27; - start_column = 5; - end_line = 27; - end_column = 44; - law_headings = - [ "Règles diverses"; "Épilogue"; "Décrets divers" ]; - } - (not - (log_end_call + if + log_decision_taken + { + filename = "./epilogue.catala_fr"; + start_line = 27; + start_column = 5; + end_line = 27; + end_column = 44; + law_headings = + [ "Règles diverses"; "Épilogue"; "Décrets divers" ]; + } + (not + (log_end_call + [ + "AllocationsFamiliales"; + "droit_ouvert_majoration"; + ] + (log_variable_definition + [ + "AllocationsFamiliales"; + "droit_ouvert_majoration"; + "output"; + ] + unembeddable + (log_begin_call + [ + "AllocationsFamiliales"; + "droit_ouvert_majoration"; + ] + droit_ouvert_majoration_ + (log_variable_definition + [ + "AllocationsFamiliales"; + "droit_ouvert_majoration"; + "input"; + ] + unembeddable param_))))) + then money_of_cents_string "0" + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 132; + start_column = 3; + end_line = 132; + end_column = 41; + law_headings = + [ + "Article D521-1"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + (ressources_menage_ >$ plafond__i_i_d521_3_ + && log_end_call + [ + "AllocationsFamiliales"; "droit_ouvert_majoration"; + ] + (log_variable_definition [ "AllocationsFamiliales"; "droit_ouvert_majoration"; + "output"; ] - (log_variable_definition + unembeddable + (log_begin_call [ "AllocationsFamiliales"; "droit_ouvert_majoration"; - "output"; ] - unembeddable - (log_begin_call + droit_ouvert_majoration_ + (log_variable_definition [ "AllocationsFamiliales"; "droit_ouvert_majoration"; + "input"; ] - droit_ouvert_majoration_ - (log_variable_definition - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - "input"; - ] - unembeddable param_))))) - then money_of_cents_string "0" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 132; - start_column = 3; - end_line = 132; - end_column = 41; - law_headings = - [ - "Article D521-1"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et \ - prestations assimilées"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - (ressources_menage_ >$ plafond__i_i_d521_3_ - && log_end_call - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - ] - (log_variable_definition - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - "output"; - ] - unembeddable - (log_begin_call - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - ] - droit_ouvert_majoration_ - (log_variable_definition - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - "input"; - ] - unembeddable param_)))) - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.04" - else raise EmptyError - with EmptyError -> raise EmptyError); + unembeddable param_)))) + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.04" + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 95; - start_column = 3; - end_line = 96; - end_column = 44; - law_headings = - [ - "Article D521-1"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et \ - prestations assimilées"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - ((ressources_menage_ >$ plafond__i_d521_3_ - && ressources_menage_ <=$ plafond__i_i_d521_3_) - && log_end_call - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - ] - (log_variable_definition - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - "output"; - ] - unembeddable - (log_begin_call - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - ] - droit_ouvert_majoration_ - (log_variable_definition - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - "input"; - ] - unembeddable param_)))) - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.08" - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 95; + start_column = 3; + end_line = 96; + end_column = 44; + law_headings = + [ + "Article D521-1"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + ((ressources_menage_ >$ plafond__i_d521_3_ + && ressources_menage_ <=$ plafond__i_i_d521_3_) + && log_end_call + [ + "AllocationsFamiliales"; "droit_ouvert_majoration"; + ] + (log_variable_definition + [ + "AllocationsFamiliales"; + "droit_ouvert_majoration"; + "output"; + ] + unembeddable + (log_begin_call + [ + "AllocationsFamiliales"; + "droit_ouvert_majoration"; + ] + droit_ouvert_majoration_ + (log_variable_definition + [ + "AllocationsFamiliales"; + "droit_ouvert_majoration"; + "input"; + ] + unembeddable param_)))) + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.08" + else raise EmptyError); (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 55; - start_column = 3; - end_line = 55; - end_column = 41; - law_headings = - [ - "Article D521-1"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et \ - prestations assimilées"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - (ressources_menage_ <=$ plafond__i_d521_3_ - && log_end_call - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - ] - (log_variable_definition - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - "output"; - ] - unembeddable - (log_begin_call - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - ] - droit_ouvert_majoration_ - (log_variable_definition - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - "input"; - ] - unembeddable param_)))) - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.16" - else raise EmptyError - with EmptyError -> raise EmptyError); + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 55; + start_column = 3; + end_line = 55; + end_column = 41; + law_headings = + [ + "Article D521-1"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + (ressources_menage_ <=$ plafond__i_d521_3_ + && log_end_call + [ + "AllocationsFamiliales"; "droit_ouvert_majoration"; + ] + (log_variable_definition + [ + "AllocationsFamiliales"; + "droit_ouvert_majoration"; + "output"; + ] + unembeddable + (log_begin_call + [ + "AllocationsFamiliales"; + "droit_ouvert_majoration"; + ] + droit_ouvert_majoration_ + (log_variable_definition + [ + "AllocationsFamiliales"; + "droit_ouvert_majoration"; + "input"; + ] + unembeddable param_)))) + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.16" + else raise EmptyError); |] - (fun (_ : _) -> - log_decision_taken - { - filename = "./prologue.catala_fr"; - start_line = 133; - start_column = 11; - end_line = 133; - end_column = 47; - law_headings = [ "Prologue" ]; - } - true) + (fun (_ : _) -> true) (fun (_ : _) -> raise EmptyError) with EmptyError -> raise @@ -4640,42 +4239,36 @@ let allocations_familiales [ "AllocationsFamiliales"; "montant_versé_forfaitaire" ] embed_money (try - try - try - montant_verse_forfaitaire_par_enfant_ - *$ decimal_of_integer - (Array.fold_left - (fun (acc_ : integer) (enfant_ : _) -> - if - log_end_call - [ - "AllocationsFamiliales"; "droit_ouvert_forfaitaire"; - ] - (log_variable_definition - [ - "AllocationsFamiliales"; - "droit_ouvert_forfaitaire"; - "output"; - ] - unembeddable - (log_begin_call - [ - "AllocationsFamiliales"; - "droit_ouvert_forfaitaire"; - ] - droit_ouvert_forfaitaire_ - (log_variable_definition - [ - "AllocationsFamiliales"; - "droit_ouvert_forfaitaire"; - "input"; - ] - unembeddable enfant_))) - then acc_ +! integer_of_string "1" - else acc_) - (integer_of_string "0") enfants_a_charge_) - with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError + montant_verse_forfaitaire_par_enfant_ + *$ decimal_of_integer + (Array.fold_left + (fun (acc_ : integer) (enfant_ : _) -> + if + log_end_call + [ "AllocationsFamiliales"; "droit_ouvert_forfaitaire" ] + (log_variable_definition + [ + "AllocationsFamiliales"; + "droit_ouvert_forfaitaire"; + "output"; + ] + unembeddable + (log_begin_call + [ + "AllocationsFamiliales"; + "droit_ouvert_forfaitaire"; + ] + droit_ouvert_forfaitaire_ + (log_variable_definition + [ + "AllocationsFamiliales"; + "droit_ouvert_forfaitaire"; + "input"; + ] + unembeddable enfant_))) + then acc_ +! integer_of_string "1" + else acc_) + (integer_of_string "0") enfants_a_charge_) with EmptyError -> raise (NoValueProvided @@ -4693,83 +4286,65 @@ let allocations_familiales [ "AllocationsFamiliales"; "montant_initial_base" ] embed_money (try - try - handle_default - [| - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./decrets_divers.catala_fr"; - start_line = 335; - start_column = 5; - end_line = 335; - end_column = 24; - law_headings = - [ - "Article 7"; - "Décret n°2002-423 du 29 mars 2002 relatif aux \ - prestations familiales à Mayotte"; - "Dispositions spéciales relatives à Mayotte"; - "Décrets divers"; - ]; - } - (residence_ = Mayotte ()) - then - montant_initial_base_premier_enfant_mayotte_ - +$ (montant_initial_base_deuxieme_enfant_mayotte_ - +$ (montant_initial_base_troisieme_enfant_mayotte_ - +$ montant_initial_base_quatrieme_enfant_et_plus_mayotte_ - )) - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 350; - start_column = 5; - end_line = 351; - end_column = 69; - law_headings = - [ - "Article D755-5"; - "Chapitre 5 : Prestations familiales et \ - prestations assimilées"; - "Titre 5 : Départements d'outre-mer"; - "Livre 7 : Régimes divers - Dispositions diverses"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - (prestations_familiales_dot_regime_outre_mer_l751_1_ - && array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - = integer_of_string "1") - then montant_initial_base_premier_enfant_ - else raise EmptyError - with EmptyError -> raise EmptyError); - |] + handle_default + [| (fun (_ : _) -> - log_decision_taken - { - filename = "./prologue.catala_fr"; - start_line = 109; - start_column = 11; - end_line = 109; - end_column = 31; - law_headings = [ "Prologue" ]; - } - true) + if + log_decision_taken + { + filename = "./decrets_divers.catala_fr"; + start_line = 335; + start_column = 5; + end_line = 335; + end_column = 24; + law_headings = + [ + "Article 7"; + "Décret n°2002-423 du 29 mars 2002 relatif aux \ + prestations familiales à Mayotte"; + "Dispositions spéciales relatives à Mayotte"; + "Décrets divers"; + ]; + } + (residence_ = Mayotte ()) + then + montant_initial_base_premier_enfant_mayotte_ + +$ (montant_initial_base_deuxieme_enfant_mayotte_ + +$ (montant_initial_base_troisieme_enfant_mayotte_ + +$ montant_initial_base_quatrieme_enfant_et_plus_mayotte_ + )) + else raise EmptyError); (fun (_ : _) -> - try - montant_initial_base_deuxieme_enfant_ - +$ montant_initial_base_troisieme_enfant_et_plus_ - with EmptyError -> raise EmptyError) - with EmptyError -> raise EmptyError + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 350; + start_column = 5; + end_line = 351; + end_column = 69; + law_headings = + [ + "Article D755-5"; + "Chapitre 5 : Prestations familiales et prestations \ + assimilées"; + "Titre 5 : Départements d'outre-mer"; + "Livre 7 : Régimes divers - Dispositions diverses"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + (prestations_familiales_dot_regime_outre_mer_l751_1_ + && array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + = integer_of_string "1") + then montant_initial_base_premier_enfant_ + else raise EmptyError); + |] + (fun (_ : _) -> true) + (fun (_ : _) -> + montant_initial_base_deuxieme_enfant_ + +$ montant_initial_base_troisieme_enfant_et_plus_) with EmptyError -> raise (NoValueProvided @@ -4789,165 +4364,139 @@ let allocations_familiales (try fun (param_ : enfant) -> try - try - handle_default - [| - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 382; - start_column = 5; - end_line = 385; - end_column = 23; - law_headings = - [ - "Article D755-5"; - "Chapitre 5 : Prestations familiales et \ - prestations assimilées"; - "Titre 5 : Départements d'outre-mer"; - "Livre 7 : Régimes divers - Dispositions \ - diverses"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - (log_end_call - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - ] - (log_variable_definition - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - "output"; - ] - unembeddable - (log_begin_call - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - ] - droit_ouvert_majoration_ - (log_variable_definition - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - "input"; - ] - unembeddable param_))) - && prestations_familiales_dot_regime_outre_mer_l751_1_ - && array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - = integer_of_string "1" - && param_.age >=! integer_of_string "16") - then - prestations_familiales_dot_base_mensuelle_ - *$ decimal_of_string "0.0567" - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 373; - start_column = 5; - end_line = 376; - end_column = 42; - law_headings = - [ - "Article D755-5"; - "Chapitre 5 : Prestations familiales et \ - prestations assimilées"; - "Titre 5 : Départements d'outre-mer"; - "Livre 7 : Régimes divers - Dispositions \ - diverses"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - (log_end_call - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - ] - (log_variable_definition - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - "output"; - ] - unembeddable - (log_begin_call - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - ] - droit_ouvert_majoration_ - (log_variable_definition - [ - "AllocationsFamiliales"; - "droit_ouvert_majoration"; - "input"; - ] - unembeddable param_))) - && prestations_familiales_dot_regime_outre_mer_l751_1_ - && array_length - enfants_a_charge_droit_ouvert_prestation_familiale_ - = integer_of_string "1" - && param_.age >=! integer_of_string "11" - && param_.age raise EmptyError); - |] + handle_default + [| (fun (_ : _) -> - log_decision_taken - { - filename = "./prologue.catala_fr"; - start_line = 134; - start_column = 11; - end_line = 134; - end_column = 37; - law_headings = [ "Prologue" ]; - } - true) + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 382; + start_column = 5; + end_line = 385; + end_column = 23; + law_headings = + [ + "Article D755-5"; + "Chapitre 5 : Prestations familiales et \ + prestations assimilées"; + "Titre 5 : Départements d'outre-mer"; + "Livre 7 : Régimes divers - Dispositions diverses"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + (log_end_call + [ "AllocationsFamiliales"; "droit_ouvert_majoration" ] + (log_variable_definition + [ + "AllocationsFamiliales"; + "droit_ouvert_majoration"; + "output"; + ] + unembeddable + (log_begin_call + [ + "AllocationsFamiliales"; + "droit_ouvert_majoration"; + ] + droit_ouvert_majoration_ + (log_variable_definition + [ + "AllocationsFamiliales"; + "droit_ouvert_majoration"; + "input"; + ] + unembeddable param_))) + && prestations_familiales_dot_regime_outre_mer_l751_1_ + && array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + = integer_of_string "1" + && param_.age >=! integer_of_string "16") + then + prestations_familiales_dot_base_mensuelle_ + *$ decimal_of_string "0.0567" + else raise EmptyError); (fun (_ : _) -> - try - log_end_call - [ - "AllocationsFamiliales"; - "montant_initial_métropole_majoration"; - ] - (log_variable_definition - [ - "AllocationsFamiliales"; - "montant_initial_métropole_majoration"; - "output"; - ] - unembeddable - (log_begin_call + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 373; + start_column = 5; + end_line = 376; + end_column = 42; + law_headings = + [ + "Article D755-5"; + "Chapitre 5 : Prestations familiales et \ + prestations assimilées"; + "Titre 5 : Départements d'outre-mer"; + "Livre 7 : Régimes divers - Dispositions diverses"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + (log_end_call + [ "AllocationsFamiliales"; "droit_ouvert_majoration" ] + (log_variable_definition [ "AllocationsFamiliales"; - "montant_initial_métropole_majoration"; + "droit_ouvert_majoration"; + "output"; ] - montant_initial_metropole_majoration_ - (log_variable_definition + unembeddable + (log_begin_call [ "AllocationsFamiliales"; - "montant_initial_métropole_majoration"; - "input"; + "droit_ouvert_majoration"; ] - unembeddable param_))) - with EmptyError -> raise EmptyError) - with EmptyError -> raise EmptyError + droit_ouvert_majoration_ + (log_variable_definition + [ + "AllocationsFamiliales"; + "droit_ouvert_majoration"; + "input"; + ] + unembeddable param_))) + && prestations_familiales_dot_regime_outre_mer_l751_1_ + && array_length + enfants_a_charge_droit_ouvert_prestation_familiale_ + = integer_of_string "1" + && param_.age >=! integer_of_string "11" + && param_.age true) + (fun (_ : _) -> + log_end_call + [ + "AllocationsFamiliales"; + "montant_initial_métropole_majoration"; + ] + (log_variable_definition + [ + "AllocationsFamiliales"; + "montant_initial_métropole_majoration"; + "output"; + ] + unembeddable + (log_begin_call + [ + "AllocationsFamiliales"; + "montant_initial_métropole_majoration"; + ] + montant_initial_metropole_majoration_ + (log_variable_definition + [ + "AllocationsFamiliales"; + "montant_initial_métropole_majoration"; + "input"; + ] + unembeddable param_)))) with EmptyError -> raise (NoValueProvided @@ -4976,89 +4525,73 @@ let allocations_familiales [ "AllocationsFamiliales"; "montant_versé_complément_pour_forfaitaire" ] embed_money (try - try - handle_default - [| - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 272; - start_column = 5; - end_line = 274; - end_column = 41; - law_headings = - [ - "Article D521-2"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et prestations \ - assimilées"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - (ressources_menage_ >$ plafond__i_i_d521_3_ - && ressources_menage_ - <=$ plafond__i_i_d521_3_ - +$ montant_verse_forfaitaire_ - *$ decimal_of_string "12.") - then - (plafond__i_i_d521_3_ - +$ ((montant_verse_forfaitaire_ *$ decimal_of_string "12.") - -$ ressources_menage_)) - *$ (decimal_of_string "1." /& decimal_of_string "12.") - else raise EmptyError - with EmptyError -> raise EmptyError); - (fun (_ : _) -> - try - if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 262; - start_column = 5; - end_line = 264; - end_column = 42; - law_headings = - [ - "Article D521-2"; - "Chapitre 1er : Allocations familiales"; - "Titre 2 : Prestations générales d'entretien"; - "Livre 5 : Prestations familiales et prestations \ - assimilées"; - "Partie réglementaire - Décrets simples"; - "Code de la sécurité sociale"; - ]; - } - (ressources_menage_ >$ plafond__i_d521_3_ - && ressources_menage_ - <=$ plafond__i_d521_3_ - +$ montant_verse_forfaitaire_ - *$ decimal_of_string "12.") - then - (plafond__i_d521_3_ - +$ ((montant_verse_forfaitaire_ *$ decimal_of_string "12.") - -$ ressources_menage_)) - *$ (decimal_of_string "1." /& decimal_of_string "12.") - else raise EmptyError - with EmptyError -> raise EmptyError); - |] + handle_default + [| (fun (_ : _) -> - log_decision_taken - { - filename = "./prologue.catala_fr"; - start_line = 143; - start_column = 11; - end_line = 143; - end_column = 52; - law_headings = [ "Prologue" ]; - } - true) - (fun (_ : _) -> money_of_cents_string "0") - with EmptyError -> raise EmptyError + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 272; + start_column = 5; + end_line = 274; + end_column = 41; + law_headings = + [ + "Article D521-2"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + (ressources_menage_ >$ plafond__i_i_d521_3_ + && ressources_menage_ + <=$ plafond__i_i_d521_3_ + +$ montant_verse_forfaitaire_ + *$ decimal_of_string "12.") + then + (plafond__i_i_d521_3_ + +$ ((montant_verse_forfaitaire_ *$ decimal_of_string "12.") + -$ ressources_menage_)) + *$ (decimal_of_string "1." /& decimal_of_string "12.") + else raise EmptyError); + (fun (_ : _) -> + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 262; + start_column = 5; + end_line = 264; + end_column = 42; + law_headings = + [ + "Article D521-2"; + "Chapitre 1er : Allocations familiales"; + "Titre 2 : Prestations générales d'entretien"; + "Livre 5 : Prestations familiales et prestations \ + assimilées"; + "Partie réglementaire - Décrets simples"; + "Code de la sécurité sociale"; + ]; + } + (ressources_menage_ >$ plafond__i_d521_3_ + && ressources_menage_ + <=$ plafond__i_d521_3_ + +$ montant_verse_forfaitaire_ + *$ decimal_of_string "12.") + then + (plafond__i_d521_3_ + +$ ((montant_verse_forfaitaire_ *$ decimal_of_string "12.") + -$ ressources_menage_)) + *$ (decimal_of_string "1." /& decimal_of_string "12.") + else raise EmptyError); + |] + (fun (_ : _) -> true) + (fun (_ : _) -> money_of_cents_string "0") with EmptyError -> raise (NoValueProvided @@ -5075,11 +4608,7 @@ let allocations_familiales log_variable_definition [ "AllocationsFamiliales"; "montant_avec_garde_alternée_base" ] embed_money - (try - try - try montant_initial_base_ *$ rapport_enfants_total_moyen_ - with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError + (try montant_initial_base_ *$ rapport_enfants_total_moyen_ with EmptyError -> raise (NoValueProvided @@ -5099,52 +4628,44 @@ let allocations_familiales (try fun (param_ : enfant) -> try - try - try - log_end_call - [ "AllocationsFamiliales"; "montant_initial_majoration" ] - (log_variable_definition - [ - "AllocationsFamiliales"; - "montant_initial_majoration"; - "output"; - ] - unembeddable - (log_begin_call - [ - "AllocationsFamiliales"; "montant_initial_majoration"; - ] - montant_initial_majoration_ - (log_variable_definition - [ - "AllocationsFamiliales"; - "montant_initial_majoration"; - "input"; - ] - unembeddable param_))) - *$ - match - log_end_call - [ "AllocationsFamiliales"; "prise_en_compte" ] + log_end_call + [ "AllocationsFamiliales"; "montant_initial_majoration" ] + (log_variable_definition + [ + "AllocationsFamiliales"; + "montant_initial_majoration"; + "output"; + ] + unembeddable + (log_begin_call + [ "AllocationsFamiliales"; "montant_initial_majoration" ] + montant_initial_majoration_ (log_variable_definition - [ "AllocationsFamiliales"; "prise_en_compte"; "output" ] - unembeddable - (log_begin_call - [ "AllocationsFamiliales"; "prise_en_compte" ] - prise_en_compte_ - (log_variable_definition - [ - "AllocationsFamiliales"; - "prise_en_compte"; - "input"; - ] - unembeddable param_))) - with - | Complete _ -> decimal_of_string "1." - | Partagee _ -> decimal_of_string "0.5" - | Zero _ -> decimal_of_string "0." - with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError + [ + "AllocationsFamiliales"; + "montant_initial_majoration"; + "input"; + ] + unembeddable param_))) + *$ + match + log_end_call + [ "AllocationsFamiliales"; "prise_en_compte" ] + (log_variable_definition + [ "AllocationsFamiliales"; "prise_en_compte"; "output" ] + unembeddable + (log_begin_call + [ "AllocationsFamiliales"; "prise_en_compte" ] + prise_en_compte_ + (log_variable_definition + [ + "AllocationsFamiliales"; "prise_en_compte"; "input"; + ] + unembeddable param_))) + with + | Complete _ -> decimal_of_string "1." + | Partagee _ -> decimal_of_string "0.5" + | Zero _ -> decimal_of_string "0." with EmptyError -> raise (NoValueProvided @@ -5173,12 +4694,8 @@ let allocations_familiales [ "AllocationsFamiliales"; "montant_versé_base" ] embed_money (try - try - try - if droit_ouvert_base_ then montant_avec_garde_alternee_base_ - else money_of_cents_string "0" - with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError + if droit_ouvert_base_ then montant_avec_garde_alternee_base_ + else money_of_cents_string "0" with EmptyError -> raise (NoValueProvided @@ -5196,42 +4713,38 @@ let allocations_familiales [ "AllocationsFamiliales"; "montant_versé_majoration" ] embed_money (try - try - try - if droit_ouvert_base_ then - Array.fold_left - (fun (acc_ : money) (enfant_ : _) -> - acc_ - +$ log_end_call - [ - "AllocationsFamiliales"; - "montant_avec_garde_alternée_majoration"; - ] - (log_variable_definition - [ - "AllocationsFamiliales"; - "montant_avec_garde_alternée_majoration"; - "output"; - ] - unembeddable - (log_begin_call - [ - "AllocationsFamiliales"; - "montant_avec_garde_alternée_majoration"; - ] - montant_avec_garde_alternee_majoration_ - (log_variable_definition - [ - "AllocationsFamiliales"; - "montant_avec_garde_alternée_majoration"; - "input"; - ] - unembeddable enfant_)))) - (money_of_cents_string "0") - enfants_a_charge_ - else money_of_cents_string "0" - with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError + if droit_ouvert_base_ then + Array.fold_left + (fun (acc_ : money) (enfant_ : _) -> + acc_ + +$ log_end_call + [ + "AllocationsFamiliales"; + "montant_avec_garde_alternée_majoration"; + ] + (log_variable_definition + [ + "AllocationsFamiliales"; + "montant_avec_garde_alternée_majoration"; + "output"; + ] + unembeddable + (log_begin_call + [ + "AllocationsFamiliales"; + "montant_avec_garde_alternée_majoration"; + ] + montant_avec_garde_alternee_majoration_ + (log_variable_definition + [ + "AllocationsFamiliales"; + "montant_avec_garde_alternée_majoration"; + "input"; + ] + unembeddable enfant_)))) + (money_of_cents_string "0") + enfants_a_charge_ + else money_of_cents_string "0" with EmptyError -> raise (NoValueProvided @@ -5251,11 +4764,7 @@ let allocations_familiales "montant_base_complément_pour_base_et_majoration"; ] embed_money - (try - try - try montant_verse_base_ +$ montant_verse_majoration_ - with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError + (try montant_verse_base_ +$ montant_verse_majoration_ with EmptyError -> raise (NoValueProvided @@ -5276,30 +4785,22 @@ let allocations_familiales ] embed_money (try - try - try - if droit_ouvert_complement_ then - log_end_call - [ "AllocationsFamiliales"; "complément_dégressif" ] - (log_variable_definition - [ - "AllocationsFamiliales"; "complément_dégressif"; "output"; - ] - unembeddable - (log_begin_call - [ "AllocationsFamiliales"; "complément_dégressif" ] - complement_degressif_ - (log_variable_definition - [ - "AllocationsFamiliales"; - "complément_dégressif"; - "input"; - ] - unembeddable - montant_base_complement_pour_base_et_majoration_))) - else money_of_cents_string "0" - with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError + if droit_ouvert_complement_ then + log_end_call + [ "AllocationsFamiliales"; "complément_dégressif" ] + (log_variable_definition + [ "AllocationsFamiliales"; "complément_dégressif"; "output" ] + unembeddable + (log_begin_call + [ "AllocationsFamiliales"; "complément_dégressif" ] + complement_degressif_ + (log_variable_definition + [ + "AllocationsFamiliales"; "complément_dégressif"; "input"; + ] + unembeddable + montant_base_complement_pour_base_et_majoration_))) + else money_of_cents_string "0" with EmptyError -> raise (NoValueProvided @@ -5317,17 +4818,13 @@ let allocations_familiales [ "AllocationsFamiliales"; "montant_versé" ] embed_money (try - try - try - if droit_ouvert_base_ then - montant_verse_base_ - +$ (montant_verse_majoration_ - +$ (montant_verse_forfaitaire_ - +$ (montant_verse_complement_pour_base_et_majoration_ - +$ montant_verse_complement_pour_forfaitaire_))) - else money_of_cents_string "0" - with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError + if droit_ouvert_base_ then + montant_verse_base_ + +$ (montant_verse_majoration_ + +$ (montant_verse_forfaitaire_ + +$ (montant_verse_complement_pour_base_et_majoration_ + +$ montant_verse_complement_pour_forfaitaire_))) + else money_of_cents_string "0" with EmptyError -> raise (NoValueProvided @@ -5402,35 +4899,31 @@ let interface_allocations_familiales [ "InterfaceAllocationsFamiliales"; "enfants_à_charge" ] (embed_array embed_enfant) (try - try - try - Array.map - (fun (enfant_ : _) -> - { - identifiant = enfant_.d_identifiant; - obligation_scolaire = - (if - enfant_.d_date_de_naissance +@ duration_of_numbers 3 0 0 - >=@ i_date_courante_ - then Avant () - else if - enfant_.d_date_de_naissance +@ duration_of_numbers 16 0 0 - >=@ i_date_courante_ - then Pendant () - else Apres ()); - remuneration_mensuelle = enfant_.d_remuneration_mensuelle; - date_de_naissance = enfant_.d_date_de_naissance; - age = - year_of_date - (date_of_numbers 0 1 1 - +@ (i_date_courante_ -@ enfant_.d_date_de_naissance)); - prise_en_charge = enfant_.d_prise_en_charge; - a_deja_ouvert_droit_aux_allocations_familiales = - enfant_.d_a_deja_ouvert_droit_aux_allocations_familiales; - }) - i_enfants_ - with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError + Array.map + (fun (enfant_ : _) -> + { + identifiant = enfant_.d_identifiant; + obligation_scolaire = + (if + enfant_.d_date_de_naissance +@ duration_of_numbers 3 0 0 + >=@ i_date_courante_ + then Avant () + else if + enfant_.d_date_de_naissance +@ duration_of_numbers 16 0 0 + >=@ i_date_courante_ + then Pendant () + else Apres ()); + remuneration_mensuelle = enfant_.d_remuneration_mensuelle; + date_de_naissance = enfant_.d_date_de_naissance; + age = + year_of_date + (date_of_numbers 0 1 1 + +@ (i_date_courante_ -@ enfant_.d_date_de_naissance)); + prise_en_charge = enfant_.d_prise_en_charge; + a_deja_ouvert_droit_aux_allocations_familiales = + enfant_.d_a_deja_ouvert_droit_aux_allocations_familiales; + }) + i_enfants_ with EmptyError -> raise (NoValueProvided @@ -5454,33 +4947,32 @@ let interface_allocations_familiales ] embed_bool (try - try - if - log_decision_taken - { - filename = "./epilogue.catala_fr"; - start_line = 90; - start_column = 20; - end_line = 90; - end_column = 69; - law_headings = - [ "Interface du programme"; "Épilogue"; "Décrets divers" ]; - } - i_personne_charge_effective_permanente_est_parent_ - then true - else raise EmptyError - with EmptyError -> raise EmptyError + if + log_decision_taken + { + filename = "./epilogue.catala_fr"; + start_line = 90; + start_column = 20; + end_line = 90; + end_column = 69; + law_headings = + [ "Interface du programme"; "Épilogue"; "Décrets divers" ]; + } + i_personne_charge_effective_permanente_est_parent_ + then true + else raise EmptyError with EmptyError -> false) with EmptyError -> raise (NoValueProvided { - filename = "./prologue.catala_fr"; - start_line = 90; - start_column = 10; - end_line = 90; - end_column = 57; - law_headings = [ "Prologue" ]; + filename = "./epilogue.catala_fr"; + start_line = 75; + start_column = 3; + end_line = 75; + end_column = 25; + law_headings = + [ "Interface du programme"; "Épilogue"; "Décrets divers" ]; }) in let allocations_familiales_dot_personne_charge_effective_permanente_remplit_titre__i_ @@ -5493,33 +4985,32 @@ let interface_allocations_familiales ] embed_bool (try - try - if - log_decision_taken - { - filename = "./epilogue.catala_fr"; - start_line = 93; - start_column = 20; - end_line = 93; - end_column = 74; - law_headings = - [ "Interface du programme"; "Épilogue"; "Décrets divers" ]; - } - i_personne_charge_effective_permanente_remplit_titre__i_ - then true - else raise EmptyError - with EmptyError -> raise EmptyError + if + log_decision_taken + { + filename = "./epilogue.catala_fr"; + start_line = 93; + start_column = 20; + end_line = 93; + end_column = 74; + law_headings = + [ "Interface du programme"; "Épilogue"; "Décrets divers" ]; + } + i_personne_charge_effective_permanente_remplit_titre__i_ + then true + else raise EmptyError with EmptyError -> false) with EmptyError -> raise (NoValueProvided { - filename = "./prologue.catala_fr"; - start_line = 91; - start_column = 10; - end_line = 91; - end_column = 62; - law_headings = [ "Prologue" ]; + filename = "./epilogue.catala_fr"; + start_line = 75; + start_column = 3; + end_line = 75; + end_column = 25; + law_headings = + [ "Interface du programme"; "Épilogue"; "Décrets divers" ]; }) in let allocations_familiales_dot_ressources_menage_ : money = @@ -5529,38 +5020,36 @@ let interface_allocations_familiales "InterfaceAllocationsFamiliales"; "allocations_familiales.ressources_ménage"; ] - embed_money - (try try i_ressources_menage_ with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError) + embed_money i_ressources_menage_ with EmptyError -> raise (NoValueProvided { - filename = "./prologue.catala_fr"; - start_line = 92; - start_column = 10; - end_line = 92; - end_column = 27; - law_headings = [ "Prologue" ]; + filename = "./epilogue.catala_fr"; + start_line = 75; + start_column = 3; + end_line = 75; + end_column = 25; + law_headings = + [ "Interface du programme"; "Épilogue"; "Décrets divers" ]; }) in let allocations_familiales_dot_residence_ : collectivite = try log_variable_definition [ "InterfaceAllocationsFamiliales"; "allocations_familiales.résidence" ] - embed_collectivite - (try try i_residence_ with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError) + embed_collectivite i_residence_ with EmptyError -> raise (NoValueProvided { - filename = "./prologue.catala_fr"; - start_line = 93; - start_column = 10; - end_line = 93; - end_column = 19; - law_headings = [ "Prologue" ]; + filename = "./epilogue.catala_fr"; + start_line = 75; + start_column = 3; + end_line = 75; + end_column = 25; + law_headings = + [ "Interface du programme"; "Épilogue"; "Décrets divers" ]; }) in let allocations_familiales_dot_date_courante_ : date = @@ -5570,19 +5059,18 @@ let interface_allocations_familiales "InterfaceAllocationsFamiliales"; "allocations_familiales.date_courante"; ] - embed_date - (try try i_date_courante_ with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError) + embed_date i_date_courante_ with EmptyError -> raise (NoValueProvided { - filename = "./prologue.catala_fr"; - start_line = 96; - start_column = 10; - end_line = 96; - end_column = 23; - law_headings = [ "Prologue" ]; + filename = "./epilogue.catala_fr"; + start_line = 75; + start_column = 3; + end_line = 75; + end_column = 25; + law_headings = + [ "Interface du programme"; "Épilogue"; "Décrets divers" ]; }) in let allocations_familiales_dot_enfants_a_charge_ : enfant array = @@ -5592,19 +5080,18 @@ let interface_allocations_familiales "InterfaceAllocationsFamiliales"; "allocations_familiales.enfants_à_charge"; ] - (embed_array embed_enfant) - (try try enfants_a_charge_ with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError) + (embed_array embed_enfant) enfants_a_charge_ with EmptyError -> raise (NoValueProvided { - filename = "./prologue.catala_fr"; - start_line = 99; - start_column = 10; - end_line = 99; - end_column = 26; - law_headings = [ "Prologue" ]; + filename = "./epilogue.catala_fr"; + start_line = 75; + start_column = 3; + end_line = 75; + end_column = 25; + law_headings = + [ "Interface du programme"; "Épilogue"; "Décrets divers" ]; }) in let allocations_familiales_dot_avait_enfant_a_charge_avant_1er_janvier_2012_ : @@ -5617,33 +5104,32 @@ let interface_allocations_familiales ] embed_bool (try - try - if - log_decision_taken - { - filename = "./epilogue.catala_fr"; - start_line = 96; - start_column = 20; - end_line = 96; - end_column = 66; - law_headings = - [ "Interface du programme"; "Épilogue"; "Décrets divers" ]; - } - i_avait_enfant_a_charge_avant_1er_janvier_2012_ - then true - else raise EmptyError - with EmptyError -> raise EmptyError + if + log_decision_taken + { + filename = "./epilogue.catala_fr"; + start_line = 96; + start_column = 20; + end_line = 96; + end_column = 66; + law_headings = + [ "Interface du programme"; "Épilogue"; "Décrets divers" ]; + } + i_avait_enfant_a_charge_avant_1er_janvier_2012_ + then true + else raise EmptyError with EmptyError -> false) with EmptyError -> raise (NoValueProvided { - filename = "./prologue.catala_fr"; - start_line = 120; - start_column = 10; - end_line = 120; - end_column = 54; - law_headings = [ "Prologue" ]; + filename = "./epilogue.catala_fr"; + start_line = 75; + start_column = 3; + end_line = 75; + end_column = 25; + law_headings = + [ "Interface du programme"; "Épilogue"; "Décrets divers" ]; }) in let result_ : allocations_familiales_out = @@ -5680,11 +5166,7 @@ let interface_allocations_familiales log_variable_definition [ "InterfaceAllocationsFamiliales"; "i_montant_versé" ] embed_money - (try - try - try allocations_familiales_dot_montant_verse_ - with EmptyError -> raise EmptyError - with EmptyError -> raise EmptyError + (try allocations_familiales_dot_montant_verse_ with EmptyError -> raise (NoValueProvided diff --git a/french_law/python/src/allocations_familiales.py b/french_law/python/src/allocations_familiales.py index c32041b96..5c0fa8aa3 100644 --- a/french_law/python/src/allocations_familiales.py +++ b/french_law/python/src/allocations_familiales.py @@ -475,469 +475,404 @@ def __str__(self) -> str: self.i_avait_enfant_a_charge_avant_1er_janvier_2012_in) -def smic(smic_in_1: SmicIn): - date_courante_2 = smic_in_1.date_courante_in - residence_3 = smic_in_1.residence_in +def smic(smic_in: SmicIn): + date_courante = smic_in.date_courante_in + residence = smic_in.residence_in try: - def local_var_20(_: Any): + def temp_brut_horaire(_: Any): raise EmptyError - def local_var_18(_: Any): - return log_decision_taken(SourcePosition(filename="./prologue.catala_fr", - start_line=43, start_column=10, end_line=43, end_column=22, - law_headings=["Prologue"]), True) - - def local_var_16(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=219, start_column=5, - end_line=228, end_column=6, law_headings=["Article 1", - "Décret n° 2018-1173 du 19 décembre 2018 portant relèvement du salaire minimum de croissance", - "Montant du salaire minimum de croissance", - "Décrets divers"]), ((date_courante_2 >= - date_of_numbers(2019, 1, 1)) and ((date_courante_2 <= - date_of_numbers(2019, 12, 31)) and ((residence_3 == - Collectivite(Collectivite_Code.Metropole, Unit())) or - ((residence_3 == - Collectivite(Collectivite_Code.Guadeloupe, Unit())) or - ((residence_3 == Collectivite(Collectivite_Code.Guyane, - Unit())) or ((residence_3 == - Collectivite(Collectivite_Code.Martinique, Unit())) or - ((residence_3 == - Collectivite(Collectivite_Code.LaReunion, Unit())) or - ((residence_3 == - Collectivite(Collectivite_Code.SaintBarthelemy, - Unit())) or ((residence_3 == - Collectivite(Collectivite_Code.SaintMartin, Unit())) or - (residence_3 == - Collectivite(Collectivite_Code.SaintPierreEtMiquelon, - Unit())))))))))))): - return money_of_cents_string("1003") - else: - raise EmptyError - except EmptyError: + def temp_brut_horaire_1(_: Any): + return True + + def temp_brut_horaire_2(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=219, start_column=5, end_line=228, end_column=6, + law_headings=["Article 1", + "Décret n° 2018-1173 du 19 décembre 2018 portant relèvement du salaire minimum de croissance", + "Montant du salaire minimum de croissance", + "Décrets divers"]), ((date_courante >= + date_of_numbers(2019, 1, 1)) and ((date_courante <= + date_of_numbers(2019, 12, 31)) and ((residence == + Collectivite(Collectivite_Code.Metropole, Unit())) or + ((residence == Collectivite(Collectivite_Code.Guadeloupe, + Unit())) or ((residence == + Collectivite(Collectivite_Code.Guyane, Unit())) or + ((residence == Collectivite(Collectivite_Code.Martinique, + Unit())) or ((residence == + Collectivite(Collectivite_Code.LaReunion, Unit())) or + ((residence == + Collectivite(Collectivite_Code.SaintBarthelemy, Unit())) or + ((residence == Collectivite(Collectivite_Code.SaintMartin, + Unit())) or (residence == + Collectivite(Collectivite_Code.SaintPierreEtMiquelon, + Unit())))))))))))): + return money_of_cents_string("1003") + else: raise EmptyError - def local_var_14(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=237, start_column=5, - end_line=239, end_column=6, law_headings=["Article 1", - "Décret n° 2018-1173 du 19 décembre 2018 portant relèvement du salaire minimum de croissance", - "Montant du salaire minimum de croissance", - "Décrets divers"]), ((date_courante_2 >= - date_of_numbers(2019, 1, 1)) and ((date_courante_2 <= - date_of_numbers(2019, 12, 31)) and (residence_3 == - Collectivite(Collectivite_Code.Mayotte, - Unit()))))): - return money_of_cents_string("757") - else: - raise EmptyError - except EmptyError: + def temp_brut_horaire_3(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=237, start_column=5, end_line=239, end_column=6, + law_headings=["Article 1", + "Décret n° 2018-1173 du 19 décembre 2018 portant relèvement du salaire minimum de croissance", + "Montant du salaire minimum de croissance", + "Décrets divers"]), ((date_courante >= + date_of_numbers(2019, 1, 1)) and ((date_courante <= + date_of_numbers(2019, 12, 31)) and (residence == + Collectivite(Collectivite_Code.Mayotte, + Unit()))))): + return money_of_cents_string("757") + else: raise EmptyError - def local_var_12(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=258, start_column=5, - end_line=267, end_column=6, law_headings=["Article 1", - "Décret n° 2019-1387 du 18 décembre 2019 portant relèvement du salaire minimum de croissance", - "Montant du salaire minimum de croissance", - "Décrets divers"]), ((date_courante_2 >= - date_of_numbers(2020, 1, 1)) and ((date_courante_2 <= - date_of_numbers(2020, 12, 31)) and ((residence_3 == - Collectivite(Collectivite_Code.Metropole, Unit())) or - ((residence_3 == - Collectivite(Collectivite_Code.Guadeloupe, Unit())) or - ((residence_3 == Collectivite(Collectivite_Code.Guyane, - Unit())) or ((residence_3 == - Collectivite(Collectivite_Code.Martinique, Unit())) or - ((residence_3 == - Collectivite(Collectivite_Code.LaReunion, Unit())) or - ((residence_3 == - Collectivite(Collectivite_Code.SaintBarthelemy, - Unit())) or ((residence_3 == - Collectivite(Collectivite_Code.SaintMartin, Unit())) or - (residence_3 == - Collectivite(Collectivite_Code.SaintPierreEtMiquelon, - Unit())))))))))))): - return money_of_cents_string("1015") - else: - raise EmptyError - except EmptyError: + def temp_brut_horaire_4(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=258, start_column=5, end_line=267, end_column=6, + law_headings=["Article 1", + "Décret n° 2019-1387 du 18 décembre 2019 portant relèvement du salaire minimum de croissance", + "Montant du salaire minimum de croissance", + "Décrets divers"]), ((date_courante >= + date_of_numbers(2020, 1, 1)) and ((date_courante <= + date_of_numbers(2020, 12, 31)) and ((residence == + Collectivite(Collectivite_Code.Metropole, Unit())) or + ((residence == Collectivite(Collectivite_Code.Guadeloupe, + Unit())) or ((residence == + Collectivite(Collectivite_Code.Guyane, Unit())) or + ((residence == Collectivite(Collectivite_Code.Martinique, + Unit())) or ((residence == + Collectivite(Collectivite_Code.LaReunion, Unit())) or + ((residence == + Collectivite(Collectivite_Code.SaintBarthelemy, Unit())) or + ((residence == Collectivite(Collectivite_Code.SaintMartin, + Unit())) or (residence == + Collectivite(Collectivite_Code.SaintPierreEtMiquelon, + Unit())))))))))))): + return money_of_cents_string("1015") + else: raise EmptyError - def local_var_10(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=276, start_column=5, - end_line=278, end_column=6, law_headings=["Article 1", - "Décret n° 2019-1387 du 18 décembre 2019 portant relèvement du salaire minimum de croissance", - "Montant du salaire minimum de croissance", - "Décrets divers"]), ((date_courante_2 >= - date_of_numbers(2020, 1, 1)) and ((date_courante_2 <= - date_of_numbers(2020, 12, 31)) and (residence_3 == - Collectivite(Collectivite_Code.Mayotte, - Unit()))))): - return money_of_cents_string("766") - else: - raise EmptyError - except EmptyError: + def temp_brut_horaire_5(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=276, start_column=5, end_line=278, end_column=6, + law_headings=["Article 1", + "Décret n° 2019-1387 du 18 décembre 2019 portant relèvement du salaire minimum de croissance", + "Montant du salaire minimum de croissance", + "Décrets divers"]), ((date_courante >= + date_of_numbers(2020, 1, 1)) and ((date_courante <= + date_of_numbers(2020, 12, 31)) and (residence == + Collectivite(Collectivite_Code.Mayotte, + Unit()))))): + return money_of_cents_string("766") + else: raise EmptyError - def local_var_8(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=297, start_column=5, - end_line=306, end_column=6, law_headings=["Article 1", - "Décret n° 2020-1598 du 16 décembre 2020 portant relèvement du salaire minimum de croissance", - "Montant du salaire minimum de croissance", - "Décrets divers"]), ((date_courante_2 >= - date_of_numbers(2021, 1, 1)) and ((date_courante_2 <= - date_of_numbers(2021, 12, 31)) and ((residence_3 == - Collectivite(Collectivite_Code.Metropole, Unit())) or - ((residence_3 == - Collectivite(Collectivite_Code.Guadeloupe, Unit())) or - ((residence_3 == Collectivite(Collectivite_Code.Guyane, - Unit())) or ((residence_3 == - Collectivite(Collectivite_Code.Martinique, Unit())) or - ((residence_3 == - Collectivite(Collectivite_Code.LaReunion, Unit())) or - ((residence_3 == - Collectivite(Collectivite_Code.SaintBarthelemy, - Unit())) or ((residence_3 == - Collectivite(Collectivite_Code.SaintMartin, Unit())) or - (residence_3 == - Collectivite(Collectivite_Code.SaintPierreEtMiquelon, - Unit())))))))))))): - return money_of_cents_string("1025") - else: - raise EmptyError - except EmptyError: + def temp_brut_horaire_6(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=297, start_column=5, end_line=306, end_column=6, + law_headings=["Article 1", + "Décret n° 2020-1598 du 16 décembre 2020 portant relèvement du salaire minimum de croissance", + "Montant du salaire minimum de croissance", + "Décrets divers"]), ((date_courante >= + date_of_numbers(2021, 1, 1)) and ((date_courante <= + date_of_numbers(2021, 12, 31)) and ((residence == + Collectivite(Collectivite_Code.Metropole, Unit())) or + ((residence == Collectivite(Collectivite_Code.Guadeloupe, + Unit())) or ((residence == + Collectivite(Collectivite_Code.Guyane, Unit())) or + ((residence == Collectivite(Collectivite_Code.Martinique, + Unit())) or ((residence == + Collectivite(Collectivite_Code.LaReunion, Unit())) or + ((residence == + Collectivite(Collectivite_Code.SaintBarthelemy, Unit())) or + ((residence == Collectivite(Collectivite_Code.SaintMartin, + Unit())) or (residence == + Collectivite(Collectivite_Code.SaintPierreEtMiquelon, + Unit())))))))))))): + return money_of_cents_string("1025") + else: raise EmptyError - def local_var_6(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=315, start_column=5, - end_line=317, end_column=6, law_headings=["Article 1", - "Décret n° 2020-1598 du 16 décembre 2020 portant relèvement du salaire minimum de croissance", - "Montant du salaire minimum de croissance", - "Décrets divers"]), ((date_courante_2 >= - date_of_numbers(2021, 1, 1)) and ((date_courante_2 <= - date_of_numbers(2021, 12, 31)) and (residence_3 == - Collectivite(Collectivite_Code.Mayotte, - Unit()))))): - return money_of_cents_string("774") - else: - raise EmptyError - except EmptyError: + def temp_brut_horaire_7(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=315, start_column=5, end_line=317, end_column=6, + law_headings=["Article 1", + "Décret n° 2020-1598 du 16 décembre 2020 portant relèvement du salaire minimum de croissance", + "Montant du salaire minimum de croissance", + "Décrets divers"]), ((date_courante >= + date_of_numbers(2021, 1, 1)) and ((date_courante <= + date_of_numbers(2021, 12, 31)) and (residence == + Collectivite(Collectivite_Code.Mayotte, + Unit()))))): + return money_of_cents_string("774") + else: raise EmptyError - local_var_5 = handle_default([local_var_6, local_var_8, local_var_10, - local_var_12, local_var_14, - local_var_16], local_var_18, - local_var_20) + temp_brut_horaire_8 = handle_default([temp_brut_horaire_7, + temp_brut_horaire_6, + temp_brut_horaire_5, + temp_brut_horaire_4, + temp_brut_horaire_3, + temp_brut_horaire_2], + temp_brut_horaire_1, + temp_brut_horaire) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=43, start_column=10, end_line=43, end_column=22, law_headings=["Prologue"])) - brut_horaire_4 = log_variable_definition(["Smic", "brut_horaire"], - local_var_5) - return SmicOut(brut_horaire_out=brut_horaire_4) + brut_horaire = log_variable_definition(["Smic", "brut_horaire"], + temp_brut_horaire_8) + return SmicOut(brut_horaire_out=brut_horaire) -def allocation_familiales_avril2008(allocation_familiales_avril2008_in_22: AllocationFamilialesAvril2008In): +def allocation_familiales_avril2008(allocation_familiales_avril2008_in: AllocationFamilialesAvril2008In): try: - local_var_24 = integer_of_string("16") + temp_age_minimum_alinea_1_l521_3 = integer_of_string("16") except EmptyError: - raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=81, start_column=10, - end_line=81, end_column=37, - law_headings=["Prologue"])) - age_minimum_alinea_1_l521_3_23 = log_variable_definition(["AllocationFamilialesAvril2008", - "âge_minimum_alinéa_1_l521_3"], local_var_24) - return AllocationFamilialesAvril2008Out(age_minimum_alinea_1_l521_3_out=age_minimum_alinea_1_l521_3_23) + raise NoValueProvided(SourcePosition(filename="./securite_sociale_R.catala_fr", + start_line=78, start_column=49, + end_line=78, end_column=51, + law_headings=["Article R521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets en Conseil d'Etat", + "Code de la sécurité sociale"])) + age_minimum_alinea_1_l521_3 = log_variable_definition(["AllocationFamilialesAvril2008", + "âge_minimum_alinéa_1_l521_3"], temp_age_minimum_alinea_1_l521_3) + return AllocationFamilialesAvril2008Out(age_minimum_alinea_1_l521_3_out=age_minimum_alinea_1_l521_3) -def enfant_le_plus_age(enfant_le_plus_age_in_25: EnfantLePlusAgeIn): - enfants_26 = enfant_le_plus_age_in_25.enfants_in +def enfant_le_plus_age(enfant_le_plus_age_in: EnfantLePlusAgeIn): + enfants = enfant_le_plus_age_in.enfants_in try: - try: - try: - def local_var_29(acc_30: Any, item_31: Any): - if (acc_30.age > item_31.age): - return acc_30 - else: - return item_31 - local_var_28 = list_fold_left(local_var_29, - Enfant(identifiant=- integer_of_string("1"), - obligation_scolaire=SituationObligationScolaire(SituationObligationScolaire_Code.Pendant, - Unit()), - remuneration_mensuelle=money_of_cents_string( - "0"), - date_de_naissance=date_of_numbers( - 1900, 1, 1), - age=integer_of_string( - "0"), - prise_en_charge=PriseEnCharge(PriseEnCharge_Code.EffectiveEtPermanente, - Unit()), - a_deja_ouvert_droit_aux_allocations_familiales=False), - enfants_26) - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_le_plus_age(acc: Any, item: Any): + if (acc.age > item.age): + return acc + else: + return item + temp_le_plus_age_1 = list_fold_left(temp_le_plus_age, + Enfant(identifiant=- integer_of_string("1"), + obligation_scolaire=SituationObligationScolaire(SituationObligationScolaire_Code.Pendant, + Unit()), + remuneration_mensuelle=money_of_cents_string( + "0"), + date_de_naissance=date_of_numbers( + 1900, 1, 1), + age=integer_of_string("0"), + prise_en_charge=PriseEnCharge(PriseEnCharge_Code.EffectiveEtPermanente, + Unit()), + a_deja_ouvert_droit_aux_allocations_familiales=False), + enfants) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=85, start_column=10, end_line=85, end_column=21, law_headings=["Prologue"])) - le_plus_age_27 = log_variable_definition(["EnfantLePlusÂgé", - "le_plus_âgé"], local_var_28) - return EnfantLePlusAgeOut(le_plus_age_out=le_plus_age_27) + le_plus_age = log_variable_definition(["EnfantLePlusÂgé", + "le_plus_âgé"], temp_le_plus_age_1) + return EnfantLePlusAgeOut(le_plus_age_out=le_plus_age) -def prestations_familiales(prestations_familiales_in_32: PrestationsFamilialesIn): - date_courante_33 = prestations_familiales_in_32.date_courante_in - prestation_courante_34 = prestations_familiales_in_32.prestation_courante_in - residence_35 = prestations_familiales_in_32.residence_in +def prestations_familiales(prestations_familiales_in: PrestationsFamilialesIn): + date_courante_1 = prestations_familiales_in.date_courante_in + prestation_courante = prestations_familiales_in.prestation_courante_in + residence_1 = prestations_familiales_in.residence_in try: - local_var_37 = integer_of_string("20") + temp_age_l512_3_2 = integer_of_string("20") except EmptyError: - raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=68, start_column=10, - end_line=68, end_column=22, - law_headings=["Prologue"])) - age_l512_3_2_36 = log_variable_definition(["PrestationsFamiliales", - "âge_l512_3_2"], local_var_37) + raise NoValueProvided(SourcePosition(filename="./securite_sociale_R.catala_fr", + start_line=21, start_column=34, + end_line=21, end_column=36, + law_headings=["Article R512-2", + "Chapitre 2 : Champ d'application.", + "Titre 1 : Champ d'application - Généralités", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets en Conseil d'Etat", + "Code de la sécurité sociale"])) + age_l512_3_2 = log_variable_definition(["PrestationsFamiliales", + "âge_l512_3_2"], temp_age_l512_3_2) try: - def local_var_48(_: Any): + def temp_base_mensuelle(_: Any): raise EmptyError - def local_var_46(_: Any): - return log_decision_taken(SourcePosition(filename="./prologue.catala_fr", - start_line=74, start_column=10, end_line=74, end_column=24, - law_headings=["Prologue"]), True) - - def local_var_44(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=24, start_column=5, - end_line=25, end_column=34, - law_headings=["Instruction ministérielle N°DSS/SD2B/2019/65 du 25 mars 2019 relative à la revalorisation au 1er avril 2019 des prestations familiales servies en métropole", - "Montant de la base mensuelle des allocations familiales", - "Décrets divers"]), ((date_courante_33 >= - date_of_numbers(2019, 4, 1)) and (date_courante_33 < - date_of_numbers(2020, 4, 1)))): - return money_of_cents_string("41316") - else: - raise EmptyError - except EmptyError: + def temp_base_mensuelle_1(_: Any): + return True + + def temp_base_mensuelle_2(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=24, start_column=5, end_line=25, end_column=34, + law_headings=["Instruction ministérielle N°DSS/SD2B/2019/65 du 25 mars 2019 relative à la revalorisation au 1er avril 2019 des prestations familiales servies en métropole", + "Montant de la base mensuelle des allocations familiales", + "Décrets divers"]), ((date_courante_1 >= + date_of_numbers(2019, 4, 1)) and (date_courante_1 < + date_of_numbers(2020, 4, 1)))): + return money_of_cents_string("41316") + else: raise EmptyError - def local_var_42(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=44, start_column=5, - end_line=45, end_column=34, - law_headings=["Instruction interministérielle no DSS/SD2B/2020/33 du 18 février 2020 relative à la revalorisation au 1er avril 2020 des prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à La Réunion, à Saint-Barthélemy, à Saint-Martin et dans le département de Mayotte", - "Montant de la base mensuelle des allocations familiales", - "Décrets divers"]), ((date_courante_33 >= - date_of_numbers(2020, 4, 1)) and (date_courante_33 < - date_of_numbers(2021, 4, 1)))): - return money_of_cents_string("41404") - else: - raise EmptyError - except EmptyError: + def temp_base_mensuelle_3(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=44, start_column=5, end_line=45, end_column=34, + law_headings=["Instruction interministérielle no DSS/SD2B/2020/33 du 18 février 2020 relative à la revalorisation au 1er avril 2020 des prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à La Réunion, à Saint-Barthélemy, à Saint-Martin et dans le département de Mayotte", + "Montant de la base mensuelle des allocations familiales", + "Décrets divers"]), ((date_courante_1 >= + date_of_numbers(2020, 4, 1)) and (date_courante_1 < + date_of_numbers(2021, 4, 1)))): + return money_of_cents_string("41404") + else: raise EmptyError - def local_var_40(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=60, start_column=5, - end_line=61, end_column=34, - law_headings=["Instruction interministérielle n°DSS/2B/2021/65 du 19 mars 2021 relative à la revalorisation au 1er avril 2021 des prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et dans le département de Mayotte", - "Montant de la base mensuelle des allocations familiales", - "Décrets divers"]), ((date_courante_33 >= - date_of_numbers(2021, 4, 1)) and (date_courante_33 < - date_of_numbers(2022, 4, 1)))): - return money_of_cents_string("41481") - else: - raise EmptyError - except EmptyError: + def temp_base_mensuelle_4(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=60, start_column=5, end_line=61, end_column=34, + law_headings=["Instruction interministérielle n°DSS/2B/2021/65 du 19 mars 2021 relative à la revalorisation au 1er avril 2021 des prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et dans le département de Mayotte", + "Montant de la base mensuelle des allocations familiales", + "Décrets divers"]), ((date_courante_1 >= + date_of_numbers(2021, 4, 1)) and (date_courante_1 < + date_of_numbers(2022, 4, 1)))): + return money_of_cents_string("41481") + else: raise EmptyError - local_var_39 = handle_default([local_var_40, local_var_42, - local_var_44], local_var_46, - local_var_48) + temp_base_mensuelle_5 = handle_default([temp_base_mensuelle_4, + temp_base_mensuelle_3, + temp_base_mensuelle_2], + temp_base_mensuelle_1, + temp_base_mensuelle) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=74, start_column=10, end_line=74, end_column=24, law_headings=["Prologue"])) - base_mensuelle_38 = log_variable_definition(["PrestationsFamiliales", - "base_mensuelle"], local_var_39) + base_mensuelle = log_variable_definition(["PrestationsFamiliales", + "base_mensuelle"], temp_base_mensuelle_5) try: - try: - try: - local_var_52 = date_courante_33 - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError - local_var_51 = log_variable_definition(["PrestationsFamiliales", - "smic.date_courante"], local_var_52) + temp_smic_dot_date_courante = log_variable_definition(["PrestationsFamiliales", + "smic.date_courante"], date_courante_1) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=41, start_column=10, - end_line=41, end_column=23, + start_line=73, start_column=3, + end_line=73, end_column=7, law_headings=["Prologue"])) - smic_dot_date_courante_50 = local_var_51 + smic_dot_date_courante = temp_smic_dot_date_courante try: - try: - try: - local_var_55 = residence_35 - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError - local_var_54 = log_variable_definition(["PrestationsFamiliales", - "smic.résidence"], local_var_55) + temp_smic_dot_residence = log_variable_definition(["PrestationsFamiliales", + "smic.résidence"], residence_1) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=42, start_column=10, - end_line=42, end_column=19, + start_line=73, start_column=3, + end_line=73, end_column=7, law_headings=["Prologue"])) - smic_dot_residence_53 = local_var_54 - result_56 = log_end_call(["PrestationsFamiliales", "smic", "Smic"], - log_begin_call(["PrestationsFamiliales", "smic", "Smic"], smic, - SmicIn(date_courante_in=smic_dot_date_courante_50, - residence_in=smic_dot_residence_53))) - smic_dot_brut_horaire_57 = result_56.brut_horaire_out + smic_dot_residence = temp_smic_dot_residence + result = log_end_call(["PrestationsFamiliales", "smic", "Smic"], + log_begin_call(["PrestationsFamiliales", "smic", "Smic"], smic, + SmicIn(date_courante_in=smic_dot_date_courante, + residence_in=smic_dot_residence))) + smic_dot_brut_horaire = result.brut_horaire_out try: try: - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=354, start_column=5, - end_line=359, end_column=30, - law_headings=["Article L751-1", - "Chapitre 1er : Généralités", - "Titre 5 : Dispositions particulières à la Guadeloupe, à la Guyane, à la Martinique, à La Réunion, à Saint-Barthélemy et à Saint-Martin", - "Livre 7 : Régimes divers - Dispositions diverses", - "Partie législative", - "Code de la sécurité sociale"]), ((residence_35 == - Collectivite(Collectivite_Code.Guadeloupe, Unit())) or - ((residence_35 == Collectivite(Collectivite_Code.Guyane, - Unit())) or ((residence_35 == - Collectivite(Collectivite_Code.Martinique, Unit())) or - ((residence_35 == - Collectivite(Collectivite_Code.LaReunion, Unit())) or - ((residence_35 == - Collectivite(Collectivite_Code.SaintBarthelemy, - Unit())) or (residence_35 == - Collectivite(Collectivite_Code.SaintMartin, - Unit())))))))): - local_var_59 = True - else: - raise EmptyError - except EmptyError: + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=354, start_column=5, end_line=359, end_column=30, + law_headings=["Article L751-1", + "Chapitre 1er : Généralités", + "Titre 5 : Dispositions particulières à la Guadeloupe, à la Guyane, à la Martinique, à La Réunion, à Saint-Barthélemy et à Saint-Martin", + "Livre 7 : Régimes divers - Dispositions diverses", + "Partie législative", + "Code de la sécurité sociale"]), ((residence_1 == + Collectivite(Collectivite_Code.Guadeloupe, Unit())) or + ((residence_1 == Collectivite(Collectivite_Code.Guyane, + Unit())) or ((residence_1 == + Collectivite(Collectivite_Code.Martinique, Unit())) or + ((residence_1 == Collectivite(Collectivite_Code.LaReunion, + Unit())) or ((residence_1 == + Collectivite(Collectivite_Code.SaintBarthelemy, Unit())) or + (residence_1 == Collectivite(Collectivite_Code.SaintMartin, + Unit())))))))): + temp_regime_outre_mer_l751_1 = True + else: raise EmptyError except EmptyError: - local_var_59 = False + temp_regime_outre_mer_l751_1 = False except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=69, start_column=10, end_line=69, end_column=33, law_headings=["Prologue"])) - regime_outre_mer_l751_1_58 = log_variable_definition(["PrestationsFamiliales", - "régime_outre_mer_l751_1"], local_var_59) + regime_outre_mer_l751_1 = log_variable_definition(["PrestationsFamiliales", + "régime_outre_mer_l751_1"], temp_regime_outre_mer_l751_1) try: try: - try: - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_R.catala_fr", - start_line=216, start_column=18, - end_line=216, end_column=41, - law_headings=["Article R755-0-2", - "Chapitre 5 : Prestations familiales et prestations assimilées", - "Titre 5 : Départements d'outre-mer", - "Livre 7 : Régimes divers - Dispositions diverses", - "Partie réglementaire - Décrets en Conseil d'Etat", - "Code de la sécurité sociale"]), regime_outre_mer_l751_1_58): - local_var_61 = ((smic_dot_brut_horaire_57 * - decimal_of_string("0.55")) * - decimal_of_string("169.")) - else: - raise EmptyError - except EmptyError: - raise EmptyError - except EmptyError: - try: - local_var_61 = ((smic_dot_brut_horaire_57 * - decimal_of_string("0.55")) * - decimal_of_string("169.")) - except EmptyError: - raise EmptyError + if log_decision_taken(SourcePosition(filename="./securite_sociale_R.catala_fr", + start_line=216, start_column=18, end_line=216, end_column=41, + law_headings=["Article R755-0-2", + "Chapitre 5 : Prestations familiales et prestations assimilées", + "Titre 5 : Départements d'outre-mer", + "Livre 7 : Régimes divers - Dispositions diverses", + "Partie réglementaire - Décrets en Conseil d'Etat", + "Code de la sécurité sociale"]), regime_outre_mer_l751_1): + temp_plafond_l512_3_2 = ((smic_dot_brut_horaire * + decimal_of_string("0.55")) * decimal_of_string("169.")) + else: + raise EmptyError except EmptyError: - raise EmptyError + temp_plafond_l512_3_2 = ((smic_dot_brut_horaire * + decimal_of_string("0.55")) * decimal_of_string("169.")) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=67, start_column=11, end_line=67, end_column=27, law_headings=["Prologue"])) - plafond_l512_3_2_60 = log_variable_definition(["PrestationsFamiliales", - "plafond_l512_3_2"], local_var_61) + plafond_l512_3_2 = log_variable_definition(["PrestationsFamiliales", + "plafond_l512_3_2"], temp_plafond_l512_3_2) try: - def local_var_63(param_64: Enfant): + def temp_conditions_hors_age(param: Enfant): try: try: - try: - match_arg_540 = param_64.obligation_scolaire - if match_arg_540.code == SituationObligationScolaire_Code.Avant: - _ = match_arg_540.value - local_var_73 = False - elif match_arg_540.code == SituationObligationScolaire_Code.Pendant: - _ = match_arg_540.value - local_var_73 = False - elif match_arg_540.code == SituationObligationScolaire_Code.Apres: - _ = match_arg_540.value - local_var_73 = True - match_arg_541 = param_64.obligation_scolaire - if match_arg_541.code == SituationObligationScolaire_Code.Avant: - _ = match_arg_541.value - local_var_69 = False - elif match_arg_541.code == SituationObligationScolaire_Code.Pendant: - _ = match_arg_541.value - local_var_69 = True - elif match_arg_541.code == SituationObligationScolaire_Code.Apres: - _ = match_arg_541.value - local_var_69 = False - match_arg_542 = param_64.obligation_scolaire - if match_arg_542.code == SituationObligationScolaire_Code.Avant: - _ = match_arg_542.value - local_var_65 = True - elif match_arg_542.code == SituationObligationScolaire_Code.Pendant: - _ = match_arg_542.value - local_var_65 = False - elif match_arg_542.code == SituationObligationScolaire_Code.Apres: - _ = match_arg_542.value - local_var_65 = False - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=68, start_column=5, - end_line=71, end_column=57, - law_headings=["Article L512-3", - "Chapitre 2 : Champ d'application", - "Titre 1 : Champ d'application - Généralités", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), ((local_var_65 or - (local_var_69 or local_var_73)) and - (param_64.remuneration_mensuelle <= - plafond_l512_3_2_60))): - return True - else: - raise EmptyError - except EmptyError: + match_arg = param.obligation_scolaire + if match_arg.code == SituationObligationScolaire_Code.Avant: + _ = match_arg.value + temp_conditions_hors_age_1 = False + elif match_arg.code == SituationObligationScolaire_Code.Pendant: + _ = match_arg.value + temp_conditions_hors_age_1 = False + elif match_arg.code == SituationObligationScolaire_Code.Apres: + _ = match_arg.value + temp_conditions_hors_age_1 = True + match_arg_1 = param.obligation_scolaire + if match_arg_1.code == SituationObligationScolaire_Code.Avant: + _ = match_arg_1.value + temp_conditions_hors_age_2 = False + elif match_arg_1.code == SituationObligationScolaire_Code.Pendant: + _ = match_arg_1.value + temp_conditions_hors_age_2 = True + elif match_arg_1.code == SituationObligationScolaire_Code.Apres: + _ = match_arg_1.value + temp_conditions_hors_age_2 = False + match_arg_2 = param.obligation_scolaire + if match_arg_2.code == SituationObligationScolaire_Code.Avant: + _ = match_arg_2.value + temp_conditions_hors_age_3 = True + elif match_arg_2.code == SituationObligationScolaire_Code.Pendant: + _ = match_arg_2.value + temp_conditions_hors_age_3 = False + elif match_arg_2.code == SituationObligationScolaire_Code.Apres: + _ = match_arg_2.value + temp_conditions_hors_age_3 = False + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=68, start_column=5, + end_line=71, end_column=57, + law_headings=["Article L512-3", + "Chapitre 2 : Champ d'application", + "Titre 1 : Champ d'application - Généralités", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), ((temp_conditions_hors_age_3 or + (temp_conditions_hors_age_2 or + temp_conditions_hors_age_1)) and + (param.remuneration_mensuelle <= + plafond_l512_3_2))): + return True + else: raise EmptyError except EmptyError: return False @@ -953,89 +888,82 @@ def local_var_63(param_64: Enfant): start_line=66, start_column=10, end_line=66, end_column=29, law_headings=["Prologue"])) - conditions_hors_age_62 = log_variable_definition(["PrestationsFamiliales", - "conditions_hors_âge"], local_var_63) + conditions_hors_age = log_variable_definition(["PrestationsFamiliales", + "conditions_hors_âge"], temp_conditions_hors_age) try: - def local_var_78(param_79: Enfant): + def temp_droit_ouvert(param_1: Enfant): try: - def local_var_98(_: Any): + def temp_droit_ouvert_1(_: Any): return False - def local_var_96(_: Any): - return log_decision_taken(SourcePosition(filename="./prologue.catala_fr", - start_line=65, start_column=10, - end_line=65, end_column=22, - law_headings=["Prologue"]), True) - - def local_var_86(_: Any): - try: - match_arg_543 = param_79.obligation_scolaire - if match_arg_543.code == SituationObligationScolaire_Code.Avant: - _ = match_arg_543.value - local_var_92 = False - elif match_arg_543.code == SituationObligationScolaire_Code.Pendant: - _ = match_arg_543.value - local_var_92 = True - elif match_arg_543.code == SituationObligationScolaire_Code.Apres: - _ = match_arg_543.value - local_var_92 = False - match_arg_544 = param_79.obligation_scolaire - if match_arg_544.code == SituationObligationScolaire_Code.Avant: - _ = match_arg_544.value - local_var_88 = True - elif match_arg_544.code == SituationObligationScolaire_Code.Pendant: - _ = match_arg_544.value - local_var_88 = False - elif match_arg_544.code == SituationObligationScolaire_Code.Apres: - _ = match_arg_544.value - local_var_88 = False - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=49, start_column=5, - end_line=50, end_column=50, - law_headings=["Article L512-3", - "Chapitre 2 : Champ d'application", - "Titre 1 : Champ d'application - Généralités", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), (local_var_88 or - local_var_92)): - return True - else: - raise EmptyError - except EmptyError: + def temp_droit_ouvert_2(_: Any): + return True + + def temp_droit_ouvert_3(_: Any): + match_arg_3 = param_1.obligation_scolaire + if match_arg_3.code == SituationObligationScolaire_Code.Avant: + _ = match_arg_3.value + temp_droit_ouvert_4 = False + elif match_arg_3.code == SituationObligationScolaire_Code.Pendant: + _ = match_arg_3.value + temp_droit_ouvert_4 = True + elif match_arg_3.code == SituationObligationScolaire_Code.Apres: + _ = match_arg_3.value + temp_droit_ouvert_4 = False + match_arg_4 = param_1.obligation_scolaire + if match_arg_4.code == SituationObligationScolaire_Code.Avant: + _ = match_arg_4.value + temp_droit_ouvert_5 = True + elif match_arg_4.code == SituationObligationScolaire_Code.Pendant: + _ = match_arg_4.value + temp_droit_ouvert_5 = False + elif match_arg_4.code == SituationObligationScolaire_Code.Apres: + _ = match_arg_4.value + temp_droit_ouvert_5 = False + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=49, start_column=5, + end_line=50, end_column=50, + law_headings=["Article L512-3", + "Chapitre 2 : Champ d'application", + "Titre 1 : Champ d'application - Généralités", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), (temp_droit_ouvert_5 or + temp_droit_ouvert_4)): + return True + else: raise EmptyError - def local_var_80(_: Any): - try: - match_arg_545 = param_79.obligation_scolaire - if match_arg_545.code == SituationObligationScolaire_Code.Avant: - _ = match_arg_545.value - local_var_82 = False - elif match_arg_545.code == SituationObligationScolaire_Code.Pendant: - _ = match_arg_545.value - local_var_82 = False - elif match_arg_545.code == SituationObligationScolaire_Code.Apres: - _ = match_arg_545.value - local_var_82 = True - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=60, start_column=5, - end_line=62, end_column=32, - law_headings=["Article L512-3", - "Chapitre 2 : Champ d'application", - "Titre 1 : Champ d'application - Généralités", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), (local_var_82 and - ((param_79.remuneration_mensuelle <= - plafond_l512_3_2_60) and (param_79.age < - age_l512_3_2_36)))): - return True - else: - raise EmptyError - except EmptyError: + def temp_droit_ouvert_6(_: Any): + match_arg_5 = param_1.obligation_scolaire + if match_arg_5.code == SituationObligationScolaire_Code.Avant: + _ = match_arg_5.value + temp_droit_ouvert_7 = False + elif match_arg_5.code == SituationObligationScolaire_Code.Pendant: + _ = match_arg_5.value + temp_droit_ouvert_7 = False + elif match_arg_5.code == SituationObligationScolaire_Code.Apres: + _ = match_arg_5.value + temp_droit_ouvert_7 = True + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=60, start_column=5, + end_line=62, end_column=32, + law_headings=["Article L512-3", + "Chapitre 2 : Champ d'application", + "Titre 1 : Champ d'application - Généralités", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), (temp_droit_ouvert_7 and + ((param_1.remuneration_mensuelle <= + plafond_l512_3_2) and (param_1.age < + age_l512_3_2)))): + return True + else: raise EmptyError - return handle_default([local_var_80, local_var_86], - local_var_96, local_var_98) + return handle_default([temp_droit_ouvert_6, + temp_droit_ouvert_3], + temp_droit_ouvert_2, + temp_droit_ouvert_1) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=65, @@ -1048,208 +976,192 @@ def local_var_80(_: Any): start_line=65, start_column=10, end_line=65, end_column=22, law_headings=["Prologue"])) - droit_ouvert_77 = log_variable_definition(["PrestationsFamiliales", - "droit_ouvert"], local_var_78) - return PrestationsFamilialesOut(droit_ouvert_out=droit_ouvert_77, - conditions_hors_age_out=conditions_hors_age_62, - age_l512_3_2_out=age_l512_3_2_36, - regime_outre_mer_l751_1_out=regime_outre_mer_l751_1_58, - base_mensuelle_out=base_mensuelle_38) - - -def allocations_familiales(allocations_familiales_in_100: AllocationsFamilialesIn): - personne_charge_effective_permanente_est_parent_101 = allocations_familiales_in_100.personne_charge_effective_permanente_est_parent_in - personne_charge_effective_permanente_remplit_titre__i_102 = allocations_familiales_in_100.personne_charge_effective_permanente_remplit_titre_I_in - ressources_menage_103 = allocations_familiales_in_100.ressources_menage_in - residence_104 = allocations_familiales_in_100.residence_in - date_courante_105 = allocations_familiales_in_100.date_courante_in - enfants_a_charge_106 = allocations_familiales_in_100.enfants_a_charge_in - avait_enfant_a_charge_avant_1er_janvier_2012_107 = allocations_familiales_in_100.avait_enfant_a_charge_avant_1er_janvier_2012_in + droit_ouvert = log_variable_definition(["PrestationsFamiliales", + "droit_ouvert"], temp_droit_ouvert) + return PrestationsFamilialesOut(droit_ouvert_out=droit_ouvert, + conditions_hors_age_out=conditions_hors_age, + age_l512_3_2_out=age_l512_3_2, + regime_outre_mer_l751_1_out=regime_outre_mer_l751_1, + base_mensuelle_out=base_mensuelle) + + +def allocations_familiales(allocations_familiales_in: AllocationsFamilialesIn): + personne_charge_effective_permanente_est_parent = allocations_familiales_in.personne_charge_effective_permanente_est_parent_in + personne_charge_effective_permanente_remplit_titre__i = allocations_familiales_in.personne_charge_effective_permanente_remplit_titre_I_in + ressources_menage = allocations_familiales_in.ressources_menage_in + residence_2 = allocations_familiales_in.residence_in + date_courante_2 = allocations_familiales_in.date_courante_in + enfants_a_charge = allocations_familiales_in.enfants_a_charge_in + avait_enfant_a_charge_avant_1er_janvier_2012 = allocations_familiales_in.avait_enfant_a_charge_avant_1er_janvier_2012_in try: - def local_var_109(param_110: Enfant): + def temp_prise_en_compte(param_2: Enfant): try: - def local_var_153(_: Any): - raise EmptyError - - def local_var_151(_: Any): - return log_decision_taken(SourcePosition(filename="./prologue.catala_fr", - start_line=102, start_column=11, - end_line=102, end_column=26, - law_headings=["Prologue"]), True) - - def local_var_143(_: Any): - try: - match_arg_546 = param_110.prise_en_charge - if match_arg_546.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: - _ = match_arg_546.value - local_var_145 = False - elif match_arg_546.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: - _ = match_arg_546.value - local_var_145 = False - elif match_arg_546.code == PriseEnCharge_Code.EffectiveEtPermanente: - _ = match_arg_546.value - local_var_145 = True - elif match_arg_546.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: - _ = match_arg_546.value - local_var_145 = False - elif match_arg_546.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: - _ = match_arg_546.value - local_var_145 = False - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=184, start_column=5, - end_line=184, end_column=60, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_145): - return PriseEnCompte(PriseEnCompte_Code.Complete, - Unit()) - else: - raise EmptyError - except EmptyError: + def temp_prise_en_compte_1(_: Any): + raise EmptyError + + def temp_prise_en_compte_2(_: Any): + return True + + def temp_prise_en_compte_3(_: Any): + match_arg_6 = param_2.prise_en_charge + if match_arg_6.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: + _ = match_arg_6.value + temp_prise_en_compte_4 = False + elif match_arg_6.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: + _ = match_arg_6.value + temp_prise_en_compte_4 = False + elif match_arg_6.code == PriseEnCharge_Code.EffectiveEtPermanente: + _ = match_arg_6.value + temp_prise_en_compte_4 = True + elif match_arg_6.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: + _ = match_arg_6.value + temp_prise_en_compte_4 = False + elif match_arg_6.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: + _ = match_arg_6.value + temp_prise_en_compte_4 = False + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=184, start_column=5, + end_line=184, end_column=60, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), temp_prise_en_compte_4): + return PriseEnCompte(PriseEnCompte_Code.Complete, + Unit()) + else: raise EmptyError - def local_var_135(_: Any): - try: - match_arg_547 = param_110.prise_en_charge - if match_arg_547.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: - _ = match_arg_547.value - local_var_137 = False - elif match_arg_547.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: - _ = match_arg_547.value - local_var_137 = True - elif match_arg_547.code == PriseEnCharge_Code.EffectiveEtPermanente: - _ = match_arg_547.value - local_var_137 = False - elif match_arg_547.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: - _ = match_arg_547.value - local_var_137 = False - elif match_arg_547.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: - _ = match_arg_547.value - local_var_137 = False - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=204, start_column=5, - end_line=204, end_column=69, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_137): - return PriseEnCompte(PriseEnCompte_Code.Complete, - Unit()) - else: - raise EmptyError - except EmptyError: + def temp_prise_en_compte_5(_: Any): + match_arg_7 = param_2.prise_en_charge + if match_arg_7.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: + _ = match_arg_7.value + temp_prise_en_compte_6 = False + elif match_arg_7.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: + _ = match_arg_7.value + temp_prise_en_compte_6 = True + elif match_arg_7.code == PriseEnCharge_Code.EffectiveEtPermanente: + _ = match_arg_7.value + temp_prise_en_compte_6 = False + elif match_arg_7.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: + _ = match_arg_7.value + temp_prise_en_compte_6 = False + elif match_arg_7.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: + _ = match_arg_7.value + temp_prise_en_compte_6 = False + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=204, start_column=5, + end_line=204, end_column=69, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), temp_prise_en_compte_6): + return PriseEnCompte(PriseEnCompte_Code.Complete, + Unit()) + else: raise EmptyError - def local_var_127(_: Any): - try: - match_arg_548 = param_110.prise_en_charge - if match_arg_548.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: - _ = match_arg_548.value - local_var_129 = True - elif match_arg_548.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: - _ = match_arg_548.value - local_var_129 = False - elif match_arg_548.code == PriseEnCharge_Code.EffectiveEtPermanente: - _ = match_arg_548.value - local_var_129 = False - elif match_arg_548.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: - _ = match_arg_548.value - local_var_129 = False - elif match_arg_548.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: - _ = match_arg_548.value - local_var_129 = False - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=214, start_column=5, - end_line=214, end_column=70, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_129): - return PriseEnCompte(PriseEnCompte_Code.Partagee, - Unit()) - else: - raise EmptyError - except EmptyError: + def temp_prise_en_compte_7(_: Any): + match_arg_8 = param_2.prise_en_charge + if match_arg_8.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: + _ = match_arg_8.value + temp_prise_en_compte_8 = True + elif match_arg_8.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: + _ = match_arg_8.value + temp_prise_en_compte_8 = False + elif match_arg_8.code == PriseEnCharge_Code.EffectiveEtPermanente: + _ = match_arg_8.value + temp_prise_en_compte_8 = False + elif match_arg_8.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: + _ = match_arg_8.value + temp_prise_en_compte_8 = False + elif match_arg_8.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: + _ = match_arg_8.value + temp_prise_en_compte_8 = False + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=214, start_column=5, + end_line=214, end_column=70, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), temp_prise_en_compte_8): + return PriseEnCompte(PriseEnCompte_Code.Partagee, + Unit()) + else: raise EmptyError - def local_var_119(_: Any): - try: - match_arg_549 = param_110.prise_en_charge - if match_arg_549.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: - _ = match_arg_549.value - local_var_121 = False - elif match_arg_549.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: - _ = match_arg_549.value - local_var_121 = False - elif match_arg_549.code == PriseEnCharge_Code.EffectiveEtPermanente: - _ = match_arg_549.value - local_var_121 = False - elif match_arg_549.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: - _ = match_arg_549.value - local_var_121 = False - elif match_arg_549.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: - _ = match_arg_549.value - local_var_121 = True - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=253, start_column=5, - end_line=254, end_column=56, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_121): - return PriseEnCompte(PriseEnCompte_Code.Zero, - Unit()) - else: - raise EmptyError - except EmptyError: + def temp_prise_en_compte_9(_: Any): + match_arg_9 = param_2.prise_en_charge + if match_arg_9.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: + _ = match_arg_9.value + temp_prise_en_compte_10 = False + elif match_arg_9.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: + _ = match_arg_9.value + temp_prise_en_compte_10 = False + elif match_arg_9.code == PriseEnCharge_Code.EffectiveEtPermanente: + _ = match_arg_9.value + temp_prise_en_compte_10 = False + elif match_arg_9.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: + _ = match_arg_9.value + temp_prise_en_compte_10 = False + elif match_arg_9.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: + _ = match_arg_9.value + temp_prise_en_compte_10 = True + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=253, start_column=5, + end_line=254, end_column=56, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), temp_prise_en_compte_10): + return PriseEnCompte(PriseEnCompte_Code.Zero, Unit()) + else: raise EmptyError - def local_var_111(_: Any): - try: - match_arg_550 = param_110.prise_en_charge - if match_arg_550.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: - _ = match_arg_550.value - local_var_113 = False - elif match_arg_550.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: - _ = match_arg_550.value - local_var_113 = False - elif match_arg_550.code == PriseEnCharge_Code.EffectiveEtPermanente: - _ = match_arg_550.value - local_var_113 = False - elif match_arg_550.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: - _ = match_arg_550.value - local_var_113 = True - elif match_arg_550.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: - _ = match_arg_550.value - local_var_113 = False - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=263, start_column=5, - end_line=264, end_column=48, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_113): - return PriseEnCompte(PriseEnCompte_Code.Complete, - Unit()) - else: - raise EmptyError - except EmptyError: + def temp_prise_en_compte_11(_: Any): + match_arg_10 = param_2.prise_en_charge + if match_arg_10.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: + _ = match_arg_10.value + temp_prise_en_compte_12 = False + elif match_arg_10.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: + _ = match_arg_10.value + temp_prise_en_compte_12 = False + elif match_arg_10.code == PriseEnCharge_Code.EffectiveEtPermanente: + _ = match_arg_10.value + temp_prise_en_compte_12 = False + elif match_arg_10.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: + _ = match_arg_10.value + temp_prise_en_compte_12 = True + elif match_arg_10.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: + _ = match_arg_10.value + temp_prise_en_compte_12 = False + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=263, start_column=5, + end_line=264, end_column=48, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), temp_prise_en_compte_12): + return PriseEnCompte(PriseEnCompte_Code.Complete, + Unit()) + else: raise EmptyError - return handle_default([local_var_111, local_var_119, - local_var_127, local_var_135, - local_var_143], local_var_151, - local_var_153) + return handle_default([temp_prise_en_compte_11, + temp_prise_en_compte_9, + temp_prise_en_compte_7, + temp_prise_en_compte_5, + temp_prise_en_compte_3], + temp_prise_en_compte_2, + temp_prise_en_compte_1) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=102, @@ -1262,193 +1174,175 @@ def local_var_111(_: Any): start_line=102, start_column=11, end_line=102, end_column=26, law_headings=["Prologue"])) - prise_en_compte_108 = log_variable_definition(["AllocationsFamiliales", - "prise_en_compte"], local_var_109) + prise_en_compte = log_variable_definition(["AllocationsFamiliales", + "prise_en_compte"], temp_prise_en_compte) try: - def local_var_156(param_157: Enfant): + def temp_versement(param_3: Enfant): try: - def local_var_200(_: Any): - raise EmptyError - - def local_var_198(_: Any): - return log_decision_taken(SourcePosition(filename="./prologue.catala_fr", - start_line=103, start_column=11, - end_line=103, end_column=20, - law_headings=["Prologue"]), True) - - def local_var_190(_: Any): - try: - match_arg_551 = param_157.prise_en_charge - if match_arg_551.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: - _ = match_arg_551.value - local_var_192 = False - elif match_arg_551.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: - _ = match_arg_551.value - local_var_192 = False - elif match_arg_551.code == PriseEnCharge_Code.EffectiveEtPermanente: - _ = match_arg_551.value - local_var_192 = True - elif match_arg_551.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: - _ = match_arg_551.value - local_var_192 = False - elif match_arg_551.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: - _ = match_arg_551.value - local_var_192 = False - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=188, start_column=5, - end_line=188, end_column=60, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_192): - return VersementAllocations(VersementAllocations_Code.Normal, - Unit()) - else: - raise EmptyError - except EmptyError: + def temp_versement_1(_: Any): + raise EmptyError + + def temp_versement_2(_: Any): + return True + + def temp_versement_3(_: Any): + match_arg_11 = param_3.prise_en_charge + if match_arg_11.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: + _ = match_arg_11.value + temp_versement_4 = False + elif match_arg_11.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: + _ = match_arg_11.value + temp_versement_4 = False + elif match_arg_11.code == PriseEnCharge_Code.EffectiveEtPermanente: + _ = match_arg_11.value + temp_versement_4 = True + elif match_arg_11.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: + _ = match_arg_11.value + temp_versement_4 = False + elif match_arg_11.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: + _ = match_arg_11.value + temp_versement_4 = False + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=188, start_column=5, + end_line=188, end_column=60, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), temp_versement_4): + return VersementAllocations(VersementAllocations_Code.Normal, + Unit()) + else: raise EmptyError - def local_var_182(_: Any): - try: - match_arg_552 = param_157.prise_en_charge - if match_arg_552.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: - _ = match_arg_552.value - local_var_184 = False - elif match_arg_552.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: - _ = match_arg_552.value - local_var_184 = True - elif match_arg_552.code == PriseEnCharge_Code.EffectiveEtPermanente: - _ = match_arg_552.value - local_var_184 = False - elif match_arg_552.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: - _ = match_arg_552.value - local_var_184 = False - elif match_arg_552.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: - _ = match_arg_552.value - local_var_184 = False - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=208, start_column=5, - end_line=208, end_column=69, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_184): - return VersementAllocations(VersementAllocations_Code.Normal, - Unit()) - else: - raise EmptyError - except EmptyError: + def temp_versement_5(_: Any): + match_arg_12 = param_3.prise_en_charge + if match_arg_12.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: + _ = match_arg_12.value + temp_versement_6 = False + elif match_arg_12.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: + _ = match_arg_12.value + temp_versement_6 = True + elif match_arg_12.code == PriseEnCharge_Code.EffectiveEtPermanente: + _ = match_arg_12.value + temp_versement_6 = False + elif match_arg_12.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: + _ = match_arg_12.value + temp_versement_6 = False + elif match_arg_12.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: + _ = match_arg_12.value + temp_versement_6 = False + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=208, start_column=5, + end_line=208, end_column=69, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), temp_versement_6): + return VersementAllocations(VersementAllocations_Code.Normal, + Unit()) + else: raise EmptyError - def local_var_174(_: Any): - try: - match_arg_553 = param_157.prise_en_charge - if match_arg_553.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: - _ = match_arg_553.value - local_var_176 = True - elif match_arg_553.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: - _ = match_arg_553.value - local_var_176 = False - elif match_arg_553.code == PriseEnCharge_Code.EffectiveEtPermanente: - _ = match_arg_553.value - local_var_176 = False - elif match_arg_553.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: - _ = match_arg_553.value - local_var_176 = False - elif match_arg_553.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: - _ = match_arg_553.value - local_var_176 = False - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=218, start_column=5, - end_line=218, end_column=70, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_176): - return VersementAllocations(VersementAllocations_Code.Normal, - Unit()) - else: - raise EmptyError - except EmptyError: + def temp_versement_7(_: Any): + match_arg_13 = param_3.prise_en_charge + if match_arg_13.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: + _ = match_arg_13.value + temp_versement_8 = True + elif match_arg_13.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: + _ = match_arg_13.value + temp_versement_8 = False + elif match_arg_13.code == PriseEnCharge_Code.EffectiveEtPermanente: + _ = match_arg_13.value + temp_versement_8 = False + elif match_arg_13.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: + _ = match_arg_13.value + temp_versement_8 = False + elif match_arg_13.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: + _ = match_arg_13.value + temp_versement_8 = False + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=218, start_column=5, + end_line=218, end_column=70, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), temp_versement_8): + return VersementAllocations(VersementAllocations_Code.Normal, + Unit()) + else: raise EmptyError - def local_var_166(_: Any): - try: - match_arg_554 = param_157.prise_en_charge - if match_arg_554.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: - _ = match_arg_554.value - local_var_168 = False - elif match_arg_554.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: - _ = match_arg_554.value - local_var_168 = False - elif match_arg_554.code == PriseEnCharge_Code.EffectiveEtPermanente: - _ = match_arg_554.value - local_var_168 = False - elif match_arg_554.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: - _ = match_arg_554.value - local_var_168 = False - elif match_arg_554.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: - _ = match_arg_554.value - local_var_168 = True - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=258, start_column=5, - end_line=259, end_column=56, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_168): - return VersementAllocations(VersementAllocations_Code.AllocationVerseeAuxServicesSociaux, - Unit()) - else: - raise EmptyError - except EmptyError: + def temp_versement_9(_: Any): + match_arg_14 = param_3.prise_en_charge + if match_arg_14.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: + _ = match_arg_14.value + temp_versement_10 = False + elif match_arg_14.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: + _ = match_arg_14.value + temp_versement_10 = False + elif match_arg_14.code == PriseEnCharge_Code.EffectiveEtPermanente: + _ = match_arg_14.value + temp_versement_10 = False + elif match_arg_14.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: + _ = match_arg_14.value + temp_versement_10 = False + elif match_arg_14.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: + _ = match_arg_14.value + temp_versement_10 = True + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=258, start_column=5, + end_line=259, end_column=56, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), temp_versement_10): + return VersementAllocations(VersementAllocations_Code.AllocationVerseeAuxServicesSociaux, + Unit()) + else: raise EmptyError - def local_var_158(_: Any): - try: - match_arg_555 = param_157.prise_en_charge - if match_arg_555.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: - _ = match_arg_555.value - local_var_160 = False - elif match_arg_555.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: - _ = match_arg_555.value - local_var_160 = False - elif match_arg_555.code == PriseEnCharge_Code.EffectiveEtPermanente: - _ = match_arg_555.value - local_var_160 = False - elif match_arg_555.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: - _ = match_arg_555.value - local_var_160 = True - elif match_arg_555.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: - _ = match_arg_555.value - local_var_160 = False - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=269, start_column=5, - end_line=270, end_column=48, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_160): - return VersementAllocations(VersementAllocations_Code.Normal, - Unit()) - else: - raise EmptyError - except EmptyError: + def temp_versement_11(_: Any): + match_arg_15 = param_3.prise_en_charge + if match_arg_15.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: + _ = match_arg_15.value + temp_versement_12 = False + elif match_arg_15.code == PriseEnCharge_Code.GardeAlterneeAllocataireUnique: + _ = match_arg_15.value + temp_versement_12 = False + elif match_arg_15.code == PriseEnCharge_Code.EffectiveEtPermanente: + _ = match_arg_15.value + temp_versement_12 = False + elif match_arg_15.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeALaFamille: + _ = match_arg_15.value + temp_versement_12 = True + elif match_arg_15.code == PriseEnCharge_Code.ServicesSociauxAllocationVerseeAuxServicesSociaux: + _ = match_arg_15.value + temp_versement_12 = False + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=269, start_column=5, + end_line=270, end_column=48, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), temp_versement_12): + return VersementAllocations(VersementAllocations_Code.Normal, + Unit()) + else: raise EmptyError - return handle_default([local_var_158, local_var_166, - local_var_174, local_var_182, - local_var_190], local_var_198, - local_var_200) + return handle_default([temp_versement_11, temp_versement_9, + temp_versement_7, temp_versement_5, + temp_versement_3], temp_versement_2, + temp_versement_1) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=103, @@ -1461,141 +1355,118 @@ def local_var_158(_: Any): start_line=103, start_column=11, end_line=103, end_column=20, law_headings=["Prologue"])) - versement_155 = log_variable_definition(["AllocationsFamiliales", - "versement"], local_var_156) + versement = log_variable_definition(["AllocationsFamiliales", + "versement"], temp_versement) try: - local_var_203 = integer_of_string("3") + temp_nombre_enfants_l521_1 = integer_of_string("3") except EmptyError: - raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=151, start_column=11, - end_line=151, end_column=32, - law_headings=["Prologue"])) - nombre_enfants_l521_1_202 = log_variable_definition(["AllocationsFamiliales", - "nombre_enfants_l521_1"], local_var_203) + raise NoValueProvided(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=288, start_column=43, + end_line=288, end_column=44, + law_headings=["Article D521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"])) + nombre_enfants_l521_1 = log_variable_definition(["AllocationsFamiliales", + "nombre_enfants_l521_1"], temp_nombre_enfants_l521_1) try: - local_var_205 = integer_of_string("3") + temp_nombre_enfants_alinea_2_l521_3 = integer_of_string("3") except EmptyError: - raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=153, start_column=11, - end_line=153, end_column=41, - law_headings=["Prologue"])) - nombre_enfants_alinea_2_l521_3_204 = log_variable_definition(["AllocationsFamiliales", - "nombre_enfants_alinéa_2_l521_3"], local_var_205) - result_206 = log_end_call(["AllocationsFamiliales", "version_avril_2008", - "AllocationFamilialesAvril2008"], - log_begin_call(["AllocationsFamiliales", "version_avril_2008", - "AllocationFamilialesAvril2008"], allocation_familiales_avril2008, - AllocationFamilialesAvril2008In())) - version_avril_2008_dot_age_minimum_alinea_1_l521_3_207 = result_206.age_minimum_alinea_1_l521_3_out + raise NoValueProvided(SourcePosition(filename="./securite_sociale_R.catala_fr", + start_line=64, start_column=52, + end_line=64, end_column=53, + law_headings=["Article R521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets en Conseil d'Etat", + "Code de la sécurité sociale"])) + nombre_enfants_alinea_2_l521_3 = log_variable_definition(["AllocationsFamiliales", + "nombre_enfants_alinéa_2_l521_3"], + temp_nombre_enfants_alinea_2_l521_3) + result_1 = log_end_call(["AllocationsFamiliales", "version_avril_2008", + "AllocationFamilialesAvril2008"], + log_begin_call(["AllocationsFamiliales", "version_avril_2008", + "AllocationFamilialesAvril2008"], allocation_familiales_avril2008, + AllocationFamilialesAvril2008In())) + version_avril_2008_dot_age_minimum_alinea_1_l521_3 = result_1.age_minimum_alinea_1_l521_3_out try: - try: - try: - local_var_210 = date_courante_105 - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError - local_var_209 = log_variable_definition(["AllocationsFamiliales", - "prestations_familiales.date_courante"], local_var_210) + temp_prestations_familiales_dot_date_courante = log_variable_definition(["AllocationsFamiliales", + "prestations_familiales.date_courante"], date_courante_2) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=70, start_column=10, - end_line=70, end_column=23, + start_line=146, start_column=3, + end_line=146, end_column=25, law_headings=["Prologue"])) - prestations_familiales_dot_date_courante_208 = local_var_209 + prestations_familiales_dot_date_courante = temp_prestations_familiales_dot_date_courante try: - try: - try: - local_var_213 = ElementPrestationsFamiliales(ElementPrestationsFamiliales_Code.AllocationsFamiliales, - Unit()) - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError - local_var_212 = log_variable_definition(["AllocationsFamiliales", - "prestations_familiales.prestation_courante"], local_var_213) + temp_prestations_familiales_dot_prestation_courante = log_variable_definition(["AllocationsFamiliales", + "prestations_familiales.prestation_courante"], + ElementPrestationsFamiliales(ElementPrestationsFamiliales_Code.AllocationsFamiliales, + Unit())) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=71, start_column=10, - end_line=71, end_column=29, + start_line=146, start_column=3, + end_line=146, end_column=25, law_headings=["Prologue"])) - prestations_familiales_dot_prestation_courante_211 = local_var_212 + prestations_familiales_dot_prestation_courante = temp_prestations_familiales_dot_prestation_courante try: - try: - try: - local_var_216 = residence_104 - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError - local_var_215 = log_variable_definition(["AllocationsFamiliales", - "prestations_familiales.résidence"], local_var_216) + temp_prestations_familiales_dot_residence = log_variable_definition(["AllocationsFamiliales", + "prestations_familiales.résidence"], residence_2) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=72, start_column=10, - end_line=72, end_column=19, + start_line=146, start_column=3, + end_line=146, end_column=25, law_headings=["Prologue"])) - prestations_familiales_dot_residence_214 = local_var_215 - result_217 = log_end_call(["AllocationsFamiliales", - "prestations_familiales", "PrestationsFamiliales"], - log_begin_call(["AllocationsFamiliales", "prestations_familiales", - "PrestationsFamiliales"], prestations_familiales, - PrestationsFamilialesIn(date_courante_in=prestations_familiales_dot_date_courante_208, - prestation_courante_in=prestations_familiales_dot_prestation_courante_211, - residence_in=prestations_familiales_dot_residence_214))) - prestations_familiales_dot_droit_ouvert_218 = result_217.droit_ouvert_out - prestations_familiales_dot_conditions_hors_age_219 = result_217.conditions_hors_age_out - prestations_familiales_dot_age_l512_3_2_220 = result_217.age_l512_3_2_out - prestations_familiales_dot_regime_outre_mer_l751_1_221 = result_217.regime_outre_mer_l751_1_out - prestations_familiales_dot_base_mensuelle_222 = result_217.base_mensuelle_out + prestations_familiales_dot_residence = temp_prestations_familiales_dot_residence + result_2 = log_end_call(["AllocationsFamiliales", + "prestations_familiales", "PrestationsFamiliales"], + log_begin_call(["AllocationsFamiliales", "prestations_familiales", + "PrestationsFamiliales"], prestations_familiales, + PrestationsFamilialesIn(date_courante_in=prestations_familiales_dot_date_courante, + prestation_courante_in=prestations_familiales_dot_prestation_courante, + residence_in=prestations_familiales_dot_residence))) + prestations_familiales_dot_droit_ouvert = result_2.droit_ouvert_out + prestations_familiales_dot_conditions_hors_age = result_2.conditions_hors_age_out + prestations_familiales_dot_age_l512_3_2 = result_2.age_l512_3_2_out + prestations_familiales_dot_regime_outre_mer_l751_1 = result_2.regime_outre_mer_l751_1_out + prestations_familiales_dot_base_mensuelle = result_2.base_mensuelle_out try: - try: - try: - local_var_225 = enfants_a_charge_106 - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError - local_var_224 = log_variable_definition(["AllocationsFamiliales", - "enfant_le_plus_âgé.enfants"], local_var_225) + temp_enfant_le_plus_age_dot_enfants = log_variable_definition(["AllocationsFamiliales", + "enfant_le_plus_âgé.enfants"], enfants_a_charge) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=84, start_column=10, - end_line=84, end_column=17, + start_line=148, start_column=3, + end_line=148, end_column=21, law_headings=["Prologue"])) - enfant_le_plus_age_dot_enfants_223 = local_var_224 - result_226 = log_end_call(["AllocationsFamiliales", - "enfant_le_plus_âgé", "EnfantLePlusÂgé"], - log_begin_call(["AllocationsFamiliales", "enfant_le_plus_âgé", - "EnfantLePlusÂgé"], enfant_le_plus_age, - EnfantLePlusAgeIn(enfants_in=enfant_le_plus_age_dot_enfants_223))) - enfant_le_plus_age_dot_le_plus_age_227 = result_226.le_plus_age_out + enfant_le_plus_age_dot_enfants = temp_enfant_le_plus_age_dot_enfants + result_3 = log_end_call(["AllocationsFamiliales", "enfant_le_plus_âgé", + "EnfantLePlusÂgé"], log_begin_call(["AllocationsFamiliales", + "enfant_le_plus_âgé", "EnfantLePlusÂgé"], enfant_le_plus_age, + EnfantLePlusAgeIn(enfants_in=enfant_le_plus_age_dot_enfants))) + enfant_le_plus_age_dot_le_plus_age = result_3.le_plus_age_out try: - def local_var_229(param_230: Enfant): + def temp_age_minimum_alinea_1_l521_3_1(param_4: Enfant): try: try: - try: - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_R.catala_fr", - start_line=83, start_column=19, - end_line=83, end_column=69, - law_headings=["Article R521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets en Conseil d'Etat", - "Code de la sécurité sociale"]), ((param_230.date_de_naissance + - duration_of_numbers(11, 0, 0)) <= - date_of_numbers(2008, 4, 30))): - return version_avril_2008_dot_age_minimum_alinea_1_l521_3_207 - else: - raise EmptyError - except EmptyError: - raise EmptyError - except EmptyError: - return integer_of_string("14") + if log_decision_taken(SourcePosition(filename="./securite_sociale_R.catala_fr", + start_line=83, start_column=19, + end_line=83, end_column=69, + law_headings=["Article R521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets en Conseil d'Etat", + "Code de la sécurité sociale"]), ((param_4.date_de_naissance + + duration_of_numbers(11, 0, 0)) <= + date_of_numbers(2008, 4, 30))): + return version_avril_2008_dot_age_minimum_alinea_1_l521_3 + else: + raise EmptyError except EmptyError: - raise EmptyError + return integer_of_string("14") except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=152, @@ -1608,46 +1479,31 @@ def local_var_229(param_230: Enfant): start_line=152, start_column=11, end_line=152, end_column=38, law_headings=["Prologue"])) - age_minimum_alinea_1_l521_3_228 = log_variable_definition(["AllocationsFamiliales", - "âge_minimum_alinéa_1_l521_3"], local_var_229) + age_minimum_alinea_1_l521_3_1 = log_variable_definition(["AllocationsFamiliales", + "âge_minimum_alinéa_1_l521_3"], temp_age_minimum_alinea_1_l521_3_1) try: - try: - try: - def local_var_233(enfant_234: Any): - return log_end_call(["PrestationsFamiliales", - "droit_ouvert"], - log_variable_definition(["PrestationsFamiliales", - "droit_ouvert", "output"], - log_begin_call(["PrestationsFamiliales", - "droit_ouvert"], - prestations_familiales_dot_droit_ouvert_218, - log_variable_definition(["PrestationsFamiliales", - "droit_ouvert", "input"], enfant_234)))) - local_var_232 = list_filter(local_var_233, - enfants_a_charge_106) - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_enfants_a_charge_droit_ouvert_prestation_familiale(enfant: Any): + return log_end_call(["PrestationsFamiliales", "droit_ouvert"], + log_variable_definition(["PrestationsFamiliales", + "droit_ouvert", "output"], + log_begin_call(["PrestationsFamiliales", "droit_ouvert"], + prestations_familiales_dot_droit_ouvert, + log_variable_definition(["PrestationsFamiliales", + "droit_ouvert", "input"], enfant)))) + temp_enfants_a_charge_droit_ouvert_prestation_familiale_1 = list_filter(temp_enfants_a_charge_droit_ouvert_prestation_familiale, + enfants_a_charge) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=100, start_column=11, end_line=100, end_column=61, law_headings=["Prologue"])) - enfants_a_charge_droit_ouvert_prestation_familiale_231 = log_variable_definition(["AllocationsFamiliales", - "enfants_à_charge_droit_ouvert_prestation_familiale"], - local_var_232) + enfants_a_charge_droit_ouvert_prestation_familiale = log_variable_definition(["AllocationsFamiliales", + "enfants_à_charge_droit_ouvert_prestation_familiale"], + temp_enfants_a_charge_droit_ouvert_prestation_familiale_1) try: - def local_var_236(param_237: Enfant): + def temp_est_enfant_le_plus_age(param_5: Enfant): try: - try: - try: - return (enfant_le_plus_age_dot_le_plus_age_227 == - param_237) - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError + return (enfant_le_plus_age_dot_le_plus_age == param_5) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=154, @@ -1660,290 +1516,237 @@ def local_var_236(param_237: Enfant): start_line=154, start_column=11, end_line=154, end_column=33, law_headings=["Prologue"])) - est_enfant_le_plus_age_235 = log_variable_definition(["AllocationsFamiliales", - "est_enfant_le_plus_âgé"], local_var_236) + est_enfant_le_plus_age = log_variable_definition(["AllocationsFamiliales", + "est_enfant_le_plus_âgé"], temp_est_enfant_le_plus_age) try: - try: - def local_var_250(_: Any): - try: - return (money_of_cents_string("7830000") + - (money_of_cents_string("559500") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231)))) - except EmptyError: - raise EmptyError - - def local_var_248(_: Any): - return log_decision_taken(SourcePosition(filename="./prologue.catala_fr", - start_line=156, start_column=11, - end_line=156, end_column=28, - law_headings=["Prologue"]), True) - - def local_var_246(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=94, start_column=5, - end_line=94, end_column=69, - law_headings=["Circulaire interministérielle N° DSS/SD2B/2017/352 du 22 décembre 2017 relative à la revalorisation au 1er janvier 2018 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", - "Montant des plafonds de ressources", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2018, 1, 1)) and (date_courante_105 <= - date_of_numbers(2018, 12, 31)))): - return (money_of_cents_string("7877000") + - (money_of_cents_string("562800") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231)))) - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_plafond__i_i_d521_3(_: Any): + return (money_of_cents_string("7830000") + + (money_of_cents_string("559500") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale)))) + + def temp_plafond__i_i_d521_3_1(_: Any): + return True + + def temp_plafond__i_i_d521_3_2(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=94, start_column=5, end_line=94, end_column=69, + law_headings=["Circulaire interministérielle N° DSS/SD2B/2017/352 du 22 décembre 2017 relative à la revalorisation au 1er janvier 2018 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", + "Montant des plafonds de ressources", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2018, 1, 1)) and (date_courante_2 <= + date_of_numbers(2018, 12, 31)))): + return (money_of_cents_string("7877000") + + (money_of_cents_string("562800") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale)))) + else: + raise EmptyError - def local_var_244(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=127, start_column=5, - end_line=127, end_column=69, - law_headings=["Instruction interministérielle n° DSS/SD2B/2018/279 du 17 décembre 2018 relative à la revalorisation au 1er janvier 2019 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", - "Montant des plafonds de ressources", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2019, 1, 1)) and (date_courante_105 <= - date_of_numbers(2019, 12, 31)))): - return (money_of_cents_string("7955800") + - (money_of_cents_string("568400") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231)))) - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_plafond__i_i_d521_3_3(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=127, start_column=5, end_line=127, end_column=69, + law_headings=["Instruction interministérielle n° DSS/SD2B/2018/279 du 17 décembre 2018 relative à la revalorisation au 1er janvier 2019 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", + "Montant des plafonds de ressources", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2019, 1, 1)) and (date_courante_2 <= + date_of_numbers(2019, 12, 31)))): + return (money_of_cents_string("7955800") + + (money_of_cents_string("568400") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale)))) + else: + raise EmptyError - def local_var_242(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=160, start_column=5, - end_line=160, end_column=69, - law_headings=["Instruction interministerielle no DSS/SD2B/2019/261 du 18 décembre 2019 relative à la revalorisation au 1er janvier 2020 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à La Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", - "Montant des plafonds de ressources", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2020, 1, 1)) and (date_courante_105 <= - date_of_numbers(2020, 12, 31)))): - return (money_of_cents_string("8083100") + - (money_of_cents_string("577500") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231)))) - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_plafond__i_i_d521_3_4(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=160, start_column=5, end_line=160, end_column=69, + law_headings=["Instruction interministerielle no DSS/SD2B/2019/261 du 18 décembre 2019 relative à la revalorisation au 1er janvier 2020 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à La Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", + "Montant des plafonds de ressources", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2020, 1, 1)) and (date_courante_2 <= + date_of_numbers(2020, 12, 31)))): + return (money_of_cents_string("8083100") + + (money_of_cents_string("577500") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale)))) + else: + raise EmptyError - def local_var_240(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=196, start_column=5, - end_line=196, end_column=69, - law_headings=["Article 1", - "Arrêté du 14 décembre 2020 relatif au montant des plafonds de ressources de certaines prestations familiales et aux tranches du barème applicable au recouvrement des indus et à la saisie des prestations", - "Montant des plafonds de ressources", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2021, 1, 1)) and (date_courante_105 <= - date_of_numbers(2021, 12, 31)))): - return (money_of_cents_string("8155800") + - (money_of_cents_string("582700") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231)))) - else: - raise EmptyError - except EmptyError: - raise EmptyError - local_var_239 = handle_default([local_var_240, local_var_242, - local_var_244, local_var_246], - local_var_248, local_var_250) - except EmptyError: - raise EmptyError + def temp_plafond__i_i_d521_3_5(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=196, start_column=5, end_line=196, end_column=69, + law_headings=["Article 1", + "Arrêté du 14 décembre 2020 relatif au montant des plafonds de ressources de certaines prestations familiales et aux tranches du barème applicable au recouvrement des indus et à la saisie des prestations", + "Montant des plafonds de ressources", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2021, 1, 1)) and (date_courante_2 <= + date_of_numbers(2021, 12, 31)))): + return (money_of_cents_string("8155800") + + (money_of_cents_string("582700") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale)))) + else: + raise EmptyError + temp_plafond__i_i_d521_3_6 = handle_default([temp_plafond__i_i_d521_3_5, + temp_plafond__i_i_d521_3_4, + temp_plafond__i_i_d521_3_3, + temp_plafond__i_i_d521_3_2], + temp_plafond__i_i_d521_3_1, + temp_plafond__i_i_d521_3) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=156, start_column=11, end_line=156, end_column=28, law_headings=["Prologue"])) - plafond__i_i_d521_3_238 = log_variable_definition(["AllocationsFamiliales", - "plafond_II_d521_3"], local_var_239) + plafond__i_i_d521_3 = log_variable_definition(["AllocationsFamiliales", + "plafond_II_d521_3"], temp_plafond__i_i_d521_3_6) try: - try: - def local_var_264(_: Any): - try: - return (money_of_cents_string("5595000") + - (money_of_cents_string("559500") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231)))) - except EmptyError: - raise EmptyError - - def local_var_262(_: Any): - return log_decision_taken(SourcePosition(filename="./prologue.catala_fr", - start_line=155, start_column=11, - end_line=155, end_column=27, - law_headings=["Prologue"]), True) - - def local_var_260(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=87, start_column=5, - end_line=87, end_column=69, - law_headings=["Circulaire interministérielle N° DSS/SD2B/2017/352 du 22 décembre 2017 relative à la revalorisation au 1er janvier 2018 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", - "Montant des plafonds de ressources", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2018, 1, 1)) and (date_courante_105 <= - date_of_numbers(2018, 12, 31)))): - return (money_of_cents_string("5628600") + - (money_of_cents_string("562800") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231)))) - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_plafond__i_d521_3(_: Any): + return (money_of_cents_string("5595000") + + (money_of_cents_string("559500") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale)))) + + def temp_plafond__i_d521_3_1(_: Any): + return True + + def temp_plafond__i_d521_3_2(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=87, start_column=5, end_line=87, end_column=69, + law_headings=["Circulaire interministérielle N° DSS/SD2B/2017/352 du 22 décembre 2017 relative à la revalorisation au 1er janvier 2018 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", + "Montant des plafonds de ressources", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2018, 1, 1)) and (date_courante_2 <= + date_of_numbers(2018, 12, 31)))): + return (money_of_cents_string("5628600") + + (money_of_cents_string("562800") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale)))) + else: + raise EmptyError - def local_var_258(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=120, start_column=5, - end_line=120, end_column=69, - law_headings=["Instruction interministérielle n° DSS/SD2B/2018/279 du 17 décembre 2018 relative à la revalorisation au 1er janvier 2019 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", - "Montant des plafonds de ressources", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2019, 1, 1)) and (date_courante_105 <= - date_of_numbers(2019, 12, 31)))): - return (money_of_cents_string("5684900") + - (money_of_cents_string("568400") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231)))) - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_plafond__i_d521_3_3(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=120, start_column=5, end_line=120, end_column=69, + law_headings=["Instruction interministérielle n° DSS/SD2B/2018/279 du 17 décembre 2018 relative à la revalorisation au 1er janvier 2019 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", + "Montant des plafonds de ressources", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2019, 1, 1)) and (date_courante_2 <= + date_of_numbers(2019, 12, 31)))): + return (money_of_cents_string("5684900") + + (money_of_cents_string("568400") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale)))) + else: + raise EmptyError - def local_var_256(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=153, start_column=5, - end_line=153, end_column=69, - law_headings=["Instruction interministerielle no DSS/SD2B/2019/261 du 18 décembre 2019 relative à la revalorisation au 1er janvier 2020 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à La Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", - "Montant des plafonds de ressources", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2020, 1, 1)) and (date_courante_105 <= - date_of_numbers(2020, 12, 31)))): - return (money_of_cents_string("5775900") + - (money_of_cents_string("577500") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231)))) - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_plafond__i_d521_3_4(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=153, start_column=5, end_line=153, end_column=69, + law_headings=["Instruction interministerielle no DSS/SD2B/2019/261 du 18 décembre 2019 relative à la revalorisation au 1er janvier 2020 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à La Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", + "Montant des plafonds de ressources", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2020, 1, 1)) and (date_courante_2 <= + date_of_numbers(2020, 12, 31)))): + return (money_of_cents_string("5775900") + + (money_of_cents_string("577500") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale)))) + else: + raise EmptyError - def local_var_254(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=180, start_column=5, - end_line=180, end_column=69, - law_headings=["Article 1", - "Arrêté du 14 décembre 2020 relatif au montant des plafonds de ressources de certaines prestations familiales et aux tranches du barème applicable au recouvrement des indus et à la saisie des prestations", - "Montant des plafonds de ressources", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2021, 1, 1)) and (date_courante_105 <= - date_of_numbers(2021, 12, 31)))): - return (money_of_cents_string("5827900") + - (money_of_cents_string("582700") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231)))) - else: - raise EmptyError - except EmptyError: - raise EmptyError - local_var_253 = handle_default([local_var_254, local_var_256, - local_var_258, local_var_260], - local_var_262, local_var_264) - except EmptyError: - raise EmptyError + def temp_plafond__i_d521_3_5(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=180, start_column=5, end_line=180, end_column=69, + law_headings=["Article 1", + "Arrêté du 14 décembre 2020 relatif au montant des plafonds de ressources de certaines prestations familiales et aux tranches du barème applicable au recouvrement des indus et à la saisie des prestations", + "Montant des plafonds de ressources", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2021, 1, 1)) and (date_courante_2 <= + date_of_numbers(2021, 12, 31)))): + return (money_of_cents_string("5827900") + + (money_of_cents_string("582700") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale)))) + else: + raise EmptyError + temp_plafond__i_d521_3_6 = handle_default([temp_plafond__i_d521_3_5, + temp_plafond__i_d521_3_4, + temp_plafond__i_d521_3_3, + temp_plafond__i_d521_3_2], + temp_plafond__i_d521_3_1, + temp_plafond__i_d521_3) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=155, start_column=11, end_line=155, end_column=27, law_headings=["Prologue"])) - plafond__i_d521_3_252 = log_variable_definition(["AllocationsFamiliales", - "plafond_I_d521_3"], local_var_253) + plafond__i_d521_3 = log_variable_definition(["AllocationsFamiliales", + "plafond_I_d521_3"], temp_plafond__i_d521_3_6) try: try: try: - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=426, start_column=5, - end_line=427, end_column=71, - law_headings=["Article L755-12", - "Chapitre 5 : Prestations familiales et prestations assimilées", - "Titre 5 : Dispositions particulières à la Guadeloupe, à la Guyane, à la Martinique, à La Réunion, à Saint-Barthélemy et à Saint-Martin", - "Livre 7 : Régimes divers - Dispositions diverses", - "Partie législative", - "Code de la sécurité sociale"]), (prestations_familiales_dot_regime_outre_mer_l751_1_221 and - (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) == - integer_of_string("1")))): - local_var_267 = False - else: - raise EmptyError - except EmptyError: + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=426, start_column=5, + end_line=427, end_column=71, + law_headings=["Article L755-12", + "Chapitre 5 : Prestations familiales et prestations assimilées", + "Titre 5 : Dispositions particulières à la Guadeloupe, à la Guyane, à la Martinique, à La Réunion, à Saint-Barthélemy et à Saint-Martin", + "Livre 7 : Régimes divers - Dispositions diverses", + "Partie législative", + "Code de la sécurité sociale"]), (prestations_familiales_dot_regime_outre_mer_l751_1 and + (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) == + integer_of_string("1")))): + temp_droit_ouvert_complement = False + else: raise EmptyError except EmptyError: - local_var_267 = True + temp_droit_ouvert_complement = True except EmptyError: - local_var_267 = False + temp_droit_ouvert_complement = False except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=139, start_column=11, end_line=139, end_column=34, law_headings=["Prologue"])) - droit_ouvert_complement_266 = log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_complément"], local_var_267) + droit_ouvert_complement = log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_complément"], temp_droit_ouvert_complement) try: - def local_var_269(param_270: Enfant): + def temp_droit_ouvert_forfaitaire(param_6: Enfant): try: try: try: - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=420, start_column=6, - end_line=421, end_column=72, - law_headings=["Article L755-12", - "Chapitre 5 : Prestations familiales et prestations assimilées", - "Titre 5 : Dispositions particulières à la Guadeloupe, à la Guyane, à la Martinique, à La Réunion, à Saint-Barthélemy et à Saint-Martin", - "Livre 7 : Régimes divers - Dispositions diverses", - "Partie législative", - "Code de la sécurité sociale"]), (prestations_familiales_dot_regime_outre_mer_l751_1_221 and - (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) == - integer_of_string("1")))): - return False - else: - raise EmptyError - except EmptyError: + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=420, start_column=6, + end_line=421, end_column=72, + law_headings=["Article L755-12", + "Chapitre 5 : Prestations familiales et prestations assimilées", + "Titre 5 : Dispositions particulières à la Guadeloupe, à la Guyane, à la Martinique, à La Réunion, à Saint-Barthélemy et à Saint-Martin", + "Livre 7 : Régimes divers - Dispositions diverses", + "Partie législative", + "Code de la sécurité sociale"]), (prestations_familiales_dot_regime_outre_mer_l751_1 and + (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) == + integer_of_string("1")))): + return False + else: raise EmptyError except EmptyError: - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=119, start_column=5, - end_line=125, end_column=59, - law_headings=["Article L521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), ((list_length(enfants_a_charge_106) >= - nombre_enfants_alinea_2_l521_3_204) and - ((param_270.age == - prestations_familiales_dot_age_l512_3_2_220) and - (param_270.a_deja_ouvert_droit_aux_allocations_familiales and - log_end_call(["PrestationsFamiliales", - "conditions_hors_âge"], - log_variable_definition(["PrestationsFamiliales", - "conditions_hors_âge", "output"], - log_begin_call(["PrestationsFamiliales", - "conditions_hors_âge"], - prestations_familiales_dot_conditions_hors_age_219, - log_variable_definition(["PrestationsFamiliales", - "conditions_hors_âge", "input"], - param_270)))))))): - return True - else: - raise EmptyError - except EmptyError: + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=119, start_column=5, + end_line=125, end_column=59, + law_headings=["Article L521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), ((list_length(enfants_a_charge) >= + nombre_enfants_alinea_2_l521_3) and + ((param_6.age == + prestations_familiales_dot_age_l512_3_2) and + (param_6.a_deja_ouvert_droit_aux_allocations_familiales and + log_end_call(["PrestationsFamiliales", + "conditions_hors_âge"], + log_variable_definition(["PrestationsFamiliales", + "conditions_hors_âge", "output"], + log_begin_call(["PrestationsFamiliales", + "conditions_hors_âge"], + prestations_familiales_dot_conditions_hors_age, + log_variable_definition(["PrestationsFamiliales", + "conditions_hors_âge", "input"], + param_6)))))))): + return True + else: raise EmptyError except EmptyError: return False @@ -1959,1013 +1762,878 @@ def local_var_269(param_270: Enfant): start_line=127, start_column=11, end_line=127, end_column=35, law_headings=["Prologue"])) - droit_ouvert_forfaitaire_268 = log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_forfaitaire"], local_var_269) + droit_ouvert_forfaitaire = log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_forfaitaire"], temp_droit_ouvert_forfaitaire) try: - try: - try: - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("3")): - local_var_272 = ((prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.0463")) * - decimal_of_integer((list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) - - integer_of_string("3")))) - else: - local_var_272 = money_of_cents_string("0") - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("3")): + temp_montant_initial_base_quatrieme_enfant_et_plus_mayotte = ((prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.0463")) * + decimal_of_integer((list_length(enfants_a_charge_droit_ouvert_prestation_familiale) - + integer_of_string("3")))) + else: + temp_montant_initial_base_quatrieme_enfant_et_plus_mayotte = money_of_cents_string( + "0") except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=124, start_column=11, end_line=124, end_column=64, law_headings=["Prologue"])) - montant_initial_base_quatrieme_enfant_et_plus_mayotte_271 = log_variable_definition(["AllocationsFamiliales", - "montant_initial_base_quatrième_enfant_et_plus_mayotte"], - local_var_272) + montant_initial_base_quatrieme_enfant_et_plus_mayotte = log_variable_definition(["AllocationsFamiliales", + "montant_initial_base_quatrième_enfant_et_plus_mayotte"], + temp_montant_initial_base_quatrieme_enfant_et_plus_mayotte) try: - try: - def local_var_297(_: Any): - try: - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("2")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.16")) - else: - return money_of_cents_string("0") - except EmptyError: - raise EmptyError - - def local_var_295(_: Any): - return log_decision_taken(SourcePosition(filename="./prologue.catala_fr", - start_line=123, start_column=11, - end_line=123, end_column=56, - law_headings=["Prologue"]), True) + def temp_montant_initial_base_troisieme_enfant_mayotte(_: Any): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("2")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.16")) + else: + return money_of_cents_string("0") - def local_var_293(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=584, start_column=5, - end_line=584, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2011, 1, 1)) and (date_courante_105 <= - date_of_numbers(2011, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("2")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.0463")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_troisieme_enfant_mayotte_1(_: Any): + return True + + def temp_montant_initial_base_troisieme_enfant_mayotte_2(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=584, start_column=5, end_line=584, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2011, 1, 1)) and (date_courante_2 <= + date_of_numbers(2011, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("2")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.0463")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_291(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=591, start_column=5, - end_line=591, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2012, 1, 1)) and (date_courante_105 <= - date_of_numbers(2012, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("2")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.0539")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_troisieme_enfant_mayotte_3(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=591, start_column=5, end_line=591, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2012, 1, 1)) and (date_courante_2 <= + date_of_numbers(2012, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("2")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.0539")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_289(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=598, start_column=5, - end_line=598, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2013, 1, 1)) and (date_courante_105 <= - date_of_numbers(2013, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("2")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.075")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_troisieme_enfant_mayotte_4(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=598, start_column=5, end_line=598, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2013, 1, 1)) and (date_courante_2 <= + date_of_numbers(2013, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("2")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.075")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_287(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=605, start_column=5, - end_line=605, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2014, 1, 1)) and (date_courante_105 <= - date_of_numbers(2014, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("2")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.069")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_troisieme_enfant_mayotte_5(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=605, start_column=5, end_line=605, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2014, 1, 1)) and (date_courante_2 <= + date_of_numbers(2014, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("2")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.069")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_285(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=612, start_column=5, - end_line=612, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2015, 1, 1)) and (date_courante_105 <= - date_of_numbers(2015, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("2")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.0766")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_troisieme_enfant_mayotte_6(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=612, start_column=5, end_line=612, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2015, 1, 1)) and (date_courante_2 <= + date_of_numbers(2015, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("2")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.0766")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_283(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=619, start_column=5, - end_line=619, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2016, 1, 1)) and (date_courante_105 <= - date_of_numbers(2016, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("2")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.0842")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_troisieme_enfant_mayotte_7(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=619, start_column=5, end_line=619, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2016, 1, 1)) and (date_courante_2 <= + date_of_numbers(2016, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("2")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.0842")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_281(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=626, start_column=5, - end_line=626, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2017, 1, 1)) and (date_courante_105 <= - date_of_numbers(2017, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("2")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.0918")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_troisieme_enfant_mayotte_8(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=626, start_column=5, end_line=626, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2017, 1, 1)) and (date_courante_2 <= + date_of_numbers(2017, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("2")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.0918")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_279(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=633, start_column=5, - end_line=633, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2018, 1, 1)) and (date_courante_105 <= - date_of_numbers(2018, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("2")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.1089")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_troisieme_enfant_mayotte_9(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=633, start_column=5, end_line=633, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2018, 1, 1)) and (date_courante_2 <= + date_of_numbers(2018, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("2")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.1089")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_277(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=640, start_column=5, - end_line=640, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2019, 1, 1)) and (date_courante_105 <= - date_of_numbers(2019, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("2")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.1259")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_troisieme_enfant_mayotte_10(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=640, start_column=5, end_line=640, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2019, 1, 1)) and (date_courante_2 <= + date_of_numbers(2019, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("2")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.1259")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_275(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=647, start_column=5, - end_line=647, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2020, 1, 1)) and (date_courante_105 <= - date_of_numbers(2020, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("2")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.143")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError - local_var_274 = handle_default([local_var_275, local_var_277, - local_var_279, local_var_281, - local_var_283, local_var_285, - local_var_287, local_var_289, - local_var_291, local_var_293], - local_var_295, local_var_297) - except EmptyError: - raise EmptyError + def temp_montant_initial_base_troisieme_enfant_mayotte_11(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=647, start_column=5, end_line=647, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2020, 1, 1)) and (date_courante_2 <= + date_of_numbers(2020, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("2")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.143")) + else: + return money_of_cents_string("0") + else: + raise EmptyError + temp_montant_initial_base_troisieme_enfant_mayotte_12 = handle_default( + [temp_montant_initial_base_troisieme_enfant_mayotte_11, + temp_montant_initial_base_troisieme_enfant_mayotte_10, + temp_montant_initial_base_troisieme_enfant_mayotte_9, + temp_montant_initial_base_troisieme_enfant_mayotte_8, + temp_montant_initial_base_troisieme_enfant_mayotte_7, + temp_montant_initial_base_troisieme_enfant_mayotte_6, + temp_montant_initial_base_troisieme_enfant_mayotte_5, + temp_montant_initial_base_troisieme_enfant_mayotte_4, + temp_montant_initial_base_troisieme_enfant_mayotte_3, + temp_montant_initial_base_troisieme_enfant_mayotte_2], + temp_montant_initial_base_troisieme_enfant_mayotte_1, + temp_montant_initial_base_troisieme_enfant_mayotte) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=123, start_column=11, end_line=123, end_column=56, law_headings=["Prologue"])) - montant_initial_base_troisieme_enfant_mayotte_273 = log_variable_definition(["AllocationsFamiliales", - "montant_initial_base_troisième_enfant_mayotte"], local_var_274) + montant_initial_base_troisieme_enfant_mayotte = log_variable_definition(["AllocationsFamiliales", + "montant_initial_base_troisième_enfant_mayotte"], + temp_montant_initial_base_troisieme_enfant_mayotte_12) try: - try: - def local_var_323(_: Any): - try: - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("1")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.32")) - else: - return money_of_cents_string("0") - except EmptyError: - raise EmptyError - - def local_var_321(_: Any): - return log_decision_taken(SourcePosition(filename="./prologue.catala_fr", - start_line=122, start_column=11, - end_line=122, end_column=55, - law_headings=["Prologue"]), True) + def temp_montant_initial_base_deuxieme_enfant_mayotte(_: Any): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("1")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.32")) + else: + return money_of_cents_string("0") - def local_var_319(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=513, start_column=5, - end_line=513, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2011, 1, 1)) and (date_courante_105 <= - date_of_numbers(2011, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("1")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.232")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_deuxieme_enfant_mayotte_1(_: Any): + return True + + def temp_montant_initial_base_deuxieme_enfant_mayotte_2(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=513, start_column=5, end_line=513, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2011, 1, 1)) and (date_courante_2 <= + date_of_numbers(2011, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("1")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.232")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_317(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=520, start_column=5, - end_line=520, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2012, 1, 1)) and (date_courante_105 <= - date_of_numbers(2012, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("1")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.2379")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_deuxieme_enfant_mayotte_3(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=520, start_column=5, end_line=520, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2012, 1, 1)) and (date_courante_2 <= + date_of_numbers(2012, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("1")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.2379")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_315(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=527, start_column=5, - end_line=527, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2013, 1, 1)) and (date_courante_105 <= - date_of_numbers(2013, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("1")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.2437")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_deuxieme_enfant_mayotte_4(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=527, start_column=5, end_line=527, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2013, 1, 1)) and (date_courante_2 <= + date_of_numbers(2013, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("1")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.2437")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_313(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=534, start_column=5, - end_line=534, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2014, 1, 1)) and (date_courante_105 <= - date_of_numbers(2014, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("1")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.2496")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_deuxieme_enfant_mayotte_5(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=534, start_column=5, end_line=534, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2014, 1, 1)) and (date_courante_2 <= + date_of_numbers(2014, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("1")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.2496")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_311(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=541, start_column=5, - end_line=541, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2015, 1, 1)) and (date_courante_105 <= - date_of_numbers(2015, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("1")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.2555")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_deuxieme_enfant_mayotte_6(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=541, start_column=5, end_line=541, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2015, 1, 1)) and (date_courante_2 <= + date_of_numbers(2015, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("1")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.2555")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_309(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=548, start_column=5, - end_line=548, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2016, 1, 1)) and (date_courante_105 <= - date_of_numbers(2016, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("1")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.273")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_deuxieme_enfant_mayotte_7(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=548, start_column=5, end_line=548, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2016, 1, 1)) and (date_courante_2 <= + date_of_numbers(2016, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("1")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.273")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_307(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=555, start_column=5, - end_line=555, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2017, 1, 1)) and (date_courante_105 <= - date_of_numbers(2017, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("1")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.2672")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_deuxieme_enfant_mayotte_8(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=555, start_column=5, end_line=555, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2017, 1, 1)) and (date_courante_2 <= + date_of_numbers(2017, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("1")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.2672")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_305(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=562, start_column=5, - end_line=562, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2018, 1, 1)) and (date_courante_105 <= - date_of_numbers(2018, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("1")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.284")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_deuxieme_enfant_mayotte_9(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=562, start_column=5, end_line=562, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2018, 1, 1)) and (date_courante_2 <= + date_of_numbers(2018, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("1")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.284")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_303(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=569, start_column=5, - end_line=569, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2019, 1, 1)) and (date_courante_105 <= - date_of_numbers(2019, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("1")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.2936")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_deuxieme_enfant_mayotte_10(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=569, start_column=5, end_line=569, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2019, 1, 1)) and (date_courante_2 <= + date_of_numbers(2019, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("1")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.2936")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_301(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=576, start_column=5, - end_line=576, end_column=69, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2020, 1, 1)) and (date_courante_105 <= - date_of_numbers(2020, 12, 31)))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("1")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.3068")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError - local_var_300 = handle_default([local_var_301, local_var_303, - local_var_305, local_var_307, - local_var_309, local_var_311, - local_var_313, local_var_315, - local_var_317, local_var_319], - local_var_321, local_var_323) - except EmptyError: - raise EmptyError + def temp_montant_initial_base_deuxieme_enfant_mayotte_11(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=576, start_column=5, end_line=576, end_column=69, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2020, 1, 1)) and (date_courante_2 <= + date_of_numbers(2020, 12, 31)))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("1")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.3068")) + else: + return money_of_cents_string("0") + else: + raise EmptyError + temp_montant_initial_base_deuxieme_enfant_mayotte_12 = handle_default( + [temp_montant_initial_base_deuxieme_enfant_mayotte_11, + temp_montant_initial_base_deuxieme_enfant_mayotte_10, + temp_montant_initial_base_deuxieme_enfant_mayotte_9, + temp_montant_initial_base_deuxieme_enfant_mayotte_8, + temp_montant_initial_base_deuxieme_enfant_mayotte_7, + temp_montant_initial_base_deuxieme_enfant_mayotte_6, + temp_montant_initial_base_deuxieme_enfant_mayotte_5, + temp_montant_initial_base_deuxieme_enfant_mayotte_4, + temp_montant_initial_base_deuxieme_enfant_mayotte_3, + temp_montant_initial_base_deuxieme_enfant_mayotte_2], + temp_montant_initial_base_deuxieme_enfant_mayotte_1, + temp_montant_initial_base_deuxieme_enfant_mayotte) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=122, start_column=11, end_line=122, end_column=55, law_headings=["Prologue"])) - montant_initial_base_deuxieme_enfant_mayotte_299 = log_variable_definition(["AllocationsFamiliales", - "montant_initial_base_deuxième_enfant_mayotte"], local_var_300) + montant_initial_base_deuxieme_enfant_mayotte = log_variable_definition(["AllocationsFamiliales", + "montant_initial_base_deuxième_enfant_mayotte"], + temp_montant_initial_base_deuxieme_enfant_mayotte_12) try: - try: - def local_var_351(_: Any): - try: - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("0")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.0588")) - else: - return money_of_cents_string("0") - except EmptyError: - raise EmptyError - - def local_var_349(_: Any): - return log_decision_taken(SourcePosition(filename="./prologue.catala_fr", - start_line=121, start_column=11, - end_line=121, end_column=54, - law_headings=["Prologue"]), True) - - def local_var_347(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=425, start_column=5, - end_line=426, end_column=53, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2011, 1, 1)) and ((date_courante_105 <= - date_of_numbers(2011, 12, 31)) and - not avait_enfant_a_charge_avant_1er_janvier_2012_107))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("0")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.145")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_premier_enfant_mayotte(_: Any): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("0")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.0588")) + else: + return money_of_cents_string("0") - def local_var_345(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=433, start_column=5, - end_line=434, end_column=53, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2012, 1, 1)) and ((date_courante_105 <= - date_of_numbers(2012, 12, 31)) and - not avait_enfant_a_charge_avant_1er_janvier_2012_107))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("0")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.1393")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_premier_enfant_mayotte_1(_: Any): + return True + + def temp_montant_initial_base_premier_enfant_mayotte_2(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=425, start_column=5, end_line=426, end_column=53, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2011, 1, 1)) and ((date_courante_2 <= + date_of_numbers(2011, 12, 31)) and + not avait_enfant_a_charge_avant_1er_janvier_2012))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("0")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.145")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_343(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=441, start_column=5, - end_line=442, end_column=53, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2013, 1, 1)) and ((date_courante_105 <= - date_of_numbers(2013, 12, 31)) and - not avait_enfant_a_charge_avant_1er_janvier_2012_107))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("0")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.1335")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_premier_enfant_mayotte_3(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=433, start_column=5, end_line=434, end_column=53, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2012, 1, 1)) and ((date_courante_2 <= + date_of_numbers(2012, 12, 31)) and + not avait_enfant_a_charge_avant_1er_janvier_2012))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("0")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.1393")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_341(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=449, start_column=5, - end_line=450, end_column=53, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2014, 1, 1)) and ((date_courante_105 <= - date_of_numbers(2014, 12, 31)) and - not avait_enfant_a_charge_avant_1er_janvier_2012_107))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("0")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.1278")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_premier_enfant_mayotte_4(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=441, start_column=5, end_line=442, end_column=53, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2013, 1, 1)) and ((date_courante_2 <= + date_of_numbers(2013, 12, 31)) and + not avait_enfant_a_charge_avant_1er_janvier_2012))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("0")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.1335")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_339(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=457, start_column=5, - end_line=458, end_column=53, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2015, 1, 1)) and ((date_courante_105 <= - date_of_numbers(2015, 12, 31)) and - not avait_enfant_a_charge_avant_1er_janvier_2012_107))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("0")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.122")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_premier_enfant_mayotte_5(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=449, start_column=5, end_line=450, end_column=53, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2014, 1, 1)) and ((date_courante_2 <= + date_of_numbers(2014, 12, 31)) and + not avait_enfant_a_charge_avant_1er_janvier_2012))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("0")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.1278")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_337(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=465, start_column=5, - end_line=466, end_column=53, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2016, 1, 1)) and ((date_courante_105 <= - date_of_numbers(2016, 12, 31)) and - not avait_enfant_a_charge_avant_1er_janvier_2012_107))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("0")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.1163")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_premier_enfant_mayotte_6(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=457, start_column=5, end_line=458, end_column=53, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2015, 1, 1)) and ((date_courante_2 <= + date_of_numbers(2015, 12, 31)) and + not avait_enfant_a_charge_avant_1er_janvier_2012))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("0")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.122")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_335(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=473, start_column=5, - end_line=474, end_column=53, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2017, 1, 1)) and ((date_courante_105 <= - date_of_numbers(2017, 12, 31)) and - not avait_enfant_a_charge_avant_1er_janvier_2012_107))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("0")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.115")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_premier_enfant_mayotte_7(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=465, start_column=5, end_line=466, end_column=53, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2016, 1, 1)) and ((date_courante_2 <= + date_of_numbers(2016, 12, 31)) and + not avait_enfant_a_charge_avant_1er_janvier_2012))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("0")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.1163")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_333(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=481, start_column=5, - end_line=482, end_column=53, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2018, 1, 1)) and ((date_courante_105 <= - date_of_numbers(2018, 12, 31)) and - not avait_enfant_a_charge_avant_1er_janvier_2012_107))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("0")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.0976")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_premier_enfant_mayotte_8(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=473, start_column=5, end_line=474, end_column=53, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2017, 1, 1)) and ((date_courante_2 <= + date_of_numbers(2017, 12, 31)) and + not avait_enfant_a_charge_avant_1er_janvier_2012))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("0")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.115")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_331(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=489, start_column=5, - end_line=490, end_column=53, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2019, 1, 1)) and ((date_courante_105 <= - date_of_numbers(2019, 12, 31)) and - not avait_enfant_a_charge_avant_1er_janvier_2012_107))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("0")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.0847")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_premier_enfant_mayotte_9(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=481, start_column=5, end_line=482, end_column=53, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2018, 1, 1)) and ((date_courante_2 <= + date_of_numbers(2018, 12, 31)) and + not avait_enfant_a_charge_avant_1er_janvier_2012))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("0")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.0976")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_329(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=497, start_column=5, - end_line=498, end_column=53, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((date_courante_105 >= - date_of_numbers(2020, 1, 1)) and ((date_courante_105 <= - date_of_numbers(2020, 12, 31)) and - not avait_enfant_a_charge_avant_1er_janvier_2012_107))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("0")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.0717")) - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_base_premier_enfant_mayotte_10(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=489, start_column=5, end_line=490, end_column=53, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2019, 1, 1)) and ((date_courante_2 <= + date_of_numbers(2019, 12, 31)) and + not avait_enfant_a_charge_avant_1er_janvier_2012))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("0")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.0847")) + else: + return money_of_cents_string("0") + else: + raise EmptyError - def local_var_327(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=505, start_column=5, - end_line=505, end_column=49, law_headings=["Annexe", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), avait_enfant_a_charge_avant_1er_janvier_2012_107): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("0")): - return money_of_cents_string("5728") - else: - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: - raise EmptyError - local_var_326 = handle_default([local_var_327, local_var_329, - local_var_331, local_var_333, - local_var_335, local_var_337, - local_var_339, local_var_341, - local_var_343, local_var_345, - local_var_347], local_var_349, - local_var_351) - except EmptyError: - raise EmptyError + def temp_montant_initial_base_premier_enfant_mayotte_11(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=497, start_column=5, end_line=498, end_column=53, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((date_courante_2 >= + date_of_numbers(2020, 1, 1)) and ((date_courante_2 <= + date_of_numbers(2020, 12, 31)) and + not avait_enfant_a_charge_avant_1er_janvier_2012))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("0")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.0717")) + else: + return money_of_cents_string("0") + else: + raise EmptyError + + def temp_montant_initial_base_premier_enfant_mayotte_12(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=505, start_column=5, end_line=505, end_column=49, + law_headings=["Annexe", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), avait_enfant_a_charge_avant_1er_janvier_2012): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("0")): + return money_of_cents_string("5728") + else: + return money_of_cents_string("0") + else: + raise EmptyError + temp_montant_initial_base_premier_enfant_mayotte_13 = handle_default( + [temp_montant_initial_base_premier_enfant_mayotte_12, + temp_montant_initial_base_premier_enfant_mayotte_11, + temp_montant_initial_base_premier_enfant_mayotte_10, + temp_montant_initial_base_premier_enfant_mayotte_9, + temp_montant_initial_base_premier_enfant_mayotte_8, + temp_montant_initial_base_premier_enfant_mayotte_7, + temp_montant_initial_base_premier_enfant_mayotte_6, + temp_montant_initial_base_premier_enfant_mayotte_5, + temp_montant_initial_base_premier_enfant_mayotte_4, + temp_montant_initial_base_premier_enfant_mayotte_3, + temp_montant_initial_base_premier_enfant_mayotte_2], + temp_montant_initial_base_premier_enfant_mayotte_1, + temp_montant_initial_base_premier_enfant_mayotte) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=121, start_column=11, end_line=121, end_column=54, law_headings=["Prologue"])) - montant_initial_base_premier_enfant_mayotte_325 = log_variable_definition(["AllocationsFamiliales", - "montant_initial_base_premier_enfant_mayotte"], local_var_326) + montant_initial_base_premier_enfant_mayotte = log_variable_definition(["AllocationsFamiliales", + "montant_initial_base_premier_enfant_mayotte"], + temp_montant_initial_base_premier_enfant_mayotte_13) try: - try: - try: - local_var_354 = decimal_of_integer(list_length( - enfants_a_charge_droit_ouvert_prestation_familiale_231)) - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError + temp_nombre_total_enfants = decimal_of_integer( + list_length(enfants_a_charge_droit_ouvert_prestation_familiale)) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=115, start_column=11, end_line=115, end_column=31, law_headings=["Prologue"])) - nombre_total_enfants_353 = log_variable_definition(["AllocationsFamiliales", - "nombre_total_enfants"], local_var_354) + nombre_total_enfants = log_variable_definition(["AllocationsFamiliales", + "nombre_total_enfants"], temp_nombre_total_enfants) try: - try: - try: - def local_var_357(acc_358: Decimal, enfant_359: Any): - match_arg_556 = log_end_call(["AllocationsFamiliales", - "prise_en_compte"], - log_variable_definition(["AllocationsFamiliales", - "prise_en_compte", "output"], - log_begin_call(["AllocationsFamiliales", - "prise_en_compte"], prise_en_compte_108, - log_variable_definition(["AllocationsFamiliales", - "prise_en_compte", "input"], - enfant_359)))) - if match_arg_556.code == PriseEnCompte_Code.Complete: - _ = match_arg_556.value - local_var_360 = decimal_of_string("1.") - elif match_arg_556.code == PriseEnCompte_Code.Partagee: - _ = match_arg_556.value - local_var_360 = decimal_of_string("0.5") - elif match_arg_556.code == PriseEnCompte_Code.Zero: - _ = match_arg_556.value - local_var_360 = decimal_of_string("0.") - return (acc_358 + local_var_360) - local_var_356 = list_fold_left(local_var_357, - decimal_of_string("0."), - enfants_a_charge_droit_ouvert_prestation_familiale_231) - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_nombre_moyen_enfants(acc_1: Decimal, enfant_1: Any): + match_arg_16 = log_end_call(["AllocationsFamiliales", + "prise_en_compte"], + log_variable_definition(["AllocationsFamiliales", + "prise_en_compte", "output"], + log_begin_call(["AllocationsFamiliales", "prise_en_compte"], + prise_en_compte, + log_variable_definition(["AllocationsFamiliales", + "prise_en_compte", "input"], + enfant_1)))) + if match_arg_16.code == PriseEnCompte_Code.Complete: + _ = match_arg_16.value + temp_nombre_moyen_enfants_1 = decimal_of_string("1.") + elif match_arg_16.code == PriseEnCompte_Code.Partagee: + _ = match_arg_16.value + temp_nombre_moyen_enfants_1 = decimal_of_string("0.5") + elif match_arg_16.code == PriseEnCompte_Code.Zero: + _ = match_arg_16.value + temp_nombre_moyen_enfants_1 = decimal_of_string("0.") + return (acc_1 + temp_nombre_moyen_enfants_1) + temp_nombre_moyen_enfants_2 = list_fold_left(temp_nombre_moyen_enfants, + decimal_of_string("0."), + enfants_a_charge_droit_ouvert_prestation_familiale) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=114, start_column=11, end_line=114, end_column=31, law_headings=["Prologue"])) - nombre_moyen_enfants_355 = log_variable_definition(["AllocationsFamiliales", - "nombre_moyen_enfants"], local_var_356) + nombre_moyen_enfants = log_variable_definition(["AllocationsFamiliales", + "nombre_moyen_enfants"], temp_nombre_moyen_enfants_2) try: try: - try: - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=359, start_column=5, - end_line=360, end_column=71, - law_headings=["Article D755-5", - "Chapitre 5 : Prestations familiales et prestations assimilées", - "Titre 5 : Départements d'outre-mer", - "Livre 7 : Régimes divers - Dispositions diverses", - "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), (prestations_familiales_dot_regime_outre_mer_l751_1_221 and - (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) == - integer_of_string("1")))): - local_var_365 = (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.0588")) - else: - raise EmptyError - except EmptyError: - raise EmptyError - except EmptyError: - local_var_365 = money_of_cents_string("0") + if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=359, start_column=5, end_line=360, end_column=71, + law_headings=["Article D755-5", + "Chapitre 5 : Prestations familiales et prestations assimilées", + "Titre 5 : Départements d'outre-mer", + "Livre 7 : Régimes divers - Dispositions diverses", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"]), (prestations_familiales_dot_regime_outre_mer_l751_1 and + (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) == + integer_of_string("1")))): + temp_montant_initial_base_premier_enfant = (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.0588")) + else: + raise EmptyError except EmptyError: - raise EmptyError + temp_montant_initial_base_premier_enfant = money_of_cents_string( + "0") except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=110, start_column=11, end_line=110, end_column=46, law_headings=["Prologue"])) - montant_initial_base_premier_enfant_364 = log_variable_definition(["AllocationsFamiliales", - "montant_initial_base_premier_enfant"], local_var_365) + montant_initial_base_premier_enfant = log_variable_definition(["AllocationsFamiliales", + "montant_initial_base_premier_enfant"], + temp_montant_initial_base_premier_enfant) try: try: - def local_var_374(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=101, start_column=5, - end_line=101, end_column=70, - law_headings=["Article L521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) >= - integer_of_string("2"))): - return True - else: - raise EmptyError - except EmptyError: + def temp_droit_ouvert_base(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=101, start_column=5, + end_line=101, end_column=70, + law_headings=["Article L521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) >= + integer_of_string("2"))): + return True + else: raise EmptyError - def local_var_372(_: Any): - return log_decision_taken(SourcePosition(filename="./prologue.catala_fr", - start_line=108, start_column=11, - end_line=108, end_column=28, - law_headings=["Prologue"]), True) + def temp_droit_ouvert_base_1(_: Any): + return True - def local_var_370(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=406, start_column=5, - end_line=407, end_column=72, - law_headings=["Article L755-12", - "Chapitre 5 : Prestations familiales et prestations assimilées", - "Titre 5 : Dispositions particulières à la Guadeloupe, à la Guyane, à la Martinique, à La Réunion, à Saint-Barthélemy et à Saint-Martin", - "Livre 7 : Régimes divers - Dispositions diverses", - "Partie législative", - "Code de la sécurité sociale"]), (prestations_familiales_dot_regime_outre_mer_l751_1_221 and - (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) >= - integer_of_string("1")))): - return True - else: - raise EmptyError - except EmptyError: + def temp_droit_ouvert_base_2(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=406, start_column=5, + end_line=407, end_column=72, + law_headings=["Article L755-12", + "Chapitre 5 : Prestations familiales et prestations assimilées", + "Titre 5 : Dispositions particulières à la Guadeloupe, à la Guyane, à la Martinique, à La Réunion, à Saint-Barthélemy et à Saint-Martin", + "Livre 7 : Régimes divers - Dispositions diverses", + "Partie législative", + "Code de la sécurité sociale"]), (prestations_familiales_dot_regime_outre_mer_l751_1 and + (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) >= + integer_of_string("1")))): + return True + else: raise EmptyError - def local_var_368(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=344, start_column=5, - end_line=345, end_column=72, - law_headings=["Article 7", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), ((residence_104 == - Collectivite(Collectivite_Code.Mayotte, Unit())) and - (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) >= - integer_of_string("1")))): - return True - else: - raise EmptyError - except EmptyError: + def temp_droit_ouvert_base_3(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=344, start_column=5, + end_line=345, end_column=72, law_headings=["Article 7", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), ((residence_2 == + Collectivite(Collectivite_Code.Mayotte, Unit())) and + (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) >= + integer_of_string("1")))): + return True + else: raise EmptyError - local_var_367 = handle_default([local_var_368, local_var_370], - local_var_372, local_var_374) + temp_droit_ouvert_base_4 = handle_default([temp_droit_ouvert_base_3, + temp_droit_ouvert_base_2], + temp_droit_ouvert_base_1, + temp_droit_ouvert_base) except EmptyError: - local_var_367 = False + temp_droit_ouvert_base_4 = False except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=108, start_column=11, end_line=108, end_column=28, law_headings=["Prologue"])) - droit_ouvert_base_366 = log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_base"], local_var_367) + droit_ouvert_base = log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_base"], temp_droit_ouvert_base_4) try: - def local_var_377(param_378: Enfant): + def temp_droit_ouvert_majoration(param_7: Enfant): try: try: try: - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=313, start_column=5, - end_line=315, end_column=58, - law_headings=["Article L521-3", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), ((list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) >= - nombre_enfants_alinea_2_l521_3_204) and - (param_378.age >= - log_end_call(["AllocationsFamiliales", - "âge_minimum_alinéa_1_l521_3"], - log_variable_definition(["AllocationsFamiliales", - "âge_minimum_alinéa_1_l521_3", "output"], - log_begin_call(["AllocationsFamiliales", - "âge_minimum_alinéa_1_l521_3"], - age_minimum_alinea_1_l521_3_228, - log_variable_definition(["AllocationsFamiliales", - "âge_minimum_alinéa_1_l521_3", "input"], - param_378))))))): - return True - else: - raise EmptyError - except EmptyError: + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=313, start_column=5, + end_line=315, end_column=58, + law_headings=["Article L521-3", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), ((list_length(enfants_a_charge_droit_ouvert_prestation_familiale) >= + nombre_enfants_alinea_2_l521_3) and + (param_7.age >= + log_end_call(["AllocationsFamiliales", + "âge_minimum_alinéa_1_l521_3"], + log_variable_definition(["AllocationsFamiliales", + "âge_minimum_alinéa_1_l521_3", "output"], + log_begin_call(["AllocationsFamiliales", + "âge_minimum_alinéa_1_l521_3"], + age_minimum_alinea_1_l521_3_1, + log_variable_definition(["AllocationsFamiliales", + "âge_minimum_alinéa_1_l521_3", "input"], + param_7))))))): + return True + else: raise EmptyError except EmptyError: - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=299, start_column=5, - end_line=300, end_column=58, - law_headings=["Article L521-3", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), (not log_end_call(["AllocationsFamiliales", - "est_enfant_le_plus_âgé"], - log_variable_definition(["AllocationsFamiliales", - "est_enfant_le_plus_âgé", "output"], - log_begin_call(["AllocationsFamiliales", - "est_enfant_le_plus_âgé"], - est_enfant_le_plus_age_235, - log_variable_definition(["AllocationsFamiliales", - "est_enfant_le_plus_âgé", "input"], - param_378)))) and (param_378.age >= - log_end_call(["AllocationsFamiliales", - "âge_minimum_alinéa_1_l521_3"], - log_variable_definition(["AllocationsFamiliales", - "âge_minimum_alinéa_1_l521_3", "output"], - log_begin_call(["AllocationsFamiliales", - "âge_minimum_alinéa_1_l521_3"], - age_minimum_alinea_1_l521_3_228, - log_variable_definition(["AllocationsFamiliales", - "âge_minimum_alinéa_1_l521_3", "input"], - param_378))))))): - return True - else: - raise EmptyError - except EmptyError: + if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", + start_line=299, start_column=5, + end_line=300, end_column=58, + law_headings=["Article L521-3", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), (not log_end_call(["AllocationsFamiliales", + "est_enfant_le_plus_âgé"], + log_variable_definition(["AllocationsFamiliales", + "est_enfant_le_plus_âgé", "output"], + log_begin_call(["AllocationsFamiliales", + "est_enfant_le_plus_âgé"], + est_enfant_le_plus_age, + log_variable_definition(["AllocationsFamiliales", + "est_enfant_le_plus_âgé", "input"], + param_7)))) and (param_7.age >= + log_end_call(["AllocationsFamiliales", + "âge_minimum_alinéa_1_l521_3"], + log_variable_definition(["AllocationsFamiliales", + "âge_minimum_alinéa_1_l521_3", "output"], + log_begin_call(["AllocationsFamiliales", + "âge_minimum_alinéa_1_l521_3"], + age_minimum_alinea_1_l521_3_1, + log_variable_definition(["AllocationsFamiliales", + "âge_minimum_alinéa_1_l521_3", "input"], + param_7))))))): + return True + else: raise EmptyError except EmptyError: return False @@ -2981,74 +2649,60 @@ def local_var_377(param_378: Enfant): start_line=132, start_column=11, end_line=132, end_column=34, law_headings=["Prologue"])) - droit_ouvert_majoration_376 = log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration"], local_var_377) + droit_ouvert_majoration = log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration"], temp_droit_ouvert_majoration) try: - def local_var_380(param_381: Money): + def temp_complement_degressif(param_8: Money): try: - try: - def local_var_388(_: Any): - return money_of_cents_string("0") + def temp_complement_degressif_1(_: Any): + return money_of_cents_string("0") - def local_var_386(_: Any): - return log_decision_taken(SourcePosition(filename="./prologue.catala_fr", - start_line=141, start_column=11, - end_line=141, end_column=31, - law_headings=["Prologue"]), True) - - def local_var_384(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=162, start_column=5, - end_line=163, end_column=68, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), ((ressources_menage_103 > - plafond__i_d521_3_252) and - (ressources_menage_103 <= - (plafond__i_d521_3_252 + (param_381 * - decimal_of_string("12.")))))): - return ((plafond__i_d521_3_252 + - ((param_381 * decimal_of_string("12.")) - - ressources_menage_103)) * - (decimal_of_string("1.") / - decimal_of_string("12."))) - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_complement_degressif_2(_: Any): + return True - def local_var_382(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=170, start_column=5, - end_line=171, end_column=68, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), ((ressources_menage_103 > - plafond__i_i_d521_3_238) and - (ressources_menage_103 <= - (plafond__i_i_d521_3_238 + (param_381 * - decimal_of_string("12.")))))): - return ((plafond__i_i_d521_3_238 + - ((param_381 * decimal_of_string("12.")) - - ressources_menage_103)) * - (decimal_of_string("1.") / - decimal_of_string("12."))) - else: - raise EmptyError - except EmptyError: - raise EmptyError - return handle_default([local_var_382, local_var_384], - local_var_386, local_var_388) - except EmptyError: - raise EmptyError + def temp_complement_degressif_3(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=162, start_column=5, + end_line=163, end_column=68, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"]), ((ressources_menage > + plafond__i_d521_3) and (ressources_menage <= + (plafond__i_d521_3 + (param_8 * + decimal_of_string("12.")))))): + return ((plafond__i_d521_3 + ((param_8 * + decimal_of_string("12.")) - ressources_menage)) * + (decimal_of_string("1.") / + decimal_of_string("12."))) + else: + raise EmptyError + + def temp_complement_degressif_4(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=170, start_column=5, + end_line=171, end_column=68, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"]), ((ressources_menage > + plafond__i_i_d521_3) and (ressources_menage <= + (plafond__i_i_d521_3 + (param_8 * + decimal_of_string("12.")))))): + return ((plafond__i_i_d521_3 + ((param_8 * + decimal_of_string("12.")) - ressources_menage)) * + (decimal_of_string("1.") / + decimal_of_string("12."))) + else: + raise EmptyError + return handle_default([temp_complement_degressif_4, + temp_complement_degressif_3], + temp_complement_degressif_2, + temp_complement_degressif_1) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=141, @@ -3061,411 +2715,358 @@ def local_var_382(_: Any): start_line=141, start_column=11, end_line=141, end_column=31, law_headings=["Prologue"])) - complement_degressif_379 = log_variable_definition(["AllocationsFamiliales", - "complément_dégressif"], local_var_380) + complement_degressif = log_variable_definition(["AllocationsFamiliales", + "complément_dégressif"], temp_complement_degressif) try: - def local_var_400(_: Any): + def temp_montant_verse_forfaitaire_par_enfant(_: Any): raise EmptyError - def local_var_398(_: Any): - return log_decision_taken(SourcePosition(filename="./prologue.catala_fr", - start_line=128, start_column=11, end_line=128, end_column=47, - law_headings=["Prologue"]), True) - - def local_var_396(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=215, start_column=5, - end_line=215, end_column=43, - law_headings=["Article D521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), (ressources_menage_103 <= - plafond__i_d521_3_252)): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.20234")) - else: - raise EmptyError - except EmptyError: + def temp_montant_verse_forfaitaire_par_enfant_1(_: Any): + return True + + def temp_montant_verse_forfaitaire_par_enfant_2(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=215, start_column=5, end_line=215, end_column=43, + law_headings=["Article D521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"]), (ressources_menage <= + plafond__i_d521_3)): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.20234")) + else: raise EmptyError - def local_var_394(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=229, start_column=5, - end_line=230, end_column=46, - law_headings=["Article D521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), ((ressources_menage_103 > - plafond__i_d521_3_252) and (ressources_menage_103 <= - plafond__i_i_d521_3_238))): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.1117")) - else: - raise EmptyError - except EmptyError: + def temp_montant_verse_forfaitaire_par_enfant_3(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=229, start_column=5, end_line=230, end_column=46, + law_headings=["Article D521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"]), ((ressources_menage > + plafond__i_d521_3) and (ressources_menage <= + plafond__i_i_d521_3))): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.1117")) + else: raise EmptyError - def local_var_392(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=243, start_column=5, - end_line=243, end_column=43, - law_headings=["Article D521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), (ressources_menage_103 > - plafond__i_i_d521_3_238)): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.0559")) - else: - raise EmptyError - except EmptyError: + def temp_montant_verse_forfaitaire_par_enfant_4(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=243, start_column=5, end_line=243, end_column=43, + law_headings=["Article D521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"]), (ressources_menage > + plafond__i_i_d521_3)): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.0559")) + else: raise EmptyError - local_var_391 = handle_default([local_var_392, local_var_394, - local_var_396], local_var_398, - local_var_400) + temp_montant_verse_forfaitaire_par_enfant_5 = handle_default( + [temp_montant_verse_forfaitaire_par_enfant_4, + temp_montant_verse_forfaitaire_par_enfant_3, + temp_montant_verse_forfaitaire_par_enfant_2], + temp_montant_verse_forfaitaire_par_enfant_1, + temp_montant_verse_forfaitaire_par_enfant) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=128, start_column=11, end_line=128, end_column=47, law_headings=["Prologue"])) - montant_verse_forfaitaire_par_enfant_390 = log_variable_definition(["AllocationsFamiliales", - "montant_versé_forfaitaire_par_enfant"], local_var_391) + montant_verse_forfaitaire_par_enfant = log_variable_definition(["AllocationsFamiliales", + "montant_versé_forfaitaire_par_enfant"], + temp_montant_verse_forfaitaire_par_enfant_5) try: - def local_var_412(_: Any): + def temp_montant_initial_base_troisieme_enfant_et_plus(_: Any): raise EmptyError - def local_var_410(_: Any): - return log_decision_taken(SourcePosition(filename="./prologue.catala_fr", - start_line=112, start_column=11, end_line=112, end_column=56, - law_headings=["Prologue"]), True) - - def local_var_408(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=35, start_column=3, - end_line=35, end_column=41, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), (ressources_menage_103 <= - plafond__i_d521_3_252)): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("2")): - return ((prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.41")) * - decimal_of_integer((list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) - - integer_of_string("2")))) - else: - return money_of_cents_string("0") + def temp_montant_initial_base_troisieme_enfant_et_plus_1(_: Any): + return True + + def temp_montant_initial_base_troisieme_enfant_et_plus_2(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=35, start_column=3, end_line=35, end_column=41, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"]), (ressources_menage <= + plafond__i_d521_3)): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("2")): + return ((prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.41")) * + decimal_of_integer((list_length(enfants_a_charge_droit_ouvert_prestation_familiale) - + integer_of_string("2")))) else: - raise EmptyError - except EmptyError: + return money_of_cents_string("0") + else: raise EmptyError - def local_var_406(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=74, start_column=3, - end_line=75, end_column=44, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), ((ressources_menage_103 > - plafond__i_d521_3_252) and (ressources_menage_103 <= - plafond__i_i_d521_3_238))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("2")): - return ((prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.205")) * - decimal_of_integer((list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) - - integer_of_string("2")))) - else: - return money_of_cents_string("0") + def temp_montant_initial_base_troisieme_enfant_et_plus_3(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=74, start_column=3, end_line=75, end_column=44, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"]), ((ressources_menage > + plafond__i_d521_3) and (ressources_menage <= + plafond__i_i_d521_3))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("2")): + return ((prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.205")) * + decimal_of_integer((list_length(enfants_a_charge_droit_ouvert_prestation_familiale) - + integer_of_string("2")))) else: - raise EmptyError - except EmptyError: + return money_of_cents_string("0") + else: raise EmptyError - def local_var_404(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=113, start_column=3, - end_line=113, end_column=41, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), (ressources_menage_103 > - plafond__i_i_d521_3_238)): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("2")): - return ((prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.1025")) * - decimal_of_integer((list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) - - integer_of_string("2")))) - else: - return money_of_cents_string("0") + def temp_montant_initial_base_troisieme_enfant_et_plus_4(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=113, start_column=3, end_line=113, end_column=41, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"]), (ressources_menage > + plafond__i_i_d521_3)): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("2")): + return ((prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.1025")) * + decimal_of_integer((list_length(enfants_a_charge_droit_ouvert_prestation_familiale) - + integer_of_string("2")))) else: - raise EmptyError - except EmptyError: + return money_of_cents_string("0") + else: raise EmptyError - local_var_403 = handle_default([local_var_404, local_var_406, - local_var_408], local_var_410, - local_var_412) + temp_montant_initial_base_troisieme_enfant_et_plus_5 = handle_default( + [temp_montant_initial_base_troisieme_enfant_et_plus_4, + temp_montant_initial_base_troisieme_enfant_et_plus_3, + temp_montant_initial_base_troisieme_enfant_et_plus_2], + temp_montant_initial_base_troisieme_enfant_et_plus_1, + temp_montant_initial_base_troisieme_enfant_et_plus) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=112, start_column=11, end_line=112, end_column=56, law_headings=["Prologue"])) - montant_initial_base_troisieme_enfant_et_plus_402 = log_variable_definition(["AllocationsFamiliales", - "montant_initial_base_troisième_enfant_et_plus"], local_var_403) + montant_initial_base_troisieme_enfant_et_plus = log_variable_definition(["AllocationsFamiliales", + "montant_initial_base_troisième_enfant_et_plus"], + temp_montant_initial_base_troisieme_enfant_et_plus_5) try: - def local_var_424(_: Any): + def temp_montant_initial_base_deuxieme_enfant(_: Any): raise EmptyError - def local_var_422(_: Any): - return log_decision_taken(SourcePosition(filename="./prologue.catala_fr", - start_line=111, start_column=11, end_line=111, end_column=47, - law_headings=["Prologue"]), True) - - def local_var_420(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=35, start_column=3, - end_line=35, end_column=41, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), (ressources_menage_103 <= - plafond__i_d521_3_252)): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("1")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.32")) - else: - return money_of_cents_string("0") + def temp_montant_initial_base_deuxieme_enfant_1(_: Any): + return True + + def temp_montant_initial_base_deuxieme_enfant_2(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=35, start_column=3, end_line=35, end_column=41, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"]), (ressources_menage <= + plafond__i_d521_3)): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("1")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.32")) else: - raise EmptyError - except EmptyError: + return money_of_cents_string("0") + else: raise EmptyError - def local_var_418(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=74, start_column=3, - end_line=75, end_column=44, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), ((ressources_menage_103 > - plafond__i_d521_3_252) and (ressources_menage_103 <= - plafond__i_i_d521_3_238))): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("1")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.16")) - else: - return money_of_cents_string("0") + def temp_montant_initial_base_deuxieme_enfant_3(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=74, start_column=3, end_line=75, end_column=44, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"]), ((ressources_menage > + plafond__i_d521_3) and (ressources_menage <= + plafond__i_i_d521_3))): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("1")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.16")) else: - raise EmptyError - except EmptyError: + return money_of_cents_string("0") + else: raise EmptyError - def local_var_416(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=113, start_column=3, - end_line=113, end_column=41, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), (ressources_menage_103 > - plafond__i_i_d521_3_238)): - if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) > - integer_of_string("1")): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.08")) - else: - return money_of_cents_string("0") + def temp_montant_initial_base_deuxieme_enfant_4(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=113, start_column=3, end_line=113, end_column=41, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"]), (ressources_menage > + plafond__i_i_d521_3)): + if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) > + integer_of_string("1")): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.08")) else: - raise EmptyError - except EmptyError: + return money_of_cents_string("0") + else: raise EmptyError - local_var_415 = handle_default([local_var_416, local_var_418, - local_var_420], local_var_422, - local_var_424) + temp_montant_initial_base_deuxieme_enfant_5 = handle_default( + [temp_montant_initial_base_deuxieme_enfant_4, + temp_montant_initial_base_deuxieme_enfant_3, + temp_montant_initial_base_deuxieme_enfant_2], + temp_montant_initial_base_deuxieme_enfant_1, + temp_montant_initial_base_deuxieme_enfant) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=111, start_column=11, end_line=111, end_column=47, law_headings=["Prologue"])) - montant_initial_base_deuxieme_enfant_414 = log_variable_definition(["AllocationsFamiliales", - "montant_initial_base_deuxième_enfant"], local_var_415) + montant_initial_base_deuxieme_enfant = log_variable_definition(["AllocationsFamiliales", + "montant_initial_base_deuxième_enfant"], + temp_montant_initial_base_deuxieme_enfant_5) try: - try: - try: - if (nombre_total_enfants_353 == - decimal_of_string("0.")): - local_var_427 = decimal_of_string("0.") - else: - local_var_427 = (nombre_moyen_enfants_355 / - nombre_total_enfants_353) - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError + if (nombre_total_enfants == + decimal_of_string("0.")): + temp_rapport_enfants_total_moyen = decimal_of_string("0.") + else: + temp_rapport_enfants_total_moyen = (nombre_moyen_enfants / + nombre_total_enfants) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=113, start_column=11, end_line=113, end_column=38, law_headings=["Prologue"])) - rapport_enfants_total_moyen_426 = log_variable_definition(["AllocationsFamiliales", - "rapport_enfants_total_moyen"], local_var_427) + rapport_enfants_total_moyen = log_variable_definition(["AllocationsFamiliales", + "rapport_enfants_total_moyen"], temp_rapport_enfants_total_moyen) try: - def local_var_429(param_430: Enfant): + def temp_montant_initial_metropole_majoration(param_9: Enfant): try: - def local_var_441(_: Any): + def temp_montant_initial_metropole_majoration_1(_: Any): raise EmptyError - def local_var_439(_: Any): - return log_decision_taken(SourcePosition(filename="./prologue.catala_fr", - start_line=133, start_column=11, - end_line=133, end_column=47, - law_headings=["Prologue"]), True) - - def local_var_437(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=55, start_column=3, - end_line=55, end_column=41, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), ((ressources_menage_103 <= - plafond__i_d521_3_252) and - log_end_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "output"], - log_begin_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - droit_ouvert_majoration_376, - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "input"], - param_430)))))): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.16")) - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_initial_metropole_majoration_2(_: Any): + return True - def local_var_435(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=95, start_column=3, - end_line=96, end_column=44, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), (((ressources_menage_103 > - plafond__i_d521_3_252) and - (ressources_menage_103 <= - plafond__i_i_d521_3_238)) and - log_end_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "output"], - log_begin_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - droit_ouvert_majoration_376, - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "input"], - param_430)))))): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.08")) - else: - raise EmptyError - except EmptyError: + def temp_montant_initial_metropole_majoration_3(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=55, start_column=3, + end_line=55, end_column=41, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"]), ((ressources_menage <= + plafond__i_d521_3) and + log_end_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "output"], + log_begin_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], droit_ouvert_majoration, + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "input"], + param_9)))))): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.16")) + else: raise EmptyError - def local_var_433(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=132, start_column=3, - end_line=132, end_column=41, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), ((ressources_menage_103 > - plafond__i_i_d521_3_238) and - log_end_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "output"], - log_begin_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - droit_ouvert_majoration_376, - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "input"], - param_430)))))): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.04")) - else: - raise EmptyError - except EmptyError: + def temp_montant_initial_metropole_majoration_4(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=95, start_column=3, + end_line=96, end_column=44, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"]), (((ressources_menage > + plafond__i_d521_3) and (ressources_menage <= + plafond__i_i_d521_3)) and + log_end_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "output"], + log_begin_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], droit_ouvert_majoration, + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "input"], + param_9)))))): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.08")) + else: raise EmptyError - def local_var_431(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./epilogue.catala_fr", - start_line=27, start_column=5, - end_line=27, end_column=44, - law_headings=["Règles diverses", "Épilogue", - "Décrets divers"]), not log_end_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "output"], - log_begin_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - droit_ouvert_majoration_376, - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "input"], - param_430))))): - return money_of_cents_string("0") - else: - raise EmptyError - except EmptyError: + def temp_montant_initial_metropole_majoration_5(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=132, start_column=3, + end_line=132, end_column=41, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"]), ((ressources_menage > + plafond__i_i_d521_3) and + log_end_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "output"], + log_begin_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], droit_ouvert_majoration, + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "input"], + param_9)))))): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.04")) + else: + raise EmptyError + + def temp_montant_initial_metropole_majoration_6(_: Any): + if log_decision_taken(SourcePosition(filename="./epilogue.catala_fr", + start_line=27, start_column=5, + end_line=27, end_column=44, + law_headings=["Règles diverses", "Épilogue", + "Décrets divers"]), not log_end_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "output"], + log_begin_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], droit_ouvert_majoration, + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "input"], + param_9))))): + return money_of_cents_string("0") + else: raise EmptyError - return handle_default([local_var_431, local_var_433, - local_var_435, local_var_437], - local_var_439, local_var_441) + return handle_default([temp_montant_initial_metropole_majoration_6, + temp_montant_initial_metropole_majoration_5, + temp_montant_initial_metropole_majoration_4, + temp_montant_initial_metropole_majoration_3], + temp_montant_initial_metropole_majoration_2, + temp_montant_initial_metropole_majoration_1) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=133, @@ -3478,198 +3079,158 @@ def local_var_431(_: Any): start_line=133, start_column=11, end_line=133, end_column=47, law_headings=["Prologue"])) - montant_initial_metropole_majoration_428 = log_variable_definition(["AllocationsFamiliales", - "montant_initial_métropole_majoration"], local_var_429) + montant_initial_metropole_majoration = log_variable_definition(["AllocationsFamiliales", + "montant_initial_métropole_majoration"], + temp_montant_initial_metropole_majoration) try: - try: - try: - def local_var_445(acc_446: Integer, enfant_447: Any): - if log_end_call(["AllocationsFamiliales", - "droit_ouvert_forfaitaire"], - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_forfaitaire", "output"], - log_begin_call(["AllocationsFamiliales", - "droit_ouvert_forfaitaire"], - droit_ouvert_forfaitaire_268, - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_forfaitaire", "input"], - enfant_447)))): - return (acc_446 + integer_of_string("1")) - else: - return acc_446 - local_var_444 = (montant_verse_forfaitaire_par_enfant_390 * - decimal_of_integer(list_fold_left(local_var_445, - integer_of_string( - "0"), - enfants_a_charge_106))) - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_verse_forfaitaire(acc_2: Integer, enfant_2: Any): + if log_end_call(["AllocationsFamiliales", + "droit_ouvert_forfaitaire"], + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_forfaitaire", "output"], + log_begin_call(["AllocationsFamiliales", + "droit_ouvert_forfaitaire"], droit_ouvert_forfaitaire, + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_forfaitaire", "input"], + enfant_2)))): + return (acc_2 + integer_of_string("1")) + else: + return acc_2 + temp_montant_verse_forfaitaire_1 = (montant_verse_forfaitaire_par_enfant * + decimal_of_integer(list_fold_left(temp_montant_verse_forfaitaire, + integer_of_string( + "0"), + enfants_a_charge))) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=129, start_column=11, end_line=129, end_column=36, law_headings=["Prologue"])) - montant_verse_forfaitaire_443 = log_variable_definition(["AllocationsFamiliales", - "montant_versé_forfaitaire"], local_var_444) + montant_verse_forfaitaire = log_variable_definition(["AllocationsFamiliales", + "montant_versé_forfaitaire"], temp_montant_verse_forfaitaire_1) try: - try: - def local_var_456(_: Any): - try: - return (montant_initial_base_deuxieme_enfant_414 + - montant_initial_base_troisieme_enfant_et_plus_402) - except EmptyError: - raise EmptyError - - def local_var_454(_: Any): - return log_decision_taken(SourcePosition(filename="./prologue.catala_fr", - start_line=109, start_column=11, - end_line=109, end_column=31, - law_headings=["Prologue"]), True) + def temp_montant_initial_base(_: Any): + return (montant_initial_base_deuxieme_enfant + + montant_initial_base_troisieme_enfant_et_plus) + + def temp_montant_initial_base_1(_: Any): + return True + + def temp_montant_initial_base_2(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=350, start_column=5, end_line=351, end_column=69, + law_headings=["Article D755-5", + "Chapitre 5 : Prestations familiales et prestations assimilées", + "Titre 5 : Départements d'outre-mer", + "Livre 7 : Régimes divers - Dispositions diverses", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"]), (prestations_familiales_dot_regime_outre_mer_l751_1 and + (list_length(enfants_a_charge_droit_ouvert_prestation_familiale) == + integer_of_string("1")))): + return montant_initial_base_premier_enfant + else: + raise EmptyError - def local_var_452(_: Any): - try: + def temp_montant_initial_base_3(_: Any): + if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", + start_line=335, start_column=5, end_line=335, end_column=24, + law_headings=["Article 7", + "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", + "Dispositions spéciales relatives à Mayotte", + "Décrets divers"]), (residence_2 == + Collectivite(Collectivite_Code.Mayotte, + Unit()))): + return (montant_initial_base_premier_enfant_mayotte + + (montant_initial_base_deuxieme_enfant_mayotte + + (montant_initial_base_troisieme_enfant_mayotte + + montant_initial_base_quatrieme_enfant_et_plus_mayotte))) + else: + raise EmptyError + temp_montant_initial_base_4 = handle_default([temp_montant_initial_base_3, + temp_montant_initial_base_2], + temp_montant_initial_base_1, + temp_montant_initial_base) + except EmptyError: + raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", + start_line=109, start_column=11, + end_line=109, end_column=31, + law_headings=["Prologue"])) + montant_initial_base = log_variable_definition(["AllocationsFamiliales", + "montant_initial_base"], temp_montant_initial_base_4) + try: + def temp_montant_initial_majoration(param_10: Enfant): + try: + def temp_montant_initial_majoration_1(_: Any): + return log_end_call(["AllocationsFamiliales", + "montant_initial_métropole_majoration"], + log_variable_definition(["AllocationsFamiliales", + "montant_initial_métropole_majoration", "output"], + log_begin_call(["AllocationsFamiliales", + "montant_initial_métropole_majoration"], + montant_initial_metropole_majoration, + log_variable_definition(["AllocationsFamiliales", + "montant_initial_métropole_majoration", "input"], + param_10)))) + + def temp_montant_initial_majoration_2(_: Any): + return True + + def temp_montant_initial_majoration_3(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=350, start_column=5, - end_line=351, end_column=69, + start_line=373, start_column=5, + end_line=376, end_column=42, law_headings=["Article D755-5", "Chapitre 5 : Prestations familiales et prestations assimilées", "Titre 5 : Départements d'outre-mer", "Livre 7 : Régimes divers - Dispositions diverses", "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), (prestations_familiales_dot_regime_outre_mer_l751_1_221 and - (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) == - integer_of_string("1")))): - return montant_initial_base_premier_enfant_364 + "Code de la sécurité sociale"]), (log_end_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "output"], + log_begin_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], droit_ouvert_majoration, + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "input"], param_10)))) and + (prestations_familiales_dot_regime_outre_mer_l751_1 and + ((list_length(enfants_a_charge_droit_ouvert_prestation_familiale) == + integer_of_string("1")) and ((param_10.age >= + integer_of_string("11")) and (param_10.age < + integer_of_string("16"))))))): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.0369")) else: raise EmptyError - except EmptyError: - raise EmptyError - def local_var_450(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=335, start_column=5, - end_line=335, end_column=24, - law_headings=["Article 7", - "Décret n°2002-423 du 29 mars 2002 relatif aux prestations familiales à Mayotte", - "Dispositions spéciales relatives à Mayotte", - "Décrets divers"]), (residence_104 == - Collectivite(Collectivite_Code.Mayotte, - Unit()))): - return (montant_initial_base_premier_enfant_mayotte_325 + - (montant_initial_base_deuxieme_enfant_mayotte_299 + - (montant_initial_base_troisieme_enfant_mayotte_273 + - montant_initial_base_quatrieme_enfant_et_plus_mayotte_271))) + def temp_montant_initial_majoration_4(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=382, start_column=5, + end_line=385, end_column=23, + law_headings=["Article D755-5", + "Chapitre 5 : Prestations familiales et prestations assimilées", + "Titre 5 : Départements d'outre-mer", + "Livre 7 : Régimes divers - Dispositions diverses", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"]), (log_end_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "output"], + log_begin_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], droit_ouvert_majoration, + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "input"], param_10)))) and + (prestations_familiales_dot_regime_outre_mer_l751_1 and + ((list_length(enfants_a_charge_droit_ouvert_prestation_familiale) == + integer_of_string("1")) and (param_10.age >= + integer_of_string("16")))))): + return (prestations_familiales_dot_base_mensuelle * + decimal_of_string("0.0567")) else: raise EmptyError - except EmptyError: - raise EmptyError - local_var_449 = handle_default([local_var_450, local_var_452], - local_var_454, local_var_456) - except EmptyError: - raise EmptyError - except EmptyError: - raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=109, start_column=11, - end_line=109, end_column=31, - law_headings=["Prologue"])) - montant_initial_base_448 = log_variable_definition(["AllocationsFamiliales", - "montant_initial_base"], local_var_449) - try: - def local_var_459(param_460: Enfant): - try: - try: - def local_var_467(_: Any): - try: - return log_end_call(["AllocationsFamiliales", - "montant_initial_métropole_majoration"], - log_variable_definition(["AllocationsFamiliales", - "montant_initial_métropole_majoration", - "output"], - log_begin_call(["AllocationsFamiliales", - "montant_initial_métropole_majoration"], - montant_initial_metropole_majoration_428, - log_variable_definition(["AllocationsFamiliales", - "montant_initial_métropole_majoration", - "input"], param_460)))) - except EmptyError: - raise EmptyError - - def local_var_465(_: Any): - return log_decision_taken(SourcePosition(filename="./prologue.catala_fr", - start_line=134, start_column=11, - end_line=134, end_column=37, - law_headings=["Prologue"]), True) - - def local_var_463(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=373, start_column=5, - end_line=376, end_column=42, - law_headings=["Article D755-5", - "Chapitre 5 : Prestations familiales et prestations assimilées", - "Titre 5 : Départements d'outre-mer", - "Livre 7 : Régimes divers - Dispositions diverses", - "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), (log_end_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "output"], - log_begin_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - droit_ouvert_majoration_376, - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "input"], - param_460)))) and - (prestations_familiales_dot_regime_outre_mer_l751_1_221 and - ((list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) == - integer_of_string("1")) and - ((param_460.age >= - integer_of_string("11")) and (param_460.age < - integer_of_string("16"))))))): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.0369")) - else: - raise EmptyError - except EmptyError: - raise EmptyError - - def local_var_461(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=382, start_column=5, - end_line=385, end_column=23, - law_headings=["Article D755-5", - "Chapitre 5 : Prestations familiales et prestations assimilées", - "Titre 5 : Départements d'outre-mer", - "Livre 7 : Régimes divers - Dispositions diverses", - "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), (log_end_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "output"], - log_begin_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - droit_ouvert_majoration_376, - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "input"], - param_460)))) and - (prestations_familiales_dot_regime_outre_mer_l751_1_221 and - ((list_length(enfants_a_charge_droit_ouvert_prestation_familiale_231) == - integer_of_string("1")) and (param_460.age >= - integer_of_string("16")))))): - return (prestations_familiales_dot_base_mensuelle_222 * - decimal_of_string("0.0567")) - else: - raise EmptyError - except EmptyError: - raise EmptyError - return handle_default([local_var_461, local_var_463], - local_var_465, local_var_467) - except EmptyError: - raise EmptyError + return handle_default([temp_montant_initial_majoration_4, + temp_montant_initial_majoration_3], + temp_montant_initial_majoration_2, + temp_montant_initial_majoration_1) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=134, @@ -3682,134 +3243,108 @@ def local_var_461(_: Any): start_line=134, start_column=11, end_line=134, end_column=37, law_headings=["Prologue"])) - montant_initial_majoration_458 = log_variable_definition(["AllocationsFamiliales", - "montant_initial_majoration"], local_var_459) + montant_initial_majoration = log_variable_definition(["AllocationsFamiliales", + "montant_initial_majoration"], temp_montant_initial_majoration) try: - try: - def local_var_477(_: Any): - return money_of_cents_string("0") - - def local_var_475(_: Any): - return log_decision_taken(SourcePosition(filename="./prologue.catala_fr", - start_line=143, start_column=11, - end_line=143, end_column=52, - law_headings=["Prologue"]), True) - - def local_var_473(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=262, start_column=5, - end_line=264, end_column=42, - law_headings=["Article D521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), ((ressources_menage_103 > - plafond__i_d521_3_252) and (ressources_menage_103 <= - (plafond__i_d521_3_252 + - (montant_verse_forfaitaire_443 * - decimal_of_string("12.")))))): - return ((plafond__i_d521_3_252 + - ((montant_verse_forfaitaire_443 * - decimal_of_string("12.")) - - ressources_menage_103)) * - (decimal_of_string("1.") / - decimal_of_string("12."))) - else: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_montant_verse_complement_pour_forfaitaire(_: Any): + return money_of_cents_string("0") + + def temp_montant_verse_complement_pour_forfaitaire_1(_: Any): + return True + + def temp_montant_verse_complement_pour_forfaitaire_2(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=262, start_column=5, end_line=264, end_column=42, + law_headings=["Article D521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"]), ((ressources_menage > + plafond__i_d521_3) and (ressources_menage <= + (plafond__i_d521_3 + (montant_verse_forfaitaire * + decimal_of_string("12.")))))): + return ((plafond__i_d521_3 + ((montant_verse_forfaitaire * + decimal_of_string("12.")) - ressources_menage)) * + (decimal_of_string("1.") / decimal_of_string("12."))) + else: + raise EmptyError - def local_var_471(_: Any): - try: - if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=272, start_column=5, - end_line=274, end_column=41, - law_headings=["Article D521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples", - "Code de la sécurité sociale"]), ((ressources_menage_103 > - plafond__i_i_d521_3_238) and - (ressources_menage_103 <= (plafond__i_i_d521_3_238 + - (montant_verse_forfaitaire_443 * - decimal_of_string("12.")))))): - return ((plafond__i_i_d521_3_238 + - ((montant_verse_forfaitaire_443 * - decimal_of_string("12.")) - - ressources_menage_103)) * - (decimal_of_string("1.") / - decimal_of_string("12."))) - else: - raise EmptyError - except EmptyError: - raise EmptyError - local_var_470 = handle_default([local_var_471, local_var_473], - local_var_475, local_var_477) - except EmptyError: - raise EmptyError + def temp_montant_verse_complement_pour_forfaitaire_3(_: Any): + if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", + start_line=272, start_column=5, end_line=274, end_column=41, + law_headings=["Article D521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples", + "Code de la sécurité sociale"]), ((ressources_menage > + plafond__i_i_d521_3) and (ressources_menage <= + (plafond__i_i_d521_3 + (montant_verse_forfaitaire * + decimal_of_string("12.")))))): + return ((plafond__i_i_d521_3 + ((montant_verse_forfaitaire * + decimal_of_string("12.")) - ressources_menage)) * + (decimal_of_string("1.") / decimal_of_string("12."))) + else: + raise EmptyError + temp_montant_verse_complement_pour_forfaitaire_4 = handle_default( + [temp_montant_verse_complement_pour_forfaitaire_3, + temp_montant_verse_complement_pour_forfaitaire_2], + temp_montant_verse_complement_pour_forfaitaire_1, + temp_montant_verse_complement_pour_forfaitaire) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=143, start_column=11, end_line=143, end_column=52, law_headings=["Prologue"])) - montant_verse_complement_pour_forfaitaire_469 = log_variable_definition(["AllocationsFamiliales", - "montant_versé_complément_pour_forfaitaire"], local_var_470) + montant_verse_complement_pour_forfaitaire = log_variable_definition(["AllocationsFamiliales", + "montant_versé_complément_pour_forfaitaire"], + temp_montant_verse_complement_pour_forfaitaire_4) try: - try: - try: - local_var_480 = (montant_initial_base_448 * - rapport_enfants_total_moyen_426) - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError + temp_montant_avec_garde_alternee_base = (montant_initial_base * + rapport_enfants_total_moyen) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=116, start_column=11, end_line=116, end_column=43, law_headings=["Prologue"])) - montant_avec_garde_alternee_base_479 = log_variable_definition(["AllocationsFamiliales", - "montant_avec_garde_alternée_base"], local_var_480) + montant_avec_garde_alternee_base = log_variable_definition(["AllocationsFamiliales", + "montant_avec_garde_alternée_base"], + temp_montant_avec_garde_alternee_base) try: - def local_var_482(param_483: Enfant): + def temp_montant_avec_garde_alternee_majoration(param_11: Enfant): try: - try: - try: - match_arg_557 = log_end_call(["AllocationsFamiliales", - "prise_en_compte"], - log_variable_definition(["AllocationsFamiliales", - "prise_en_compte", "output"], - log_begin_call(["AllocationsFamiliales", - "prise_en_compte"], prise_en_compte_108, - log_variable_definition(["AllocationsFamiliales", - "prise_en_compte", "input"], - param_483)))) - if match_arg_557.code == PriseEnCompte_Code.Complete: - _ = match_arg_557.value - local_var_484 = decimal_of_string("1.") - elif match_arg_557.code == PriseEnCompte_Code.Partagee: - _ = match_arg_557.value - local_var_484 = decimal_of_string("0.5") - elif match_arg_557.code == PriseEnCompte_Code.Zero: - _ = match_arg_557.value - local_var_484 = decimal_of_string("0.") - return (log_end_call(["AllocationsFamiliales", - "montant_initial_majoration"], - log_variable_definition(["AllocationsFamiliales", - "montant_initial_majoration", "output"], - log_begin_call(["AllocationsFamiliales", - "montant_initial_majoration"], - montant_initial_majoration_458, - log_variable_definition(["AllocationsFamiliales", - "montant_initial_majoration", "input"], - param_483)))) * local_var_484) - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError + match_arg_17 = log_end_call(["AllocationsFamiliales", + "prise_en_compte"], + log_variable_definition(["AllocationsFamiliales", + "prise_en_compte", "output"], + log_begin_call(["AllocationsFamiliales", "prise_en_compte"], + prise_en_compte, + log_variable_definition(["AllocationsFamiliales", + "prise_en_compte", "input"], + param_11)))) + if match_arg_17.code == PriseEnCompte_Code.Complete: + _ = match_arg_17.value + temp_montant_avec_garde_alternee_majoration_1 = decimal_of_string( + "1.") + elif match_arg_17.code == PriseEnCompte_Code.Partagee: + _ = match_arg_17.value + temp_montant_avec_garde_alternee_majoration_1 = decimal_of_string( + "0.5") + elif match_arg_17.code == PriseEnCompte_Code.Zero: + _ = match_arg_17.value + temp_montant_avec_garde_alternee_majoration_1 = decimal_of_string( + "0.") + return (log_end_call(["AllocationsFamiliales", + "montant_initial_majoration"], + log_variable_definition(["AllocationsFamiliales", + "montant_initial_majoration", "output"], + log_begin_call(["AllocationsFamiliales", + "montant_initial_majoration"], + montant_initial_majoration, + log_variable_definition(["AllocationsFamiliales", + "montant_initial_majoration", "input"], param_11)))) * + temp_montant_avec_garde_alternee_majoration_1) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=135, @@ -3822,127 +3357,99 @@ def local_var_482(param_483: Enfant): start_line=135, start_column=11, end_line=135, end_column=49, law_headings=["Prologue"])) - montant_avec_garde_alternee_majoration_481 = log_variable_definition(["AllocationsFamiliales", - "montant_avec_garde_alternée_majoration"], local_var_482) + montant_avec_garde_alternee_majoration = log_variable_definition(["AllocationsFamiliales", + "montant_avec_garde_alternée_majoration"], + temp_montant_avec_garde_alternee_majoration) try: - try: - try: - if droit_ouvert_base_366: - local_var_489 = montant_avec_garde_alternee_base_479 - else: - local_var_489 = money_of_cents_string("0") - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError + if droit_ouvert_base: + temp_montant_verse_base = montant_avec_garde_alternee_base + else: + temp_montant_verse_base = money_of_cents_string("0") except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=117, start_column=11, end_line=117, end_column=29, law_headings=["Prologue"])) - montant_verse_base_488 = log_variable_definition(["AllocationsFamiliales", - "montant_versé_base"], local_var_489) + montant_verse_base = log_variable_definition(["AllocationsFamiliales", + "montant_versé_base"], temp_montant_verse_base) try: - try: - try: - if droit_ouvert_base_366: - def local_var_492(acc_493: Money, enfant_494: Any): - return (acc_493 + - log_end_call(["AllocationsFamiliales", + if droit_ouvert_base: + def temp_montant_verse_majoration(acc_3: Money, enfant_3: Any): + return (acc_3 + log_end_call(["AllocationsFamiliales", "montant_avec_garde_alternée_majoration"], log_variable_definition(["AllocationsFamiliales", - "montant_avec_garde_alternée_majoration", - "output"], + "montant_avec_garde_alternée_majoration", "output"], log_begin_call(["AllocationsFamiliales", "montant_avec_garde_alternée_majoration"], - montant_avec_garde_alternee_majoration_481, + montant_avec_garde_alternee_majoration, log_variable_definition(["AllocationsFamiliales", - "montant_avec_garde_alternée_majoration", - "input"], enfant_494))))) - local_var_491 = list_fold_left(local_var_492, - money_of_cents_string("0"), - enfants_a_charge_106) - else: - local_var_491 = money_of_cents_string("0") - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError + "montant_avec_garde_alternée_majoration", "input"], + enfant_3))))) + temp_montant_verse_majoration_1 = list_fold_left(temp_montant_verse_majoration, + money_of_cents_string( + "0"), + enfants_a_charge) + else: + temp_montant_verse_majoration_1 = money_of_cents_string("0") except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=136, start_column=11, end_line=136, end_column=35, law_headings=["Prologue"])) - montant_verse_majoration_490 = log_variable_definition(["AllocationsFamiliales", - "montant_versé_majoration"], local_var_491) + montant_verse_majoration = log_variable_definition(["AllocationsFamiliales", + "montant_versé_majoration"], temp_montant_verse_majoration_1) try: - try: - try: - local_var_496 = (montant_verse_base_488 + - montant_verse_majoration_490) - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError + temp_montant_base_complement_pour_base_et_majoration = (montant_verse_base + + montant_verse_majoration) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=140, start_column=11, end_line=140, end_column=58, law_headings=["Prologue"])) - montant_base_complement_pour_base_et_majoration_495 = log_variable_definition(["AllocationsFamiliales", - "montant_base_complément_pour_base_et_majoration"], local_var_496) + montant_base_complement_pour_base_et_majoration = log_variable_definition(["AllocationsFamiliales", + "montant_base_complément_pour_base_et_majoration"], + temp_montant_base_complement_pour_base_et_majoration) try: - try: - try: - if droit_ouvert_complement_266: - local_var_498 = log_end_call(["AllocationsFamiliales", - "complément_dégressif"], - log_variable_definition(["AllocationsFamiliales", - "complément_dégressif", "output"], - log_begin_call(["AllocationsFamiliales", - "complément_dégressif"], complement_degressif_379, - log_variable_definition(["AllocationsFamiliales", - "complément_dégressif", "input"], - montant_base_complement_pour_base_et_majoration_495)))) - else: - local_var_498 = money_of_cents_string("0") - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError + if droit_ouvert_complement: + temp_montant_verse_complement_pour_base_et_majoration = log_end_call(["AllocationsFamiliales", + "complément_dégressif"], + log_variable_definition(["AllocationsFamiliales", + "complément_dégressif", "output"], + log_begin_call(["AllocationsFamiliales", + "complément_dégressif"], complement_degressif, + log_variable_definition(["AllocationsFamiliales", + "complément_dégressif", "input"], + montant_base_complement_pour_base_et_majoration)))) + else: + temp_montant_verse_complement_pour_base_et_majoration = money_of_cents_string( + "0") except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=142, start_column=11, end_line=142, end_column=59, law_headings=["Prologue"])) - montant_verse_complement_pour_base_et_majoration_497 = log_variable_definition(["AllocationsFamiliales", - "montant_versé_complément_pour_base_et_majoration"], local_var_498) + montant_verse_complement_pour_base_et_majoration = log_variable_definition(["AllocationsFamiliales", + "montant_versé_complément_pour_base_et_majoration"], + temp_montant_verse_complement_pour_base_et_majoration) try: - try: - try: - if droit_ouvert_base_366: - local_var_500 = (montant_verse_base_488 + - (montant_verse_majoration_490 + - (montant_verse_forfaitaire_443 + - (montant_verse_complement_pour_base_et_majoration_497 + - montant_verse_complement_pour_forfaitaire_469)))) - else: - local_var_500 = money_of_cents_string("0") - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError + if droit_ouvert_base: + temp_montant_verse = (montant_verse_base + + (montant_verse_majoration + (montant_verse_forfaitaire + + (montant_verse_complement_pour_base_et_majoration + + montant_verse_complement_pour_forfaitaire)))) + else: + temp_montant_verse = money_of_cents_string("0") except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", start_line=105, start_column=10, end_line=105, end_column=23, law_headings=["Prologue"])) - montant_verse_499 = log_variable_definition(["AllocationsFamiliales", - "montant_versé"], local_var_500) + montant_verse = log_variable_definition(["AllocationsFamiliales", + "montant_versé"], temp_montant_verse) try: - local_var_501 = (personne_charge_effective_permanente_est_parent_101 or - (not personne_charge_effective_permanente_est_parent_101 and - personne_charge_effective_permanente_remplit_titre__i_102)) + allocations_familiales = (personne_charge_effective_permanente_est_parent or + (not personne_charge_effective_permanente_est_parent and + personne_charge_effective_permanente_remplit_titre__i)) except EmptyError: raise NoValueProvided(SourcePosition(filename="./securite_sociale_L.catala_fr", start_line=230, start_column=5, @@ -3953,221 +3460,176 @@ def local_var_492(acc_493: Money, enfant_494: Any): "Livre 5 : Prestations familiales et prestations assimilées", "Partie législative", "Code de la sécurité sociale"])) - assert local_var_501 - return AllocationsFamilialesOut(montant_verse_out=montant_verse_499) - - -def interface_allocations_familiales(interface_allocations_familiales_in_502: InterfaceAllocationsFamilialesIn): - i_date_courante_503 = interface_allocations_familiales_in_502.i_date_courante_in - i_enfants_504 = interface_allocations_familiales_in_502.i_enfants_in - i_ressources_menage_505 = interface_allocations_familiales_in_502.i_ressources_menage_in - i_residence_506 = interface_allocations_familiales_in_502.i_residence_in - i_personne_charge_effective_permanente_est_parent_507 = interface_allocations_familiales_in_502.i_personne_charge_effective_permanente_est_parent_in - i_personne_charge_effective_permanente_remplit_titre__i_508 = interface_allocations_familiales_in_502.i_personne_charge_effective_permanente_remplit_titre_I_in - i_avait_enfant_a_charge_avant_1er_janvier_2012_509 = interface_allocations_familiales_in_502.i_avait_enfant_a_charge_avant_1er_janvier_2012_in + assert allocations_familiales + return AllocationsFamilialesOut(montant_verse_out=montant_verse) + + +def interface_allocations_familiales(interface_allocations_familiales_in: InterfaceAllocationsFamilialesIn): + i_date_courante = interface_allocations_familiales_in.i_date_courante_in + i_enfants = interface_allocations_familiales_in.i_enfants_in + i_ressources_menage = interface_allocations_familiales_in.i_ressources_menage_in + i_residence = interface_allocations_familiales_in.i_residence_in + i_personne_charge_effective_permanente_est_parent = interface_allocations_familiales_in.i_personne_charge_effective_permanente_est_parent_in + i_personne_charge_effective_permanente_remplit_titre__i = interface_allocations_familiales_in.i_personne_charge_effective_permanente_remplit_titre_I_in + i_avait_enfant_a_charge_avant_1er_janvier_2012 = interface_allocations_familiales_in.i_avait_enfant_a_charge_avant_1er_janvier_2012_in try: - try: - try: - def local_var_512(enfant_513: Any): - if ((enfant_513.d_date_de_naissance + - duration_of_numbers(3, 0, 0)) >= - i_date_courante_503): - local_var_514 = SituationObligationScolaire(SituationObligationScolaire_Code.Avant, - Unit()) - else: - if ((enfant_513.d_date_de_naissance + - duration_of_numbers(16, 0, 0)) >= - i_date_courante_503): - local_var_514 = SituationObligationScolaire(SituationObligationScolaire_Code.Pendant, - Unit()) - else: - local_var_514 = SituationObligationScolaire(SituationObligationScolaire_Code.Apres, - Unit()) - return Enfant(identifiant=enfant_513.d_identifiant, - obligation_scolaire=local_var_514, - remuneration_mensuelle=enfant_513.d_remuneration_mensuelle, - date_de_naissance=enfant_513.d_date_de_naissance, - age=year_of_date((date_of_numbers(0, 1, 1) + - (i_date_courante_503 - - enfant_513.d_date_de_naissance))), - prise_en_charge=enfant_513.d_prise_en_charge, - a_deja_ouvert_droit_aux_allocations_familiales=enfant_513.d_a_deja_ouvert_droit_aux_allocations_familiales) - local_var_511 = list_map(local_var_512, i_enfants_504) - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError + def temp_enfants_a_charge(enfant_4: Any): + if ((enfant_4.d_date_de_naissance + + duration_of_numbers(3, 0, 0)) >= + i_date_courante): + temp_enfants_a_charge_1 = SituationObligationScolaire(SituationObligationScolaire_Code.Avant, + Unit()) + else: + if ((enfant_4.d_date_de_naissance + + duration_of_numbers(16, 0, 0)) >= + i_date_courante): + temp_enfants_a_charge_1 = SituationObligationScolaire(SituationObligationScolaire_Code.Pendant, + Unit()) + else: + temp_enfants_a_charge_1 = SituationObligationScolaire(SituationObligationScolaire_Code.Apres, + Unit()) + return Enfant(identifiant=enfant_4.d_identifiant, + obligation_scolaire=temp_enfants_a_charge_1, + remuneration_mensuelle=enfant_4.d_remuneration_mensuelle, + date_de_naissance=enfant_4.d_date_de_naissance, + age=year_of_date((date_of_numbers(0, 1, 1) + + (i_date_courante - enfant_4.d_date_de_naissance))), + prise_en_charge=enfant_4.d_prise_en_charge, + a_deja_ouvert_droit_aux_allocations_familiales=enfant_4.d_a_deja_ouvert_droit_aux_allocations_familiales) + temp_enfants_a_charge_2 = list_map(temp_enfants_a_charge, i_enfants) except EmptyError: raise NoValueProvided(SourcePosition(filename="./epilogue.catala_fr", start_line=74, start_column=11, end_line=74, end_column=27, law_headings=["Interface du programme", "Épilogue", "Décrets divers"])) - enfants_a_charge_510 = log_variable_definition(["InterfaceAllocationsFamiliales", - "enfants_à_charge"], local_var_511) + enfants_a_charge_1 = log_variable_definition(["InterfaceAllocationsFamiliales", + "enfants_à_charge"], temp_enfants_a_charge_2) try: try: - try: - if log_decision_taken(SourcePosition(filename="./epilogue.catala_fr", - start_line=90, start_column=20, - end_line=90, end_column=69, - law_headings=["Interface du programme", "Épilogue", - "Décrets divers"]), i_personne_charge_effective_permanente_est_parent_507): - local_var_517 = True - else: - raise EmptyError - except EmptyError: + if log_decision_taken(SourcePosition(filename="./epilogue.catala_fr", + start_line=90, start_column=20, end_line=90, end_column=69, + law_headings=["Interface du programme", "Épilogue", + "Décrets divers"]), i_personne_charge_effective_permanente_est_parent): + temp_allocations_familiales_dot_personne_charge_effective_permanente_est_parent = True + else: raise EmptyError except EmptyError: - local_var_517 = False - local_var_516 = log_variable_definition(["InterfaceAllocationsFamiliales", - "allocations_familiales.personne_charge_effective_permanente_est_parent"], - local_var_517) + temp_allocations_familiales_dot_personne_charge_effective_permanente_est_parent = False + temp_allocations_familiales_dot_personne_charge_effective_permanente_est_parent_1 = log_variable_definition(["InterfaceAllocationsFamiliales", + "allocations_familiales.personne_charge_effective_permanente_est_parent"], + temp_allocations_familiales_dot_personne_charge_effective_permanente_est_parent) except EmptyError: - raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=90, start_column=10, - end_line=90, end_column=57, - law_headings=["Prologue"])) - allocations_familiales_dot_personne_charge_effective_permanente_est_parent_515 = local_var_516 + raise NoValueProvided(SourcePosition(filename="./epilogue.catala_fr", + start_line=75, start_column=3, + end_line=75, end_column=25, + law_headings=["Interface du programme", + "Épilogue", "Décrets divers"])) + allocations_familiales_dot_personne_charge_effective_permanente_est_parent = temp_allocations_familiales_dot_personne_charge_effective_permanente_est_parent_1 try: try: - try: - if log_decision_taken(SourcePosition(filename="./epilogue.catala_fr", - start_line=93, start_column=20, - end_line=93, end_column=74, - law_headings=["Interface du programme", "Épilogue", - "Décrets divers"]), i_personne_charge_effective_permanente_remplit_titre__i_508): - local_var_520 = True - else: - raise EmptyError - except EmptyError: + if log_decision_taken(SourcePosition(filename="./epilogue.catala_fr", + start_line=93, start_column=20, end_line=93, end_column=74, + law_headings=["Interface du programme", "Épilogue", + "Décrets divers"]), i_personne_charge_effective_permanente_remplit_titre__i): + temp_allocations_familiales_dot_personne_charge_effective_permanente_remplit_titre__i = True + else: raise EmptyError except EmptyError: - local_var_520 = False - local_var_519 = log_variable_definition(["InterfaceAllocationsFamiliales", - "allocations_familiales.personne_charge_effective_permanente_remplit_titre_I"], - local_var_520) + temp_allocations_familiales_dot_personne_charge_effective_permanente_remplit_titre__i = False + temp_allocations_familiales_dot_personne_charge_effective_permanente_remplit_titre__i_1 = log_variable_definition(["InterfaceAllocationsFamiliales", + "allocations_familiales.personne_charge_effective_permanente_remplit_titre_I"], + temp_allocations_familiales_dot_personne_charge_effective_permanente_remplit_titre__i) except EmptyError: - raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=91, start_column=10, - end_line=91, end_column=62, - law_headings=["Prologue"])) - allocations_familiales_dot_personne_charge_effective_permanente_remplit_titre__i_518 = local_var_519 + raise NoValueProvided(SourcePosition(filename="./epilogue.catala_fr", + start_line=75, start_column=3, + end_line=75, end_column=25, + law_headings=["Interface du programme", + "Épilogue", "Décrets divers"])) + allocations_familiales_dot_personne_charge_effective_permanente_remplit_titre__i = temp_allocations_familiales_dot_personne_charge_effective_permanente_remplit_titre__i_1 try: - try: - try: - local_var_523 = i_ressources_menage_505 - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError - local_var_522 = log_variable_definition(["InterfaceAllocationsFamiliales", - "allocations_familiales.ressources_ménage"], local_var_523) + temp_allocations_familiales_dot_ressources_menage = log_variable_definition(["InterfaceAllocationsFamiliales", + "allocations_familiales.ressources_ménage"], + i_ressources_menage) except EmptyError: - raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=92, start_column=10, - end_line=92, end_column=27, - law_headings=["Prologue"])) - allocations_familiales_dot_ressources_menage_521 = local_var_522 + raise NoValueProvided(SourcePosition(filename="./epilogue.catala_fr", + start_line=75, start_column=3, + end_line=75, end_column=25, + law_headings=["Interface du programme", + "Épilogue", "Décrets divers"])) + allocations_familiales_dot_ressources_menage = temp_allocations_familiales_dot_ressources_menage try: - try: - try: - local_var_526 = i_residence_506 - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError - local_var_525 = log_variable_definition(["InterfaceAllocationsFamiliales", - "allocations_familiales.résidence"], local_var_526) + temp_allocations_familiales_dot_residence = log_variable_definition(["InterfaceAllocationsFamiliales", + "allocations_familiales.résidence"], i_residence) except EmptyError: - raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=93, start_column=10, - end_line=93, end_column=19, - law_headings=["Prologue"])) - allocations_familiales_dot_residence_524 = local_var_525 + raise NoValueProvided(SourcePosition(filename="./epilogue.catala_fr", + start_line=75, start_column=3, + end_line=75, end_column=25, + law_headings=["Interface du programme", + "Épilogue", "Décrets divers"])) + allocations_familiales_dot_residence = temp_allocations_familiales_dot_residence try: - try: - try: - local_var_529 = i_date_courante_503 - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError - local_var_528 = log_variable_definition(["InterfaceAllocationsFamiliales", - "allocations_familiales.date_courante"], local_var_529) + temp_allocations_familiales_dot_date_courante = log_variable_definition(["InterfaceAllocationsFamiliales", + "allocations_familiales.date_courante"], i_date_courante) except EmptyError: - raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=96, start_column=10, - end_line=96, end_column=23, - law_headings=["Prologue"])) - allocations_familiales_dot_date_courante_527 = local_var_528 + raise NoValueProvided(SourcePosition(filename="./epilogue.catala_fr", + start_line=75, start_column=3, + end_line=75, end_column=25, + law_headings=["Interface du programme", + "Épilogue", "Décrets divers"])) + allocations_familiales_dot_date_courante = temp_allocations_familiales_dot_date_courante try: - try: - try: - local_var_532 = enfants_a_charge_510 - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError - local_var_531 = log_variable_definition(["InterfaceAllocationsFamiliales", - "allocations_familiales.enfants_à_charge"], local_var_532) + temp_allocations_familiales_dot_enfants_a_charge = log_variable_definition(["InterfaceAllocationsFamiliales", + "allocations_familiales.enfants_à_charge"], enfants_a_charge_1) except EmptyError: - raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=99, start_column=10, - end_line=99, end_column=26, - law_headings=["Prologue"])) - allocations_familiales_dot_enfants_a_charge_530 = local_var_531 + raise NoValueProvided(SourcePosition(filename="./epilogue.catala_fr", + start_line=75, start_column=3, + end_line=75, end_column=25, + law_headings=["Interface du programme", + "Épilogue", "Décrets divers"])) + allocations_familiales_dot_enfants_a_charge = temp_allocations_familiales_dot_enfants_a_charge try: try: - try: - if log_decision_taken(SourcePosition(filename="./epilogue.catala_fr", - start_line=96, start_column=20, - end_line=96, end_column=66, - law_headings=["Interface du programme", "Épilogue", - "Décrets divers"]), i_avait_enfant_a_charge_avant_1er_janvier_2012_509): - local_var_535 = True - else: - raise EmptyError - except EmptyError: + if log_decision_taken(SourcePosition(filename="./epilogue.catala_fr", + start_line=96, start_column=20, end_line=96, end_column=66, + law_headings=["Interface du programme", "Épilogue", + "Décrets divers"]), i_avait_enfant_a_charge_avant_1er_janvier_2012): + temp_allocations_familiales_dot_avait_enfant_a_charge_avant_1er_janvier_2012 = True + else: raise EmptyError except EmptyError: - local_var_535 = False - local_var_534 = log_variable_definition(["InterfaceAllocationsFamiliales", - "allocations_familiales.avait_enfant_à_charge_avant_1er_janvier_2012"], - local_var_535) + temp_allocations_familiales_dot_avait_enfant_a_charge_avant_1er_janvier_2012 = False + temp_allocations_familiales_dot_avait_enfant_a_charge_avant_1er_janvier_2012_1 = log_variable_definition(["InterfaceAllocationsFamiliales", + "allocations_familiales.avait_enfant_à_charge_avant_1er_janvier_2012"], + temp_allocations_familiales_dot_avait_enfant_a_charge_avant_1er_janvier_2012) except EmptyError: - raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=120, start_column=10, - end_line=120, end_column=54, - law_headings=["Prologue"])) - allocations_familiales_dot_avait_enfant_a_charge_avant_1er_janvier_2012_533 = local_var_534 - result_536 = log_end_call(["InterfaceAllocationsFamiliales", - "allocations_familiales", "AllocationsFamiliales"], - log_begin_call(["InterfaceAllocationsFamiliales", - "allocations_familiales", "AllocationsFamiliales"], - allocations_familiales, - AllocationsFamilialesIn(personne_charge_effective_permanente_est_parent_in=allocations_familiales_dot_personne_charge_effective_permanente_est_parent_515, - personne_charge_effective_permanente_remplit_titre_I_in=allocations_familiales_dot_personne_charge_effective_permanente_remplit_titre__i_518, - ressources_menage_in=allocations_familiales_dot_ressources_menage_521, - residence_in=allocations_familiales_dot_residence_524, - date_courante_in=allocations_familiales_dot_date_courante_527, - enfants_a_charge_in=allocations_familiales_dot_enfants_a_charge_530, - avait_enfant_a_charge_avant_1er_janvier_2012_in=allocations_familiales_dot_avait_enfant_a_charge_avant_1er_janvier_2012_533))) - allocations_familiales_dot_montant_verse_537 = result_536.montant_verse_out + raise NoValueProvided(SourcePosition(filename="./epilogue.catala_fr", + start_line=75, start_column=3, + end_line=75, end_column=25, + law_headings=["Interface du programme", + "Épilogue", "Décrets divers"])) + allocations_familiales_dot_avait_enfant_a_charge_avant_1er_janvier_2012 = temp_allocations_familiales_dot_avait_enfant_a_charge_avant_1er_janvier_2012_1 + result_4 = log_end_call(["InterfaceAllocationsFamiliales", + "allocations_familiales", "AllocationsFamiliales"], + log_begin_call(["InterfaceAllocationsFamiliales", + "allocations_familiales", "AllocationsFamiliales"], + allocations_familiales, + AllocationsFamilialesIn(personne_charge_effective_permanente_est_parent_in=allocations_familiales_dot_personne_charge_effective_permanente_est_parent, + personne_charge_effective_permanente_remplit_titre_I_in=allocations_familiales_dot_personne_charge_effective_permanente_remplit_titre__i, + ressources_menage_in=allocations_familiales_dot_ressources_menage, + residence_in=allocations_familiales_dot_residence, + date_courante_in=allocations_familiales_dot_date_courante, + enfants_a_charge_in=allocations_familiales_dot_enfants_a_charge, + avait_enfant_a_charge_avant_1er_janvier_2012_in=allocations_familiales_dot_avait_enfant_a_charge_avant_1er_janvier_2012))) + allocations_familiales_dot_montant_verse = result_4.montant_verse_out try: - try: - try: - local_var_539 = allocations_familiales_dot_montant_verse_537 - except EmptyError: - raise EmptyError - except EmptyError: - raise EmptyError + temp_i_montant_verse = allocations_familiales_dot_montant_verse except EmptyError: raise NoValueProvided(SourcePosition(filename="./epilogue.catala_fr", start_line=78, start_column=10, end_line=78, end_column=25, law_headings=["Interface du programme", "Épilogue", "Décrets divers"])) - i_montant_verse_538 = log_variable_definition(["InterfaceAllocationsFamiliales", - "i_montant_versé"], local_var_539) - return InterfaceAllocationsFamilialesOut(i_montant_verse_out=i_montant_verse_538) + i_montant_verse = log_variable_definition(["InterfaceAllocationsFamiliales", + "i_montant_versé"], temp_i_montant_verse) + return InterfaceAllocationsFamilialesOut(i_montant_verse_out=i_montant_verse) diff --git a/tests/test_bool/good/output/test_bool.catala_en.Dcalc b/tests/test_bool/good/output/test_bool.catala_en.Dcalc index 83b519ba6..92d2bc58c 100644 --- a/tests/test_bool/good/output/test_bool.catala_en.Dcalc +++ b/tests/test_bool/good/output/test_bool.catala_en.Dcalc @@ -1,18 +1,18 @@ -let TestBool_7 : +let TestBool_13 : TestBool_in{"foo_in": unit → bool; "bar_in": unit → integer} → TestBool_out{"foo_out": bool; "bar_out": integer} = - λ (TestBool_in_8: TestBool_in{"foo_in": unit → bool; "bar_in": - unit → integer}) → - let foo_9 : unit → bool = TestBool_in_8."foo_in" in - let bar_10 : unit → integer = TestBool_in_8."bar_in" in - let bar_11 : integer = error_empty - ⟨bar_10 () | true ⊢ + λ (TestBool_in_14: TestBool_in{"foo_in": unit → bool; "bar_in": + unit → integer}) → + let foo_15 : unit → bool = TestBool_in_14."foo_in" in + let bar_16 : unit → integer = TestBool_in_14."bar_in" in + let bar_17 : integer = error_empty + ⟨bar_16 () | true ⊢ ⟨⟨true ⊢ ⟨⟨true ⊢ 1⟩ | false ⊢ ∅ ⟩⟩ | true ⊢ ⟨⟨false ⊢ ∅ ⟩ | false ⊢ ∅ ⟩⟩⟩ in - let foo_12 : bool = error_empty - ⟨foo_9 () | true ⊢ - ⟨⟨true ⊢ ⟨⟨bar_11 < 0 ⊢ false⟩ | false ⊢ ∅ ⟩⟩, - ⟨true ⊢ ⟨⟨bar_11 >= 0 ⊢ true⟩ | false ⊢ ∅ ⟩⟩ | + let foo_18 : bool = error_empty + ⟨foo_15 () | true ⊢ + ⟨⟨true ⊢ ⟨⟨bar_17 < 0 ⊢ false⟩ | false ⊢ ∅ ⟩⟩, + ⟨true ⊢ ⟨⟨bar_17 >= 0 ⊢ true⟩ | false ⊢ ∅ ⟩⟩ | true ⊢ ⟨⟨false ⊢ ∅ ⟩ | false ⊢ ∅ ⟩⟩⟩ in - TestBool_out {"foo_out"= foo_12; "bar_out"= bar_11} in -TestBool_7 + TestBool_out {"foo_out"= foo_18; "bar_out"= bar_17} in +TestBool_13 diff --git a/tests/test_enum/bad/output/empty.catala_en.Typecheck b/tests/test_enum/bad/output/empty.catala_en.Typecheck index 24b3677b5..731950601 100644 --- a/tests/test_enum/bad/output/empty.catala_en.Typecheck +++ b/tests/test_enum/bad/output/empty.catala_en.Typecheck @@ -1,7 +1,7 @@ [ERROR] 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 | declaration enumeration Foo: | ^^^ + Test diff --git a/tests/test_io/good/output/all_io.catala_en.A.Dcalc b/tests/test_io/good/output/all_io.catala_en.A.Dcalc index 23c478352..390efb6f9 100644 --- a/tests/test_io/good/output/all_io.catala_en.A.Dcalc +++ b/tests/test_io/good/output/all_io.catala_en.A.Dcalc @@ -1,23 +1,23 @@ let A = - λ (A_in_11: A_in{"c_in": integer; "d_in": integer; "e_in": + λ (A_in_31: A_in{"c_in": integer; "d_in": integer; "e_in": unit → integer; "f_in": unit → integer}) → - let c_12 : integer = A_in_11."c_in" in - let d_13 : integer = A_in_11."d_in" in - let e_14 : unit → integer = A_in_11."e_in" in - let f_15 : unit → integer = A_in_11."f_in" in - let a_16 : integer = error_empty + let c_32 : integer = A_in_31."c_in" in + let d_33 : integer = A_in_31."d_in" in + let e_34 : unit → integer = A_in_31."e_in" in + let f_35 : unit → integer = A_in_31."f_in" in + let a_36 : integer = error_empty ⟨⟨true ⊢ ⟨⟨true ⊢ 0⟩ | false ⊢ ∅ ⟩⟩ | true ⊢ ⟨⟨false ⊢ ∅ ⟩ | false ⊢ ∅ ⟩⟩ in - let b_17 : integer = error_empty - ⟨⟨true ⊢ ⟨⟨true ⊢ a_16 + 1⟩ | false ⊢ ∅ ⟩⟩ | true + let b_37 : integer = error_empty + ⟨⟨true ⊢ ⟨⟨true ⊢ a_36 + 1⟩ | false ⊢ ∅ ⟩⟩ | true ⊢ ⟨⟨false ⊢ ∅ ⟩ | false ⊢ ∅ ⟩⟩ in - let e_18 : integer = error_empty - ⟨e_14 () | true ⊢ + let e_38 : integer = error_empty + ⟨e_34 () | true ⊢ ⟨⟨true ⊢ - ⟨⟨true ⊢ b_17 + c_12 + d_13 + 1⟩ | false ⊢ ∅ ⟩⟩ + ⟨⟨true ⊢ b_37 + c_32 + d_33 + 1⟩ | false ⊢ ∅ ⟩⟩ | true ⊢ ⟨⟨false ⊢ ∅ ⟩ | false ⊢ ∅ ⟩⟩⟩ in - let f_19 : integer = error_empty - ⟨f_15 () | true ⊢ - ⟨⟨true ⊢ ⟨⟨true ⊢ e_18 + 1⟩ | false ⊢ ∅ ⟩⟩ | + let f_39 : integer = error_empty + ⟨f_35 () | true ⊢ + ⟨⟨true ⊢ ⟨⟨true ⊢ e_38 + 1⟩ | false ⊢ ∅ ⟩⟩ | true ⊢ ⟨⟨false ⊢ ∅ ⟩ | false ⊢ ∅ ⟩⟩⟩ in - A_out {"b_out"= b_17; "d_out"= d_13; "f_out"= f_19} + A_out {"b_out"= b_37; "d_out"= d_33; "f_out"= f_39} diff --git a/tests/test_io/good/output/condition_only_input.catala_en.B.Dcalc b/tests/test_io/good/output/condition_only_input.catala_en.B.Dcalc index 556c97fd2..722afdf8c 100644 --- a/tests/test_io/good/output/condition_only_input.catala_en.B.Dcalc +++ b/tests/test_io/good/output/condition_only_input.catala_en.B.Dcalc @@ -1,8 +1,8 @@ let B = - λ (B_in_14: B_in{}) → - let a.x_15 : bool = error_empty + λ (B_in_31: B_in{}) → + let a.x_32 : bool = error_empty ⟨true ⊢ ⟨⟨true ⊢ false⟩ | false ⊢ ∅ ⟩⟩ in - let result_16 : A_out{"y_out": integer} = A_3 (A_in {"x_in"= a.x_15}) in - let a.y_17 : integer = result_16."y_out" in - let __18 : unit = assert (error_empty a.y_17 = 1) in + let result_33 : A_out{"y_out": integer} = A_24 (A_in {"x_in"= a.x_32}) in + let a.y_34 : integer = result_33."y_out" in + let __35 : unit = assert (error_empty a.y_34 = 1) in B_out {} diff --git a/tests/test_io/good/output/subscope.catala_en.B.Dcalc b/tests/test_io/good/output/subscope.catala_en.B.Dcalc index d151aaa8e..e93250e76 100644 --- a/tests/test_io/good/output/subscope.catala_en.B.Dcalc +++ b/tests/test_io/good/output/subscope.catala_en.B.Dcalc @@ -1,11 +1,11 @@ let B = - λ (B_in_18: B_in{}) → - let a.a_19 : unit → integer = λ (__20: unit) → ∅ in - let a.b_21 : integer = error_empty + λ (B_in_40: B_in{}) → + let a.a_41 : unit → integer = λ (__42: unit) → ∅ in + let a.b_43 : integer = error_empty ⟨⟨true ⊢ ⟨⟨true ⊢ 2⟩ | false ⊢ ∅ ⟩⟩ | true ⊢ ⟨⟨false ⊢ ∅ ⟩ | false ⊢ ∅ ⟩⟩ in - let result_22 : A_out{"c_out": integer} = - A_3 (A_in {"a_in"= a.a_19; "b_in"= a.b_21}) in - let a.c_23 : integer = result_22."c_out" in - let __24 : unit = assert (error_empty a.c_23 = 1) in + let result_44 : A_out{"c_out": integer} = + A_32 (A_in {"a_in"= a.a_41; "b_in"= a.b_43}) in + let a.c_45 : integer = result_44."c_out" in + let __46 : unit = assert (error_empty a.c_45 = 1) in B_out {} diff --git a/tests/test_proof/bad/output/array_length-empty.catala_en.Proof b/tests/test_proof/bad/output/array_length-empty.catala_en.Proof index fe580b6f9..3fca78905 100644 --- a/tests/test_proof/bad/output/array_length-empty.catala_en.Proof +++ b/tests/test_proof/bad/output/array_length-empty.catala_en.Proof @@ -1,3 +1,5 @@ +[RESULT] [A.x] This variable never returns an empty error +[RESULT] [A.x] No two exceptions to ever overlap for this variable [ERROR] [A.y] This variable might return an empty error: --> tests/test_proof/bad/array_length-empty.catala_en | @@ -6,5 +8,3 @@ + Test Counterexample generation is disabled so none was generated. [RESULT] [A.y] No two exceptions to ever overlap for this variable -[RESULT] [A.x] This variable never returns an empty error -[RESULT] [A.x] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/bad/output/array_length-overlap.catala_en.Proof b/tests/test_proof/bad/output/array_length-overlap.catala_en.Proof index 9ebb27976..018bf2152 100644 --- a/tests/test_proof/bad/output/array_length-overlap.catala_en.Proof +++ b/tests/test_proof/bad/output/array_length-overlap.catala_en.Proof @@ -1,3 +1,5 @@ +[RESULT] [A.x] This variable never returns an empty error +[RESULT] [A.x] No two exceptions to ever overlap for this variable [RESULT] [A.y] This variable never returns an empty error [ERROR] [A.y] At least two exceptions overlap for this variable: --> tests/test_proof/bad/array_length-overlap.catala_en @@ -6,5 +8,3 @@ | ^ + Test Counterexample generation is disabled so none was generated. -[RESULT] [A.x] This variable never returns an empty error -[RESULT] [A.x] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/bad/output/dates_get_year-empty.catala_en.Proof b/tests/test_proof/bad/output/dates_get_year-empty.catala_en.Proof index 536b3be35..606a3bde9 100644 --- a/tests/test_proof/bad/output/dates_get_year-empty.catala_en.Proof +++ b/tests/test_proof/bad/output/dates_get_year-empty.catala_en.Proof @@ -1,3 +1,5 @@ +[RESULT] [A.x] This variable never returns an empty error +[RESULT] [A.x] No two exceptions to ever overlap for this variable [ERROR] [A.y] This variable might return an empty error: --> tests/test_proof/bad/dates_get_year-empty.catala_en | @@ -6,5 +8,3 @@ + Test Counterexample generation is disabled so none was generated. [RESULT] [A.y] No two exceptions to ever overlap for this variable -[RESULT] [A.x] This variable never returns an empty error -[RESULT] [A.x] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/bad/output/dates_get_year-overlap.catala_en.Proof b/tests/test_proof/bad/output/dates_get_year-overlap.catala_en.Proof index cc32d09ac..76bf79581 100644 --- a/tests/test_proof/bad/output/dates_get_year-overlap.catala_en.Proof +++ b/tests/test_proof/bad/output/dates_get_year-overlap.catala_en.Proof @@ -1,3 +1,5 @@ +[RESULT] [A.x] This variable never returns an empty error +[RESULT] [A.x] No two exceptions to ever overlap for this variable [RESULT] [A.y] This variable never returns an empty error [ERROR] [A.y] At least two exceptions overlap for this variable: --> tests/test_proof/bad/dates_get_year-overlap.catala_en @@ -6,5 +8,3 @@ | ^ + Test Counterexample generation is disabled so none was generated. -[RESULT] [A.x] This variable never returns an empty error -[RESULT] [A.x] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/bad/output/dates_simple-empty.catala_en.Proof b/tests/test_proof/bad/output/dates_simple-empty.catala_en.Proof index 8e62df295..0a2452f1d 100644 --- a/tests/test_proof/bad/output/dates_simple-empty.catala_en.Proof +++ b/tests/test_proof/bad/output/dates_simple-empty.catala_en.Proof @@ -1,3 +1,5 @@ +[RESULT] [A.x] This variable never returns an empty error +[RESULT] [A.x] No two exceptions to ever overlap for this variable [ERROR] [A.y] This variable might return an empty error: --> tests/test_proof/bad/dates_simple-empty.catala_en | @@ -6,5 +8,3 @@ + Test Counterexample generation is disabled so none was generated. [RESULT] [A.y] No two exceptions to ever overlap for this variable -[RESULT] [A.x] This variable never returns an empty error -[RESULT] [A.x] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/bad/output/dates_simple-overlap.catala_en.Proof b/tests/test_proof/bad/output/dates_simple-overlap.catala_en.Proof index fbf6db693..90c08fd33 100644 --- a/tests/test_proof/bad/output/dates_simple-overlap.catala_en.Proof +++ b/tests/test_proof/bad/output/dates_simple-overlap.catala_en.Proof @@ -1,3 +1,5 @@ +[RESULT] [A.x] This variable never returns an empty error +[RESULT] [A.x] No two exceptions to ever overlap for this variable [RESULT] [A.y] This variable never returns an empty error [ERROR] [A.y] At least two exceptions overlap for this variable: --> tests/test_proof/bad/dates_simple-overlap.catala_en @@ -6,5 +8,3 @@ | ^ + Test Counterexample generation is disabled so none was generated. -[RESULT] [A.x] This variable never returns an empty error -[RESULT] [A.x] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/bad/output/duration-empty.catala_en.Proof b/tests/test_proof/bad/output/duration-empty.catala_en.Proof index 7cc33eb73..d0f6bdd5d 100644 --- a/tests/test_proof/bad/output/duration-empty.catala_en.Proof +++ b/tests/test_proof/bad/output/duration-empty.catala_en.Proof @@ -1,3 +1,5 @@ +[RESULT] [A.x] This variable never returns an empty error +[RESULT] [A.x] No two exceptions to ever overlap for this variable [ERROR] [A.y] This variable might return an empty error: --> tests/test_proof/bad/duration-empty.catala_en | @@ -6,5 +8,3 @@ + Test Counterexample generation is disabled so none was generated. [RESULT] [A.y] No two exceptions to ever overlap for this variable -[RESULT] [A.x] This variable never returns an empty error -[RESULT] [A.x] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/bad/output/duration-overlap.catala_en.Proof b/tests/test_proof/bad/output/duration-overlap.catala_en.Proof index c3b0444cb..1753bae74 100644 --- a/tests/test_proof/bad/output/duration-overlap.catala_en.Proof +++ b/tests/test_proof/bad/output/duration-overlap.catala_en.Proof @@ -1,3 +1,5 @@ +[RESULT] [A.x] This variable never returns an empty error +[RESULT] [A.x] No two exceptions to ever overlap for this variable [RESULT] [A.y] This variable never returns an empty error [ERROR] [A.y] At least two exceptions overlap for this variable: --> tests/test_proof/bad/duration-overlap.catala_en @@ -6,5 +8,3 @@ | ^ + Test Counterexample generation is disabled so none was generated. -[RESULT] [A.x] This variable never returns an empty error -[RESULT] [A.x] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/bad/output/enums_inj-empty.catala_en.Proof b/tests/test_proof/bad/output/enums_inj-empty.catala_en.Proof index 3a15f414b..570574187 100644 --- a/tests/test_proof/bad/output/enums_inj-empty.catala_en.Proof +++ b/tests/test_proof/bad/output/enums_inj-empty.catala_en.Proof @@ -1,3 +1,5 @@ +[RESULT] [A.x] This variable never returns an empty error +[RESULT] [A.x] No two exceptions to ever overlap for this variable [ERROR] [A.y] This variable might return an empty error: --> tests/test_proof/bad/enums_inj-empty.catala_en | @@ -6,5 +8,3 @@ + Article Counterexample generation is disabled so none was generated. [RESULT] [A.y] No two exceptions to ever overlap for this variable -[RESULT] [A.x] This variable never returns an empty error -[RESULT] [A.x] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/bad/output/enums_inj-overlap.catala_en.Proof b/tests/test_proof/bad/output/enums_inj-overlap.catala_en.Proof index ee8929020..9d79b3bf3 100644 --- a/tests/test_proof/bad/output/enums_inj-overlap.catala_en.Proof +++ b/tests/test_proof/bad/output/enums_inj-overlap.catala_en.Proof @@ -1,3 +1,5 @@ +[RESULT] [A.x] This variable never returns an empty error +[RESULT] [A.x] No two exceptions to ever overlap for this variable [RESULT] [A.y] This variable never returns an empty error [ERROR] [A.y] At least two exceptions overlap for this variable: --> tests/test_proof/bad/enums_inj-overlap.catala_en @@ -6,5 +8,3 @@ | ^ + Article Counterexample generation is disabled so none was generated. -[RESULT] [A.x] This variable never returns an empty error -[RESULT] [A.x] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/bad/output/enums_unit-empty.catala_en.Proof b/tests/test_proof/bad/output/enums_unit-empty.catala_en.Proof index 3ae0910e0..3fee17458 100644 --- a/tests/test_proof/bad/output/enums_unit-empty.catala_en.Proof +++ b/tests/test_proof/bad/output/enums_unit-empty.catala_en.Proof @@ -1,3 +1,5 @@ +[RESULT] [A.x] This variable never returns an empty error +[RESULT] [A.x] No two exceptions to ever overlap for this variable [ERROR] [A.y] This variable might return an empty error: --> tests/test_proof/bad/enums_unit-empty.catala_en | @@ -6,5 +8,3 @@ + Article Counterexample generation is disabled so none was generated. [RESULT] [A.y] No two exceptions to ever overlap for this variable -[RESULT] [A.x] This variable never returns an empty error -[RESULT] [A.x] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/bad/output/enums_unit-overlap.catala_en.Proof b/tests/test_proof/bad/output/enums_unit-overlap.catala_en.Proof index f72a928d2..074e49fed 100644 --- a/tests/test_proof/bad/output/enums_unit-overlap.catala_en.Proof +++ b/tests/test_proof/bad/output/enums_unit-overlap.catala_en.Proof @@ -1,3 +1,5 @@ +[RESULT] [A.x] This variable never returns an empty error +[RESULT] [A.x] No two exceptions to ever overlap for this variable [RESULT] [A.y] This variable never returns an empty error [ERROR] [A.y] At least two exceptions overlap for this variable: --> tests/test_proof/bad/enums_unit-overlap.catala_en @@ -6,5 +8,3 @@ | ^ + Article Counterexample generation is disabled so none was generated. -[RESULT] [A.x] This variable never returns an empty error -[RESULT] [A.x] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/bad/output/money-empty.catala_en.Proof b/tests/test_proof/bad/output/money-empty.catala_en.Proof index 951d509dd..0fde9e969 100644 --- a/tests/test_proof/bad/output/money-empty.catala_en.Proof +++ b/tests/test_proof/bad/output/money-empty.catala_en.Proof @@ -1,3 +1,5 @@ +[RESULT] [A.x] This variable never returns an empty error +[RESULT] [A.x] No two exceptions to ever overlap for this variable [ERROR] [A.y] This variable might return an empty error: --> tests/test_proof/bad/money-empty.catala_en | @@ -6,5 +8,3 @@ + Test Counterexample generation is disabled so none was generated. [RESULT] [A.y] No two exceptions to ever overlap for this variable -[RESULT] [A.x] This variable never returns an empty error -[RESULT] [A.x] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/bad/output/money-overlap.catala_en.Proof b/tests/test_proof/bad/output/money-overlap.catala_en.Proof index 3c3fc0d87..dd77e406e 100644 --- a/tests/test_proof/bad/output/money-overlap.catala_en.Proof +++ b/tests/test_proof/bad/output/money-overlap.catala_en.Proof @@ -1,3 +1,5 @@ +[RESULT] [A.x] This variable never returns an empty error +[RESULT] [A.x] No two exceptions to ever overlap for this variable [RESULT] [A.y] This variable never returns an empty error [ERROR] [A.y] At least two exceptions overlap for this variable: --> tests/test_proof/bad/money-overlap.catala_en @@ -6,5 +8,3 @@ | ^ + Test Counterexample generation is disabled so none was generated. -[RESULT] [A.x] This variable never returns an empty error -[RESULT] [A.x] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/bad/output/no_vars-conflict.catala_en.Proof b/tests/test_proof/bad/output/no_vars-conflict.catala_en.Proof index c56436da6..799ba2781 100644 --- a/tests/test_proof/bad/output/no_vars-conflict.catala_en.Proof +++ b/tests/test_proof/bad/output/no_vars-conflict.catala_en.Proof @@ -1,3 +1,5 @@ +[RESULT] [A.x] This variable never returns an empty error +[RESULT] [A.x] No two exceptions to ever overlap for this variable [RESULT] [A.y] This variable never returns an empty error [ERROR] [A.y] At least two exceptions overlap for this variable: --> tests/test_proof/bad/no_vars-conflict.catala_en @@ -6,5 +8,3 @@ | ^ + Test Counterexample generation is disabled so none was generated. -[RESULT] [A.x] This variable never returns an empty error -[RESULT] [A.x] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/bad/output/no_vars-empty.catala_en.Proof b/tests/test_proof/bad/output/no_vars-empty.catala_en.Proof index ca7f18cb6..5a3556da4 100644 --- a/tests/test_proof/bad/output/no_vars-empty.catala_en.Proof +++ b/tests/test_proof/bad/output/no_vars-empty.catala_en.Proof @@ -1,3 +1,5 @@ +[RESULT] [A.x] This variable never returns an empty error +[RESULT] [A.x] No two exceptions to ever overlap for this variable [ERROR] [A.y] This variable might return an empty error: --> tests/test_proof/bad/no_vars-empty.catala_en | @@ -6,5 +8,3 @@ + Test Counterexample generation is disabled so none was generated. [RESULT] [A.y] No two exceptions to ever overlap for this variable -[RESULT] [A.x] This variable never returns an empty error -[RESULT] [A.x] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/bad/output/prolala_motivating_example.catala_en.Proof b/tests/test_proof/bad/output/prolala_motivating_example.catala_en.Proof index 16b141a11..4f05eff3e 100644 --- a/tests/test_proof/bad/output/prolala_motivating_example.catala_en.Proof +++ b/tests/test_proof/bad/output/prolala_motivating_example.catala_en.Proof @@ -11,12 +11,12 @@ Counterexample generation is disabled so none was generated. [RESULT] [Amount.correct_amount] No two exceptions to ever overlap for this variable [RESULT] [Amount.eligibility.is_professor] No two exceptions to ever overlap for this variable [RESULT] [Amount.eligibility.is_student] No two exceptions to ever overlap for this variable -[RESULT] [Amount.number_of_advisors] This variable never returns an empty error -[RESULT] [Amount.number_of_advisors] No two exceptions to ever overlap for this variable [RESULT] [Amount.is_professor] This variable never returns an empty error [RESULT] [Amount.is_professor] No two exceptions to ever overlap for this variable [RESULT] [Amount.is_student] This variable never returns an empty error [RESULT] [Amount.is_student] No two exceptions to ever overlap for this variable +[RESULT] [Amount.number_of_advisors] This variable never returns an empty error +[RESULT] [Amount.number_of_advisors] No two exceptions to ever overlap for this variable [ERROR] [Eligibility.is_eligible] This variable might return an empty error: --> tests/test_proof/bad/prolala_motivating_example.catala_en | diff --git a/tests/test_proof/bad/output/rationals-empty.catala_en.Proof b/tests/test_proof/bad/output/rationals-empty.catala_en.Proof index 4062b1293..fc1b19cd7 100644 --- a/tests/test_proof/bad/output/rationals-empty.catala_en.Proof +++ b/tests/test_proof/bad/output/rationals-empty.catala_en.Proof @@ -1,3 +1,5 @@ +[RESULT] [A.x] This variable never returns an empty error +[RESULT] [A.x] No two exceptions to ever overlap for this variable [ERROR] [A.y] This variable might return an empty error: --> tests/test_proof/bad/rationals-empty.catala_en | @@ -6,5 +8,3 @@ + Test Counterexample generation is disabled so none was generated. [RESULT] [A.y] No two exceptions to ever overlap for this variable -[RESULT] [A.x] This variable never returns an empty error -[RESULT] [A.x] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/bad/output/rationals-overlap.catala_en.Proof b/tests/test_proof/bad/output/rationals-overlap.catala_en.Proof index 06c6b604b..14cbd1d68 100644 --- a/tests/test_proof/bad/output/rationals-overlap.catala_en.Proof +++ b/tests/test_proof/bad/output/rationals-overlap.catala_en.Proof @@ -1,3 +1,5 @@ +[RESULT] [A.x] This variable never returns an empty error +[RESULT] [A.x] No two exceptions to ever overlap for this variable [RESULT] [A.y] This variable never returns an empty error [ERROR] [A.y] At least two exceptions overlap for this variable: --> tests/test_proof/bad/rationals-overlap.catala_en @@ -6,5 +8,3 @@ | ^ + Test Counterexample generation is disabled so none was generated. -[RESULT] [A.x] This variable never returns an empty error -[RESULT] [A.x] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/bad/output/sat_solving.catala_en.Proof b/tests/test_proof/bad/output/sat_solving.catala_en.Proof index 717aa066e..681d757a4 100644 --- a/tests/test_proof/bad/output/sat_solving.catala_en.Proof +++ b/tests/test_proof/bad/output/sat_solving.catala_en.Proof @@ -1,3 +1,5 @@ +[RESULT] [A.x1] This variable never returns an empty error +[RESULT] [A.x1] No two exceptions to ever overlap for this variable [ERROR] [A.x10] This variable might return an empty error: --> tests/test_proof/bad/sat_solving.catala_en | @@ -6,21 +8,19 @@ + Test Counterexample generation is disabled so none was generated. [RESULT] [A.x10] No two exceptions to ever overlap for this variable -[RESULT] [A.x9] This variable never returns an empty error -[RESULT] [A.x9] No two exceptions to ever overlap for this variable -[RESULT] [A.x8] This variable never returns an empty error -[RESULT] [A.x8] No two exceptions to ever overlap for this variable -[RESULT] [A.x7] This variable never returns an empty error -[RESULT] [A.x7] No two exceptions to ever overlap for this variable -[RESULT] [A.x6] This variable never returns an empty error -[RESULT] [A.x6] No two exceptions to ever overlap for this variable -[RESULT] [A.x5] This variable never returns an empty error -[RESULT] [A.x5] No two exceptions to ever overlap for this variable -[RESULT] [A.x4] This variable never returns an empty error -[RESULT] [A.x4] No two exceptions to ever overlap for this variable -[RESULT] [A.x3] This variable never returns an empty error -[RESULT] [A.x3] No two exceptions to ever overlap for this variable [RESULT] [A.x2] This variable never returns an empty error [RESULT] [A.x2] No two exceptions to ever overlap for this variable -[RESULT] [A.x1] This variable never returns an empty error -[RESULT] [A.x1] No two exceptions to ever overlap for this variable +[RESULT] [A.x3] This variable never returns an empty error +[RESULT] [A.x3] No two exceptions to ever overlap for this variable +[RESULT] [A.x4] This variable never returns an empty error +[RESULT] [A.x4] No two exceptions to ever overlap for this variable +[RESULT] [A.x5] This variable never returns an empty error +[RESULT] [A.x5] No two exceptions to ever overlap for this variable +[RESULT] [A.x6] This variable never returns an empty error +[RESULT] [A.x6] No two exceptions to ever overlap for this variable +[RESULT] [A.x7] This variable never returns an empty error +[RESULT] [A.x7] No two exceptions to ever overlap for this variable +[RESULT] [A.x8] This variable never returns an empty error +[RESULT] [A.x8] No two exceptions to ever overlap for this variable +[RESULT] [A.x9] This variable never returns an empty error +[RESULT] [A.x9] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/good/output/array_length.catala_en.Proof b/tests/test_proof/good/output/array_length.catala_en.Proof index ebe1a2238..2b85d1edd 100644 --- a/tests/test_proof/good/output/array_length.catala_en.Proof +++ b/tests/test_proof/good/output/array_length.catala_en.Proof @@ -1,4 +1,4 @@ -[RESULT] [A.y] This variable never returns an empty error -[RESULT] [A.y] No two exceptions to ever overlap for this variable [RESULT] [A.x] This variable never returns an empty error [RESULT] [A.x] No two exceptions to ever overlap for this variable +[RESULT] [A.y] This variable never returns an empty error +[RESULT] [A.y] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/good/output/dates_get_year.catala_en.Proof b/tests/test_proof/good/output/dates_get_year.catala_en.Proof index ebe1a2238..2b85d1edd 100644 --- a/tests/test_proof/good/output/dates_get_year.catala_en.Proof +++ b/tests/test_proof/good/output/dates_get_year.catala_en.Proof @@ -1,4 +1,4 @@ -[RESULT] [A.y] This variable never returns an empty error -[RESULT] [A.y] No two exceptions to ever overlap for this variable [RESULT] [A.x] This variable never returns an empty error [RESULT] [A.x] No two exceptions to ever overlap for this variable +[RESULT] [A.y] This variable never returns an empty error +[RESULT] [A.y] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/good/output/dates_simple.catala_en.Proof b/tests/test_proof/good/output/dates_simple.catala_en.Proof index ebe1a2238..2b85d1edd 100644 --- a/tests/test_proof/good/output/dates_simple.catala_en.Proof +++ b/tests/test_proof/good/output/dates_simple.catala_en.Proof @@ -1,4 +1,4 @@ -[RESULT] [A.y] This variable never returns an empty error -[RESULT] [A.y] No two exceptions to ever overlap for this variable [RESULT] [A.x] This variable never returns an empty error [RESULT] [A.x] No two exceptions to ever overlap for this variable +[RESULT] [A.y] This variable never returns an empty error +[RESULT] [A.y] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/good/output/duration.catala_en.Proof b/tests/test_proof/good/output/duration.catala_en.Proof index ebe1a2238..2b85d1edd 100644 --- a/tests/test_proof/good/output/duration.catala_en.Proof +++ b/tests/test_proof/good/output/duration.catala_en.Proof @@ -1,4 +1,4 @@ -[RESULT] [A.y] This variable never returns an empty error -[RESULT] [A.y] No two exceptions to ever overlap for this variable [RESULT] [A.x] This variable never returns an empty error [RESULT] [A.x] No two exceptions to ever overlap for this variable +[RESULT] [A.y] This variable never returns an empty error +[RESULT] [A.y] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/good/output/enums_inj.catala_en.Proof b/tests/test_proof/good/output/enums_inj.catala_en.Proof index ebe1a2238..2b85d1edd 100644 --- a/tests/test_proof/good/output/enums_inj.catala_en.Proof +++ b/tests/test_proof/good/output/enums_inj.catala_en.Proof @@ -1,4 +1,4 @@ -[RESULT] [A.y] This variable never returns an empty error -[RESULT] [A.y] No two exceptions to ever overlap for this variable [RESULT] [A.x] This variable never returns an empty error [RESULT] [A.x] No two exceptions to ever overlap for this variable +[RESULT] [A.y] This variable never returns an empty error +[RESULT] [A.y] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/good/output/enums_unit.catala_en.Proof b/tests/test_proof/good/output/enums_unit.catala_en.Proof index ebe1a2238..2b85d1edd 100644 --- a/tests/test_proof/good/output/enums_unit.catala_en.Proof +++ b/tests/test_proof/good/output/enums_unit.catala_en.Proof @@ -1,4 +1,4 @@ -[RESULT] [A.y] This variable never returns an empty error -[RESULT] [A.y] No two exceptions to ever overlap for this variable [RESULT] [A.x] This variable never returns an empty error [RESULT] [A.x] No two exceptions to ever overlap for this variable +[RESULT] [A.y] This variable never returns an empty error +[RESULT] [A.y] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/good/output/functions.catala_en.Proof b/tests/test_proof/good/output/functions.catala_en.Proof index dc6847e91..5b47ccbdd 100644 --- a/tests/test_proof/good/output/functions.catala_en.Proof +++ b/tests/test_proof/good/output/functions.catala_en.Proof @@ -1,4 +1,4 @@ -[RESULT] [A.z] This variable never returns an empty error -[RESULT] [A.z] No two exceptions to ever overlap for this variable [RESULT] [A.x] This variable never returns an empty error [RESULT] [A.x] No two exceptions to ever overlap for this variable +[RESULT] [A.z] This variable never returns an empty error +[RESULT] [A.z] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/good/output/money.catala_en.Proof b/tests/test_proof/good/output/money.catala_en.Proof index ebe1a2238..2b85d1edd 100644 --- a/tests/test_proof/good/output/money.catala_en.Proof +++ b/tests/test_proof/good/output/money.catala_en.Proof @@ -1,4 +1,4 @@ -[RESULT] [A.y] This variable never returns an empty error -[RESULT] [A.y] No two exceptions to ever overlap for this variable [RESULT] [A.x] This variable never returns an empty error [RESULT] [A.x] No two exceptions to ever overlap for this variable +[RESULT] [A.y] This variable never returns an empty error +[RESULT] [A.y] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/good/output/rationals.catala_en.Proof b/tests/test_proof/good/output/rationals.catala_en.Proof index ebe1a2238..2b85d1edd 100644 --- a/tests/test_proof/good/output/rationals.catala_en.Proof +++ b/tests/test_proof/good/output/rationals.catala_en.Proof @@ -1,4 +1,4 @@ -[RESULT] [A.y] This variable never returns an empty error -[RESULT] [A.y] No two exceptions to ever overlap for this variable [RESULT] [A.x] This variable never returns an empty error [RESULT] [A.x] No two exceptions to ever overlap for this variable +[RESULT] [A.y] This variable never returns an empty error +[RESULT] [A.y] No two exceptions to ever overlap for this variable diff --git a/tests/test_proof/good/output/simple_vars.catala_en.Proof b/tests/test_proof/good/output/simple_vars.catala_en.Proof index 5a437666d..ab66d0c47 100644 --- a/tests/test_proof/good/output/simple_vars.catala_en.Proof +++ b/tests/test_proof/good/output/simple_vars.catala_en.Proof @@ -1,6 +1,6 @@ -[RESULT] [A.z] This variable never returns an empty error -[RESULT] [A.z] No two exceptions to ever overlap for this variable [RESULT] [A.x] This variable never returns an empty error [RESULT] [A.x] No two exceptions to ever overlap for this variable [RESULT] [A.y] This variable never returns an empty error [RESULT] [A.y] No two exceptions to ever overlap for this variable +[RESULT] [A.z] This variable never returns an empty error +[RESULT] [A.z] No two exceptions to ever overlap for this variable diff --git a/tests/test_struct/bad/output/empty_struct.catala_en.Typecheck b/tests/test_struct/bad/output/empty_struct.catala_en.Typecheck index 1b4fcf3d7..70d24a86c 100644 --- a/tests/test_struct/bad/output/empty_struct.catala_en.Typecheck +++ b/tests/test_struct/bad/output/empty_struct.catala_en.Typecheck @@ -1,7 +1,7 @@ [ERROR] 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 | declaration structure Foo: | ^^^ + Test diff --git a/tests/test_variable_state/bad/output/def_no_state.catala_en.Typecheck b/tests/test_variable_state/bad/output/def_no_state.catala_en.Typecheck index 4f7788b69..39d07bf58 100644 --- a/tests/test_variable_state/bad/output/def_no_state.catala_en.Typecheck +++ b/tests/test_variable_state/bad/output/def_no_state.catala_en.Typecheck @@ -1,14 +1,14 @@ [ERROR] This definition does not indicate which state has to be considered for variable foo. --> tests/test_variable_state/bad/def_no_state.catala_en - | + | 10 | definition foo equals 2 | ^^^ + Test Variable declaration: --> tests/test_variable_state/bad/def_no_state.catala_en - | + | 5 | output foo content integer | ^^^ + Test diff --git a/tests/test_variable_state/bad/output/no_cross_exceptions.catala_en.Typecheck b/tests/test_variable_state/bad/output/no_cross_exceptions.catala_en.Typecheck index 49991323d..88723c2d2 100644 --- a/tests/test_variable_state/bad/output/no_cross_exceptions.catala_en.Typecheck +++ b/tests/test_variable_state/bad/output/no_cross_exceptions.catala_en.Typecheck @@ -1,7 +1,7 @@ [ERROR] Unknown label for the scope variable foo.baz: "thing" --> tests/test_variable_state/bad/no_cross_exceptions.catala_en - | + | 14 | exception thing definition foo state baz under condition true consequence equals 3 | ^^^^^ + Test diff --git a/tests/test_variable_state/bad/output/self_reference_first_state.catala_en.Typecheck b/tests/test_variable_state/bad/output/self_reference_first_state.catala_en.Typecheck index d402a29b9..2a6f16845 100644 --- a/tests/test_variable_state/bad/output/self_reference_first_state.catala_en.Typecheck +++ b/tests/test_variable_state/bad/output/self_reference_first_state.catala_en.Typecheck @@ -1,7 +1,7 @@ [ERROR] It is impossible to refer to the variable you are defining when defining its first state. --> tests/test_variable_state/bad/self_reference_first_state.catala_en - | + | 10 | definition foo state bar equals foo + 1 | ^^^ - + Test \ No newline at end of file + + Test diff --git a/tests/test_variable_state/bad/output/state_cycle.catala_en.Typecheck b/tests/test_variable_state/bad/output/state_cycle.catala_en.Typecheck index 7a73e545d..763bbd052 100644 --- a/tests/test_variable_state/bad/output/state_cycle.catala_en.Typecheck +++ b/tests/test_variable_state/bad/output/state_cycle.catala_en.Typecheck @@ -2,56 +2,56 @@ Cycle variable foofoo.bar, declared: --> tests/test_variable_state/bad/state_cycle.catala_en - | + | 9 | state bar | ^^^ + Test Used here in the definition of another cycle variable foofoo.baz: --> tests/test_variable_state/bad/state_cycle.catala_en - | + | 19 | definition foofoo state baz equals foofoo + 1 | ^^^^^^ + Test Cycle variable foofoo.baz, declared: --> tests/test_variable_state/bad/state_cycle.catala_en - | + | 10 | state baz | ^^^ + Test Used here in the definition of another cycle variable foo.bar: --> tests/test_variable_state/bad/state_cycle.catala_en - | + | 13 | definition foo state bar equals foofoo | ^^^^^^ + Test Cycle variable foo.bar, declared: --> tests/test_variable_state/bad/state_cycle.catala_en - | + | 6 | state bar | ^^^ + Test Used here in the definition of another cycle variable foo.baz: --> tests/test_variable_state/bad/state_cycle.catala_en - | + | 15 | definition foo state baz equals foo + 1 | ^^^ + Test Cycle variable foo.baz, declared: --> tests/test_variable_state/bad/state_cycle.catala_en - | + | 7 | state baz | ^^^ + Test Used here in the definition of another cycle variable foofoo.bar: --> tests/test_variable_state/bad/state_cycle.catala_en - | + | 17 | definition foofoo state bar equals foo | ^^^ + Test diff --git a/tests/test_variable_state/bad/output/unknown_state.catala_en.Typecheck b/tests/test_variable_state/bad/output/unknown_state.catala_en.Typecheck index bfdb16992..5e3073d91 100644 --- a/tests/test_variable_state/bad/output/unknown_state.catala_en.Typecheck +++ b/tests/test_variable_state/bad/output/unknown_state.catala_en.Typecheck @@ -1,14 +1,14 @@ [ERROR] This identifier is not a state declared for variable foo. --> tests/test_variable_state/bad/unknown_state.catala_en - | + | 12 | definition foo state basz equals foo + 1 | ^^^^ + Test Variable declaration: --> tests/test_variable_state/bad/unknown_state.catala_en - | + | 5 | output foo content integer | ^^^ - + Test \ No newline at end of file + + Test diff --git a/tests/test_variable_state/good/output/simple.catala_en.A.Interpret b/tests/test_variable_state/good/output/simple.catala_en.A.Interpret index 2c5a194a9..bb248edc5 100644 --- a/tests/test_variable_state/good/output/simple.catala_en.A.Interpret +++ b/tests/test_variable_state/good/output/simple.catala_en.A.Interpret @@ -1,2 +1,2 @@ [RESULT] Computation successful! Results: -[RESULT] foo_fizz = 3 \ No newline at end of file +[RESULT] foo_fizz = 3 diff --git a/tests/test_variable_state/good/output/simple.catala_en.Typecheck b/tests/test_variable_state/good/output/simple.catala_en.Typecheck index 1af828f89..cb4796c3b 100644 --- a/tests/test_variable_state/good/output/simple.catala_en.Typecheck +++ b/tests/test_variable_state/good/output/simple.catala_en.Typecheck @@ -1 +1 @@ -[RESULT] Typechecking successful! \ No newline at end of file +[RESULT] Typechecking successful!