mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-19 16:28:12 +03:00
Improving French housing benefits (#314)
Follow-up of #287, #266 and #165. Time spent Pair programming sessions Before 2022-07-11: 50h (50 h for each person of the pair programming duo) Refactoring sessions Before 2022-07-11: 24 h 2022-07-14: 3 h Legal research sessions Before 2022-07-11: 21,5 h Testing and debugging Before 2022-07-11: 13,5 h 2022-07-11: 3 h with Denis 2022-07-13: 2 h with Denis 2022-07-14: 1 h with Denis 2022-07-16: 2 h with Denis 2022-07-19: 2 h with Denis 2022-07-21: 2 h with Denis 2022-08-11: 6 h with Denis 2022-08-15: 4 h with Denis 2022-08-16: 2 h with Denis UI and form 2022-08-09: 8 h with Denis 2022-08-10: 8 h with Denis 2022-08-15: 2 h with Denis 2022-08-16: 2 h with Denis 2022-08-17: 6 h with Denis 2022-08-18: 4 h with Denis
This commit is contained in:
commit
9008a7f0e6
2
Makefile
2
Makefile
@ -336,7 +336,7 @@ $(addprefix _build/default/,$(WEBSITE_ASSETS)):
|
||||
dune build $@
|
||||
|
||||
#> website-assets : Builds all the assets necessary for the Catala website
|
||||
website-assets: js_build literate_examples build_french_law_library_web_api doc
|
||||
website-assets: build_french_law_library_web_api doc literate_examples build
|
||||
dune build $(WEBSITE_ASSETS)
|
||||
|
||||
##########################################
|
||||
|
@ -276,8 +276,7 @@ let rec evaluate_operator
|
||||
Cli.log_format "%*s%a %a: %s" (!log_indent * 2) ""
|
||||
Print.format_log_entry entry Print.format_uid_list infos
|
||||
(match e' with
|
||||
(* | Ast.EAbs _ -> Cli.with_style [ ANSITerminal.green ]
|
||||
"<function>" *)
|
||||
| Ast.EAbs _ -> Cli.with_style [ANSITerminal.green] "<function>"
|
||||
| _ ->
|
||||
let expr_str =
|
||||
Format.asprintf "%a"
|
||||
|
@ -455,7 +455,11 @@ and typecheck_expr_top_down
|
||||
let pos_e = Ast.pos e in
|
||||
let mark e = Marked.mark { uf = tau; pos = pos_e } e in
|
||||
let unify_and_mark (e' : (A.dcalc, mark) A.gexpr) tau' =
|
||||
unify ctx e tau tau';
|
||||
(* This try...with was added because of
|
||||
[tests/test_bool/bad/bad_assert.catala_en] but we shouldn't need it.
|
||||
TODO: debug why it is needed here. *)
|
||||
(try unify ctx e tau tau'
|
||||
with Type_error (e', t1, t2) -> handle_type_error ctx e' t1 t2);
|
||||
Marked.mark { uf = tau; pos = pos_e } e'
|
||||
in
|
||||
let unionfind_make ?(pos = e) t = UnionFind.make (add_pos pos t) in
|
||||
@ -673,10 +677,10 @@ let infer_types_program prg =
|
||||
in
|
||||
let rec process_scope_body_expr env = function
|
||||
| A.Result e ->
|
||||
let e' = typecheck_expr_bottom_up ctx env e in
|
||||
let e' = wrap ctx (typecheck_expr_bottom_up ctx env) e in
|
||||
Bindlib.box_apply
|
||||
(fun e1 ->
|
||||
unify ctx e (ty e1) ty_out;
|
||||
wrap ctx (unify ctx e (ty e1)) ty_out;
|
||||
let e1 = Astgen_utils.map_gexpr_marks ~f:get_ty_mark e1 in
|
||||
A.Result (Bindlib.unbox e1))
|
||||
e'
|
||||
@ -689,14 +693,14 @@ let infer_types_program prg =
|
||||
scope_let_pos;
|
||||
} ->
|
||||
let ty_e = ast_to_typ scope_let_typ in
|
||||
let e = typecheck_expr_bottom_up ctx env e0 in
|
||||
let e = wrap ctx (typecheck_expr_bottom_up ctx env) e0 in
|
||||
let var, next = Bindlib.unbind scope_let_next in
|
||||
let env = Var.Map.add var ty_e env in
|
||||
let next = process_scope_body_expr env next in
|
||||
let scope_let_next = Bindlib.bind_var (Var.translate var) next in
|
||||
Bindlib.box_apply2
|
||||
(fun e scope_let_next ->
|
||||
unify ctx e0 (ty e) ty_e;
|
||||
wrap ctx (unify ctx e0 (ty e)) ty_e;
|
||||
let e = Astgen_utils.map_gexpr_marks ~f:get_ty_mark e in
|
||||
A.ScopeLet
|
||||
{
|
||||
|
@ -357,8 +357,16 @@ let translate_def
|
||||
aren't"
|
||||
in
|
||||
let top_list = def_map_to_tree def_info def in
|
||||
let is_input =
|
||||
match Marked.unmark io.Scopelang.Ast.io_input with
|
||||
| OnlyInput -> true
|
||||
| _ -> false
|
||||
in
|
||||
let top_value =
|
||||
if is_cond then
|
||||
if is_cond && ((not is_subscope_var) || (is_subscope_var && is_input)) then
|
||||
(* We add the bottom [false] value for conditions, only for the scope
|
||||
where the condition is declared. Except when the variable is an input,
|
||||
where we want the [false] to be added at each caller parent scope. *)
|
||||
Some
|
||||
(Ast.always_false_rule
|
||||
(Ast.ScopeDef.get_position def_info)
|
||||
@ -385,12 +393,7 @@ let translate_def
|
||||
for all subscope variables that are not defined. It covers the subtlety
|
||||
with functions described above but also conditions with the false default
|
||||
value. *)
|
||||
&& not
|
||||
(is_cond
|
||||
&&
|
||||
match Marked.unmark io.Scopelang.Ast.io_input with
|
||||
| OnlyInput -> true
|
||||
| _ -> false)
|
||||
&& not (is_cond && is_input)
|
||||
(* However, this special case suffers from an exception: when a condition is
|
||||
defined as an OnlyInput to a subscope, since the [false] default value
|
||||
will not be provided by the calee scope, it has to be placed in the
|
||||
|
@ -192,5 +192,3 @@ let make_matchopt m v tau arg e_none e_some =
|
||||
|
||||
let handle_default = Var.make "handle_default"
|
||||
let handle_default_opt = Var.make "handle_default_opt"
|
||||
|
||||
type 'm binder = ('m expr, 'm marked_expr) Bindlib.binder
|
||||
|
@ -135,7 +135,7 @@ let pygmentize_code (c : string Marked.pos) (language : C.backend_lang) : string
|
||||
"style=colorful,anchorlinenos=True,lineanchors=\""
|
||||
^ String_common.to_ascii (Pos.get_file (Marked.get_mark c))
|
||||
^ "\",linenos=table,linenostart="
|
||||
^ string_of_int (Pos.get_start_line (Marked.get_mark c) + 1);
|
||||
^ string_of_int (Pos.get_start_line (Marked.get_mark c));
|
||||
"-o";
|
||||
temp_file_out;
|
||||
temp_file_in;
|
||||
@ -161,7 +161,7 @@ let pygmentize_code (c : string Marked.pos) (language : C.backend_lang) : string
|
||||
let sanitize_html_href str =
|
||||
str
|
||||
|> String_common.to_ascii
|
||||
|> R.substitute ~rex:(R.regexp "[' '°]") ~subst:(function _ -> "%20")
|
||||
|> R.substitute ~rex:(R.regexp "[' '°\"]") ~subst:(function _ -> "%20")
|
||||
|
||||
let rec law_structure_to_html
|
||||
(language : C.backend_lang)
|
||||
|
@ -631,8 +631,8 @@ code:
|
||||
|
||||
metadata_block:
|
||||
| BEGIN_METADATA option(law_text) code_and_pos = code text = END_CODE {
|
||||
let (code, pos) = code_and_pos in
|
||||
(code, (text, pos))
|
||||
let (code, _) = code_and_pos in
|
||||
(code, (text, Pos.from_lpos $sloc))
|
||||
}
|
||||
|
||||
|
||||
|
@ -29,9 +29,6 @@ type 'e var = 'e expr Bindlib.var
|
||||
type 'e t = 'e var
|
||||
type 'e vars = 'e expr Bindlib.mvar
|
||||
|
||||
type 'e binder = (('a, 't) gexpr, ('a, 't) marked_gexpr) Bindlib.binder
|
||||
constraint 'e = ('a, 't) gexpr
|
||||
|
||||
let make (name : string) : 'e var = Bindlib.new_var (fun x -> EVar x) name
|
||||
let compare = Bindlib.compare_vars
|
||||
let eq = Bindlib.eq_vars
|
||||
@ -62,7 +59,6 @@ module Generic = struct
|
||||
let t v = Var v
|
||||
let get (Var v) = Bindlib.copy_var v (fun x -> EVar x) (Bindlib.name_of v)
|
||||
let compare (Var x) (Var y) = Bindlib.compare_vars x y
|
||||
let eq (Var x) (Var y) = Bindlib.eq_vars x y
|
||||
end
|
||||
|
||||
(* Wrapper around Set.Make to re-add type parameters (avoid inconsistent
|
||||
|
@ -155,7 +155,7 @@ Bénéficiaires Zones Montants
|
||||
------------------------- ----- --------
|
||||
Cas général I 268,26
|
||||
|
||||
II 233,80
|
||||
II 233,80
|
||||
|
||||
III 219,13
|
||||
|
||||
@ -4265,7 +4265,7 @@ b) 131,00 euros lorsqu'il s'agit d'un couple ;
|
||||
champ d'application CalculAllocationLogementFoyer
|
||||
sous condition date_courante >=@ |2021-10-01|:
|
||||
définition équivalence_loyer sous condition
|
||||
catégorie_équivalence_loyer_d842_16 sous forme ÉtudiantLogéEnChambre
|
||||
catégorie_équivalence_loyer_d842_16 sous forme ÉtudiantLogéEnChambreCROUS
|
||||
conséquence égal à
|
||||
selon situation_familiale_calcul_apl sous forme
|
||||
-- PersonneSeule: 84,14 €
|
||||
@ -4283,7 +4283,7 @@ champ d'application CalculAllocationLogementFoyer
|
||||
sous condition date_courante >=@ |2021-10-01|:
|
||||
définition équivalence_loyer sous condition
|
||||
catégorie_équivalence_loyer_d842_16 sous forme
|
||||
ÉtudiantLogéEnChambreRéhabilitée
|
||||
ÉtudiantLogéEnChambreCROUSRéhabilitée
|
||||
conséquence égal à
|
||||
selon situation_familiale_calcul_apl sous forme
|
||||
-- PersonneSeule: 170,12 €
|
||||
|
@ -65,13 +65,12 @@ champ d'application ÉligibilitéAidesPersonnelleLogement:
|
||||
condition_logement_résidence_principale et # L821-2
|
||||
condition_logement_mode_occupation et
|
||||
condition_logement_location_tiers et
|
||||
condition_logement_surface
|
||||
condition_ouverture_l822_10_peuplement_logement
|
||||
conséquence rempli
|
||||
|
||||
exception règle éligibilité_logement sous condition
|
||||
condition_non_ouverture_l822_8 ou
|
||||
condition_non_ouverture_l822_9_decence_logement ou
|
||||
condition_non_ouverture_l822_10_peuplement_logement
|
||||
condition_non_ouverture_l822_9_decence_logement
|
||||
conséquence non rempli
|
||||
```
|
||||
|
||||
@ -107,7 +106,8 @@ champ d'application ÉligibilitéAidesPersonnelleLogement:
|
||||
règle condition_nationalité sous condition
|
||||
selon demandeur.nationalité sous forme
|
||||
-- Française: vrai
|
||||
-- Étrangère: demandeur.satisfait_conditions_l512_2_code_sécurité_sociale
|
||||
-- Étrangère de conditions:
|
||||
conditions.satisfait_conditions_l512_2_code_sécurité_sociale
|
||||
conséquence rempli
|
||||
```
|
||||
|
||||
@ -203,7 +203,8 @@ exception cas_base_l822_4 règle condition_logement_location_tiers
|
||||
selon ménage.logement.loué_ou_sous_loué_à_des_tiers sous forme
|
||||
-- LouéOuSousLouéÀDesTiers.Non: vrai
|
||||
-- LouéOuSousLouéÀDesTiers.Oui de personne:
|
||||
personne.age_personne_sous_location <= 30 ou
|
||||
personne.date_naissance_personne_sous_location +@ 30 an >@
|
||||
date_courante ou
|
||||
personne.conforme_article_l442_1
|
||||
conséquence rempli
|
||||
```
|
||||
@ -376,9 +377,11 @@ L'attribution d'une aide personnelle au logement est subordonnée au
|
||||
respect de conditions de peuplement des logements.
|
||||
|
||||
```catala
|
||||
# Cet article fait référence à la condition sur la surface minimale du logement
|
||||
# de R822-25
|
||||
champ d'application ÉligibilitéAidesPersonnelleLogement:
|
||||
règle condition_non_ouverture_l822_10_peuplement_logement
|
||||
sous condition condition_peuplement_logement_l822_10
|
||||
règle condition_ouverture_l822_10_peuplement_logement
|
||||
sous condition condition_logement_surface
|
||||
conséquence rempli
|
||||
```
|
||||
|
||||
@ -630,14 +633,16 @@ régies par la section 3 du chapitre Ier du titre II du livre III ;
|
||||
|
||||
```catala
|
||||
champ d'application ÉligibilitéAidePersonnaliséeLogement:
|
||||
étiquette l831_1_2 règle condition_logement_bailleur sous condition
|
||||
règle condition_logement_bailleur sous condition
|
||||
selon ménage.logement.mode_occupation sous forme
|
||||
-- Locataire de location:
|
||||
(selon location.bailleur.type_bailleur sous forme
|
||||
-- BailleurSocial:
|
||||
location.bailleur.respecte_convention_titre_V
|
||||
-- BailleurPrivé:
|
||||
location.bailleur.respecte_convention_titre_II)
|
||||
(selon location.Location.bailleur sous forme
|
||||
-- BailleurSocial de convention:
|
||||
convention.ConventionBailleurSocial.
|
||||
conventionné_livre_III_titre_V_chap_III
|
||||
-- BailleurPrivéAvecConventionnementSocial de convention:
|
||||
convention.conventionné_livre_III_titre_II_chap_I_sec_3
|
||||
-- n'importe quel: faux)
|
||||
-- n'importe quel: faux
|
||||
conséquence rempli
|
||||
```
|
||||
@ -649,24 +654,9 @@ bailleurs de respecter les obligations précisées par des conventions régies
|
||||
par le chapitre III du titre V du livre III ;
|
||||
|
||||
```catala
|
||||
champ d'application ÉligibilitéAidePersonnaliséeLogement:
|
||||
# TODO recherche: citer cet exemple intéréssant d'un point de vue
|
||||
# computationel.
|
||||
# Ici attention à la structure d'exception! Le 2°) est le cas de base, le
|
||||
# 4°) est une exception au 2°) plus permissive que le cas de base, tandis
|
||||
# que le 3°) est une exception plus stricte que le cas de base. Si 3°) et
|
||||
# 4°) s'appliquent en même temps alors il faudra prioriser le cas strict
|
||||
# sur le cas permissif, d'où la structure d'exceptions ci-dessous.
|
||||
exception l831_1_4 règle condition_logement_bailleur sous condition
|
||||
selon ménage.logement.mode_occupation sous forme
|
||||
-- Locataire de location:
|
||||
(selon location.bailleur.type_bailleur sous forme
|
||||
-- BailleurSocial: faux
|
||||
-- BailleurPrivé:
|
||||
location.bailleur.acquisition_aides_état_prêt_titre_II_ou_livre_III et
|
||||
location.bailleur.respecte_convention_titre_V)
|
||||
-- n'importe quel: faux
|
||||
conséquence rempli
|
||||
# Cet alinéa apport une précision sur l'origine de la convention pour le
|
||||
# bailleur social, mais ne nous intéresse pas pour la formalisation puisque
|
||||
# tout ce qui nous intéresse c'est de savoir si la convention existe ou pas.
|
||||
```
|
||||
|
||||
4° Logements à usage locatif construits ou améliorés dans des conditions fixées
|
||||
@ -675,22 +665,9 @@ obligations précisées par des conventions régies par le chapitre III du titre
|
||||
ou par la section 3 du chapitre Ier du titre II du livre III ;
|
||||
|
||||
```catala
|
||||
champ d'application ÉligibilitéAidePersonnaliséeLogement:
|
||||
étiquette l831_1_4 exception l831_1_2
|
||||
règle condition_logement_bailleur sous condition
|
||||
selon ménage.logement.mode_occupation sous forme
|
||||
-- Locataire de location:
|
||||
(selon location.bailleur.type_bailleur sous forme
|
||||
-- BailleurSocial:
|
||||
location.bailleur.construit_amélioré_conditions_l831_1_4 et
|
||||
(location.bailleur.respecte_convention_titre_V ou
|
||||
location.bailleur.respecte_convention_titre_II)
|
||||
-- BailleurPrivé:
|
||||
location.bailleur.construit_amélioré_conditions_l831_1_4 et
|
||||
(location.bailleur.respecte_convention_titre_V ou
|
||||
location.bailleur.respecte_convention_titre_II))
|
||||
-- n'importe quel: faux
|
||||
conséquence rempli
|
||||
# Cet alinéa apport une précision sur l'origine de la convention pour le
|
||||
# bailleur social, mais ne nous intéresse pas pour la formalisation puisque
|
||||
# tout ce qui nous intéresse c'est de savoir si la convention existe ou pas.
|
||||
```
|
||||
|
||||
5° Logements-foyers assimilés dans des conditions fixées par voie réglementaire
|
||||
@ -698,7 +675,13 @@ aux logements mentionnés aux 2° et 3° ci-dessus, dès lors qu'ils font l'obje
|
||||
des conventions régies par le chapitre III du titre V du livre III ;
|
||||
|
||||
```catala
|
||||
# Voir R832-21.
|
||||
champ d'application ÉligibilitéAidePersonnaliséeLogement:
|
||||
règle condition_logement_bailleur sous condition
|
||||
selon ménage.logement.mode_occupation sous forme
|
||||
-- RésidentLogementFoyer de location:
|
||||
location.LogementFoyer.conventionné_livre_III_titre_V_chap_III
|
||||
-- n'importe quel: faux
|
||||
conséquence rempli
|
||||
```
|
||||
|
||||
6° Logements occupés par des titulaires de contrats de location-accession
|
||||
@ -709,7 +692,6 @@ de l'Etat ou de prêts dont les caractéristiques et les conditions d'octroi son
|
||||
fixées par voie réglementaire, sous les réserves énoncées à l ‘ article L. 831-2.
|
||||
|
||||
```catala
|
||||
# TODO juridique: trouver quelles sont ces mystérieuses conditions d'octroi.
|
||||
champ d'application ÉligibilitéAidePersonnaliséeLogement:
|
||||
règle condition_logement_bailleur sous condition
|
||||
selon ménage.logement.mode_occupation sous forme
|
||||
@ -756,13 +738,13 @@ champ d'application ÉligibilitéAidePersonnaliséeLogement:
|
||||
# 2018 nous a été confirmé le 25/05/2022 par DGALN/DHUP/FE4.
|
||||
propriété.prêt.date_signature >=@ |2018-01-01| et
|
||||
propriété.prêt.date_signature <@ |2020-01-01| et
|
||||
ménage.logement.est_ancien_l831_2 et
|
||||
ménage.logement.situé_commune_déséquilibre_l831_2
|
||||
propriété.ancienneté_logement sous forme Ancien et
|
||||
propriété.logement_situé_commune_déséquilibre_l831_2
|
||||
-- AccessionPropriétéLocalUsageExclusifHabitation de propriété:
|
||||
propriété.prêt.date_signature >=@ |2018-01-01| et
|
||||
propriété.prêt.date_signature <@ |2020-01-01| et
|
||||
ménage.logement.est_ancien_l831_2 et
|
||||
ménage.logement.situé_commune_déséquilibre_l831_2
|
||||
propriété.ancienneté_logement sous forme Ancien et
|
||||
propriété.logement_situé_commune_déséquilibre_l831_2
|
||||
-- n'importe quel: faux
|
||||
conséquence rempli
|
||||
```
|
||||
@ -818,13 +800,11 @@ est fixée par voie réglementaire.
|
||||
```catala
|
||||
champ d'application CalculAidePersonnaliséeLogementLocatif:
|
||||
définition traitement_aide_finale de aide_finale état réduction_loyer_solidarité égal à
|
||||
soit aide_finale égal à traitement_aide_finale de aide_finale dans
|
||||
si
|
||||
traitement_aide_finale de aide_finale -€
|
||||
réduction_loyer_solidarité *€ fraction_l832_3 >=€
|
||||
0€
|
||||
aide_finale -€ réduction_loyer_solidarité *€ fraction_l832_3 >=€ 0€
|
||||
alors
|
||||
traitement_aide_finale de aide_finale -€
|
||||
réduction_loyer_solidarité *€ fraction_l832_3
|
||||
aide_finale -€ réduction_loyer_solidarité *€ fraction_l832_3
|
||||
sinon 0€
|
||||
|
||||
assertion fraction_l832_3 >=. 90% et fraction_l832_3 <=. 98%
|
||||
@ -851,7 +831,10 @@ champ d'application ÉligibilitéAllocationLogement:
|
||||
# personnelles au logement. Comme il n'existe pas d'article de loi ou de
|
||||
# règlement rappelant ce fait, nous le traduisons en code ici.
|
||||
définition éligibilité état dispositions_communes égal à
|
||||
si non éligibilité_commune.éligibilité alors
|
||||
si
|
||||
(non éligibilité_commune.éligibilité) ou
|
||||
(non condition_accession_propriété)
|
||||
alors
|
||||
PasÉligible
|
||||
sinon
|
||||
# Valeur par défaut, sera réécrit à l'application de L841-2.
|
||||
@ -905,15 +888,11 @@ champ d'application ÉligibilitéAllocationLogement:
|
||||
-- obligation_scolaire: enfant.EnfantÀCharge.obligation_scolaire
|
||||
-- rémuneration_mensuelle: enfant.EnfantÀCharge.rémuneration_mensuelle
|
||||
-- date_de_naissance: enfant.EnfantÀCharge.date_de_naissance
|
||||
-- âge: enfant.EnfantÀCharge.âge
|
||||
-- prise_en_charge: (selon enfant.EnfantÀCharge.prise_en_charge sous forme
|
||||
-- PriseEnCharge.EffectiveEtPermanente:
|
||||
PriseEnChargeEnfant.EffectiveEtPermanente
|
||||
-- PriseEnCharge.RésidenceAlternéeAllocataireUnique:
|
||||
PriseEnChargeEnfant.GardeAlternéeAllocataireUnique
|
||||
-- PriseEnCharge.RésidenceAlternéeAllocationsPartagée:
|
||||
-- prise_en_charge: (selon enfant.situation_garde_alternée sous forme
|
||||
-- GardeAlternéeCoefficientPriseEnCharge:
|
||||
PriseEnChargeEnfant.GardeAlternéePartageAllocations
|
||||
)
|
||||
-- PasDeGardeAlternée:
|
||||
PriseEnChargeEnfant.EffectiveEtPermanente)
|
||||
-- a_déjà_ouvert_droit_aux_allocations_familiales:
|
||||
enfant.EnfantÀCharge.a_déjà_ouvert_droit_aux_allocations_familiales
|
||||
-- bénéficie_titre_personnel_aide_personnelle_logement:
|
||||
@ -940,15 +919,11 @@ champ d'application ÉligibilitéAllocationLogement:
|
||||
-- obligation_scolaire: enfant.EnfantÀCharge.obligation_scolaire
|
||||
-- rémuneration_mensuelle: enfant.EnfantÀCharge.rémuneration_mensuelle
|
||||
-- date_de_naissance: enfant.EnfantÀCharge.date_de_naissance
|
||||
-- âge: enfant.EnfantÀCharge.âge
|
||||
-- prise_en_charge: (selon enfant.EnfantÀCharge.prise_en_charge sous forme
|
||||
-- PriseEnCharge.EffectiveEtPermanente:
|
||||
PriseEnChargeEnfant.EffectiveEtPermanente
|
||||
-- PriseEnCharge.RésidenceAlternéeAllocataireUnique:
|
||||
PriseEnChargeEnfant.GardeAlternéeAllocataireUnique
|
||||
-- PriseEnCharge.RésidenceAlternéeAllocationsPartagée:
|
||||
-- prise_en_charge: (selon enfant.situation_garde_alternée sous forme
|
||||
-- GardeAlternéeCoefficientPriseEnCharge:
|
||||
PriseEnChargeEnfant.GardeAlternéePartageAllocations
|
||||
)
|
||||
-- PasDeGardeAlternée:
|
||||
PriseEnChargeEnfant.EffectiveEtPermanente)
|
||||
-- a_déjà_ouvert_droit_aux_allocations_familiales:
|
||||
enfant.EnfantÀCharge.a_déjà_ouvert_droit_aux_allocations_familiales
|
||||
-- bénéficie_titre_personnel_aide_personnelle_logement:
|
||||
@ -1047,10 +1022,9 @@ champ d'application ÉligibilitéAllocationLogement:
|
||||
si éligibilité = PasÉligible ou bénéficie_aide_personnalisée_logement alors
|
||||
PasÉligible
|
||||
sinon (si éligibilité_allocation_logement_familiale alors
|
||||
ÉligibilitéAllocationLogement.AllocationLogementFamiliale
|
||||
sinon (si éligibilité_allocation_logement_sociale alors
|
||||
ÉligibilitéAllocationLogement.AllocationLogementSociale
|
||||
sinon PasÉligible))
|
||||
ÉligibilitéAllocationLogement.AllocationLogementFamiliale
|
||||
sinon
|
||||
ÉligibilitéAllocationLogement.AllocationLogementSociale)
|
||||
|
||||
champ d'application CalculetteAidesAuLogement:
|
||||
# Le champ d'application CalculetteAidesAuLogement suppose un scenario type
|
||||
@ -1104,22 +1078,27 @@ champ d'application CalculetteAidesAuLogement:
|
||||
sinon calcul_allocation_logement.aide_finale_formule
|
||||
|
||||
définition traitement_aide_finale de aide_finale égal à
|
||||
si non éligibilité alors aide_finale sinon si
|
||||
éligibilité_aide_personnalisée_logement.éligibilité et
|
||||
non (éligibilité_allocation_logement.éligibilité sous forme PasÉligible)
|
||||
alors
|
||||
(si calcul_aide_personnalisée_logement.traitement_aide_finale de
|
||||
calcul_aide_personnalisée_logement.aide_finale_formule >€
|
||||
calcul_allocation_logement.traitement_aide_finale de
|
||||
calcul_allocation_logement.aide_finale_formule
|
||||
alors
|
||||
calcul_aide_personnalisée_logement.traitement_aide_finale de aide_finale
|
||||
sinon
|
||||
calcul_allocation_logement.traitement_aide_finale de aide_finale)
|
||||
sinon si éligibilité_aide_personnalisée_logement.éligibilité
|
||||
alors
|
||||
soit aide_finale_apl égal à
|
||||
calcul_aide_personnalisée_logement.traitement_aide_finale de aide_finale
|
||||
sinon calcul_allocation_logement.traitement_aide_finale de aide_finale
|
||||
dans
|
||||
soit aide_finale_al égal à
|
||||
calcul_allocation_logement.traitement_aide_finale de aide_finale
|
||||
dans
|
||||
si non éligibilité alors
|
||||
aide_finale
|
||||
sinon si
|
||||
éligibilité_aide_personnalisée_logement.éligibilité et
|
||||
non (éligibilité_allocation_logement.éligibilité sous forme PasÉligible)
|
||||
alors
|
||||
(si aide_finale_apl >€ aide_finale_al
|
||||
alors aide_finale_apl
|
||||
sinon aide_finale_al)
|
||||
sinon si
|
||||
éligibilité_aide_personnalisée_logement.éligibilité
|
||||
alors
|
||||
aide_finale_apl
|
||||
sinon
|
||||
aide_finale_al
|
||||
```
|
||||
|
||||
###### Article L841-3 | LEGIARTI000038814860
|
||||
@ -1129,9 +1108,10 @@ soins de longue durée mentionnés au 3° de l'article L. 162-22 du code de la s
|
||||
|
||||
```catala
|
||||
champ d'application ÉligibilitéAllocationLogement:
|
||||
règle éligibilité_allocation_logement_sociale sous condition
|
||||
exception définition éligibilité état l841_2 sous condition
|
||||
demandeur.personne_hébergée_centre_soin_l_L162_22_3_sécurité_sociale
|
||||
conséquence rempli
|
||||
conséquence égal à
|
||||
ÉligibilitéAllocationLogement.AllocationLogementSociale
|
||||
```
|
||||
|
||||
###### Article L841-4 | LEGIARTI000038814858
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -13,28 +13,27 @@ dans les sections suivantes.
|
||||
#### Calcul et éligibilité pour le secteur locatif
|
||||
|
||||
```catala-metadata
|
||||
déclaration structure ConventionBailleurSocial:
|
||||
donnée conventionné_livre_III_titre_V_chap_III contenu booléen
|
||||
donnée réduction_loyer_solidarité_perçue contenu argent
|
||||
|
||||
déclaration structure ConventionANHA:
|
||||
donnée conventionné_livre_III_titre_II_chap_I_sec_3 contenu booléen
|
||||
|
||||
déclaration énumération TypeBailleur:
|
||||
-- BailleurSocial
|
||||
-- BailleurSocial contenu ConventionBailleurSocial
|
||||
-- BailleurPrivéAvecConventionnementSocial contenu
|
||||
ConventionANHA
|
||||
-- BailleurPrivé
|
||||
|
||||
déclaration structure Bailleur:
|
||||
donnée type_bailleur contenu TypeBailleur
|
||||
donnée respecte_convention_titre_V contenu booléen
|
||||
donnée respecte_convention_titre_II contenu booléen
|
||||
donnée construit_amélioré_conditions_l831_1_4 contenu booléen
|
||||
donnée acquisition_aides_état_prêt_titre_II_ou_livre_III contenu booléen
|
||||
|
||||
déclaration structure Location:
|
||||
donnée bailleur contenu Bailleur
|
||||
|
||||
déclaration structure InformationsCalculAPLLocatif:
|
||||
donnée bailleur contenu TypeBailleur
|
||||
donnée loyer_principal contenu argent
|
||||
donnée bénéficiaire_aide_adulte_ou_enfant_handicapés contenu booléen
|
||||
donnée logement_est_chambre contenu booléen
|
||||
donnée colocation contenu booléen
|
||||
donnée âgées_ou_handicap_adultes_hébergées_onéreux_particuliers
|
||||
contenu booléen
|
||||
donnée réduction_loyer_solidarité contenu argent
|
||||
donnée logement_meublé_d842_2 contenu booléen
|
||||
donnée changement_logement_d842_4 contenu ChangementLogementD842_4
|
||||
```
|
||||
@ -59,6 +58,16 @@ déclaration structure Prêt:
|
||||
donnée titulaire_prêt contenu TitulairePrêt
|
||||
|
||||
déclaration structure Propriétaire:
|
||||
donnée logement_situé_commune_déséquilibre_l831_2 contenu booléen
|
||||
donnée mensualité_principale contenu argent
|
||||
donnée charges_mensuelles_prêt contenu argent
|
||||
donnée date_entrée_logement contenu date
|
||||
donnée type_travaux_logement_d832_15 contenu TypeTravauxLogementD832_15
|
||||
donnée type_travaux_logement_r842_5 contenu TypeTravauxLogementR842_5
|
||||
donnée local_habité_première_fois_bénéficiaire contenu booléen
|
||||
donnée copropriété contenu booléen
|
||||
donnée situation_r822_11_13_17 contenu booléen
|
||||
donnée ancienneté_logement contenu NeufOuAncien
|
||||
donnée prêt contenu Prêt
|
||||
|
||||
déclaration énumération TypeTravauxLogementD832_15:
|
||||
@ -79,18 +88,6 @@ déclaration énumération AmélioréParOccupant:
|
||||
déclaration énumération NeufOuAncien:
|
||||
-- Neuf
|
||||
-- Ancien contenu AmélioréParOccupant
|
||||
|
||||
déclaration structure InformationsCalculAPLAccessionPropriété:
|
||||
donnée mensualité_principale contenu argent
|
||||
donnée charges_mensuelles_prêt contenu argent
|
||||
donnée date_entrée_logement contenu date
|
||||
donnée type_travaux_logement_d832_15 contenu TypeTravauxLogementD832_15
|
||||
donnée type_travaux_logement_r842_5 contenu TypeTravauxLogementR842_5
|
||||
donnée local_habité_première_fois_bénéficiaire contenu booléen
|
||||
donnée copropriété contenu booléen
|
||||
donnée situation_r822_11_13_17 contenu booléen
|
||||
donnée ancienneté_logement contenu NeufOuAncien
|
||||
|
||||
```
|
||||
|
||||
#### Calcul et éligibilité pour le secteur logement-foyer
|
||||
@ -116,15 +113,14 @@ déclaration structure TrancheRevenuDécimal:
|
||||
|
||||
déclaration structure LogementFoyer:
|
||||
donnée type contenu TypeLogementFoyer
|
||||
donnée date_conventionnement contenu date
|
||||
donnée location contenu Location
|
||||
donnée remplit_conditions_r832_21 contenu booléen
|
||||
donnée conventionné_livre_III_titre_V_chap_III contenu booléen
|
||||
donnée date_conventionnement contenu date
|
||||
donnée construit_application_loi_1957_12_III contenu booléen
|
||||
|
||||
déclaration structure InformationsCalculAPLLogementFoyer:
|
||||
donnée redevance contenu argent
|
||||
donnée catégorie_équivalence_loyer_d842_16 contenu
|
||||
CatégorieÉquivalenceLoyerAllocationLogementFoyer
|
||||
|
||||
```
|
||||
|
||||
#### Calcul et éligibilité pour tous les secteurs
|
||||
@ -152,7 +148,7 @@ déclaration énumération ParentOuAutre:
|
||||
-- Autre
|
||||
|
||||
déclaration structure PersonneSousLocation:
|
||||
donnée age_personne_sous_location contenu entier
|
||||
donnée date_naissance_personne_sous_location contenu date
|
||||
donnée conforme_article_l442_1 contenu booléen
|
||||
|
||||
déclaration énumération LouéOuSousLouéÀDesTiers:
|
||||
@ -168,8 +164,6 @@ déclaration structure Logement:
|
||||
donnée usufruit contenu ParentOuAutre
|
||||
donnée logement_decent_l89_462 contenu booléen
|
||||
donnée surface_m_carrés contenu entier
|
||||
donnée est_ancien_l831_2 contenu booléen
|
||||
donnée situé_commune_déséquilibre_l831_2 contenu booléen
|
||||
donnée zone contenu ZoneDHabitation
|
||||
|
||||
déclaration énumération SituationGardeAlternée:
|
||||
@ -184,8 +178,6 @@ déclaration structure EnfantÀCharge:
|
||||
donnée date_de_naissance contenu date
|
||||
donnée rémuneration_mensuelle contenu argent
|
||||
donnée obligation_scolaire contenu SituationObligationScolaire
|
||||
donnée prise_en_charge contenu PriseEnCharge
|
||||
donnée âge contenu entier
|
||||
donnée situation_garde_alternée contenu SituationGardeAlternée
|
||||
|
||||
déclaration énumération Parenté:
|
||||
@ -223,30 +215,26 @@ déclaration structure Ménage:
|
||||
donnée nombre_autres_occupants_logement contenu entier
|
||||
donnée situation_familiale contenu SituationFamiliale
|
||||
donnée condition_rattaché_foyer_fiscal_parent_ifi contenu booléen
|
||||
donnée nombre_enfants_à_naître_après_troisième_mois_grossesse
|
||||
contenu entier
|
||||
donnée enfant_à_naître_après_quatrième_mois_grossesse
|
||||
contenu booléen
|
||||
donnée date_naissance_troisième_enfant_ou_dernier_si_plus contenu
|
||||
DateNaissanceTroisièmeOuDernierPlusEnfant
|
||||
donnée enfant_à_naître_après_quatrième_mois_grossesse contenu booléen
|
||||
|
||||
déclaration structure Patrimoine:
|
||||
donnée produisant_revenu_période_r822_3_3_r822_4 contenu argent
|
||||
donnée ne_produisant_pas_revenu_période_r822_3_3_r822_4 contenu argent
|
||||
|
||||
déclaration structure Demandeur:
|
||||
donnée satisfait_conditions_l512_2_code_sécurité_sociale
|
||||
contenu booléen
|
||||
donnée age_demandeur contenu entier
|
||||
donnée date_naissance contenu date
|
||||
donnée nationalité contenu Nationalité
|
||||
donnée patrimoine contenu Patrimoine
|
||||
donnée personne_hébergée_centre_soin_l_L162_22_3_sécurité_sociale
|
||||
contenu booléen
|
||||
|
||||
déclaration structure ConditionsÉtrangers:
|
||||
donnée satisfait_conditions_l512_2_code_sécurité_sociale
|
||||
contenu booléen
|
||||
|
||||
déclaration énumération Nationalité:
|
||||
-- Française
|
||||
-- Étrangère
|
||||
-- Étrangère contenu ConditionsÉtrangers
|
||||
|
||||
déclaration énumération ZoneDHabitation:
|
||||
-- Zone1
|
||||
@ -257,12 +245,6 @@ déclaration énumération CatégorieCalculAPL:
|
||||
-- Location
|
||||
-- AccessionPropriété
|
||||
-- LogementFoyer
|
||||
|
||||
déclaration énumération InformationsCalculAPL:
|
||||
-- InfosLocatif contenu InformationsCalculAPLLocatif
|
||||
-- InfosLogementFoyer contenu InformationsCalculAPLLogementFoyer
|
||||
-- InfosAccessionPropriété contenu
|
||||
InformationsCalculAPLAccessionPropriété
|
||||
```
|
||||
|
||||
### Informations concernant l'évaluation des ressources du ménage
|
||||
@ -312,12 +294,10 @@ déclaration champ d'application ÉligibilitéAidesPersonnelleLogement:
|
||||
contexte condition_logement_résidence_principale condition
|
||||
interne condition_logement_mode_occupation condition
|
||||
interne condition_logement_location_tiers condition
|
||||
interne condition_logement_surface_minimale_sans_seuil_m_carrés
|
||||
contenu entier
|
||||
contexte condition_logement_surface condition
|
||||
interne condition_non_ouverture_l822_8 condition
|
||||
interne condition_non_ouverture_l822_9_decence_logement condition
|
||||
interne condition_non_ouverture_l822_10_peuplement_logement condition
|
||||
interne condition_ouverture_l822_10_peuplement_logement condition
|
||||
interne condition_peuplement_logement_l822_10 condition
|
||||
interne éligibilité_logement condition
|
||||
interne prise_en_compte_personne_à_charge condition
|
||||
@ -327,7 +307,6 @@ déclaration champ d'application ÉligibilitéAidesPersonnelleLogement:
|
||||
|
||||
# Autres variables
|
||||
interne patrimoine_total_demandeur contenu argent
|
||||
interne nombre_personnes_logement contenu entier
|
||||
interne usufruit_ou_propriété_famille contenu booléen
|
||||
interne seuil_l822_3_parts_propriété contenu décimal
|
||||
interne seuil_l822_3_parts_usufruit contenu décimal
|
||||
@ -418,12 +397,10 @@ déclaration champ d'application ÉligibilitéAllocationLogement:
|
||||
entrée ménage contenu Ménage
|
||||
entrée demandeur contenu Demandeur
|
||||
entrée bénéficie_aide_personnalisée_logement contenu booléen
|
||||
entrée informations_calcul contenu InformationsCalculAPL
|
||||
|
||||
interne condition_logement condition
|
||||
interne condition_accession_propriété condition
|
||||
|
||||
interne éligibilité_allocation_logement_familiale condition
|
||||
interne éligibilité_allocation_logement_sociale condition
|
||||
interne durée_l841_1_3 contenu durée
|
||||
|
||||
prestations_familiales champ d'application ÉligibilitéPrestationsFamiliales
|
||||
@ -433,7 +410,6 @@ déclaration champ d'application ÉligibilitéAllocationLogement:
|
||||
sortie éligibilité contenu ÉligibilitéAllocationLogement
|
||||
état dispositions_communes
|
||||
état l841_2
|
||||
état avec_condition_logement
|
||||
sortie nombre_personnes_à_charge_prises_en_compte contenu entier
|
||||
sortie coefficents_enfants_garde_alternée_pris_en_compte contenu
|
||||
collection décimal
|
||||
@ -452,12 +428,6 @@ champ d'application ÉligibilitéAllocationLogement:
|
||||
définition éligibilité_commune.demandeur égal à demandeur
|
||||
définition éligibilité_commune.date_courante égal à
|
||||
date_courante
|
||||
|
||||
définition éligibilité état avec_condition_logement égal à
|
||||
si non condition_logement alors
|
||||
PasÉligible
|
||||
sinon
|
||||
éligibilité
|
||||
définition nombre_personnes_à_charge_prises_en_compte égal à
|
||||
éligibilité_commune.nombre_personnes_à_charge_prises_en_compte
|
||||
définition coefficents_enfants_garde_alternée_pris_en_compte égal à
|
||||
@ -467,7 +437,14 @@ champ d'application ÉligibilitéAllocationLogement:
|
||||
### Éligibilité à la prime de déménagement
|
||||
|
||||
```catala-metadata
|
||||
déclaration structure InformationsPrimeDeDéménagement:
|
||||
donnée nombre_enfants_à_naître_après_troisième_mois_grossesse
|
||||
contenu entier
|
||||
donnée date_naissance_troisième_enfant_ou_dernier_si_plus
|
||||
contenu DateNaissanceTroisièmeOuDernierPlusEnfant
|
||||
|
||||
déclaration champ d'application ÉligibilitéPrimeDeDéménagement:
|
||||
entrée informations contenu InformationsPrimeDeDéménagement
|
||||
entrée date_emménagement contenu date
|
||||
entrée ménage contenu Ménage
|
||||
entrée demandeur contenu Demandeur
|
||||
@ -550,6 +527,8 @@ déclaration champ d'application ContributionsSocialesAidesPersonnelleLogement:
|
||||
```catala-metadata
|
||||
déclaration champ d'application CalculAidePersonnaliséeLogementLocatif:
|
||||
entrée loyer_principal contenu argent
|
||||
état base
|
||||
état avec_réduction_meublé
|
||||
entrée ressources_ménage_arrondies contenu argent
|
||||
entrée bénéficiaire_aide_adulte_ou_enfant_handicapés
|
||||
contenu booléen
|
||||
@ -563,6 +542,7 @@ déclaration champ d'application CalculAidePersonnaliséeLogementLocatif:
|
||||
entrée type_aide contenu TypeAidesPersonnelleLogement
|
||||
entrée colocation contenu booléen
|
||||
entrée réduction_loyer_solidarité contenu argent
|
||||
entrée logement_meublé_d842_2 contenu booléen
|
||||
|
||||
interne loyer_éligible contenu argent
|
||||
interne taux_loyer_éligible contenu décimal
|
||||
@ -623,7 +603,8 @@ déclaration champ d'application CalculNombrePartLogementFoyer:
|
||||
sortie n_nombre_parts_d832_25 contenu décimal
|
||||
|
||||
déclaration champ d'application CalculAidePersonnaliséeLogementFoyer:
|
||||
entrée mode_occupation contenu ModeOccupation
|
||||
entrée type_logement_foyer contenu TypeLogementFoyer
|
||||
entrée date_conventionnement contenu date
|
||||
entrée ressources_ménage_arrondies contenu argent
|
||||
entrée nombre_personnes_à_charge contenu entier
|
||||
entrée situation_familiale_calcul_apl contenu SituationFamilialeCalculAPL
|
||||
@ -744,7 +725,6 @@ champ d'application CalculAidePersonnaliséeLogementAccessionPropriété:
|
||||
déclaration champ d'application CalculAidePersonnaliséeLogement:
|
||||
entrée mode_occupation contenu ModeOccupation
|
||||
entrée type_aide contenu TypeAidesPersonnelleLogement
|
||||
entrée informations_calcul contenu InformationsCalculAPL
|
||||
entrée ressources_ménage contenu argent
|
||||
état sans_arrondi
|
||||
état avec_arrondi
|
||||
@ -795,9 +775,9 @@ déclaration champ d'application CalculAllocationLogementLocatif:
|
||||
entrée type_aide contenu TypeAidesPersonnelleLogement
|
||||
entrée colocation contenu booléen
|
||||
entrée réduction_loyer_solidarité contenu argent
|
||||
entrée logement_meublé_d842_2 contenu booléen
|
||||
|
||||
# Entrées spécifiques
|
||||
entrée logement_meublé_d842_2 contenu booléen
|
||||
entrée changement_logement_d842_4 contenu ChangementLogementD842_4
|
||||
|
||||
calcul_apl_locatif champ d'application CalculAidePersonnaliséeLogementLocatif
|
||||
@ -835,6 +815,8 @@ champ d'application CalculAllocationLogementLocatif:
|
||||
colocation
|
||||
définition calcul_apl_locatif.réduction_loyer_solidarité égal à
|
||||
réduction_loyer_solidarité
|
||||
définition calcul_apl_locatif.logement_meublé_d842_2 égal à
|
||||
logement_meublé_d842_2
|
||||
|
||||
|
||||
définition aide_finale_formule égal à calcul_apl_locatif.aide_finale_formule
|
||||
@ -899,27 +881,16 @@ déclaration champ d'application CalculAllocationLogementAccessionPropriété:
|
||||
état montant_minimal
|
||||
|
||||
champ d'application CalculAllocationLogementAccessionPropriété:
|
||||
définition calcul_apl_logement_foyer.mode_occupation égal à
|
||||
# Ici la valeur du mode d'occupation n'a pas de sens puisque l'on est
|
||||
# dans le cas d'une accession à la propriété mais on nous demande de
|
||||
# calculer des quantités comme si on était en logement foyer. Or il nous
|
||||
# faut donner un argument au sous-champ d'application donc on met ici une
|
||||
# valeur bidon.
|
||||
RésidentLogementFoyer contenu (LogementFoyer {
|
||||
-- type: RésidenceSociale
|
||||
-- date_conventionnement: |2022-01-01|
|
||||
-- construit_application_loi_1957_12_III: faux
|
||||
-- location: Location {
|
||||
-- bailleur: Bailleur {
|
||||
-- type_bailleur: BailleurSocial
|
||||
-- respecte_convention_titre_V: vrai
|
||||
-- respecte_convention_titre_II: vrai
|
||||
-- construit_amélioré_conditions_l831_1_4: vrai
|
||||
-- acquisition_aides_état_prêt_titre_II_ou_livre_III: vrai
|
||||
}
|
||||
}
|
||||
-- remplit_conditions_r832_21: faux
|
||||
})
|
||||
# Ici la valeur du type de foyer et de la date de conventionnement
|
||||
# n'a pas de sens puisque l'on est
|
||||
# dans le cas d'une accession à la propriété mais on nous demande de
|
||||
# calculer des quantités comme si on était en logement foyer. Or il nous
|
||||
# faut donner un argument au sous-champ d'application donc on met ici une
|
||||
# valeur bidon.
|
||||
définition calcul_apl_logement_foyer.type_logement_foyer égal à
|
||||
TypeLogementFoyer.Autre # Valeur par défaut
|
||||
définition calcul_apl_logement_foyer.date_conventionnement égal à
|
||||
|1970-01-01| # Valeur par défaut
|
||||
définition calcul_apl_logement_foyer.redevance égal à
|
||||
0 € # Valeur par défaut
|
||||
définition calcul_apl_logement_foyer.ressources_ménage_arrondies égal à
|
||||
@ -939,8 +910,9 @@ champ d'application CalculAllocationLogementAccessionPropriété:
|
||||
|
||||
```catala-metadata
|
||||
déclaration champ d'application CalculAllocationLogementFoyer:
|
||||
entrée type_logement_foyer contenu TypeLogementFoyer
|
||||
entrée date_conventionnement contenu date
|
||||
entrée redevance contenu argent
|
||||
entrée mode_occupation contenu ModeOccupation
|
||||
entrée ressources_ménage_arrondies contenu argent
|
||||
entrée nombre_personnes_à_charge contenu entier
|
||||
entrée situation_familiale_calcul_apl contenu SituationFamilialeCalculAPL
|
||||
@ -976,8 +948,10 @@ déclaration champ d'application CalculAllocationLogementFoyer:
|
||||
état montant_minimal
|
||||
|
||||
champ d'application CalculAllocationLogementFoyer:
|
||||
définition calcul_apl_logement_foyer.mode_occupation égal à
|
||||
mode_occupation
|
||||
définition calcul_apl_logement_foyer.type_logement_foyer égal à
|
||||
type_logement_foyer
|
||||
définition calcul_apl_logement_foyer.date_conventionnement égal à
|
||||
date_conventionnement
|
||||
définition calcul_apl_logement_foyer.redevance égal à
|
||||
redevance
|
||||
définition calcul_apl_logement_foyer.ressources_ménage_arrondies égal à
|
||||
@ -998,7 +972,6 @@ champ d'application CalculAllocationLogementFoyer:
|
||||
```catala-metadata
|
||||
déclaration champ d'application CalculAllocationLogement:
|
||||
entrée mode_occupation contenu ModeOccupation
|
||||
entrée informations_calcul contenu InformationsCalculAPL
|
||||
entrée ressources_ménage contenu argent
|
||||
état sans_arrondi
|
||||
état avec_arrondi
|
||||
@ -1059,7 +1032,6 @@ de toutes les aides disponibles : APL, ALS, ALF.
|
||||
déclaration champ d'application CalculetteAidesAuLogement:
|
||||
entrée ménage contenu Ménage
|
||||
entrée demandeur contenu Demandeur
|
||||
entrée informations_calcul contenu InformationsCalculAPL
|
||||
entrée date_courante contenu date
|
||||
# TODO informatique et juridique: brancher le champ d'application de prise en
|
||||
# compte des ressources. Pour l'instant on ne fait pas calcul de prise en
|
||||
@ -1098,17 +1070,6 @@ champ d'application CalculetteAidesAuLogement:
|
||||
date_courante
|
||||
définition éligibilité_allocation_logement.date_courante égal à
|
||||
date_courante
|
||||
définition éligibilité_allocation_logement.informations_calcul égal à
|
||||
informations_calcul
|
||||
|
||||
définition calcul_aide_personnalisée_logement.informations_calcul égal à
|
||||
informations_calcul
|
||||
définition calcul_allocation_logement.informations_calcul égal à
|
||||
informations_calcul
|
||||
définition calcul_aide_personnalisée_logement.informations_calcul égal à
|
||||
informations_calcul
|
||||
définition calcul_allocation_logement.informations_calcul égal à
|
||||
informations_calcul
|
||||
définition calcul_aide_personnalisée_logement.mode_occupation égal à
|
||||
ménage.logement.mode_occupation
|
||||
définition calcul_allocation_logement.mode_occupation égal à
|
||||
@ -1153,7 +1114,6 @@ d'État.
|
||||
déclaration champ d'application CalculetteAidesAuLogementGardeAlternée:
|
||||
entrée ménage contenu Ménage
|
||||
entrée demandeur contenu Demandeur
|
||||
entrée informations_calcul contenu InformationsCalculAPL
|
||||
entrée date_courante contenu date
|
||||
entrée ressources_ménage_prises_en_compte contenu argent
|
||||
|
||||
@ -1172,8 +1132,6 @@ champ d'application CalculetteAidesAuLogementGardeAlternée:
|
||||
ménage
|
||||
définition calculette.demandeur égal à
|
||||
demandeur
|
||||
définition calculette.informations_calcul égal à
|
||||
informations_calcul
|
||||
définition calculette.date_courante égal à
|
||||
date_courante
|
||||
définition calculette.ressources_ménage_prises_en_compte égal à
|
||||
@ -1182,8 +1140,6 @@ champ d'application CalculetteAidesAuLogementGardeAlternée:
|
||||
ménage_sans_enfants_garde_alternée
|
||||
définition calculette_sans_garde_alternée.demandeur égal à
|
||||
demandeur
|
||||
définition calculette_sans_garde_alternée.informations_calcul égal à
|
||||
informations_calcul
|
||||
définition calculette_sans_garde_alternée.date_courante égal à
|
||||
date_courante
|
||||
définition
|
||||
@ -1217,12 +1173,8 @@ champ d'application CalculetteAidesAuLogementGardeAlternée:
|
||||
ménage.situation_familiale
|
||||
-- condition_rattaché_foyer_fiscal_parent_ifi :
|
||||
ménage.condition_rattaché_foyer_fiscal_parent_ifi
|
||||
-- nombre_enfants_à_naître_après_troisième_mois_grossesse :
|
||||
ménage.nombre_enfants_à_naître_après_troisième_mois_grossesse
|
||||
-- enfant_à_naître_après_quatrième_mois_grossesse :
|
||||
-- enfant_à_naître_après_quatrième_mois_grossesse:
|
||||
ménage.enfant_à_naître_après_quatrième_mois_grossesse
|
||||
-- date_naissance_troisième_enfant_ou_dernier_si_plus :
|
||||
ménage.date_naissance_troisième_enfant_ou_dernier_si_plus
|
||||
}
|
||||
définition éligibilité égal à calculette.éligibilité
|
||||
```
|
||||
|
@ -1,2 +1,2 @@
|
||||
[RESULT] Computation successful! Results:
|
||||
[RESULT] montant = 375.88 €
|
||||
[RESULT] montant = 311.56 €
|
||||
|
@ -0,0 +1,2 @@
|
||||
[RESULT] Computation successful! Results:
|
||||
[RESULT] montant = 210.06 €
|
@ -9,21 +9,9 @@ déclaration champ d'application CasTest1 :
|
||||
sortie montant contenu argent
|
||||
|
||||
champ d'application CasTest1:
|
||||
définition calcul.mode_occupation égal à RésidentLogementFoyer contenu (LogementFoyer {
|
||||
-- type : TypeLogementFoyer.RésidenceSociale
|
||||
-- date_conventionnement : |2020-01-01|
|
||||
-- construit_application_loi_1957_12_III: faux
|
||||
-- location : Location {
|
||||
-- bailleur: Bailleur {
|
||||
-- type_bailleur: BailleurSocial
|
||||
-- respecte_convention_titre_V: vrai
|
||||
-- respecte_convention_titre_II: vrai
|
||||
-- construit_amélioré_conditions_l831_1_4: vrai
|
||||
-- acquisition_aides_état_prêt_titre_II_ou_livre_III: vrai
|
||||
}
|
||||
}
|
||||
-- remplit_conditions_r832_21 : vrai
|
||||
})
|
||||
définition calcul.date_conventionnement égal à |2020-01-01|
|
||||
définition calcul.type_logement_foyer égal à
|
||||
TypeLogementFoyer.RésidenceSociale
|
||||
définition calcul.redevance égal à 350 €
|
||||
définition calcul.ressources_ménage_arrondies égal à 7 500€
|
||||
définition calcul.nombre_personnes_à_charge égal à 0
|
||||
|
@ -18,12 +18,11 @@ champ d'application Exemple1:
|
||||
définition calcul.situation_familiale_calcul_apl égal à Couple
|
||||
définition calcul.nombre_personnes_à_charge égal à 3
|
||||
définition calcul.type_aide égal à AidePersonnaliséeLogement
|
||||
# TODO juridique: trouver articles loi qui calculent le type d'aide
|
||||
# à partir des caractéristiques du ménage et l'implémenter.
|
||||
définition calcul.colocation égal à faux
|
||||
définition calcul.réduction_loyer_solidarité égal à 0 €
|
||||
définition calcul.ressources_ménage_arrondies égal à 36 000 €
|
||||
définition calcul.bénéficiaire_aide_adulte_ou_enfant_handicapés égal à faux
|
||||
définition calcul.logement_meublé_d842_2 égal à faux
|
||||
assertion montant = 0 €
|
||||
assertion calcul.montant_forfaitaire_charges_d823_16 = 91,09 €
|
||||
assertion calcul.plafond_loyer_d823_16_2 = 524,20 €
|
||||
@ -53,6 +52,7 @@ champ d'application Exemple2:
|
||||
calcul.âgées_ou_handicap_adultes_hébergées_onéreux_particuliers
|
||||
égal à faux
|
||||
définition calcul.bénéficiaire_aide_adulte_ou_enfant_handicapés égal à faux
|
||||
définition calcul.logement_meublé_d842_2 égal à faux
|
||||
assertion montant = 352,77 €
|
||||
assertion calcul.montant_forfaitaire_charges_d823_16 = 78,80 €
|
||||
assertion calcul.plafond_loyer_d823_16_2 = 409,88 €
|
||||
@ -82,6 +82,7 @@ champ d'application Exemple3:
|
||||
définition calcul.réduction_loyer_solidarité égal à 0 €
|
||||
définition calcul.ressources_ménage_arrondies égal à 14300 €
|
||||
définition calcul.bénéficiaire_aide_adulte_ou_enfant_handicapés égal à faux
|
||||
définition calcul.logement_meublé_d842_2 égal à faux
|
||||
assertion montant = 321,61 €
|
||||
assertion calcul.montant_forfaitaire_charges_d823_16 = 91,09 €
|
||||
assertion calcul.plafond_loyer_d823_16_2 = 425,80 €
|
||||
@ -111,6 +112,7 @@ champ d'application Exemple4:
|
||||
définition calcul.réduction_loyer_solidarité égal à 0 €
|
||||
définition calcul.ressources_ménage_arrondies égal à 39500 €
|
||||
définition calcul.bénéficiaire_aide_adulte_ou_enfant_handicapés égal à faux
|
||||
définition calcul.logement_meublé_d842_2 égal à faux
|
||||
assertion montant = 0 €
|
||||
assertion calcul.montant_forfaitaire_charges_d823_16 = 66,51 €
|
||||
assertion calcul.plafond_loyer_d823_16_2 = 406,30 €
|
||||
@ -140,12 +142,13 @@ champ d'application Exemple5:
|
||||
définition calcul.réduction_loyer_solidarité égal à 0 €
|
||||
définition calcul.ressources_ménage_arrondies égal à 2700 €
|
||||
définition calcul.bénéficiaire_aide_adulte_ou_enfant_handicapés égal à faux
|
||||
assertion montant = 375,88 €
|
||||
définition calcul.logement_meublé_d842_2 égal à faux
|
||||
assertion montant = 311,56 €
|
||||
assertion calcul.montant_forfaitaire_charges_d823_16 = 54,22 €
|
||||
assertion calcul.plafond_loyer_d823_16_2 = 298,07 €
|
||||
assertion calcul.participation_minimale = 35,39 €
|
||||
assertion calcul.taux_composition_familiale = 2,83%
|
||||
assertion calcul.participation_personnelle = 0€ -€ 28,80 €
|
||||
assertion calcul.participation_personnelle = 35,39€
|
||||
```
|
||||
|
||||
```catala
|
||||
@ -169,6 +172,7 @@ champ d'application Exemple6:
|
||||
définition calcul.réduction_loyer_solidarité égal à 0 €
|
||||
définition calcul.ressources_ménage_arrondies égal à 19500 €
|
||||
définition calcul.bénéficiaire_aide_adulte_ou_enfant_handicapés égal à faux
|
||||
définition calcul.logement_meublé_d842_2 égal à faux
|
||||
assertion montant = 0 €
|
||||
assertion calcul.montant_forfaitaire_charges_d823_16 = 54,22 €
|
||||
assertion calcul.plafond_loyer_d823_16_2 = 317,97 €
|
||||
@ -198,6 +202,7 @@ champ d'application Exemple7:
|
||||
définition calcul.réduction_loyer_solidarité égal à 0 €
|
||||
définition calcul.ressources_ménage_arrondies égal à 32200 €
|
||||
définition calcul.bénéficiaire_aide_adulte_ou_enfant_handicapés égal à faux
|
||||
définition calcul.logement_meublé_d842_2 égal à faux
|
||||
assertion montant = 153,77 €
|
||||
assertion calcul.montant_forfaitaire_charges_d823_16 = 127,96 €
|
||||
assertion calcul.plafond_loyer_d823_16_2 = 618,20 €
|
||||
@ -227,6 +232,7 @@ champ d'application Exemple8:
|
||||
définition calcul.réduction_loyer_solidarité égal à 0 €
|
||||
définition calcul.ressources_ménage_arrondies égal à 14800 €
|
||||
définition calcul.bénéficiaire_aide_adulte_ou_enfant_handicapés égal à faux
|
||||
définition calcul.logement_meublé_d842_2 égal à faux
|
||||
assertion montant = 11,06 €
|
||||
assertion calcul.montant_forfaitaire_charges_d823_16 = 54,22 €
|
||||
assertion calcul.plafond_loyer_d823_16_2 = 268,26 €
|
||||
@ -235,6 +241,34 @@ champ d'application Exemple8:
|
||||
assertion calcul.participation_personnelle = 306,11 €
|
||||
```
|
||||
|
||||
```catala
|
||||
déclaration champ d'application Exemple9 :
|
||||
calcul champ d'application CalculAidePersonnaliséeLogementLocatif
|
||||
sortie montant contenu argent
|
||||
|
||||
champ d'application Exemple9:
|
||||
définition montant égal à
|
||||
calcul.traitement_aide_finale de
|
||||
calcul.aide_finale_formule
|
||||
définition calcul.loyer_principal égal à 400 €
|
||||
définition calcul.date_courante égal à |2022-06-10|
|
||||
définition calcul.logement_est_chambre égal à faux
|
||||
définition
|
||||
calcul.âgées_ou_handicap_adultes_hébergées_onéreux_particuliers
|
||||
égal à faux
|
||||
définition calcul.zone égal à Zone1
|
||||
définition calcul.situation_familiale_calcul_apl égal à PersonneSeule
|
||||
définition calcul.nombre_personnes_à_charge égal à 0
|
||||
définition calcul.type_aide égal à AidePersonnaliséeLogement
|
||||
définition calcul.colocation égal à faux
|
||||
définition calcul.réduction_loyer_solidarité égal à 0 €
|
||||
# Étudiant, R822-20 CCH et article 6 arrêté 27 septembre 2019
|
||||
définition calcul.ressources_ménage_arrondies égal à 7800 €
|
||||
définition calcul.bénéficiaire_aide_adulte_ou_enfant_handicapés égal à faux
|
||||
définition calcul.logement_meublé_d842_2 égal à faux
|
||||
assertion montant = 210,06 €
|
||||
```
|
||||
|
||||
```catala-test {id="Exemple1.Interpret"}
|
||||
catala Interpret -s Exemple1
|
||||
```
|
||||
@ -266,3 +300,7 @@ catala Interpret -s Exemple7
|
||||
```catala-test {id="Exemple8.Interpret"}
|
||||
catala Interpret -s Exemple8
|
||||
```
|
||||
|
||||
```catala-test {id="Exemple9.Interpret"}
|
||||
catala Interpret -s Exemple9
|
||||
```
|
||||
|
@ -8,21 +8,8 @@ déclaration champ d'application CasTest1 :
|
||||
sortie montant contenu argent
|
||||
|
||||
champ d'application CasTest1:
|
||||
définition calcul.mode_occupation égal à RésidentLogementFoyer contenu (LogementFoyer {
|
||||
-- type : TypeLogementFoyer.Autre
|
||||
-- date_conventionnement : |2022-01-01|
|
||||
-- construit_application_loi_1957_12_III: faux
|
||||
-- location : Location {
|
||||
-- bailleur: Bailleur {
|
||||
-- type_bailleur: BailleurSocial
|
||||
-- respecte_convention_titre_V: vrai
|
||||
-- respecte_convention_titre_II: vrai
|
||||
-- construit_amélioré_conditions_l831_1_4: vrai
|
||||
-- acquisition_aides_état_prêt_titre_II_ou_livre_III: vrai
|
||||
}
|
||||
}
|
||||
-- remplit_conditions_r832_21 : vrai
|
||||
})
|
||||
définition calcul.date_conventionnement égal à |2022-01-01|
|
||||
définition calcul.type_logement_foyer égal à TypeLogementFoyer.Autre
|
||||
définition calcul.redevance égal à 360 €
|
||||
définition calcul.ressources_ménage_arrondies égal à 15 000€
|
||||
définition calcul.nombre_personnes_à_charge égal à 0
|
||||
@ -43,21 +30,8 @@ déclaration champ d'application CasTest2 :
|
||||
sortie montant contenu argent
|
||||
|
||||
champ d'application CasTest2:
|
||||
définition calcul.mode_occupation égal à RésidentLogementFoyer contenu (LogementFoyer {
|
||||
-- type : TypeLogementFoyer.Autre
|
||||
-- date_conventionnement : |2022-01-01|
|
||||
-- construit_application_loi_1957_12_III: faux
|
||||
-- location : Location {
|
||||
-- bailleur: Bailleur {
|
||||
-- type_bailleur: BailleurSocial
|
||||
-- respecte_convention_titre_V: vrai
|
||||
-- respecte_convention_titre_II: vrai
|
||||
-- construit_amélioré_conditions_l831_1_4: vrai
|
||||
-- acquisition_aides_état_prêt_titre_II_ou_livre_III: vrai
|
||||
}
|
||||
}
|
||||
-- remplit_conditions_r832_21 : vrai
|
||||
})
|
||||
définition calcul.date_conventionnement égal à |2022-01-01|
|
||||
définition calcul.type_logement_foyer égal à TypeLogementFoyer.Autre
|
||||
définition calcul.redevance égal à 360 €
|
||||
définition calcul.ressources_ménage_arrondies égal à 15 000€
|
||||
définition calcul.nombre_personnes_à_charge égal à 0
|
||||
@ -84,21 +58,8 @@ déclaration champ d'application CasTest3 :
|
||||
sortie montant contenu argent
|
||||
|
||||
champ d'application CasTest3:
|
||||
définition calcul.mode_occupation égal à RésidentLogementFoyer contenu (LogementFoyer {
|
||||
-- type : TypeLogementFoyer.Autre
|
||||
-- date_conventionnement : |2020-01-01|
|
||||
-- construit_application_loi_1957_12_III: faux
|
||||
-- location : Location {
|
||||
-- bailleur: Bailleur {
|
||||
-- type_bailleur: BailleurSocial
|
||||
-- respecte_convention_titre_V: vrai
|
||||
-- respecte_convention_titre_II: vrai
|
||||
-- construit_amélioré_conditions_l831_1_4: vrai
|
||||
-- acquisition_aides_état_prêt_titre_II_ou_livre_III: vrai
|
||||
}
|
||||
}
|
||||
-- remplit_conditions_r832_21 : vrai
|
||||
})
|
||||
définition calcul.date_conventionnement égal à |2020-01-01|
|
||||
définition calcul.type_logement_foyer égal à TypeLogementFoyer.Autre
|
||||
définition calcul.redevance égal à 350 €
|
||||
définition calcul.ressources_ménage_arrondies égal à 7 500€
|
||||
définition calcul.nombre_personnes_à_charge égal à 0
|
||||
@ -121,21 +82,8 @@ déclaration champ d'application CasTest4 :
|
||||
sortie montant contenu argent
|
||||
|
||||
champ d'application CasTest4:
|
||||
définition calcul.mode_occupation égal à RésidentLogementFoyer contenu (LogementFoyer {
|
||||
-- type : TypeLogementFoyer.Autre
|
||||
-- date_conventionnement : |2020-01-01|
|
||||
-- construit_application_loi_1957_12_III: faux
|
||||
-- location : Location {
|
||||
-- bailleur: Bailleur {
|
||||
-- type_bailleur: BailleurSocial
|
||||
-- respecte_convention_titre_V: vrai
|
||||
-- respecte_convention_titre_II: vrai
|
||||
-- construit_amélioré_conditions_l831_1_4: vrai
|
||||
-- acquisition_aides_état_prêt_titre_II_ou_livre_III: vrai
|
||||
}
|
||||
}
|
||||
-- remplit_conditions_r832_21 : vrai
|
||||
})
|
||||
définition calcul.date_conventionnement égal à |2020-01-01|
|
||||
définition calcul.type_logement_foyer égal à TypeLogementFoyer.Autre
|
||||
définition calcul.redevance égal à 350 €
|
||||
définition calcul.ressources_ménage_arrondies égal à 7 500€
|
||||
définition calcul.nombre_personnes_à_charge égal à 0
|
||||
@ -159,21 +107,9 @@ déclaration champ d'application CasTest5 :
|
||||
sortie montant contenu argent
|
||||
|
||||
champ d'application CasTest5:
|
||||
définition calcul.mode_occupation égal à RésidentLogementFoyer contenu (LogementFoyer {
|
||||
-- type : TypeLogementFoyer.RésidenceSociale
|
||||
-- date_conventionnement : |2020-01-01|
|
||||
-- construit_application_loi_1957_12_III: faux
|
||||
-- location : Location {
|
||||
-- bailleur: Bailleur {
|
||||
-- type_bailleur: BailleurSocial
|
||||
-- respecte_convention_titre_V: vrai
|
||||
-- respecte_convention_titre_II: vrai
|
||||
-- construit_amélioré_conditions_l831_1_4: vrai
|
||||
-- acquisition_aides_état_prêt_titre_II_ou_livre_III: vrai
|
||||
}
|
||||
}
|
||||
-- remplit_conditions_r832_21 : vrai
|
||||
})
|
||||
définition calcul.date_conventionnement égal à |2020-01-01|
|
||||
définition calcul.type_logement_foyer égal à
|
||||
TypeLogementFoyer.RésidenceSociale
|
||||
définition calcul.redevance égal à 350 €
|
||||
définition calcul.ressources_ménage_arrondies égal à 7 500€
|
||||
définition calcul.nombre_personnes_à_charge égal à 0
|
||||
|
@ -12,76 +12,66 @@ champ d'application Exemple1 :
|
||||
assertion éligible
|
||||
définition éligibilité.date_courante égal à |2020-03-10|
|
||||
définition éligibilité.ménage égal à Ménage {
|
||||
-- prestations_reçues: [
|
||||
PrestationReçue.AllocationSoutienEnfantHandicapé;
|
||||
PrestationReçue.ComplémentFamilial;
|
||||
PrestationReçue.AllocationsFamiliales
|
||||
]
|
||||
-- situation_familiale: Mariés contenu |2010-11-26|
|
||||
-- personnes_à_charge: [
|
||||
EnfantÀCharge contenu (EnfantÀCharge {
|
||||
-- bénéficie_titre_personnel_aide_personnelle_logement : faux
|
||||
-- prise_en_charge : PriseEnCharge.EffectiveEtPermanente
|
||||
-- âge : 19
|
||||
-- identifiant: 0
|
||||
-- a_déjà_ouvert_droit_aux_allocations_familiales: vrai
|
||||
-- date_de_naissance: |2001-01-01|
|
||||
-- rémuneration_mensuelle: 0€
|
||||
-- obligation_scolaire: Après
|
||||
-- situation_garde_alternée: PasDeGardeAlternée
|
||||
}); EnfantÀCharge contenu (EnfantÀCharge {
|
||||
-- bénéficie_titre_personnel_aide_personnelle_logement : faux
|
||||
-- prise_en_charge : PriseEnCharge.EffectiveEtPermanente
|
||||
-- âge : 11
|
||||
-- identifiant: 1
|
||||
-- a_déjà_ouvert_droit_aux_allocations_familiales: vrai
|
||||
-- date_de_naissance: |2009-01-01|
|
||||
-- rémuneration_mensuelle: 0€
|
||||
-- obligation_scolaire: Pendant
|
||||
-- situation_garde_alternée: PasDeGardeAlternée
|
||||
}); EnfantÀCharge contenu (EnfantÀCharge {
|
||||
-- bénéficie_titre_personnel_aide_personnelle_logement : faux
|
||||
-- prise_en_charge : PriseEnCharge.EffectiveEtPermanente
|
||||
-- âge : 8
|
||||
-- identifiant: 2
|
||||
-- a_déjà_ouvert_droit_aux_allocations_familiales: vrai
|
||||
-- date_de_naissance: |2012-01-01|
|
||||
-- rémuneration_mensuelle: 0€
|
||||
-- obligation_scolaire: Pendant
|
||||
-- situation_garde_alternée: PasDeGardeAlternée
|
||||
})]
|
||||
-- logement: Logement {
|
||||
-- zone: Zone1
|
||||
-- résidence_principale : vrai
|
||||
-- est_ehpad_ou_maison_autonomie_l313_12_asf : faux
|
||||
-- mode_occupation : Locataire contenu (Location {
|
||||
-- bailleur: Bailleur {
|
||||
-- type_bailleur: BailleurPrivé
|
||||
-- respecte_convention_titre_V: vrai
|
||||
-- respecte_convention_titre_II: vrai
|
||||
-- construit_amélioré_conditions_l831_1_4: faux
|
||||
-- acquisition_aides_état_prêt_titre_II_ou_livre_III: faux
|
||||
|
||||
}
|
||||
})
|
||||
-- propriétaire : ParentOuAutre.Autre
|
||||
-- loué_ou_sous_loué_à_des_tiers : LouéOuSousLouéÀDesTiers.Non
|
||||
-- usufruit : ParentOuAutre.Autre
|
||||
-- logement_decent_l89_462 : vrai
|
||||
-- surface_m_carrés : 80
|
||||
-- est_ancien_l831_2 : faux
|
||||
-- situé_commune_déséquilibre_l831_2 : faux
|
||||
}
|
||||
-- nombre_autres_occupants_logement: 1
|
||||
-- condition_rattaché_foyer_fiscal_parent_ifi: faux
|
||||
-- nombre_enfants_à_naître_après_troisième_mois_grossesse: 0
|
||||
-- enfant_à_naître_après_quatrième_mois_grossesse: faux
|
||||
-- date_naissance_troisième_enfant_ou_dernier_si_plus :
|
||||
PlusDeTroisEnfants contenu (DateDeNaissance contenu |2012-01-01|)
|
||||
-- prestations_reçues: [
|
||||
PrestationReçue.AllocationSoutienEnfantHandicapé;
|
||||
PrestationReçue.ComplémentFamilial;
|
||||
PrestationReçue.AllocationsFamiliales
|
||||
]
|
||||
-- situation_familiale: Mariés contenu |2010-11-26|
|
||||
-- personnes_à_charge: [
|
||||
EnfantÀCharge contenu (EnfantÀCharge {
|
||||
-- bénéficie_titre_personnel_aide_personnelle_logement : faux
|
||||
-- identifiant: 0
|
||||
-- a_déjà_ouvert_droit_aux_allocations_familiales: vrai
|
||||
-- date_de_naissance: |2001-01-01|
|
||||
-- rémuneration_mensuelle: 0€
|
||||
-- obligation_scolaire: Après
|
||||
-- situation_garde_alternée: PasDeGardeAlternée
|
||||
}); EnfantÀCharge contenu (EnfantÀCharge {
|
||||
-- bénéficie_titre_personnel_aide_personnelle_logement : faux
|
||||
-- identifiant: 1
|
||||
-- a_déjà_ouvert_droit_aux_allocations_familiales: vrai
|
||||
-- date_de_naissance: |2009-01-01|
|
||||
-- rémuneration_mensuelle: 0€
|
||||
-- obligation_scolaire: Pendant
|
||||
-- situation_garde_alternée: PasDeGardeAlternée
|
||||
}); EnfantÀCharge contenu (EnfantÀCharge {
|
||||
-- bénéficie_titre_personnel_aide_personnelle_logement : faux
|
||||
-- identifiant: 2
|
||||
-- a_déjà_ouvert_droit_aux_allocations_familiales: vrai
|
||||
-- date_de_naissance: |2012-01-01|
|
||||
-- rémuneration_mensuelle: 0€
|
||||
-- obligation_scolaire: Pendant
|
||||
-- situation_garde_alternée: PasDeGardeAlternée
|
||||
})]
|
||||
-- logement: Logement {
|
||||
-- zone: Zone1
|
||||
-- résidence_principale : vrai
|
||||
-- est_ehpad_ou_maison_autonomie_l313_12_asf : faux
|
||||
-- mode_occupation : Locataire contenu (Location {
|
||||
-- loyer_principal: 750 €
|
||||
-- bénéficiaire_aide_adulte_ou_enfant_handicapés: faux
|
||||
-- logement_est_chambre: faux
|
||||
-- colocation: faux
|
||||
-- âgées_ou_handicap_adultes_hébergées_onéreux_particuliers: faux
|
||||
-- logement_meublé_d842_2: faux
|
||||
-- changement_logement_d842_4: PasDeChangement
|
||||
-- bailleur: BailleurSocial contenu (ConventionBailleurSocial{
|
||||
-- conventionné_livre_III_titre_V_chap_III: vrai
|
||||
-- réduction_loyer_solidarité_perçue: 0 €
|
||||
})
|
||||
})
|
||||
-- propriétaire : ParentOuAutre.Autre
|
||||
-- loué_ou_sous_loué_à_des_tiers : LouéOuSousLouéÀDesTiers.Non
|
||||
-- usufruit : ParentOuAutre.Autre
|
||||
-- logement_decent_l89_462 : vrai
|
||||
-- surface_m_carrés : 80
|
||||
}
|
||||
-- nombre_autres_occupants_logement: 1
|
||||
-- condition_rattaché_foyer_fiscal_parent_ifi: faux
|
||||
-- enfant_à_naître_après_quatrième_mois_grossesse: faux
|
||||
}
|
||||
définition éligibilité.demandeur égal à Demandeur {
|
||||
-- satisfait_conditions_l512_2_code_sécurité_sociale : vrai
|
||||
-- age_demandeur : 52
|
||||
-- date_naissance : |1970-05-02|
|
||||
-- nationalité : Française
|
||||
-- patrimoine : Patrimoine {
|
||||
@ -91,6 +81,77 @@ champ d'application Exemple1 :
|
||||
-- personne_hébergée_centre_soin_l_L162_22_3_sécurité_sociale: faux
|
||||
}
|
||||
|
||||
déclaration champ d'application Exemple2 :
|
||||
éligibilité champ d'application ÉligibilitéAllocationLogement
|
||||
sortie éligible contenu ÉligibilitéAllocationLogement
|
||||
|
||||
champ d'application Exemple2 :
|
||||
définition éligible égal à éligibilité.éligibilité
|
||||
assertion éligible = ÉligibilitéAllocationLogement.AllocationLogementFamiliale
|
||||
définition éligibilité.date_courante égal à |2022-05-01|
|
||||
définition éligibilité.ménage égal à Ménage {
|
||||
-- prestations_reçues: [
|
||||
PrestationReçue.AllocationsFamiliales
|
||||
]
|
||||
-- situation_familiale: Concubins
|
||||
-- personnes_à_charge: [
|
||||
EnfantÀCharge contenu (EnfantÀCharge {
|
||||
-- bénéficie_titre_personnel_aide_personnelle_logement : faux
|
||||
-- identifiant: 0
|
||||
-- a_déjà_ouvert_droit_aux_allocations_familiales: vrai
|
||||
-- date_de_naissance: |2016-01-01|
|
||||
-- rémuneration_mensuelle: 0€
|
||||
-- obligation_scolaire: Pendant
|
||||
-- situation_garde_alternée: PasDeGardeAlternée
|
||||
}); EnfantÀCharge contenu (EnfantÀCharge {
|
||||
-- bénéficie_titre_personnel_aide_personnelle_logement : faux
|
||||
-- identifiant: 1
|
||||
-- a_déjà_ouvert_droit_aux_allocations_familiales: vrai
|
||||
-- date_de_naissance: |2015-01-01|
|
||||
-- rémuneration_mensuelle: 0€
|
||||
-- obligation_scolaire: Pendant
|
||||
-- situation_garde_alternée: PasDeGardeAlternée
|
||||
})]
|
||||
-- logement: Logement {
|
||||
-- zone: Zone2
|
||||
-- résidence_principale : vrai
|
||||
-- est_ehpad_ou_maison_autonomie_l313_12_asf : faux
|
||||
-- mode_occupation : Locataire contenu (Location {
|
||||
-- bailleur: BailleurSocial contenu (ConventionBailleurSocial{
|
||||
-- conventionné_livre_III_titre_V_chap_III: vrai
|
||||
-- réduction_loyer_solidarité_perçue: 0 €
|
||||
})
|
||||
-- loyer_principal: 450 €
|
||||
-- bénéficiaire_aide_adulte_ou_enfant_handicapés: faux
|
||||
-- logement_est_chambre: faux
|
||||
-- colocation: faux
|
||||
-- âgées_ou_handicap_adultes_hébergées_onéreux_particuliers: faux
|
||||
-- logement_meublé_d842_2: faux
|
||||
-- changement_logement_d842_4: PasDeChangement
|
||||
})
|
||||
-- propriétaire : ParentOuAutre.Autre
|
||||
-- loué_ou_sous_loué_à_des_tiers : LouéOuSousLouéÀDesTiers.Non
|
||||
-- usufruit : ParentOuAutre.Autre
|
||||
-- logement_decent_l89_462 : vrai
|
||||
-- surface_m_carrés : 60
|
||||
}
|
||||
-- nombre_autres_occupants_logement: 0
|
||||
-- condition_rattaché_foyer_fiscal_parent_ifi: faux
|
||||
-- enfant_à_naître_après_quatrième_mois_grossesse: faux
|
||||
}
|
||||
définition éligibilité.demandeur égal à Demandeur {
|
||||
-- date_naissance : |1992-01-01|
|
||||
-- nationalité : Française
|
||||
-- patrimoine : Patrimoine {
|
||||
-- produisant_revenu_période_r822_3_3_r822_4: 0€
|
||||
-- ne_produisant_pas_revenu_période_r822_3_3_r822_4: 0€
|
||||
}
|
||||
-- personne_hébergée_centre_soin_l_L162_22_3_sécurité_sociale: faux
|
||||
}
|
||||
définition éligibilité.bénéficie_aide_personnalisée_logement égal à faux
|
||||
|
||||
|
||||
|
||||
# déclaration champ d'application Exemple2 :
|
||||
# éligibilité champ d'application ÉligibilitéAidesPersonnelleLogement
|
||||
# sortie éligible contenu booléen
|
||||
@ -123,12 +184,8 @@ champ d'application Exemple1 :
|
||||
# }
|
||||
# -- nombre_autres_occupants_logement: 0
|
||||
# -- condition_rattaché_foyer_fiscal_parent_ifi: vrai
|
||||
# -- nombre_enfants_à_naître_après_troisième_mois_grossesse: 0
|
||||
# -- date_naissance_troisième_enfant_ou_dernier_si_plus :
|
||||
# MoinsDeTroisEnfants
|
||||
# }
|
||||
# définition éligibilité.demandeur égal à Demandeur {
|
||||
# -- satisfait_conditions_l512_2_code_sécurité_sociale : vrai
|
||||
# -- age_demandeur : 22
|
||||
# -- date_naissance : |2000-01-03|
|
||||
# -- nationalité : Française
|
||||
@ -171,12 +228,8 @@ champ d'application Exemple1 :
|
||||
# }
|
||||
# -- nombre_autres_occupants_logement: 0
|
||||
# -- condition_rattaché_foyer_fiscal_parent_ifi: faux
|
||||
# -- nombre_enfants_à_naître_après_troisième_mois_grossesse: 0
|
||||
# -- date_naissance_troisième_enfant_ou_dernier_si_plus :
|
||||
# MoinsDeTroisEnfants
|
||||
# }
|
||||
# définition éligibilité.demandeur égal à Demandeur {
|
||||
# -- satisfait_conditions_l512_2_code_sécurité_sociale : vrai
|
||||
# -- age_demandeur : 22
|
||||
# -- date_naissance : |2000-01-03|
|
||||
# -- nationalité : Française
|
||||
|
@ -10,17 +10,16 @@ la fonction du bloc de code ci-dessous.
|
||||
```catala-metadata
|
||||
champ d'application EnfantLePlusÂgé:
|
||||
définition le_plus_âgé égal à
|
||||
contenu maximum entier initial Enfant {
|
||||
contenu minimum date initial Enfant {
|
||||
-- identifiant: -1
|
||||
-- obligation_scolaire: Pendant
|
||||
-- rémuneration_mensuelle: 0€
|
||||
-- date_de_naissance: |1900-01-01|
|
||||
-- âge: 0
|
||||
-- date_de_naissance: |2999-12-31|
|
||||
-- prise_en_charge: EffectiveEtPermanente
|
||||
-- a_déjà_ouvert_droit_aux_allocations_familiales: faux
|
||||
-- bénéficie_titre_personnel_aide_personnelle_logement: faux
|
||||
}
|
||||
pour potentiel_plus_âgé dans enfants de potentiel_plus_âgé.âge
|
||||
pour potentiel_plus_âgé dans enfants de potentiel_plus_âgé.date_de_naissance
|
||||
|
||||
|
||||
champ d'application AllocationsFamiliales:
|
||||
@ -120,8 +119,6 @@ champ d'application InterfaceAllocationsFamiliales:
|
||||
-- rémuneration_mensuelle : enfant.d_rémuneration_mensuelle
|
||||
-- date_de_naissance : enfant.d_date_de_naissance
|
||||
-- prise_en_charge : enfant.d_prise_en_charge
|
||||
-- âge: accès_année de
|
||||
(|0000-01-01| +@ (i_date_courante -@ enfant.d_date_de_naissance))
|
||||
-- obligation_scolaire :
|
||||
(si enfant.d_date_de_naissance +@ 3 an >=@ i_date_courante alors
|
||||
Avant
|
||||
|
@ -24,7 +24,6 @@ déclaration structure Enfant :
|
||||
donnée obligation_scolaire contenu SituationObligationScolaire
|
||||
donnée rémuneration_mensuelle contenu argent
|
||||
donnée date_de_naissance contenu date
|
||||
donnée âge contenu entier
|
||||
donnée prise_en_charge contenu PriseEnCharge
|
||||
donnée a_déjà_ouvert_droit_aux_allocations_familiales contenu booléen
|
||||
donnée bénéficie_titre_personnel_aide_personnelle_logement contenu booléen
|
||||
@ -58,7 +57,7 @@ déclaration champ d'application PrestationsFamiliales:
|
||||
sortie droit_ouvert condition dépend de Enfant
|
||||
sortie conditions_hors_âge condition dépend de Enfant
|
||||
interne plafond_l512_3_2 contenu argent
|
||||
sortie âge_l512_3_2 contenu entier
|
||||
sortie âge_l512_3_2 contenu durée
|
||||
sortie régime_outre_mer_l751_1 condition
|
||||
entrée date_courante contenu date
|
||||
entrée prestation_courante contenu ÉlémentPrestationsFamiliales
|
||||
@ -74,7 +73,7 @@ champ d'application PrestationsFamiliales:
|
||||
|
||||
```catala-metadata
|
||||
déclaration champ d'application AllocationFamilialesAvril2008:
|
||||
sortie âge_minimum_alinéa_1_l521_3 contenu entier
|
||||
sortie âge_minimum_alinéa_1_l521_3 contenu durée
|
||||
|
||||
déclaration champ d'application EnfantLePlusÂgé:
|
||||
entrée enfants contenu collection Enfant
|
||||
@ -144,7 +143,7 @@ déclaration champ d'application AllocationsFamiliales:
|
||||
|
||||
# Plafonds, âges limites et autres constantes
|
||||
interne nombre_enfants_l521_1 contenu entier
|
||||
interne âge_minimum_alinéa_1_l521_3 contenu entier dépend de Enfant
|
||||
interne âge_minimum_alinéa_1_l521_3 contenu durée dépend de Enfant
|
||||
interne nombre_enfants_alinéa_2_l521_3 contenu entier
|
||||
interne est_enfant_le_plus_âgé contenu booléen dépend de Enfant
|
||||
interne plafond_I_d521_3 contenu argent
|
||||
|
@ -376,7 +376,8 @@ champ d'application AllocationsFamiliales :
|
||||
(droit_ouvert_majoration de enfant) et
|
||||
prestations_familiales.régime_outre_mer_l751_1 et
|
||||
(nombre de enfants_à_charge_droit_ouvert_prestation_familiale = 1) et
|
||||
(enfant.âge >= 11 et enfant.âge < 16)
|
||||
(enfant.date_de_naissance +@ 11 an <=@ date_courante et
|
||||
enfant.date_de_naissance +@ 16 an >@ date_courante)
|
||||
conséquence égal à
|
||||
bmaf.montant *€ 3,69 %
|
||||
|
||||
@ -385,7 +386,7 @@ champ d'application AllocationsFamiliales :
|
||||
(droit_ouvert_majoration de enfant) et
|
||||
prestations_familiales.régime_outre_mer_l751_1 et
|
||||
(nombre de enfants_à_charge_droit_ouvert_prestation_familiale = 1) et
|
||||
(enfant.âge >= 16)
|
||||
(enfant.date_de_naissance +@ 16 an <=@ date_courante)
|
||||
conséquence égal à
|
||||
bmaf.montant *€ 5,67 %
|
||||
```
|
||||
|
@ -59,7 +59,7 @@ champ d'application PrestationsFamiliales :
|
||||
étiquette cas_base règle droit_ouvert de enfant sous condition
|
||||
enfant.obligation_scolaire sous forme Après et
|
||||
(enfant.rémuneration_mensuelle <=€ plafond_l512_3_2) et
|
||||
(enfant.âge < âge_l512_3_2)
|
||||
(enfant.date_de_naissance +@ âge_l512_3_2 >@ date_courante)
|
||||
conséquence rempli
|
||||
|
||||
# On définit les conditions hors âge d'abord car elles
|
||||
@ -120,7 +120,8 @@ champ d'application AllocationsFamiliales :
|
||||
# Puisqu'un enfant ne garde un âge donné que pour une période d'un an,
|
||||
# cette condition assure que l'allocation ne peut être distribuée que pour
|
||||
# un an.
|
||||
(enfant.âge = prestations_familiales.âge_l512_3_2) et
|
||||
((enfant.date_de_naissance +@ prestations_familiales.âge_l512_3_2) -@
|
||||
date_courante <^ 365 jour) et
|
||||
(enfant.a_déjà_ouvert_droit_aux_allocations_familiales) et
|
||||
(prestations_familiales.conditions_hors_âge de enfant)
|
||||
conséquence rempli
|
||||
@ -297,7 +298,8 @@ champ d'application AllocationsFamiliales :
|
||||
règle droit_ouvert_majoration de enfant
|
||||
sous condition
|
||||
(non (est_enfant_le_plus_âgé de enfant)) et
|
||||
(enfant.âge >= âge_minimum_alinéa_1_l521_3 de enfant)
|
||||
(enfant.date_de_naissance +@ âge_minimum_alinéa_1_l521_3 de enfant <=@
|
||||
date_courante)
|
||||
conséquence rempli
|
||||
```
|
||||
|
||||
@ -312,7 +314,8 @@ champ d'application AllocationsFamiliales :
|
||||
sous condition
|
||||
(nombre de enfants_à_charge_droit_ouvert_prestation_familiale >=
|
||||
nombre_enfants_alinéa_2_l521_3) et
|
||||
(enfant.âge >= âge_minimum_alinéa_1_l521_3 de enfant)
|
||||
(enfant.date_de_naissance +@ âge_minimum_alinéa_1_l521_3 de enfant <=@
|
||||
date_courante)
|
||||
conséquence rempli
|
||||
```
|
||||
|
||||
|
@ -18,7 +18,7 @@ alinéa du présent article.
|
||||
# à cette limitation.
|
||||
|
||||
champ d'application PrestationsFamiliales :
|
||||
définition âge_l512_3_2 égal à 20
|
||||
définition âge_l512_3_2 égal à 20 an
|
||||
```
|
||||
|
||||
Le plafond de rémunération mentionné au 2° de l'article L. 512-3 est égal, pour
|
||||
@ -53,7 +53,7 @@ enfants ouvrent droit à la majoration des allocations familiales est fixé à
|
||||
|
||||
```catala
|
||||
champ d'application AllocationsFamiliales :
|
||||
définition âge_minimum_alinéa_1_l521_3 de enfant égal à 14
|
||||
définition âge_minimum_alinéa_1_l521_3 de enfant égal à 14 an
|
||||
```
|
||||
|
||||
Le nombre minimum d'enfants à charge, mentionné au deuxième alinéa de l'article
|
||||
@ -75,7 +75,7 @@ le onzième anniversaire est postérieur au 30 avril 2008.
|
||||
# du décret de 2008 pour des raisons de place seulement.
|
||||
champ d'application AllocationFamilialesAvril2008:
|
||||
# Âge limite avant décret n° 2008-409 du 28 avril 2008
|
||||
définition âge_minimum_alinéa_1_l521_3 égal à 16
|
||||
définition âge_minimum_alinéa_1_l521_3 égal à 16 an
|
||||
|
||||
champ d'application AllocationsFamiliales :
|
||||
exception
|
||||
|
@ -0,0 +1 @@
|
||||
[RESULT] Computation successful!
|
@ -320,6 +320,32 @@ champ d'application Test13:
|
||||
définition f.i_résidence égal à Mayotte
|
||||
règle f.i_personne_charge_effective_permanente_est_parent rempli
|
||||
assertion f.i_montant_versé = 34,99€
|
||||
|
||||
déclaration champ d'application Test14:
|
||||
f champ d'application InterfaceAllocationsFamiliales
|
||||
|
||||
champ d'application Test14:
|
||||
définition f.i_enfants égal à [EnfantEntrée {
|
||||
-- d_identifiant: 0
|
||||
-- d_date_de_naissance: |2004-12-22|
|
||||
-- d_rémuneration_mensuelle: 435€
|
||||
-- d_prise_en_charge: EffectiveEtPermanente
|
||||
-- d_a_déjà_ouvert_droit_aux_allocations_familiales: vrai
|
||||
-- d_bénéficie_titre_personnel_aide_personnelle_logement: faux
|
||||
};
|
||||
EnfantEntrée {
|
||||
-- d_identifiant: 1
|
||||
-- d_date_de_naissance: |2001-12-05|
|
||||
-- d_rémuneration_mensuelle: 1682€
|
||||
-- d_prise_en_charge: GardeAlternéeAllocataireUnique
|
||||
-- d_a_déjà_ouvert_droit_aux_allocations_familiales: vrai
|
||||
-- d_bénéficie_titre_personnel_aide_personnelle_logement: faux
|
||||
}]
|
||||
définition f.i_ressources_ménage égal à 64033 €
|
||||
définition f.i_date_courante égal à |2022-05-01|
|
||||
définition f.i_résidence égal à Guadeloupe
|
||||
règle f.i_personne_charge_effective_permanente_est_parent rempli
|
||||
assertion f.i_montant_versé = 48,77€
|
||||
```
|
||||
|
||||
```catala-test {id="Test1.Interpret"}
|
||||
@ -373,3 +399,7 @@ catala Interpret -s Test12
|
||||
```catala-test {id="Test13.Interpret"}
|
||||
catala Interpret -s Test13
|
||||
```
|
||||
|
||||
```catala-test {id="Test14.Interpret"}
|
||||
catala Interpret -s Test13
|
||||
```
|
||||
|
@ -14,7 +14,6 @@ champ d'application Données:
|
||||
-- identifiant: 1
|
||||
-- obligation_scolaire : Pendant
|
||||
-- date_de_naissance: |2007-01-01|
|
||||
-- âge: 13
|
||||
-- rémuneration_mensuelle: 0€
|
||||
-- prise_en_charge: EffectiveEtPermanente
|
||||
-- a_déjà_ouvert_droit_aux_allocations_familiales: vrai
|
||||
@ -24,7 +23,6 @@ champ d'application Données:
|
||||
-- identifiant: 2
|
||||
-- obligation_scolaire : Après
|
||||
-- date_de_naissance: |2003-01-01|
|
||||
-- âge: 18
|
||||
-- rémuneration_mensuelle: 1000€
|
||||
-- prise_en_charge: EffectiveEtPermanente
|
||||
-- a_déjà_ouvert_droit_aux_allocations_familiales: vrai
|
||||
@ -34,7 +32,6 @@ champ d'application Données:
|
||||
-- identifiant: 3
|
||||
-- obligation_scolaire : Après
|
||||
-- date_de_naissance: |2003-01-01|
|
||||
-- âge: 18
|
||||
-- rémuneration_mensuelle: 400€
|
||||
-- prise_en_charge: EffectiveEtPermanente
|
||||
-- a_déjà_ouvert_droit_aux_allocations_familiales: vrai
|
||||
@ -44,7 +41,6 @@ champ d'application Données:
|
||||
-- identifiant: 4
|
||||
-- obligation_scolaire : Après
|
||||
-- date_de_naissance: |1999-01-01|
|
||||
-- âge: 21
|
||||
-- rémuneration_mensuelle: 0€
|
||||
-- prise_en_charge: EffectiveEtPermanente
|
||||
-- a_déjà_ouvert_droit_aux_allocations_familiales: vrai
|
||||
|
@ -22,7 +22,6 @@ déclaration structure EnfantPrestationsFamiliales :
|
||||
donnée obligation_scolaire contenu SituationObligationScolaire
|
||||
donnée rémuneration_mensuelle contenu argent
|
||||
donnée date_de_naissance contenu date
|
||||
donnée âge contenu entier
|
||||
donnée prise_en_charge contenu PriseEnChargeEnfant
|
||||
donnée a_déjà_ouvert_droit_aux_allocations_familiales contenu booléen
|
||||
donnée bénéficie_titre_personnel_aide_personnelle_logement contenu booléen
|
||||
@ -41,7 +40,7 @@ déclaration champ d'application ÉligibilitéPrestationsFamiliales:
|
||||
sortie droit_ouvert condition dépend de EnfantPrestationsFamiliales
|
||||
sortie conditions_hors_âge condition dépend de EnfantPrestationsFamiliales
|
||||
interne plafond_l512_3_2 contenu argent
|
||||
sortie âge_l512_3_2 contenu entier
|
||||
sortie âge_l512_3_2 contenu durée
|
||||
sortie régime_outre_mer_l751_1 condition
|
||||
entrée date_courante contenu date
|
||||
entrée prestation_courante contenu ÉlémentPrestationsFamiliales
|
||||
|
@ -57,7 +57,8 @@ champ d'application ÉligibilitéPrestationsFamiliales :
|
||||
étiquette cas_base règle droit_ouvert de enfant sous condition
|
||||
enfant.EnfantPrestationsFamiliales.obligation_scolaire sous forme Après et
|
||||
(enfant.EnfantPrestationsFamiliales.rémuneration_mensuelle <=€ plafond_l512_3_2) et
|
||||
(enfant.EnfantPrestationsFamiliales.âge < âge_l512_3_2)
|
||||
(enfant.EnfantPrestationsFamiliales.date_de_naissance +@ âge_l512_3_2 >@
|
||||
date_courante)
|
||||
conséquence rempli
|
||||
|
||||
# On définit les conditions hors âge d'abord car elles
|
||||
|
@ -18,7 +18,7 @@ alinéa du présent article.
|
||||
# à cette limitation.
|
||||
|
||||
champ d'application ÉligibilitéPrestationsFamiliales :
|
||||
définition âge_l512_3_2 égal à 20
|
||||
définition âge_l512_3_2 égal à 20 an
|
||||
```
|
||||
|
||||
Le plafond de rémunération mentionné au 2° de l'article L. 512-3 est égal, pour
|
||||
|
@ -14,7 +14,6 @@ champ d'application Données:
|
||||
-- identifiant: 1
|
||||
-- obligation_scolaire : Pendant
|
||||
-- date_de_naissance: |2007-01-01|
|
||||
-- âge: 13
|
||||
-- rémuneration_mensuelle: 0€
|
||||
-- prise_en_charge: EffectiveEtPermanente
|
||||
-- a_déjà_ouvert_droit_aux_allocations_familiales: vrai
|
||||
@ -24,7 +23,6 @@ champ d'application Données:
|
||||
-- identifiant: 2
|
||||
-- obligation_scolaire : Après
|
||||
-- date_de_naissance: |2003-01-01|
|
||||
-- âge: 18
|
||||
-- rémuneration_mensuelle: 1000€
|
||||
-- prise_en_charge: EffectiveEtPermanente
|
||||
-- a_déjà_ouvert_droit_aux_allocations_familiales: vrai
|
||||
@ -34,7 +32,6 @@ champ d'application Données:
|
||||
-- identifiant: 3
|
||||
-- obligation_scolaire : Après
|
||||
-- date_de_naissance: |2003-01-01|
|
||||
-- âge: 18
|
||||
-- rémuneration_mensuelle: 400€
|
||||
-- prise_en_charge: EffectiveEtPermanente
|
||||
-- a_déjà_ouvert_droit_aux_allocations_familiales: vrai
|
||||
@ -44,7 +41,6 @@ champ d'application Données:
|
||||
-- identifiant: 4
|
||||
-- obligation_scolaire : Après
|
||||
-- date_de_naissance: |1999-01-01|
|
||||
-- âge: 21
|
||||
-- rémuneration_mensuelle: 0€
|
||||
-- prise_en_charge: EffectiveEtPermanente
|
||||
-- a_déjà_ouvert_droit_aux_allocations_familiales: vrai
|
||||
|
16869
french_law/js/french_law.js
generated
16869
french_law/js/french_law.js
generated
File diff suppressed because one or more lines are too long
@ -11,6 +11,11 @@
|
||||
(:standard \ bench api))
|
||||
(preprocess
|
||||
(pps js_of_ocaml-ppx))
|
||||
(js_of_ocaml
|
||||
(flags --disable=shortvar --opt 3))
|
||||
; We need to disable shortvar because
|
||||
; otherwise Webpack wrongly minifies
|
||||
; the library and it gives bugs.
|
||||
(libraries
|
||||
catala.runtime_ocaml
|
||||
catala.runtime_jsoo
|
||||
|
9022
french_law/ocaml/law_source/aides_logement.ml
generated
9022
french_law/ocaml/law_source/aides_logement.ml
generated
File diff suppressed because it is too large
Load Diff
782
french_law/ocaml/law_source/aides_logement_api_web.ml
generated
782
french_law/ocaml/law_source/aides_logement_api_web.ml
generated
File diff suppressed because it is too large
Load Diff
968
french_law/ocaml/law_source/allocations_familiales.ml
generated
968
french_law/ocaml/law_source/allocations_familiales.ml
generated
File diff suppressed because it is too large
Load Diff
@ -386,7 +386,6 @@ class type enfant =
|
||||
situation_obligation_scolaire Js.t Js.readonly_prop
|
||||
method remunerationMensuelle: Js.number Js.t Js.readonly_prop
|
||||
method dateDeNaissance: Js.js_string Js.t Js.readonly_prop
|
||||
method age: int Js.readonly_prop
|
||||
method priseEnCharge: prise_en_charge Js.t Js.readonly_prop
|
||||
method aDejaOuvertDroitAuxAllocationsFamiliales:
|
||||
bool Js.t Js.readonly_prop
|
||||
@ -401,7 +400,6 @@ class type enfant =
|
||||
val remunerationMensuelle =
|
||||
Js.number_of_float @@ money_to_float enfant.remuneration_mensuelle
|
||||
val dateDeNaissance = date_to_jsoo enfant.date_de_naissance
|
||||
val age = integer_to_int enfant.age
|
||||
val priseEnCharge = prise_en_charge_to_jsoo enfant.prise_en_charge
|
||||
val aDejaOuvertDroitAuxAllocationsFamiliales =
|
||||
Js.bool enfant.a_deja_ouvert_droit_aux_allocations_familiales
|
||||
@ -417,7 +415,6 @@ class type enfant =
|
||||
money_of_decimal @@ decimal_of_float @@ Js.float_of_number
|
||||
enfant##.remunerationMensuelle;
|
||||
date_de_naissance = date_of_jsoo enfant##.dateDeNaissance;
|
||||
age = integer_of_int enfant##.age;
|
||||
prise_en_charge = prise_en_charge_of_jsoo enfant##.priseEnCharge;
|
||||
a_deja_ouvert_droit_aux_allocations_familiales =
|
||||
Js.to_bool enfant##.aDejaOuvertDroitAuxAllocationsFamiliales;
|
||||
@ -430,7 +427,7 @@ class type prestations_familiales_out =
|
||||
method droitOuvertOut: (enfant Js.t, bool Js.t) Js.meth_callback Js.meth
|
||||
method conditionsHorsAgeOut:
|
||||
(enfant Js.t, bool Js.t) Js.meth_callback Js.meth
|
||||
method ageL51232Out: int Js.readonly_prop
|
||||
method ageL51232Out: Runtime_jsoo.Runtime.duration Js.t Js.readonly_prop
|
||||
method regimeOutreMerL7511Out: bool Js.t Js.readonly_prop
|
||||
end
|
||||
let prestations_familiales_out_to_jsoo (prestations_familiales_out
|
||||
@ -445,7 +442,7 @@ class type prestations_familiales_out =
|
||||
fun input ->
|
||||
Js.bool (prestations_familiales_out.conditions_hors_age_out (enfant_of_jsoo input)))
|
||||
val ageL51232Out =
|
||||
integer_to_int prestations_familiales_out.age_l512_3_2_out
|
||||
duration_to_jsoo prestations_familiales_out.age_l512_3_2_out
|
||||
val regimeOutreMerL7511Out =
|
||||
Js.bool prestations_familiales_out.regime_outre_mer_l751_1_out
|
||||
end
|
||||
@ -456,7 +453,7 @@ class type prestations_familiales_out =
|
||||
droit_ouvert_out = failwith "The function 'droit_ouvert_out' translation isn't yet supported...";
|
||||
conditions_hors_age_out = failwith "The function 'conditions_hors_age_out' translation isn't yet supported...";
|
||||
age_l512_3_2_out =
|
||||
integer_of_int prestations_familiales_out##.ageL51232Out;
|
||||
duration_of_jsoo prestations_familiales_out##.ageL51232Out;
|
||||
regime_outre_mer_l751_1_out =
|
||||
Js.to_bool prestations_familiales_out##.regimeOutreMerL7511Out
|
||||
}
|
||||
@ -492,7 +489,9 @@ class type prestations_familiales_in =
|
||||
}
|
||||
|
||||
class type allocation_familiales_avril2008_out =
|
||||
object method ageMinimumAlinea1L5213Out: int Js.readonly_prop
|
||||
object
|
||||
method ageMinimumAlinea1L5213Out:
|
||||
Runtime_jsoo.Runtime.duration Js.t Js.readonly_prop
|
||||
end
|
||||
let allocation_familiales_avril2008_out_to_jsoo
|
||||
(allocation_familiales_avril2008_out
|
||||
@ -500,7 +499,7 @@ class type allocation_familiales_avril2008_out =
|
||||
: allocation_familiales_avril2008_out Js.t =
|
||||
object%js
|
||||
val ageMinimumAlinea1L5213Out =
|
||||
integer_to_int allocation_familiales_avril2008_out.age_minimum_alinea_1_l521_3_out
|
||||
duration_to_jsoo allocation_familiales_avril2008_out.age_minimum_alinea_1_l521_3_out
|
||||
end
|
||||
let allocation_familiales_avril2008_out_of_jsoo
|
||||
(allocation_familiales_avril2008_out
|
||||
@ -508,7 +507,7 @@ class type allocation_familiales_avril2008_out =
|
||||
AllocationFamilialesAvril2008Out.t =
|
||||
{
|
||||
age_minimum_alinea_1_l521_3_out =
|
||||
integer_of_int
|
||||
duration_of_jsoo
|
||||
allocation_familiales_avril2008_out##.ageMinimumAlinea1L5213Out
|
||||
}
|
||||
|
||||
|
@ -26,4 +26,5 @@ let _ =
|
||||
try_test "Allocations familiales #11" Tests_allocations_familiales.test11;
|
||||
try_test "Allocations familiales #12" Tests_allocations_familiales.test12;
|
||||
try_test "Allocations familiales #13" Tests_allocations_familiales.test13;
|
||||
try_test "Allocations familiales #14" Tests_allocations_familiales.test14;
|
||||
exit (if !failure then -1 else 0)
|
||||
|
9946
french_law/python/src/aides_logement.py
generated
9946
french_law/python/src/aides_logement.py
generated
File diff suppressed because it is too large
Load Diff
384
french_law/python/src/allocations_familiales.py
generated
384
french_law/python/src/allocations_familiales.py
generated
@ -191,12 +191,11 @@ class EnfantEntree:
|
||||
self.d_beneficie_titre_personnel_aide_personnelle_logement)
|
||||
|
||||
class Enfant:
|
||||
def __init__(self, identifiant: Integer, obligation_scolaire: SituationObligationScolaire, remuneration_mensuelle: Money, date_de_naissance: Date, age: Integer, prise_en_charge: PriseEnCharge, a_deja_ouvert_droit_aux_allocations_familiales: bool, beneficie_titre_personnel_aide_personnelle_logement: bool) -> None:
|
||||
def __init__(self, identifiant: Integer, obligation_scolaire: SituationObligationScolaire, remuneration_mensuelle: Money, date_de_naissance: Date, prise_en_charge: PriseEnCharge, a_deja_ouvert_droit_aux_allocations_familiales: bool, beneficie_titre_personnel_aide_personnelle_logement: bool) -> None:
|
||||
self.identifiant = identifiant
|
||||
self.obligation_scolaire = obligation_scolaire
|
||||
self.remuneration_mensuelle = remuneration_mensuelle
|
||||
self.date_de_naissance = date_de_naissance
|
||||
self.age = age
|
||||
self.prise_en_charge = prise_en_charge
|
||||
self.a_deja_ouvert_droit_aux_allocations_familiales = a_deja_ouvert_droit_aux_allocations_familiales
|
||||
self.beneficie_titre_personnel_aide_personnelle_logement = beneficie_titre_personnel_aide_personnelle_logement
|
||||
@ -207,7 +206,6 @@ class Enfant:
|
||||
self.obligation_scolaire == other.obligation_scolaire and
|
||||
self.remuneration_mensuelle == other.remuneration_mensuelle and
|
||||
self.date_de_naissance == other.date_de_naissance and
|
||||
self.age == other.age and
|
||||
self.prise_en_charge == other.prise_en_charge and
|
||||
self.a_deja_ouvert_droit_aux_allocations_familiales == other.a_deja_ouvert_droit_aux_allocations_familiales and
|
||||
self.beneficie_titre_personnel_aide_personnelle_logement == other.beneficie_titre_personnel_aide_personnelle_logement)
|
||||
@ -218,14 +216,14 @@ class Enfant:
|
||||
return not (self == other)
|
||||
|
||||
def __str__(self) -> str:
|
||||
return "Enfant(identifiant={},obligation_scolaire={},remuneration_mensuelle={},date_de_naissance={},age={},prise_en_charge={},a_deja_ouvert_droit_aux_allocations_familiales={},beneficie_titre_personnel_aide_personnelle_logement={})".format(self.identifiant,
|
||||
return "Enfant(identifiant={},obligation_scolaire={},remuneration_mensuelle={},date_de_naissance={},prise_en_charge={},a_deja_ouvert_droit_aux_allocations_familiales={},beneficie_titre_personnel_aide_personnelle_logement={})".format(self.identifiant,
|
||||
self.obligation_scolaire, self.remuneration_mensuelle,
|
||||
self.date_de_naissance, self.age, self.prise_en_charge,
|
||||
self.date_de_naissance, self.prise_en_charge,
|
||||
self.a_deja_ouvert_droit_aux_allocations_familiales,
|
||||
self.beneficie_titre_personnel_aide_personnelle_logement)
|
||||
|
||||
class PrestationsFamilialesOut:
|
||||
def __init__(self, droit_ouvert_out: Callable[[Enfant], bool], conditions_hors_age_out: Callable[[Enfant], bool], age_l512_3_2_out: Integer, regime_outre_mer_l751_1_out: bool) -> None:
|
||||
def __init__(self, droit_ouvert_out: Callable[[Enfant], bool], conditions_hors_age_out: Callable[[Enfant], bool], age_l512_3_2_out: Duration, regime_outre_mer_l751_1_out: bool) -> None:
|
||||
self.droit_ouvert_out = droit_ouvert_out
|
||||
self.conditions_hors_age_out = conditions_hors_age_out
|
||||
self.age_l512_3_2_out = age_l512_3_2_out
|
||||
@ -270,7 +268,7 @@ class PrestationsFamilialesIn:
|
||||
self.prestation_courante_in, self.residence_in)
|
||||
|
||||
class AllocationFamilialesAvril2008Out:
|
||||
def __init__(self, age_minimum_alinea_1_l521_3_out: Integer) -> None:
|
||||
def __init__(self, age_minimum_alinea_1_l521_3_out: Duration) -> None:
|
||||
self.age_minimum_alinea_1_l521_3_out = age_minimum_alinea_1_l521_3_out
|
||||
|
||||
def __eq__(self, other: object) -> bool:
|
||||
@ -501,12 +499,12 @@ class InterfaceAllocationsFamilialesIn:
|
||||
|
||||
def allocation_familiales_avril2008(allocation_familiales_avril2008_in:AllocationFamilialesAvril2008In):
|
||||
try:
|
||||
temp_age_minimum_alinea_1_l521_3 = integer_of_string("16")
|
||||
temp_age_minimum_alinea_1_l521_3 = duration_of_numbers(16,0,0)
|
||||
except EmptyError:
|
||||
temp_age_minimum_alinea_1_l521_3 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=77, start_column=10,
|
||||
end_line=77, end_column=37,
|
||||
start_line=76, start_column=10,
|
||||
end_line=76, end_column=37,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -517,7 +515,7 @@ def enfant_le_plus_age(enfant_le_plus_age_in:EnfantLePlusAgeIn):
|
||||
enfants = enfant_le_plus_age_in.enfants_in
|
||||
try:
|
||||
def temp_le_plus_age(acc:Any, item:Any):
|
||||
if (acc.age > item.age):
|
||||
if (acc.date_de_naissance < item.date_de_naissance):
|
||||
return acc
|
||||
else:
|
||||
return item
|
||||
@ -526,8 +524,7 @@ def enfant_le_plus_age(enfant_le_plus_age_in:EnfantLePlusAgeIn):
|
||||
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"),
|
||||
date_de_naissance = date_of_numbers(2999,12,31),
|
||||
prise_en_charge = PriseEnCharge(PriseEnCharge_Code.EffectiveEtPermanente,
|
||||
Unit()),
|
||||
a_deja_ouvert_droit_aux_allocations_familiales = False,
|
||||
@ -536,8 +533,8 @@ def enfant_le_plus_age(enfant_le_plus_age_in:EnfantLePlusAgeIn):
|
||||
except EmptyError:
|
||||
temp_le_plus_age_1 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=81, start_column=10,
|
||||
end_line=81, end_column=21,
|
||||
start_line=80, start_column=10,
|
||||
end_line=80, end_column=21,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -769,12 +766,12 @@ def prestations_familiales(prestations_familiales_in:PrestationsFamilialesIn):
|
||||
prestation_courante = prestations_familiales_in.prestation_courante_in
|
||||
residence_1 = prestations_familiales_in.residence_in
|
||||
try:
|
||||
temp_age_l512_3_2 = integer_of_string("20")
|
||||
temp_age_l512_3_2 = duration_of_numbers(20,0,0)
|
||||
except EmptyError:
|
||||
temp_age_l512_3_2 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=61, start_column=10,
|
||||
end_line=61, end_column=22,
|
||||
start_line=60, start_column=10,
|
||||
end_line=60, end_column=22,
|
||||
law_headings=["Prestations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -823,8 +820,8 @@ def prestations_familiales(prestations_familiales_in:PrestationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_regime_outre_mer_l751_1 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=62, start_column=10,
|
||||
end_line=62, end_column=33,
|
||||
start_line=61, start_column=10,
|
||||
end_line=61, end_column=33,
|
||||
law_headings=["Prestations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -843,8 +840,8 @@ def prestations_familiales(prestations_familiales_in:PrestationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_plafond_l512_3_2 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=60, start_column=11,
|
||||
end_line=60, end_column=27,
|
||||
start_line=59, start_column=11,
|
||||
end_line=59, end_column=27,
|
||||
law_headings=["Prestations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -895,9 +892,9 @@ def prestations_familiales(prestations_familiales_in:PrestationsFamilialesIn):
|
||||
return False
|
||||
except EmptyError:
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=59,
|
||||
start_line=58,
|
||||
start_column=10,
|
||||
end_line=59,
|
||||
end_line=58,
|
||||
end_column=29,
|
||||
law_headings=["Prestations familiales",
|
||||
"Champs d'applications",
|
||||
@ -905,8 +902,8 @@ def prestations_familiales(prestations_familiales_in:PrestationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_conditions_hors_age = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=59, start_column=10,
|
||||
end_line=59, end_column=29,
|
||||
start_line=58, start_column=10,
|
||||
end_line=58, end_column=29,
|
||||
law_headings=["Prestations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -934,8 +931,9 @@ def prestations_familiales(prestations_familiales_in:PrestationsFamilialesIn):
|
||||
temp_droit_ouvert_1 = True
|
||||
if (temp_droit_ouvert_1 and
|
||||
((param_1.remuneration_mensuelle <=
|
||||
plafond_l512_3_2) and (param_1.age <
|
||||
age_l512_3_2))):
|
||||
plafond_l512_3_2) and
|
||||
((param_1.date_de_naissance + age_l512_3_2) >
|
||||
date_courante_2))):
|
||||
return True
|
||||
else:
|
||||
raise EmptyError
|
||||
@ -969,9 +967,9 @@ def prestations_familiales(prestations_familiales_in:PrestationsFamilialesIn):
|
||||
return False
|
||||
except EmptyError:
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=58,
|
||||
start_line=57,
|
||||
start_column=10,
|
||||
end_line=58,
|
||||
end_line=57,
|
||||
end_column=22,
|
||||
law_headings=["Prestations familiales",
|
||||
"Champs d'applications",
|
||||
@ -979,8 +977,8 @@ def prestations_familiales(prestations_familiales_in:PrestationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_droit_ouvert = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=58, start_column=10,
|
||||
end_line=58, end_column=22,
|
||||
start_line=57, start_column=10,
|
||||
end_line=57, end_column=22,
|
||||
law_headings=["Prestations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -1117,8 +1115,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
else:
|
||||
raise EmptyError
|
||||
return handle_default(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=98, start_column=11,
|
||||
end_line=98, end_column=26,
|
||||
start_line=97, start_column=11,
|
||||
end_line=97, end_column=26,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]), [temp_prise_en_compte_9,
|
||||
@ -1128,9 +1126,9 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
temp_prise_en_compte_1)
|
||||
except EmptyError:
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=98,
|
||||
start_line=97,
|
||||
start_column=11,
|
||||
end_line=98,
|
||||
end_line=97,
|
||||
end_column=26,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
@ -1138,8 +1136,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_prise_en_compte = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=98, start_column=11,
|
||||
end_line=98, end_column=26,
|
||||
start_line=97, start_column=11,
|
||||
end_line=97, end_column=26,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -1265,8 +1263,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
else:
|
||||
raise EmptyError
|
||||
return handle_default(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=99, start_column=11,
|
||||
end_line=99, end_column=20,
|
||||
start_line=98, start_column=11,
|
||||
end_line=98, end_column=20,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]), [temp_versement_8,
|
||||
@ -1274,9 +1272,9 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
temp_versement_1)
|
||||
except EmptyError:
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=99,
|
||||
start_line=98,
|
||||
start_column=11,
|
||||
end_line=99,
|
||||
end_line=98,
|
||||
end_column=20,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
@ -1284,8 +1282,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_versement = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=99, start_column=11,
|
||||
end_line=99, end_column=20,
|
||||
start_line=98, start_column=11,
|
||||
end_line=98, end_column=20,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -1295,8 +1293,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_nombre_enfants_l521_1 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=146, start_column=11,
|
||||
end_line=146, end_column=32,
|
||||
start_line=145, start_column=11,
|
||||
end_line=145, end_column=32,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -1306,8 +1304,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_nombre_enfants_alinea_2_l521_3 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=148, start_column=11,
|
||||
end_line=148, end_column=41,
|
||||
start_line=147, start_column=11,
|
||||
end_line=147, end_column=41,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -1330,8 +1328,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_prestations_familiales_dot_date_courante = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=63, start_column=10,
|
||||
end_line=63, end_column=23,
|
||||
start_line=62, start_column=10,
|
||||
end_line=62, end_column=23,
|
||||
law_headings=["Prestations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -1342,8 +1340,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_prestations_familiales_dot_prestation_courante = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=64, start_column=10,
|
||||
end_line=64, end_column=29,
|
||||
start_line=63, start_column=10,
|
||||
end_line=63, end_column=29,
|
||||
law_headings=["Prestations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -1353,8 +1351,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_prestations_familiales_dot_residence = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=65, start_column=10,
|
||||
end_line=65, end_column=19,
|
||||
start_line=64, start_column=10,
|
||||
end_line=64, end_column=19,
|
||||
law_headings=["Prestations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -1371,8 +1369,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_enfant_le_plus_age_dot_enfants = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=80, start_column=10,
|
||||
end_line=80, end_column=17,
|
||||
start_line=79, start_column=10,
|
||||
end_line=79, end_column=17,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -1390,12 +1388,12 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
else:
|
||||
raise EmptyError
|
||||
except EmptyError:
|
||||
return integer_of_string("14")
|
||||
return duration_of_numbers(14,0,0)
|
||||
except EmptyError:
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=147,
|
||||
start_line=146,
|
||||
start_column=11,
|
||||
end_line=147,
|
||||
end_line=146,
|
||||
end_column=38,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
@ -1403,8 +1401,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_age_minimum_alinea_1_l521_3_1 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=147, start_column=11,
|
||||
end_line=147, end_column=38,
|
||||
start_line=146, start_column=11,
|
||||
end_line=146, end_column=38,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -1417,8 +1415,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_enfants_a_charge_droit_ouvert_prestation_familiale_1 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=96, start_column=11,
|
||||
end_line=96, end_column=61,
|
||||
start_line=95, start_column=11,
|
||||
end_line=95, end_column=61,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -1429,9 +1427,9 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
return (enfant_le_plus_age_dot_le_plus_age == param_5)
|
||||
except EmptyError:
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=149,
|
||||
start_line=148,
|
||||
start_column=11,
|
||||
end_line=149,
|
||||
end_line=148,
|
||||
end_column=33,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
@ -1439,8 +1437,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_est_enfant_le_plus_age = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=149, start_column=11,
|
||||
end_line=149, end_column=33,
|
||||
start_line=148, start_column=11,
|
||||
end_line=148, end_column=33,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -1488,9 +1486,9 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
else:
|
||||
raise EmptyError
|
||||
temp_plafond__i_i_d521_3_6 = handle_default(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=151,
|
||||
start_line=150,
|
||||
start_column=11,
|
||||
end_line=151, end_column=28,
|
||||
end_line=150, end_column=28,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]), [temp_plafond__i_i_d521_3_5,
|
||||
@ -1506,8 +1504,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_plafond__i_i_d521_3_6 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=151, start_column=11,
|
||||
end_line=151, end_column=28,
|
||||
start_line=150, start_column=11,
|
||||
end_line=150, end_column=28,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -1555,9 +1553,9 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
else:
|
||||
raise EmptyError
|
||||
temp_plafond__i_d521_3_6 = handle_default(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=150,
|
||||
start_line=149,
|
||||
start_column=11,
|
||||
end_line=150, end_column=27,
|
||||
end_line=149, end_column=27,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]), [temp_plafond__i_d521_3_5,
|
||||
@ -1573,8 +1571,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_plafond__i_d521_3_6 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=150, start_column=11,
|
||||
end_line=150, end_column=27,
|
||||
start_line=149, start_column=11,
|
||||
end_line=149, end_column=27,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -1596,8 +1594,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_droit_ouvert_complement = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=133, start_column=11,
|
||||
end_line=133, end_column=34,
|
||||
start_line=132, start_column=11,
|
||||
end_line=132, end_column=34,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -1616,8 +1614,10 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
if ((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.date_de_naissance +
|
||||
prestations_familiales_dot_age_l512_3_2) -
|
||||
date_courante_3) <
|
||||
duration_of_numbers(0,0,365)) and
|
||||
(param_6.a_deja_ouvert_droit_aux_allocations_familiales and
|
||||
prestations_familiales_dot_conditions_hors_age(
|
||||
param_6)))):
|
||||
@ -1628,9 +1628,9 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
return False
|
||||
except EmptyError:
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=121,
|
||||
start_line=120,
|
||||
start_column=11,
|
||||
end_line=121,
|
||||
end_line=120,
|
||||
end_column=35,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
@ -1638,8 +1638,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_droit_ouvert_forfaitaire = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=121, start_column=11,
|
||||
end_line=121, end_column=35,
|
||||
start_line=120, start_column=11,
|
||||
end_line=120, end_column=35,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -1656,8 +1656,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_montant_initial_base_quatrieme_enfant_et_plus_mayotte = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=118, start_column=11,
|
||||
end_line=118, end_column=64,
|
||||
start_line=117, start_column=11,
|
||||
end_line=117, end_column=64,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -1800,7 +1800,7 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
raise EmptyError
|
||||
temp_montant_initial_base_troisieme_enfant_mayotte_12 = handle_default(
|
||||
SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=117, start_column=11, end_line=117, end_column=56,
|
||||
start_line=116, start_column=11, end_line=116, end_column=56,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]), [temp_montant_initial_base_troisieme_enfant_mayotte_11,
|
||||
@ -1825,8 +1825,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_montant_initial_base_troisieme_enfant_mayotte_12 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=117, start_column=11,
|
||||
end_line=117, end_column=56,
|
||||
start_line=116, start_column=11,
|
||||
end_line=116, end_column=56,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -1836,8 +1836,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_nombre_total_enfants = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=111, start_column=11,
|
||||
end_line=111, end_column=31,
|
||||
start_line=110, start_column=11,
|
||||
end_line=110, end_column=31,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -1861,8 +1861,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_nombre_moyen_enfants_2 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=110, start_column=11,
|
||||
end_line=110, end_column=31,
|
||||
start_line=109, start_column=11,
|
||||
end_line=109, end_column=31,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2037,8 +2037,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
else:
|
||||
raise EmptyError
|
||||
return handle_default(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=106, start_column=11,
|
||||
end_line=106, end_column=46,
|
||||
start_line=105, start_column=11,
|
||||
end_line=105, end_column=46,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]), [temp_montant_initial_base_premier_enfant_16,
|
||||
@ -2067,7 +2067,7 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
raise EmptyError
|
||||
temp_montant_initial_base_premier_enfant_17 = handle_default(
|
||||
SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=106, start_column=11, end_line=106, end_column=46,
|
||||
start_line=105, start_column=11, end_line=105, end_column=46,
|
||||
law_headings=["Allocations familiales", "Champs d'applications",
|
||||
"Prologue"]), [temp_montant_initial_base_premier_enfant_3,
|
||||
temp_montant_initial_base_premier_enfant_2],
|
||||
@ -2076,8 +2076,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_montant_initial_base_premier_enfant_17 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=106, start_column=11,
|
||||
end_line=106, end_column=46,
|
||||
start_line=105, start_column=11,
|
||||
end_line=105, end_column=46,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2114,8 +2114,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_droit_ouvert_base = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=104, start_column=11,
|
||||
end_line=104, end_column=28,
|
||||
start_line=103, start_column=11,
|
||||
end_line=103, end_column=28,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2127,15 +2127,17 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
try:
|
||||
if ((list_length(enfants_a_charge_droit_ouvert_prestation_familiale) >=
|
||||
nombre_enfants_alinea_2_l521_3) and
|
||||
(param_7.age >=
|
||||
age_minimum_alinea_1_l521_3_1(param_7))):
|
||||
((param_7.date_de_naissance +
|
||||
age_minimum_alinea_1_l521_3_1(param_7)) <=
|
||||
date_courante_3)):
|
||||
return True
|
||||
else:
|
||||
raise EmptyError
|
||||
except EmptyError:
|
||||
if (not est_enfant_le_plus_age(param_7) and
|
||||
(param_7.age >=
|
||||
age_minimum_alinea_1_l521_3_1(param_7))):
|
||||
((param_7.date_de_naissance +
|
||||
age_minimum_alinea_1_l521_3_1(param_7)) <=
|
||||
date_courante_3)):
|
||||
return True
|
||||
else:
|
||||
raise EmptyError
|
||||
@ -2143,9 +2145,9 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
return False
|
||||
except EmptyError:
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=126,
|
||||
start_line=125,
|
||||
start_column=11,
|
||||
end_line=126,
|
||||
end_line=125,
|
||||
end_column=34,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
@ -2153,8 +2155,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_droit_ouvert_majoration = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=126, start_column=11,
|
||||
end_line=126, end_column=34,
|
||||
start_line=125, start_column=11,
|
||||
end_line=125, end_column=34,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2191,9 +2193,9 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
return money_of_cents_string("0")
|
||||
except EmptyError:
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=135,
|
||||
start_line=134,
|
||||
start_column=11,
|
||||
end_line=135,
|
||||
end_line=134,
|
||||
end_column=31,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
@ -2201,8 +2203,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_complement_degressif = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=135, start_column=11,
|
||||
end_line=135, end_column=31,
|
||||
start_line=134, start_column=11,
|
||||
end_line=134, end_column=31,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2233,7 +2235,7 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
raise EmptyError
|
||||
temp_montant_verse_forfaitaire_par_enfant_5 = handle_default(
|
||||
SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=122, start_column=11, end_line=122, end_column=47,
|
||||
start_line=121, start_column=11, end_line=121, end_column=47,
|
||||
law_headings=["Allocations familiales", "Champs d'applications",
|
||||
"Prologue"]), [temp_montant_verse_forfaitaire_par_enfant_4,
|
||||
temp_montant_verse_forfaitaire_par_enfant_3,
|
||||
@ -2243,8 +2245,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_montant_verse_forfaitaire_par_enfant_5 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=122, start_column=11,
|
||||
end_line=122, end_column=47,
|
||||
start_line=121, start_column=11,
|
||||
end_line=121, end_column=47,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2294,7 +2296,7 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
raise EmptyError
|
||||
temp_montant_initial_base_troisieme_enfant_et_plus_5 = handle_default(
|
||||
SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=108, start_column=11, end_line=108, end_column=56,
|
||||
start_line=107, start_column=11, end_line=107, end_column=56,
|
||||
law_headings=["Allocations familiales", "Champs d'applications",
|
||||
"Prologue"]), [temp_montant_initial_base_troisieme_enfant_et_plus_4,
|
||||
temp_montant_initial_base_troisieme_enfant_et_plus_3,
|
||||
@ -2304,8 +2306,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_montant_initial_base_troisieme_enfant_et_plus_5 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=108, start_column=11,
|
||||
end_line=108, end_column=56,
|
||||
start_line=107, start_column=11,
|
||||
end_line=107, end_column=56,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2459,8 +2461,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
raise EmptyError
|
||||
temp_montant_initial_base_deuxieme_enfant_12 = handle_default(
|
||||
SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=107, start_column=11,
|
||||
end_line=107, end_column=47,
|
||||
start_line=106, start_column=11,
|
||||
end_line=106, end_column=47,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]), [temp_montant_initial_base_deuxieme_enfant_11,
|
||||
@ -2525,7 +2527,7 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
raise EmptyError
|
||||
temp_montant_initial_base_deuxieme_enfant_12 = handle_default(
|
||||
SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=107, start_column=11, end_line=107, end_column=47,
|
||||
start_line=106, start_column=11, end_line=106, end_column=47,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]), [temp_montant_initial_base_deuxieme_enfant_17,
|
||||
@ -2536,8 +2538,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_montant_initial_base_deuxieme_enfant_12 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=107, start_column=11,
|
||||
end_line=107, end_column=47,
|
||||
start_line=106, start_column=11,
|
||||
end_line=106, end_column=47,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2552,8 +2554,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_rapport_enfants_total_moyen = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=109, start_column=11,
|
||||
end_line=109, end_column=38,
|
||||
start_line=108, start_column=11,
|
||||
end_line=108, end_column=38,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2590,8 +2592,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
else:
|
||||
raise EmptyError
|
||||
return handle_default(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=127, start_column=11,
|
||||
end_line=127, end_column=47,
|
||||
start_line=126, start_column=11,
|
||||
end_line=126, end_column=47,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]), [temp_montant_initial_metropole_majoration_6,
|
||||
@ -2602,9 +2604,9 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
temp_montant_initial_metropole_majoration_1)
|
||||
except EmptyError:
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=127,
|
||||
start_line=126,
|
||||
start_column=11,
|
||||
end_line=127,
|
||||
end_line=126,
|
||||
end_column=47,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
@ -2612,8 +2614,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_montant_initial_metropole_majoration = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=127, start_column=11,
|
||||
end_line=127, end_column=47,
|
||||
start_line=126, start_column=11,
|
||||
end_line=126, end_column=47,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2631,8 +2633,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_montant_verse_forfaitaire_1 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=123, start_column=11,
|
||||
end_line=123, end_column=36,
|
||||
start_line=122, start_column=11,
|
||||
end_line=122, end_column=36,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2660,9 +2662,9 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
else:
|
||||
raise EmptyError
|
||||
temp_montant_initial_base_4 = handle_default(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=105,
|
||||
start_line=104,
|
||||
start_column=11,
|
||||
end_line=105, end_column=31,
|
||||
end_line=104, end_column=31,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]), [temp_montant_initial_base_3,
|
||||
@ -2675,8 +2677,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_montant_initial_base_4 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=105, start_column=11,
|
||||
end_line=105, end_column=31,
|
||||
start_line=104, start_column=11,
|
||||
end_line=104, end_column=31,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2693,8 +2695,10 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
if (droit_ouvert_majoration(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"))))):
|
||||
integer_of_string("1")) and
|
||||
((param_10.date_de_naissance +
|
||||
duration_of_numbers(16,0,0)) <=
|
||||
date_courante_3)))):
|
||||
return (bmaf_dot_montant *
|
||||
decimal_of_string("0.0567"))
|
||||
else:
|
||||
@ -2703,16 +2707,20 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
if (droit_ouvert_majoration(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")))))):
|
||||
integer_of_string("1")) and
|
||||
(((param_10.date_de_naissance +
|
||||
duration_of_numbers(11,0,0)) <=
|
||||
date_courante_3) and
|
||||
((param_10.date_de_naissance +
|
||||
duration_of_numbers(16,0,0)) >
|
||||
date_courante_3))))):
|
||||
return (bmaf_dot_montant *
|
||||
decimal_of_string("0.0369"))
|
||||
else:
|
||||
raise EmptyError
|
||||
return handle_default(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=128, start_column=11,
|
||||
end_line=128, end_column=37,
|
||||
start_line=127, start_column=11,
|
||||
end_line=127, end_column=37,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]), [temp_montant_initial_majoration_4,
|
||||
@ -2723,9 +2731,9 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
return montant_initial_metropole_majoration(param_10)
|
||||
except EmptyError:
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=128,
|
||||
start_line=127,
|
||||
start_column=11,
|
||||
end_line=128,
|
||||
end_line=127,
|
||||
end_column=37,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
@ -2733,8 +2741,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_montant_initial_majoration = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=128, start_column=11,
|
||||
end_line=128, end_column=37,
|
||||
start_line=127, start_column=11,
|
||||
end_line=127, end_column=37,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2770,8 +2778,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_montant_verse_complement_pour_forfaitaire = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=137, start_column=11,
|
||||
end_line=137, end_column=52,
|
||||
start_line=136, start_column=11,
|
||||
end_line=136, end_column=52,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2782,8 +2790,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_montant_avec_garde_alternee_base = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=112, start_column=11,
|
||||
end_line=112, end_column=43,
|
||||
start_line=111, start_column=11,
|
||||
end_line=111, end_column=43,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2805,9 +2813,9 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
temp_montant_avec_garde_alternee_majoration_1)
|
||||
except EmptyError:
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=129,
|
||||
start_line=128,
|
||||
start_column=11,
|
||||
end_line=129,
|
||||
end_line=128,
|
||||
end_column=49,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
@ -2815,8 +2823,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_montant_avec_garde_alternee_majoration = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=129, start_column=11,
|
||||
end_line=129, end_column=49,
|
||||
start_line=128, start_column=11,
|
||||
end_line=128, end_column=49,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2829,8 +2837,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_montant_verse_base = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=113, start_column=11,
|
||||
end_line=113, end_column=29,
|
||||
start_line=112, start_column=11,
|
||||
end_line=112, end_column=29,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2848,8 +2856,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_montant_verse_majoration_1 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=130, start_column=11,
|
||||
end_line=130, end_column=35,
|
||||
start_line=129, start_column=11,
|
||||
end_line=129, end_column=35,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2860,8 +2868,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_montant_base_complement_pour_base_et_majoration = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=134, start_column=11,
|
||||
end_line=134, end_column=58,
|
||||
start_line=133, start_column=11,
|
||||
end_line=133, end_column=58,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2875,8 +2883,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_montant_verse_complement_pour_base_et_majoration = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=136, start_column=11,
|
||||
end_line=136, end_column=59,
|
||||
start_line=135, start_column=11,
|
||||
end_line=135, end_column=59,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2892,8 +2900,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp_montant_verse = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=101, start_column=10,
|
||||
end_line=101, end_column=23,
|
||||
start_line=100, start_column=10,
|
||||
end_line=100, end_column=23,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2905,8 +2913,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
except EmptyError:
|
||||
temp__ = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/securite_sociale_L.catala_fr",
|
||||
start_line=230, start_column=5,
|
||||
end_line=234, end_column=6,
|
||||
start_line=231, start_column=5,
|
||||
end_line=235, end_column=6,
|
||||
law_headings=["Article L521-2",
|
||||
"Chapitre 1er : Allocations familiales",
|
||||
"Titre 2 : Prestations générales d'entretien",
|
||||
@ -2915,8 +2923,8 @@ def allocations_familiales(allocations_familiales_in:AllocationsFamilialesIn):
|
||||
"Code de la sécurité sociale"]))
|
||||
if not (temp__):
|
||||
raise AssertionFailure(SourcePosition(filename="examples/allocations_familiales/securite_sociale_L.catala_fr",
|
||||
start_line=230, start_column=5,
|
||||
end_line=234, end_column=6,
|
||||
start_line=231, start_column=5,
|
||||
end_line=235, end_column=6,
|
||||
law_headings=["Article L521-2",
|
||||
"Chapitre 1er : Allocations familiales",
|
||||
"Titre 2 : Prestations générales d'entretien",
|
||||
@ -2953,8 +2961,6 @@ def interface_allocations_familiales(interface_allocations_familiales_in:Interfa
|
||||
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,
|
||||
beneficie_titre_personnel_aide_personnelle_logement = enfant_4.d_beneficie_titre_personnel_aide_personnelle_logement)
|
||||
@ -2962,8 +2968,8 @@ def interface_allocations_familiales(interface_allocations_familiales_in:Interfa
|
||||
except EmptyError:
|
||||
temp_enfants_a_charge_2 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/epilogue.catala_fr",
|
||||
start_line=76, start_column=11,
|
||||
end_line=76, end_column=27,
|
||||
start_line=75, start_column=11,
|
||||
end_line=75, end_column=27,
|
||||
law_headings=["Interface du programme",
|
||||
"Épilogue"]))
|
||||
enfants_a_charge_1 = temp_enfants_a_charge_2
|
||||
@ -2980,8 +2986,8 @@ def interface_allocations_familiales(interface_allocations_familiales_in:Interfa
|
||||
except EmptyError:
|
||||
temp_allocations_familiales_dot_personne_charge_effective_permanente_est_parent_1 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=86, start_column=10,
|
||||
end_line=86, end_column=57,
|
||||
start_line=85, start_column=10,
|
||||
end_line=85, end_column=57,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -2999,8 +3005,8 @@ def interface_allocations_familiales(interface_allocations_familiales_in:Interfa
|
||||
except EmptyError:
|
||||
temp_allocations_familiales_dot_personne_charge_effective_permanente_remplit_titre__i_1 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=87, start_column=10,
|
||||
end_line=87, end_column=62,
|
||||
start_line=86, start_column=10,
|
||||
end_line=86, end_column=62,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -3010,8 +3016,8 @@ def interface_allocations_familiales(interface_allocations_familiales_in:Interfa
|
||||
except EmptyError:
|
||||
temp_allocations_familiales_dot_ressources_menage = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=88, start_column=10,
|
||||
end_line=88, end_column=27,
|
||||
start_line=87, start_column=10,
|
||||
end_line=87, end_column=27,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -3021,8 +3027,8 @@ def interface_allocations_familiales(interface_allocations_familiales_in:Interfa
|
||||
except EmptyError:
|
||||
temp_allocations_familiales_dot_residence = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=89, start_column=10,
|
||||
end_line=89, end_column=19,
|
||||
start_line=88, start_column=10,
|
||||
end_line=88, end_column=19,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -3032,8 +3038,8 @@ def interface_allocations_familiales(interface_allocations_familiales_in:Interfa
|
||||
except EmptyError:
|
||||
temp_allocations_familiales_dot_date_courante = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=92, start_column=10,
|
||||
end_line=92, end_column=23,
|
||||
start_line=91, start_column=10,
|
||||
end_line=91, end_column=23,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -3043,8 +3049,8 @@ def interface_allocations_familiales(interface_allocations_familiales_in:Interfa
|
||||
except EmptyError:
|
||||
temp_allocations_familiales_dot_enfants_a_charge = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=95, start_column=10,
|
||||
end_line=95, end_column=26,
|
||||
start_line=94, start_column=10,
|
||||
end_line=94, end_column=26,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -3062,8 +3068,8 @@ def interface_allocations_familiales(interface_allocations_familiales_in:Interfa
|
||||
except EmptyError:
|
||||
temp_allocations_familiales_dot_avait_enfant_a_charge_avant_1er_janvier_2012_1 = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/prologue.catala_fr",
|
||||
start_line=116, start_column=10,
|
||||
end_line=116, end_column=54,
|
||||
start_line=115, start_column=10,
|
||||
end_line=115, end_column=54,
|
||||
law_headings=["Allocations familiales",
|
||||
"Champs d'applications",
|
||||
"Prologue"]))
|
||||
@ -3081,8 +3087,8 @@ def interface_allocations_familiales(interface_allocations_familiales_in:Interfa
|
||||
except EmptyError:
|
||||
temp_i_montant_verse = dead_value
|
||||
raise NoValueProvided(SourcePosition(filename="examples/allocations_familiales/epilogue.catala_fr",
|
||||
start_line=80, start_column=10,
|
||||
end_line=80, end_column=25,
|
||||
start_line=79, start_column=10,
|
||||
end_line=79, end_column=25,
|
||||
law_headings=["Interface du programme",
|
||||
"Épilogue"]))
|
||||
i_montant_verse = temp_i_montant_verse
|
||||
|
@ -70,7 +70,7 @@ ace.define(
|
||||
{
|
||||
token: "keyword.control",
|
||||
regex:
|
||||
"\\b(match|with\\s+pattern|fixed|by|decreasing|increasing|varies|with|we\\s+have|in|such\\s+that|exists|for|all|of|if|then|else|initial)\\b",
|
||||
"\\b(match|with\\s+pattern|fixed|by|decreasing|increasing|varies|with|we\\s+have|let|in|such\\s+that|exists|for|all|of|if|then|else|initial)\\b",
|
||||
},
|
||||
{
|
||||
token: "keyword.other",
|
||||
|
@ -121,7 +121,7 @@
|
||||
}
|
||||
}
|
||||
{
|
||||
'match' : '\\b(match|with\\s+pattern|fixed|by|decreasing|increasing|varies|with|we\\s+have|in|such\\s+that|exists|for|all|of|if|then|else|initial)\\b'
|
||||
'match' : '\\b(match|with\\s+pattern|fixed|by|decreasing|increasing|varies|with|we\\s+have|let|in|such\\s+that|exists|for|all|of|if|then|else|initial)\\b'
|
||||
'name' : 'keyword.control.catala_en'
|
||||
}
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ class CatalaEnLexer(RegexLexer):
|
||||
(u'(\\s*\\#.*$)', bygroups(Comment.Single)),
|
||||
(u'(context|input|output|internal)(\\s*)(|output)(\\s+)([a-z\xe9\xe8\xe0\xe2\xf9\xee\xea\u0153\xe7][a-z\xe9\xe8\xe0\xe2\xf9\xee\xea\u0153\xe7A-Z\xc9\xc8\xc0\xc2\xd9\xce\xca\u0152\xc70-9_\\\']*)',
|
||||
bygroups(Keyword.Declaration, Text, Keyword.Declaration, Text, Name.Variable)),
|
||||
(u'\\b(match|with\\s+pattern|fixed|by|decreasing|increasing|varies|with|we\\s+have|in|such\\s+that|exists|for|all|of|if|then|else|initial)\\b',
|
||||
(u'\\b(match|with\\s+pattern|fixed|by|decreasing|increasing|varies|with|we\\s+have|let|in|such\\s+that|exists|for|all|of|if|then|else|initial)\\b',
|
||||
bygroups(Keyword.Reserved)),
|
||||
(u'\\b(scope|depends\\s+on|declaration|includes|collection|content|optional|structure|enumeration|context|input|output|internal|rule|under\\s+condition|condition|data|consequence|fulfilled|equals|assertion|definition|state|label|exception|anything)\\b',
|
||||
bygroups(Keyword.Declaration)),
|
||||
|
@ -23,7 +23,7 @@ syn match Include "^\s*>\s*Include:.*$"
|
||||
syn match sc_id_def contained "\<\([a-zéèàâùîôêœç][a-zéèàâùîôêœçA-ZÉÈÀÂÙÎÔÊŒÇ0-9_\']*\)\>"
|
||||
syn match cc_id contained "\<\([A-ZÉÈÀÂÙÎÔÊŒÇ][a-zéèàâùîôêœçA-ZÉÈÀÂÙÎÔÊŒÇ0-9_\']*\)\>"
|
||||
syn match Keyword contained "\<\(scope\|depends\s\+on\|declaration\|includes\|collection\|content\|optional\|structure\|enumeration\|context\|rule\|under\s\+condition\|condition\|data\|consequence\|fulfilled\|equals\|assertion\|definition\|state\|label\|exception\|anything\)\>"
|
||||
syn match Statement contained "\<\(match\|with\s\+pattern\|fixed\|by\|decreasing\|increasing\|varies\|with\|we\s\+have\|in\|such\s\+that\|exists\|for\|all\|of\|if\|then\|else\|initial\)\>"
|
||||
syn match Statement contained "\<\(match\|with\s\+pattern\|fixed\|by\|decreasing\|increasing\|varies\|with\|we\s\+have\|let\|in\|such\s\+that\|exists\|for\|all\|of\|if\|then\|else\|initial\)\>"
|
||||
syn keyword Conditional contained if then else
|
||||
syn match Comment contained "#.*$"
|
||||
syn match Number contained "|[0-9]\+-[0-9]\+-[0-9]\+|"
|
||||
|
@ -194,7 +194,7 @@
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(match|with\s+pattern|fixed|by|decreasing|increasing|varies|with|we\s+have|in|such\s+that|exists|for|all|of|if|then|else|initial)\b</string>
|
||||
<string>\b(match|with\s+pattern|fixed|by|decreasing|increasing|varies|with|we\s+have|let|in|such\s+that|exists|for|all|of|if|then|else|initial)\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.control.catala_en</string>
|
||||
</dict>
|
||||
|
@ -70,7 +70,7 @@ ace.define(
|
||||
{
|
||||
token: "keyword.control",
|
||||
regex:
|
||||
"\\b(selon|sous\\s+forme|fix\u00e9|par|d\u00e9croissante|croissante|varie|avec|on\\s+a|dans|tel\\s+que|existe|pour|tout|de|si|alors|sinon|initial)\\b",
|
||||
"\\b(selon|sous\\s+forme|fix\u00e9|par|d\u00e9croissante|croissante|varie|avec|on\\s+a|soit|dans|tel\\s+que|existe|pour|tout|de|si|alors|sinon|initial)\\b",
|
||||
},
|
||||
{
|
||||
token: "keyword.other",
|
||||
|
@ -121,7 +121,7 @@
|
||||
}
|
||||
}
|
||||
{
|
||||
'match' : '\\b(selon|sous\\s+forme|fixé|par|décroissante|croissante|varie|avec|on\\s+a|dans|tel\\s+que|existe|pour|tout|de|si|alors|sinon|initial)\\b'
|
||||
'match' : '\\b(selon|sous\\s+forme|fixé|par|décroissante|croissante|varie|avec|on\\s+a|soit|dans|tel\\s+que|existe|pour|tout|de|si|alors|sinon|initial)\\b'
|
||||
'name' : 'keyword.control.catala_fr'
|
||||
}
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ class CatalaFrLexer(RegexLexer):
|
||||
(u'(\\s*\\#.*$)', bygroups(Comment.Single)),
|
||||
(u'(contexte|entr\xe9e|sortie|interne)(\\s*)(|sortie)(\\s+)([a-z\xe9\xe8\xe0\xe2\xf9\xee\xf4\xea\u0153\xe7][a-z\xe9\xe8\xe0\xe2\xf9\xee\xf4\xea\u0153\xe7A-Z\xc9\xc8\xc0\xc2\xd9\xce\xd4\xca\u0152\xc70-9_\\\']*)',
|
||||
bygroups(Keyword.Declaration, Text, Keyword.Declaration, Text, Name.Variable)),
|
||||
(u'\\b(selon|sous\\s+forme|fix\xe9|par|d\xe9croissante|croissante|varie|avec|on\\s+a|dans|tel\\s+que|existe|pour|tout|de|si|alors|sinon|initial)\\b',
|
||||
(u'\\b(selon|sous\\s+forme|fix\xe9|par|d\xe9croissante|croissante|varie|avec|on\\s+a|soit|dans|tel\\s+que|existe|pour|tout|de|si|alors|sinon|initial)\\b',
|
||||
bygroups(Keyword.Reserved)),
|
||||
(u'\\b(champ\\s+d\'application|si\\s+et\\s+seulement\\s+si|d\xe9pend\\s+de|d\xe9claration|inclus|collection|contenu|optionnel|structure|\xe9num\xe9ration|contexte|entr\xe9e|sortie|interne|r\xe8gle|sous\\s+condition|condition|donn\xe9e|cons\xe9quence|rempli|\xe9gal\\s+\xe0|assertion|d\xe9finition|\xe9tat|\xe9tiquette|exception|n\'importe\\s+quel)\\b',
|
||||
bygroups(Keyword.Declaration)),
|
||||
|
@ -24,7 +24,7 @@ syn match sc_id_def contained "\<\([a-zéèàâùîôêœç][a-zéèàâùîôê
|
||||
syn match cc_id contained "\<\([A-ZÉÈÀÂÙÎÔÊŒÇ][a-zéèàâùîôêœçA-ZÉÈÀÂÙÎÔÊŒÇ0-9_\']*\)\>"
|
||||
|
||||
syn match Keyword contained "\<\(contexte\|entrée\|sortie\|interne\|champ\s\+d'application\|collection\|structure\|donnée\|énumération\|définition\|déclaration\|si\s\+et\s\+seulement\s\+si\|dépend\s\+de\|inclus\|contenu\|optionnel\|règle\|sous\s\+condition\|condition\|conséquence\|rempli\|égal\s\+à\|assertion\|état\|étiquette\|exception\|n'importe\s\+quel\)\>"
|
||||
syn match Statement contained "\<\(selon\|sous\s\+forme\|fixé\|par\|décroissante\|croissante\|varie\|avec\|on\s\+a\|dans\|tel\s\+que\|existe\|pour\|tout\|de\|initial\)\>"
|
||||
syn match Statement contained "\<\(selon\|sous\s\+forme\|fixé\|par\|décroissante\|croissante\|varie\|avec\|on\s\+a\|soit\|dans\|tel\s\+que\|existe\|pour\|tout\|de\|initial\)\>"
|
||||
syn keyword Conditional contained si alors sinon
|
||||
syn match Comment contained "#.*$"
|
||||
syn match Number contained "|[0-9]\+-[0-9]\+-[0-9]\+|"
|
||||
|
@ -194,7 +194,7 @@
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(selon|sous\s+forme|fixé|par|décroissante|croissante|varie|avec|on\s+a|dans|tel\s+que|existe|pour|tout|de|si|alors|sinon|initial)\b</string>
|
||||
<string>\b(selon|sous\s+forme|fixé|par|décroissante|croissante|varie|avec|on\s+a|soit|dans|tel\s+que|existe|pour|tout|de|si|alors|sinon|initial)\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.control.catala_fr</string>
|
||||
</dict>
|
||||
|
15
tests/test_bool/bad/bad_assert.catala_en
Normal file
15
tests/test_bool/bad/bad_assert.catala_en
Normal file
@ -0,0 +1,15 @@
|
||||
## Test
|
||||
|
||||
```catala
|
||||
declaration scope Foo:
|
||||
internal x content integer
|
||||
|
||||
scope Foo:
|
||||
definition x equals 0
|
||||
assertion x
|
||||
```
|
||||
|
||||
|
||||
```catala-test {id="Foo"}
|
||||
catala Interpret -s Foo
|
||||
```
|
24
tests/test_bool/bad/output/bad_assert.catala_en.Foo
Normal file
24
tests/test_bool/bad/output/bad_assert.catala_en.Foo
Normal file
@ -0,0 +1,24 @@
|
||||
[ERROR] Error during typechecking, incompatible types:
|
||||
--> bool
|
||||
--> integer
|
||||
|
||||
Error coming from typechecking the following expression:
|
||||
--> tests/test_bool/bad/bad_assert.catala_en
|
||||
|
|
||||
9 | assertion x
|
||||
| ^
|
||||
+ Test
|
||||
|
||||
Type bool coming from expression:
|
||||
--> tests/test_bool/bad/bad_assert.catala_en
|
||||
|
|
||||
9 | assertion x
|
||||
| ^
|
||||
+ Test
|
||||
|
||||
Type integer coming from expression:
|
||||
--> tests/test_bool/bad/bad_assert.catala_en
|
||||
|
|
||||
8 | definition x equals 0
|
||||
| ^
|
||||
+ Test
|
20
tests/test_exception/good/context_with_default.catala_en
Normal file
20
tests/test_exception/good/context_with_default.catala_en
Normal file
@ -0,0 +1,20 @@
|
||||
## Foo
|
||||
|
||||
```catala
|
||||
declaration scope Foo:
|
||||
context output x condition
|
||||
|
||||
declaration scope Bar:
|
||||
foo scope Foo
|
||||
|
||||
scope Foo:
|
||||
rule x fulfilled
|
||||
|
||||
scope Bar:
|
||||
rule foo.x under condition 1 = 2 consequence fulfilled
|
||||
assertion foo.x
|
||||
```
|
||||
|
||||
```catala-test {id="Bar"}
|
||||
catala Interpret -s Bar
|
||||
```
|
@ -0,0 +1 @@
|
||||
[RESULT] Computation successful!
|
Loading…
Reference in New Issue
Block a user