From 3f5027e5a50e93a39ab325d835953d9c9225a58c Mon Sep 17 00:00:00 2001 From: Denis Merigoux Date: Thu, 24 Jun 2021 22:55:27 +0200 Subject: [PATCH] Translation now typechecks --- Makefile | 2 + french_law/python/Makefile | 3 + french_law/python/allocations_familiales.py | 3405 ++++++++++--------- french_law/python/catala_runtime.py | 344 +- french_law/python/dependencies.txt | 2 + 5 files changed, 2033 insertions(+), 1723 deletions(-) diff --git a/Makefile b/Makefile index 594d1108..bcb8c88e 100644 --- a/Makefile +++ b/Makefile @@ -228,6 +228,8 @@ build_french_law_library_js: generate_french_law_library_ocaml format #> generate_french_law_library_python : Generates the French law library Python sources from Catala generate_french_law_library_python:\ $(FRENCH_LAW_PYTHON_LIB_DIR)/allocations_familiales.py + . $(FRENCH_LAW_PYTHON_LIB_DIR)/env/bin/activate ;\ + $(MAKE) -C $(FRENCH_LAW_PYTHON_LIB_DIR) format #> type_french_law_library_python : Types the French law library Python sources with mypy type_french_law_library_python: generate_french_law_library_python diff --git a/french_law/python/Makefile b/french_law/python/Makefile index c380edbd..35c24ad8 100644 --- a/french_law/python/Makefile +++ b/french_law/python/Makefile @@ -6,6 +6,9 @@ dependencies: type: mypy $(SOURCES) +format: + autopep8 --in-place $(SOURCES) + doc: mkdir -p doc sphinx-build ./ doc diff --git a/french_law/python/allocations_familiales.py b/french_law/python/allocations_familiales.py index 69e4c6c8..09b38b01 100644 --- a/french_law/python/allocations_familiales.py +++ b/french_law/python/allocations_familiales.py @@ -4,6 +4,7 @@ from .catala_runtime import * from typing import Any, List, Callable, Tuple from enum import Enum + class PriseEnCharge_Code(Enum): GardeAlterneePartageAllocations = 0 GardeAlterneeAllocataireUnique = 1 @@ -11,20 +12,24 @@ class PriseEnCharge_Code(Enum): ServicesSociauxAllocationVerseeALaFamille = 3 ServicesSociauxAllocationVerseeAuxServicesSociaux = 4 + class PriseEnCharge: - def __init__(self, code: PriseEnCharge_Code, value: Any) -> None: - self.code = code - self.value = value + def __init__(self, code: PriseEnCharge_Code, value: Any) -> None: + self.code = code + self.value = value + class SituationObligationScolaire_Code(Enum): Avant = 0 Pendant = 1 Apres = 2 + class SituationObligationScolaire: - def __init__(self, code: SituationObligationScolaire_Code, value: Any) -> None: - self.code = code - self.value = value + def __init__(self, code: SituationObligationScolaire_Code, value: Any) -> None: + self.code = code + self.value = value + class Collectivite_Code(Enum): Guadeloupe = 0 @@ -37,29 +42,35 @@ class Collectivite_Code(Enum): SaintPierreEtMiquelon = 7 Mayotte = 8 + class Collectivite: - def __init__(self, code: Collectivite_Code, value: Any) -> None: - self.code = code - self.value = value + def __init__(self, code: Collectivite_Code, value: Any) -> None: + self.code = code + self.value = value + class PriseEnCompte_Code(Enum): Complete = 0 Partagee = 1 Zero = 2 + class PriseEnCompte: - def __init__(self, code: PriseEnCompte_Code, value: Any) -> None: - self.code = code - self.value = value + def __init__(self, code: PriseEnCompte_Code, value: Any) -> None: + self.code = code + self.value = value + class VersementAllocations_Code(Enum): Normal = 0 AllocationVerseeAuxServicesSociaux = 1 + class VersementAllocations: - def __init__(self, code: VersementAllocations_Code, value: Any) -> None: - self.code = code - self.value = value + def __init__(self, code: VersementAllocations_Code, value: Any) -> None: + self.code = code + self.value = value + class ElementPrestationsFamiliales_Code(Enum): PrestationAccueilJeuneEnfant = 0 @@ -71,220 +82,206 @@ class ElementPrestationsFamiliales_Code(Enum): AllocationRentreeScolaire = 6 AllocationJournalierePresenceParentale = 7 + class ElementPrestationsFamiliales: - def __init__(self, code: ElementPrestationsFamiliales_Code, value: Any) -> None: - self.code = code - self.value = value + def __init__(self, code: ElementPrestationsFamiliales_Code, value: Any) -> None: + self.code = code + self.value = value + class EnfantEntree: - def __init__(self, d_identifiant: Integer, d_remuneration_mensuelle: Money, d_date_de_naissance: Date, d_prise_en_charge: PriseEnCharge, d_a_deja_ouvert_droit_aux_allocations_familiales: bool) -> None: - self.d_identifiant = d_identifiant - self.d_remuneration_mensuelle = d_remuneration_mensuelle - self.d_date_de_naissance = d_date_de_naissance - self.d_prise_en_charge = d_prise_en_charge - self.d_a_deja_ouvert_droit_aux_allocations_familiales = d_a_deja_ouvert_droit_aux_allocations_familiales - + def __init__(self, d_identifiant: Integer, d_remuneration_mensuelle: Money, d_date_de_naissance: Date, d_prise_en_charge: PriseEnCharge, d_a_deja_ouvert_droit_aux_allocations_familiales: bool) -> None: + self.d_identifiant = d_identifiant + self.d_remuneration_mensuelle = d_remuneration_mensuelle + self.d_date_de_naissance = d_date_de_naissance + self.d_prise_en_charge = d_prise_en_charge + self.d_a_deja_ouvert_droit_aux_allocations_familiales = d_a_deja_ouvert_droit_aux_allocations_familiales 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) -> 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 - + 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) -> 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 class SmicOut: - def __init__(self, date_courante_out: Date, residence_out: Collectivite, brut_horaire_out: Money) -> None: - self.date_courante_out = date_courante_out - self.residence_out = residence_out - self.brut_horaire_out = brut_horaire_out - + def __init__(self, date_courante_out: Date, residence_out: Collectivite, brut_horaire_out: Money) -> None: + self.date_courante_out = date_courante_out + self.residence_out = residence_out + self.brut_horaire_out = brut_horaire_out class SmicIn: - def __init__(self, date_courante_in: Callable[[Unit], Date], residence_in: Callable[[Unit], Collectivite], brut_horaire_in: Callable[[Unit], Money]) -> None: - self.date_courante_in = date_courante_in - self.residence_in = residence_in - self.brut_horaire_in = brut_horaire_in - + def __init__(self, date_courante_in: Callable[[Unit], Date], residence_in: Callable[[Unit], Collectivite], brut_horaire_in: Callable[[Unit], Money]) -> None: + self.date_courante_in = date_courante_in + self.residence_in = residence_in + self.brut_horaire_in = brut_horaire_in class PrestationsFamilialesOut: - def __init__(self, droit_ouvert_out: Callable[[Enfant], bool], conditions_hors_age_out: Callable[[Enfant], bool], plafond_l512_3_2_out: Money, age_l512_3_2_out: Integer, regime_outre_mer_l751_1_out: bool, date_courante_out: Date, prestation_courante_out: ElementPrestationsFamiliales, residence_out: Collectivite, base_mensuelle_out: Money) -> None: - self.droit_ouvert_out = droit_ouvert_out - self.conditions_hors_age_out = conditions_hors_age_out - self.plafond_l512_3_2_out = plafond_l512_3_2_out - self.age_l512_3_2_out = age_l512_3_2_out - self.regime_outre_mer_l751_1_out = regime_outre_mer_l751_1_out - self.date_courante_out = date_courante_out - self.prestation_courante_out = prestation_courante_out - self.residence_out = residence_out - self.base_mensuelle_out = base_mensuelle_out - + def __init__(self, droit_ouvert_out: Callable[[Enfant], bool], conditions_hors_age_out: Callable[[Enfant], bool], plafond_l512_3_2_out: Money, age_l512_3_2_out: Integer, regime_outre_mer_l751_1_out: bool, date_courante_out: Date, prestation_courante_out: ElementPrestationsFamiliales, residence_out: Collectivite, base_mensuelle_out: Money) -> None: + self.droit_ouvert_out = droit_ouvert_out + self.conditions_hors_age_out = conditions_hors_age_out + self.plafond_l512_3_2_out = plafond_l512_3_2_out + self.age_l512_3_2_out = age_l512_3_2_out + self.regime_outre_mer_l751_1_out = regime_outre_mer_l751_1_out + self.date_courante_out = date_courante_out + self.prestation_courante_out = prestation_courante_out + self.residence_out = residence_out + self.base_mensuelle_out = base_mensuelle_out class PrestationsFamilialesIn: - def __init__(self, droit_ouvert_in: Callable[[Unit], (Callable[[Enfant], bool])], conditions_hors_age_in: Callable[[Unit], (Callable[[Enfant], bool])], plafond_l512_3_2_in: Callable[[Unit], Money], age_l512_3_2_in: Callable[[Unit], Integer], regime_outre_mer_l751_1_in: Callable[[Unit], bool], date_courante_in: Callable[[Unit], Date], prestation_courante_in: Callable[[Unit], ElementPrestationsFamiliales], residence_in: Callable[[Unit], Collectivite], base_mensuelle_in: Callable[[Unit], Money]) -> None: - self.droit_ouvert_in = droit_ouvert_in - self.conditions_hors_age_in = conditions_hors_age_in - self.plafond_l512_3_2_in = plafond_l512_3_2_in - self.age_l512_3_2_in = age_l512_3_2_in - self.regime_outre_mer_l751_1_in = regime_outre_mer_l751_1_in - self.date_courante_in = date_courante_in - self.prestation_courante_in = prestation_courante_in - self.residence_in = residence_in - self.base_mensuelle_in = base_mensuelle_in - + def __init__(self, droit_ouvert_in: Callable[[Unit], (Callable[[Enfant], bool])], conditions_hors_age_in: Callable[[Unit], (Callable[[Enfant], bool])], plafond_l512_3_2_in: Callable[[Unit], Money], age_l512_3_2_in: Callable[[Unit], Integer], regime_outre_mer_l751_1_in: Callable[[Unit], bool], date_courante_in: Callable[[Unit], Date], prestation_courante_in: Callable[[Unit], ElementPrestationsFamiliales], residence_in: Callable[[Unit], Collectivite], base_mensuelle_in: Callable[[Unit], Money]) -> None: + self.droit_ouvert_in = droit_ouvert_in + self.conditions_hors_age_in = conditions_hors_age_in + self.plafond_l512_3_2_in = plafond_l512_3_2_in + self.age_l512_3_2_in = age_l512_3_2_in + self.regime_outre_mer_l751_1_in = regime_outre_mer_l751_1_in + self.date_courante_in = date_courante_in + self.prestation_courante_in = prestation_courante_in + self.residence_in = residence_in + self.base_mensuelle_in = base_mensuelle_in class AllocationFamilialesAvril2008Out: - def __init__(self, age_minimum_alinea_1_l521_3_out: Integer) -> None: - self.age_minimum_alinea_1_l521_3_out = age_minimum_alinea_1_l521_3_out - + def __init__(self, age_minimum_alinea_1_l521_3_out: Integer) -> None: + self.age_minimum_alinea_1_l521_3_out = age_minimum_alinea_1_l521_3_out class AllocationFamilialesAvril2008In: - def __init__(self, age_minimum_alinea_1_l521_3_in: Callable[[Unit], Integer]) -> None: - self.age_minimum_alinea_1_l521_3_in = age_minimum_alinea_1_l521_3_in - + def __init__(self, age_minimum_alinea_1_l521_3_in: Callable[[Unit], Integer]) -> None: + self.age_minimum_alinea_1_l521_3_in = age_minimum_alinea_1_l521_3_in class EnfantLePlusAgeOut: - def __init__(self, enfants_out: List[Enfant], le_plus_age_out: Enfant) -> None: - self.enfants_out = enfants_out - self.le_plus_age_out = le_plus_age_out - + def __init__(self, enfants_out: List[Enfant], le_plus_age_out: Enfant) -> None: + self.enfants_out = enfants_out + self.le_plus_age_out = le_plus_age_out class EnfantLePlusAgeIn: - def __init__(self, enfants_in: Callable[[Unit], (List[Enfant])], le_plus_age_in: Callable[[Unit], Enfant]) -> None: - self.enfants_in = enfants_in - self.le_plus_age_in = le_plus_age_in - + def __init__(self, enfants_in: Callable[[Unit], (List[Enfant])], le_plus_age_in: Callable[[Unit], Enfant]) -> None: + self.enfants_in = enfants_in + self.le_plus_age_in = le_plus_age_in class AllocationsFamilialesOut: - def __init__(self, personne_charge_effective_permanente_est_parent_out: bool, personne_charge_effective_permanente_remplit_titre_I_out: bool, ressources_menage_out: Money, residence_out: Collectivite, date_courante_out: Date, enfants_a_charge_out: List[Enfant], enfants_a_charge_droit_ouvert_prestation_familiale_out: List[Enfant], prise_en_compte_out: Callable[[Enfant], PriseEnCompte], versement_out: Callable[[Enfant], VersementAllocations], montant_verse_out: Money, droit_ouvert_base_out: bool, montant_initial_base_out: Money, montant_initial_base_premier_enfant_out: Money, montant_initial_base_deuxieme_enfant_out: Money, montant_initial_base_troisieme_enfant_et_plus_out: Money, rapport_enfants_total_moyen_out: Decimal, nombre_moyen_enfants_out: Decimal, nombre_total_enfants_out: Decimal, montant_avec_garde_alternee_base_out: Money, montant_verse_base_out: Money, droit_ouvert_forfaitaire_out: Callable[[Enfant], bool], montant_verse_forfaitaire_par_enfant_out: Money, montant_verse_forfaitaire_out: Money, droit_ouvert_majoration_out: Callable[[Enfant], bool], montant_initial_metropole_majoration_out: Callable[[Enfant], Money], montant_initial_majoration_out: Callable[[Enfant], Money], montant_avec_garde_alternee_majoration_out: Callable[[Enfant], Money], montant_verse_majoration_out: Money, droit_ouvert_complement_out: bool, montant_base_complement_pour_base_et_majoration_out: Money, complement_degressif_out: Callable[[Money], Money], montant_verse_complement_pour_base_et_majoration_out: Money, montant_verse_complement_pour_forfaitaire_out: Money, nombre_enfants_l521_1_out: Integer, age_minimum_alinea_1_l521_3_out: Callable[[Enfant], Integer], nombre_enfants_alinea_2_l521_3_out: Integer, est_enfant_le_plus_age_out: Callable[[Enfant], bool], plafond_I_d521_3_out: Money, plafond_II_d521_3_out: Money) -> None: - self.personne_charge_effective_permanente_est_parent_out = personne_charge_effective_permanente_est_parent_out - self.personne_charge_effective_permanente_remplit_titre_I_out = personne_charge_effective_permanente_remplit_titre_I_out - self.ressources_menage_out = ressources_menage_out - self.residence_out = residence_out - self.date_courante_out = date_courante_out - self.enfants_a_charge_out = enfants_a_charge_out - self.enfants_a_charge_droit_ouvert_prestation_familiale_out = enfants_a_charge_droit_ouvert_prestation_familiale_out - self.prise_en_compte_out = prise_en_compte_out - self.versement_out = versement_out - self.montant_verse_out = montant_verse_out - self.droit_ouvert_base_out = droit_ouvert_base_out - self.montant_initial_base_out = montant_initial_base_out - self.montant_initial_base_premier_enfant_out = montant_initial_base_premier_enfant_out - self.montant_initial_base_deuxieme_enfant_out = montant_initial_base_deuxieme_enfant_out - self.montant_initial_base_troisieme_enfant_et_plus_out = montant_initial_base_troisieme_enfant_et_plus_out - self.rapport_enfants_total_moyen_out = rapport_enfants_total_moyen_out - self.nombre_moyen_enfants_out = nombre_moyen_enfants_out - self.nombre_total_enfants_out = nombre_total_enfants_out - self.montant_avec_garde_alternee_base_out = montant_avec_garde_alternee_base_out - self.montant_verse_base_out = montant_verse_base_out - self.droit_ouvert_forfaitaire_out = droit_ouvert_forfaitaire_out - self.montant_verse_forfaitaire_par_enfant_out = montant_verse_forfaitaire_par_enfant_out - self.montant_verse_forfaitaire_out = montant_verse_forfaitaire_out - self.droit_ouvert_majoration_out = droit_ouvert_majoration_out - self.montant_initial_metropole_majoration_out = montant_initial_metropole_majoration_out - self.montant_initial_majoration_out = montant_initial_majoration_out - self.montant_avec_garde_alternee_majoration_out = montant_avec_garde_alternee_majoration_out - self.montant_verse_majoration_out = montant_verse_majoration_out - self.droit_ouvert_complement_out = droit_ouvert_complement_out - self.montant_base_complement_pour_base_et_majoration_out = montant_base_complement_pour_base_et_majoration_out - self.complement_degressif_out = complement_degressif_out - self.montant_verse_complement_pour_base_et_majoration_out = montant_verse_complement_pour_base_et_majoration_out - self.montant_verse_complement_pour_forfaitaire_out = montant_verse_complement_pour_forfaitaire_out - self.nombre_enfants_l521_1_out = nombre_enfants_l521_1_out - self.age_minimum_alinea_1_l521_3_out = age_minimum_alinea_1_l521_3_out - self.nombre_enfants_alinea_2_l521_3_out = nombre_enfants_alinea_2_l521_3_out - self.est_enfant_le_plus_age_out = est_enfant_le_plus_age_out - self.plafond_I_d521_3_out = plafond_I_d521_3_out - self.plafond_II_d521_3_out = plafond_II_d521_3_out - + def __init__(self, personne_charge_effective_permanente_est_parent_out: bool, personne_charge_effective_permanente_remplit_titre_I_out: bool, ressources_menage_out: Money, residence_out: Collectivite, date_courante_out: Date, enfants_a_charge_out: List[Enfant], enfants_a_charge_droit_ouvert_prestation_familiale_out: List[Enfant], prise_en_compte_out: Callable[[Enfant], PriseEnCompte], versement_out: Callable[[Enfant], VersementAllocations], montant_verse_out: Money, droit_ouvert_base_out: bool, montant_initial_base_out: Money, montant_initial_base_premier_enfant_out: Money, montant_initial_base_deuxieme_enfant_out: Money, montant_initial_base_troisieme_enfant_et_plus_out: Money, rapport_enfants_total_moyen_out: Decimal, nombre_moyen_enfants_out: Decimal, nombre_total_enfants_out: Decimal, montant_avec_garde_alternee_base_out: Money, montant_verse_base_out: Money, droit_ouvert_forfaitaire_out: Callable[[Enfant], bool], montant_verse_forfaitaire_par_enfant_out: Money, montant_verse_forfaitaire_out: Money, droit_ouvert_majoration_out: Callable[[Enfant], bool], montant_initial_metropole_majoration_out: Callable[[Enfant], Money], montant_initial_majoration_out: Callable[[Enfant], Money], montant_avec_garde_alternee_majoration_out: Callable[[Enfant], Money], montant_verse_majoration_out: Money, droit_ouvert_complement_out: bool, montant_base_complement_pour_base_et_majoration_out: Money, complement_degressif_out: Callable[[Money], Money], montant_verse_complement_pour_base_et_majoration_out: Money, montant_verse_complement_pour_forfaitaire_out: Money, nombre_enfants_l521_1_out: Integer, age_minimum_alinea_1_l521_3_out: Callable[[Enfant], Integer], nombre_enfants_alinea_2_l521_3_out: Integer, est_enfant_le_plus_age_out: Callable[[Enfant], bool], plafond_I_d521_3_out: Money, plafond_II_d521_3_out: Money) -> None: + self.personne_charge_effective_permanente_est_parent_out = personne_charge_effective_permanente_est_parent_out + self.personne_charge_effective_permanente_remplit_titre_I_out = personne_charge_effective_permanente_remplit_titre_I_out + self.ressources_menage_out = ressources_menage_out + self.residence_out = residence_out + self.date_courante_out = date_courante_out + self.enfants_a_charge_out = enfants_a_charge_out + self.enfants_a_charge_droit_ouvert_prestation_familiale_out = enfants_a_charge_droit_ouvert_prestation_familiale_out + self.prise_en_compte_out = prise_en_compte_out + self.versement_out = versement_out + self.montant_verse_out = montant_verse_out + self.droit_ouvert_base_out = droit_ouvert_base_out + self.montant_initial_base_out = montant_initial_base_out + self.montant_initial_base_premier_enfant_out = montant_initial_base_premier_enfant_out + self.montant_initial_base_deuxieme_enfant_out = montant_initial_base_deuxieme_enfant_out + self.montant_initial_base_troisieme_enfant_et_plus_out = montant_initial_base_troisieme_enfant_et_plus_out + self.rapport_enfants_total_moyen_out = rapport_enfants_total_moyen_out + self.nombre_moyen_enfants_out = nombre_moyen_enfants_out + self.nombre_total_enfants_out = nombre_total_enfants_out + self.montant_avec_garde_alternee_base_out = montant_avec_garde_alternee_base_out + self.montant_verse_base_out = montant_verse_base_out + self.droit_ouvert_forfaitaire_out = droit_ouvert_forfaitaire_out + self.montant_verse_forfaitaire_par_enfant_out = montant_verse_forfaitaire_par_enfant_out + self.montant_verse_forfaitaire_out = montant_verse_forfaitaire_out + self.droit_ouvert_majoration_out = droit_ouvert_majoration_out + self.montant_initial_metropole_majoration_out = montant_initial_metropole_majoration_out + self.montant_initial_majoration_out = montant_initial_majoration_out + self.montant_avec_garde_alternee_majoration_out = montant_avec_garde_alternee_majoration_out + self.montant_verse_majoration_out = montant_verse_majoration_out + self.droit_ouvert_complement_out = droit_ouvert_complement_out + self.montant_base_complement_pour_base_et_majoration_out = montant_base_complement_pour_base_et_majoration_out + self.complement_degressif_out = complement_degressif_out + self.montant_verse_complement_pour_base_et_majoration_out = montant_verse_complement_pour_base_et_majoration_out + self.montant_verse_complement_pour_forfaitaire_out = montant_verse_complement_pour_forfaitaire_out + self.nombre_enfants_l521_1_out = nombre_enfants_l521_1_out + self.age_minimum_alinea_1_l521_3_out = age_minimum_alinea_1_l521_3_out + self.nombre_enfants_alinea_2_l521_3_out = nombre_enfants_alinea_2_l521_3_out + self.est_enfant_le_plus_age_out = est_enfant_le_plus_age_out + self.plafond_I_d521_3_out = plafond_I_d521_3_out + self.plafond_II_d521_3_out = plafond_II_d521_3_out class AllocationsFamilialesIn: - def __init__(self, personne_charge_effective_permanente_est_parent_in: Callable[[Unit], bool], personne_charge_effective_permanente_remplit_titre_I_in: Callable[[Unit], bool], ressources_menage_in: Callable[[Unit], Money], residence_in: Callable[[Unit], Collectivite], date_courante_in: Callable[[Unit], Date], enfants_a_charge_in: Callable[[Unit], (List[Enfant])], enfants_a_charge_droit_ouvert_prestation_familiale_in: Callable[[Unit], (List[Enfant])], prise_en_compte_in: Callable[[Unit], (Callable[[Enfant], PriseEnCompte])], versement_in: Callable[[Unit], (Callable[[Enfant], VersementAllocations])], montant_verse_in: Callable[[Unit], Money], droit_ouvert_base_in: Callable[[Unit], bool], montant_initial_base_in: Callable[[Unit], Money], montant_initial_base_premier_enfant_in: Callable[[Unit], Money], montant_initial_base_deuxieme_enfant_in: Callable[[Unit], Money], montant_initial_base_troisieme_enfant_et_plus_in: Callable[[Unit], Money], rapport_enfants_total_moyen_in: Callable[[Unit], Decimal], nombre_moyen_enfants_in: Callable[[Unit], Decimal], nombre_total_enfants_in: Callable[[Unit], Decimal], montant_avec_garde_alternee_base_in: Callable[[Unit], Money], montant_verse_base_in: Callable[[Unit], Money], droit_ouvert_forfaitaire_in: Callable[[Unit], (Callable[[Enfant], bool])], montant_verse_forfaitaire_par_enfant_in: Callable[[Unit], Money], montant_verse_forfaitaire_in: Callable[[Unit], Money], droit_ouvert_majoration_in: Callable[[Unit], (Callable[[Enfant], bool])], montant_initial_metropole_majoration_in: Callable[[Unit], (Callable[[Enfant], Money])], montant_initial_majoration_in: Callable[[Unit], (Callable[[Enfant], Money])], montant_avec_garde_alternee_majoration_in: Callable[[Unit], (Callable[[Enfant], Money])], montant_verse_majoration_in: Callable[[Unit], Money], droit_ouvert_complement_in: Callable[[Unit], bool], montant_base_complement_pour_base_et_majoration_in: Callable[[Unit], Money], complement_degressif_in: Callable[[Unit], (Callable[[Money], Money])], montant_verse_complement_pour_base_et_majoration_in: Callable[[Unit], Money], montant_verse_complement_pour_forfaitaire_in: Callable[[Unit], Money], nombre_enfants_l521_1_in: Callable[[Unit], Integer], age_minimum_alinea_1_l521_3_in: Callable[[Unit], (Callable[[Enfant], Integer])], nombre_enfants_alinea_2_l521_3_in: Callable[[Unit], Integer], est_enfant_le_plus_age_in: Callable[[Unit], (Callable[[Enfant], bool])], plafond_I_d521_3_in: Callable[[Unit], Money], plafond_II_d521_3_in: Callable[[Unit], Money]) -> None: - self.personne_charge_effective_permanente_est_parent_in = personne_charge_effective_permanente_est_parent_in - self.personne_charge_effective_permanente_remplit_titre_I_in = personne_charge_effective_permanente_remplit_titre_I_in - self.ressources_menage_in = ressources_menage_in - self.residence_in = residence_in - self.date_courante_in = date_courante_in - self.enfants_a_charge_in = enfants_a_charge_in - self.enfants_a_charge_droit_ouvert_prestation_familiale_in = enfants_a_charge_droit_ouvert_prestation_familiale_in - self.prise_en_compte_in = prise_en_compte_in - self.versement_in = versement_in - self.montant_verse_in = montant_verse_in - self.droit_ouvert_base_in = droit_ouvert_base_in - self.montant_initial_base_in = montant_initial_base_in - self.montant_initial_base_premier_enfant_in = montant_initial_base_premier_enfant_in - self.montant_initial_base_deuxieme_enfant_in = montant_initial_base_deuxieme_enfant_in - self.montant_initial_base_troisieme_enfant_et_plus_in = montant_initial_base_troisieme_enfant_et_plus_in - self.rapport_enfants_total_moyen_in = rapport_enfants_total_moyen_in - self.nombre_moyen_enfants_in = nombre_moyen_enfants_in - self.nombre_total_enfants_in = nombre_total_enfants_in - self.montant_avec_garde_alternee_base_in = montant_avec_garde_alternee_base_in - self.montant_verse_base_in = montant_verse_base_in - self.droit_ouvert_forfaitaire_in = droit_ouvert_forfaitaire_in - self.montant_verse_forfaitaire_par_enfant_in = montant_verse_forfaitaire_par_enfant_in - self.montant_verse_forfaitaire_in = montant_verse_forfaitaire_in - self.droit_ouvert_majoration_in = droit_ouvert_majoration_in - self.montant_initial_metropole_majoration_in = montant_initial_metropole_majoration_in - self.montant_initial_majoration_in = montant_initial_majoration_in - self.montant_avec_garde_alternee_majoration_in = montant_avec_garde_alternee_majoration_in - self.montant_verse_majoration_in = montant_verse_majoration_in - self.droit_ouvert_complement_in = droit_ouvert_complement_in - self.montant_base_complement_pour_base_et_majoration_in = montant_base_complement_pour_base_et_majoration_in - self.complement_degressif_in = complement_degressif_in - self.montant_verse_complement_pour_base_et_majoration_in = montant_verse_complement_pour_base_et_majoration_in - self.montant_verse_complement_pour_forfaitaire_in = montant_verse_complement_pour_forfaitaire_in - self.nombre_enfants_l521_1_in = nombre_enfants_l521_1_in - self.age_minimum_alinea_1_l521_3_in = age_minimum_alinea_1_l521_3_in - self.nombre_enfants_alinea_2_l521_3_in = nombre_enfants_alinea_2_l521_3_in - self.est_enfant_le_plus_age_in = est_enfant_le_plus_age_in - self.plafond_I_d521_3_in = plafond_I_d521_3_in - self.plafond_II_d521_3_in = plafond_II_d521_3_in - + def __init__(self, personne_charge_effective_permanente_est_parent_in: Callable[[Unit], bool], personne_charge_effective_permanente_remplit_titre_I_in: Callable[[Unit], bool], ressources_menage_in: Callable[[Unit], Money], residence_in: Callable[[Unit], Collectivite], date_courante_in: Callable[[Unit], Date], enfants_a_charge_in: Callable[[Unit], (List[Enfant])], enfants_a_charge_droit_ouvert_prestation_familiale_in: Callable[[Unit], (List[Enfant])], prise_en_compte_in: Callable[[Unit], (Callable[[Enfant], PriseEnCompte])], versement_in: Callable[[Unit], (Callable[[Enfant], VersementAllocations])], montant_verse_in: Callable[[Unit], Money], droit_ouvert_base_in: Callable[[Unit], bool], montant_initial_base_in: Callable[[Unit], Money], montant_initial_base_premier_enfant_in: Callable[[Unit], Money], montant_initial_base_deuxieme_enfant_in: Callable[[Unit], Money], montant_initial_base_troisieme_enfant_et_plus_in: Callable[[Unit], Money], rapport_enfants_total_moyen_in: Callable[[Unit], Decimal], nombre_moyen_enfants_in: Callable[[Unit], Decimal], nombre_total_enfants_in: Callable[[Unit], Decimal], montant_avec_garde_alternee_base_in: Callable[[Unit], Money], montant_verse_base_in: Callable[[Unit], Money], droit_ouvert_forfaitaire_in: Callable[[Unit], (Callable[[Enfant], bool])], montant_verse_forfaitaire_par_enfant_in: Callable[[Unit], Money], montant_verse_forfaitaire_in: Callable[[Unit], Money], droit_ouvert_majoration_in: Callable[[Unit], (Callable[[Enfant], bool])], montant_initial_metropole_majoration_in: Callable[[Unit], (Callable[[Enfant], Money])], montant_initial_majoration_in: Callable[[Unit], (Callable[[Enfant], Money])], montant_avec_garde_alternee_majoration_in: Callable[[Unit], (Callable[[Enfant], Money])], montant_verse_majoration_in: Callable[[Unit], Money], droit_ouvert_complement_in: Callable[[Unit], bool], montant_base_complement_pour_base_et_majoration_in: Callable[[Unit], Money], complement_degressif_in: Callable[[Unit], (Callable[[Money], Money])], montant_verse_complement_pour_base_et_majoration_in: Callable[[Unit], Money], montant_verse_complement_pour_forfaitaire_in: Callable[[Unit], Money], nombre_enfants_l521_1_in: Callable[[Unit], Integer], age_minimum_alinea_1_l521_3_in: Callable[[Unit], (Callable[[Enfant], Integer])], nombre_enfants_alinea_2_l521_3_in: Callable[[Unit], Integer], est_enfant_le_plus_age_in: Callable[[Unit], (Callable[[Enfant], bool])], plafond_I_d521_3_in: Callable[[Unit], Money], plafond_II_d521_3_in: Callable[[Unit], Money]) -> None: + self.personne_charge_effective_permanente_est_parent_in = personne_charge_effective_permanente_est_parent_in + self.personne_charge_effective_permanente_remplit_titre_I_in = personne_charge_effective_permanente_remplit_titre_I_in + self.ressources_menage_in = ressources_menage_in + self.residence_in = residence_in + self.date_courante_in = date_courante_in + self.enfants_a_charge_in = enfants_a_charge_in + self.enfants_a_charge_droit_ouvert_prestation_familiale_in = enfants_a_charge_droit_ouvert_prestation_familiale_in + self.prise_en_compte_in = prise_en_compte_in + self.versement_in = versement_in + self.montant_verse_in = montant_verse_in + self.droit_ouvert_base_in = droit_ouvert_base_in + self.montant_initial_base_in = montant_initial_base_in + self.montant_initial_base_premier_enfant_in = montant_initial_base_premier_enfant_in + self.montant_initial_base_deuxieme_enfant_in = montant_initial_base_deuxieme_enfant_in + self.montant_initial_base_troisieme_enfant_et_plus_in = montant_initial_base_troisieme_enfant_et_plus_in + self.rapport_enfants_total_moyen_in = rapport_enfants_total_moyen_in + self.nombre_moyen_enfants_in = nombre_moyen_enfants_in + self.nombre_total_enfants_in = nombre_total_enfants_in + self.montant_avec_garde_alternee_base_in = montant_avec_garde_alternee_base_in + self.montant_verse_base_in = montant_verse_base_in + self.droit_ouvert_forfaitaire_in = droit_ouvert_forfaitaire_in + self.montant_verse_forfaitaire_par_enfant_in = montant_verse_forfaitaire_par_enfant_in + self.montant_verse_forfaitaire_in = montant_verse_forfaitaire_in + self.droit_ouvert_majoration_in = droit_ouvert_majoration_in + self.montant_initial_metropole_majoration_in = montant_initial_metropole_majoration_in + self.montant_initial_majoration_in = montant_initial_majoration_in + self.montant_avec_garde_alternee_majoration_in = montant_avec_garde_alternee_majoration_in + self.montant_verse_majoration_in = montant_verse_majoration_in + self.droit_ouvert_complement_in = droit_ouvert_complement_in + self.montant_base_complement_pour_base_et_majoration_in = montant_base_complement_pour_base_et_majoration_in + self.complement_degressif_in = complement_degressif_in + self.montant_verse_complement_pour_base_et_majoration_in = montant_verse_complement_pour_base_et_majoration_in + self.montant_verse_complement_pour_forfaitaire_in = montant_verse_complement_pour_forfaitaire_in + self.nombre_enfants_l521_1_in = nombre_enfants_l521_1_in + self.age_minimum_alinea_1_l521_3_in = age_minimum_alinea_1_l521_3_in + self.nombre_enfants_alinea_2_l521_3_in = nombre_enfants_alinea_2_l521_3_in + self.est_enfant_le_plus_age_in = est_enfant_le_plus_age_in + self.plafond_I_d521_3_in = plafond_I_d521_3_in + self.plafond_II_d521_3_in = plafond_II_d521_3_in class InterfaceAllocationsFamilialesOut: - def __init__(self, date_courante_out: Date, enfants_out: List[EnfantEntree], enfants_a_charge_out: List[Enfant], ressources_menage_out: Money, residence_out: Collectivite, montant_verse_out: Money, personne_charge_effective_permanente_est_parent_out: bool, personne_charge_effective_permanente_remplit_titre_I_out: bool) -> None: - self.date_courante_out = date_courante_out - self.enfants_out = enfants_out - self.enfants_a_charge_out = enfants_a_charge_out - self.ressources_menage_out = ressources_menage_out - self.residence_out = residence_out - self.montant_verse_out = montant_verse_out - self.personne_charge_effective_permanente_est_parent_out = personne_charge_effective_permanente_est_parent_out - self.personne_charge_effective_permanente_remplit_titre_I_out = personne_charge_effective_permanente_remplit_titre_I_out - + def __init__(self, date_courante_out: Date, enfants_out: List[EnfantEntree], enfants_a_charge_out: List[Enfant], ressources_menage_out: Money, residence_out: Collectivite, montant_verse_out: Money, personne_charge_effective_permanente_est_parent_out: bool, personne_charge_effective_permanente_remplit_titre_I_out: bool) -> None: + self.date_courante_out = date_courante_out + self.enfants_out = enfants_out + self.enfants_a_charge_out = enfants_a_charge_out + self.ressources_menage_out = ressources_menage_out + self.residence_out = residence_out + self.montant_verse_out = montant_verse_out + self.personne_charge_effective_permanente_est_parent_out = personne_charge_effective_permanente_est_parent_out + self.personne_charge_effective_permanente_remplit_titre_I_out = personne_charge_effective_permanente_remplit_titre_I_out class InterfaceAllocationsFamilialesIn: - def __init__(self, date_courante_in: Callable[[Unit], Date], enfants_in: Callable[[Unit], (List[EnfantEntree])], enfants_a_charge_in: Callable[[Unit], (List[Enfant])], ressources_menage_in: Callable[[Unit], Money], residence_in: Callable[[Unit], Collectivite], montant_verse_in: Callable[[Unit], Money], personne_charge_effective_permanente_est_parent_in: Callable[[Unit], bool], personne_charge_effective_permanente_remplit_titre_I_in: Callable[[Unit], bool]) -> None: - self.date_courante_in = date_courante_in - self.enfants_in = enfants_in - self.enfants_a_charge_in = enfants_a_charge_in - self.ressources_menage_in = ressources_menage_in - self.residence_in = residence_in - self.montant_verse_in = montant_verse_in - self.personne_charge_effective_permanente_est_parent_in = personne_charge_effective_permanente_est_parent_in - self.personne_charge_effective_permanente_remplit_titre_I_in = personne_charge_effective_permanente_remplit_titre_I_in + def __init__(self, date_courante_in: Callable[[Unit], Date], enfants_in: Callable[[Unit], (List[EnfantEntree])], enfants_a_charge_in: Callable[[Unit], (List[Enfant])], ressources_menage_in: Callable[[Unit], Money], residence_in: Callable[[Unit], Collectivite], montant_verse_in: Callable[[Unit], Money], personne_charge_effective_permanente_est_parent_in: Callable[[Unit], bool], personne_charge_effective_permanente_remplit_titre_I_in: Callable[[Unit], bool]) -> None: + self.date_courante_in = date_courante_in + self.enfants_in = enfants_in + self.enfants_a_charge_in = enfants_a_charge_in + self.ressources_menage_in = ressources_menage_in + self.residence_in = residence_in + self.montant_verse_in = montant_verse_in + self.personne_charge_effective_permanente_est_parent_in = personne_charge_effective_permanente_est_parent_in + self.personne_charge_effective_permanente_remplit_titre_I_in = personne_charge_effective_permanente_remplit_titre_I_in - - - -def smic(smic_in_1:SmicIn): +def smic(smic_in_1: SmicIn): date_courante_2 = smic_in_1.date_courante_in residence_3 = smic_in_1.residence_in brut_horaire_4 = smic_in_1.brut_horaire_in @@ -292,158 +289,166 @@ def smic(smic_in_1:SmicIn): local_var_6 = date_courante_2(Unit()) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=42, start_column=12, end_line=42, end_column=25, - law_headings=["Prologue"])) + start_line=42, start_column=12, end_line=42, end_column=25, + law_headings=["Prologue"])) date_courante_5 = log_variable_definition(["Smic", "date_courante"], - local_var_6) + local_var_6) try: local_var_8 = residence_3(Unit()) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=43, start_column=12, end_line=43, end_column=21, - law_headings=["Prologue"])) + start_line=43, start_column=12, end_line=43, end_column=21, + law_headings=["Prologue"])) residence_7 = log_variable_definition(["Smic", "résidence"], - local_var_8) + local_var_8) try: try: local_var_10 = brut_horaire_4(Unit()) except EmptyError: - def local_var_21(_:Any): + def local_var_21(_: Any): if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=217, start_column=5, - end_line=226, end_column=6, law_headings=["Article 1", - "Décret n° 2018-1173 du 19 décembre 2018 portant relèvement du salaire minimum de croissance", - "Montant du salaire minimum de croissance"]), ((date_courante_5 >= - date_of_numbers(2019,1,1)) and ((date_courante_5 <= - date_of_numbers(2019,12,31)) and ((residence_7 == - Collectivite(Collectivite_Code.Metropole, Unit())) or - ((residence_7 == - Collectivite(Collectivite_Code.Guadeloupe, Unit())) or - ((residence_7 == Collectivite(Collectivite_Code.Guyane, - Unit())) or ((residence_7 == - Collectivite(Collectivite_Code.Martinique, Unit())) or - ((residence_7 == - Collectivite(Collectivite_Code.LaReunion, Unit())) or - ((residence_7 == - Collectivite(Collectivite_Code.SaintBarthelemy, - Unit())) or ((residence_7 == - Collectivite(Collectivite_Code.SaintMartin, Unit())) or - (residence_7 == - Collectivite(Collectivite_Code.SaintPierreEtMiquelon, - Unit())))))))))))): + start_line=217, start_column=5, + end_line=226, end_column=6, law_headings=["Article 1", + "Décret n° 2018-1173 du 19 décembre 2018 portant relèvement du salaire minimum de croissance", + "Montant du salaire minimum de croissance"]), ((date_courante_5 >= + date_of_numbers(2019, 1, 1)) and ((date_courante_5 <= + date_of_numbers(2019, 12, 31)) and ((residence_7 == + Collectivite(Collectivite_Code.Metropole, Unit())) or + ((residence_7 == + Collectivite(Collectivite_Code.Guadeloupe, Unit())) or + ((residence_7 == Collectivite(Collectivite_Code.Guyane, + Unit())) or ((residence_7 == + Collectivite(Collectivite_Code.Martinique, Unit())) or + ((residence_7 == + Collectivite(Collectivite_Code.LaReunion, Unit())) or + ((residence_7 == + Collectivite(Collectivite_Code.SaintBarthelemy, + Unit())) or ((residence_7 == + Collectivite(Collectivite_Code.SaintMartin, Unit())) or + (residence_7 == + Collectivite(Collectivite_Code.SaintPierreEtMiquelon, + Unit())))))))))))): return money_of_cents_string("1003") else: raise EmptyError - def local_var_19(_:Any): + + def local_var_19(_: Any): if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=235, start_column=5, - end_line=237, end_column=6, law_headings=["Article 1", - "Décret n° 2018-1173 du 19 décembre 2018 portant relèvement du salaire minimum de croissance", - "Montant du salaire minimum de croissance"]), ((date_courante_5 >= - date_of_numbers(2019,1,1)) and ((date_courante_5 <= - date_of_numbers(2019,12,31)) and (residence_7 == - Collectivite(Collectivite_Code.Mayotte, - Unit()))))): + start_line=235, start_column=5, + end_line=237, end_column=6, law_headings=["Article 1", + "Décret n° 2018-1173 du 19 décembre 2018 portant relèvement du salaire minimum de croissance", + "Montant du salaire minimum de croissance"]), ((date_courante_5 >= + date_of_numbers(2019, 1, 1)) and ((date_courante_5 <= + date_of_numbers(2019, 12, 31)) and (residence_7 == + Collectivite(Collectivite_Code.Mayotte, + Unit()))))): return money_of_cents_string("757") else: raise EmptyError - def local_var_17(_:Any): + + def local_var_17(_: Any): if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=256, start_column=5, - end_line=265, end_column=6, law_headings=["Article 1", - "Décret n° 2019-1387 du 18 décembre 2019 portant relèvement du salaire minimum de croissance", - "Montant du salaire minimum de croissance"]), ((date_courante_5 >= - date_of_numbers(2020,1,1)) and ((date_courante_5 <= - date_of_numbers(2020,12,31)) and ((residence_7 == - Collectivite(Collectivite_Code.Metropole, Unit())) or - ((residence_7 == - Collectivite(Collectivite_Code.Guadeloupe, Unit())) or - ((residence_7 == Collectivite(Collectivite_Code.Guyane, - Unit())) or ((residence_7 == - Collectivite(Collectivite_Code.Martinique, Unit())) or - ((residence_7 == - Collectivite(Collectivite_Code.LaReunion, Unit())) or - ((residence_7 == - Collectivite(Collectivite_Code.SaintBarthelemy, - Unit())) or ((residence_7 == - Collectivite(Collectivite_Code.SaintMartin, Unit())) or - (residence_7 == - Collectivite(Collectivite_Code.SaintPierreEtMiquelon, - Unit())))))))))))): + start_line=256, start_column=5, + end_line=265, end_column=6, law_headings=["Article 1", + "Décret n° 2019-1387 du 18 décembre 2019 portant relèvement du salaire minimum de croissance", + "Montant du salaire minimum de croissance"]), ((date_courante_5 >= + date_of_numbers(2020, 1, 1)) and ((date_courante_5 <= + date_of_numbers(2020, 12, 31)) and ((residence_7 == + Collectivite(Collectivite_Code.Metropole, Unit())) or + ((residence_7 == + Collectivite(Collectivite_Code.Guadeloupe, Unit())) or + ((residence_7 == Collectivite(Collectivite_Code.Guyane, + Unit())) or ((residence_7 == + Collectivite(Collectivite_Code.Martinique, Unit())) or + ((residence_7 == + Collectivite(Collectivite_Code.LaReunion, Unit())) or + ((residence_7 == + Collectivite(Collectivite_Code.SaintBarthelemy, + Unit())) or ((residence_7 == + Collectivite(Collectivite_Code.SaintMartin, Unit())) or + (residence_7 == + Collectivite(Collectivite_Code.SaintPierreEtMiquelon, + Unit())))))))))))): return money_of_cents_string("1015") else: raise EmptyError - def local_var_15(_:Any): + + def local_var_15(_: Any): if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=274, start_column=5, - end_line=276, end_column=6, law_headings=["Article 1", - "Décret n° 2019-1387 du 18 décembre 2019 portant relèvement du salaire minimum de croissance", - "Montant du salaire minimum de croissance"]), ((date_courante_5 >= - date_of_numbers(2020,1,1)) and ((date_courante_5 <= - date_of_numbers(2020,12,31)) and (residence_7 == - Collectivite(Collectivite_Code.Mayotte, - Unit()))))): + start_line=274, start_column=5, + end_line=276, end_column=6, law_headings=["Article 1", + "Décret n° 2019-1387 du 18 décembre 2019 portant relèvement du salaire minimum de croissance", + "Montant du salaire minimum de croissance"]), ((date_courante_5 >= + date_of_numbers(2020, 1, 1)) and ((date_courante_5 <= + date_of_numbers(2020, 12, 31)) and (residence_7 == + Collectivite(Collectivite_Code.Mayotte, + Unit()))))): return money_of_cents_string("766") else: raise EmptyError - def local_var_13(_:Any): + + def local_var_13(_: Any): if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=295, start_column=5, - end_line=304, end_column=6, law_headings=["Article 1", - "Décret n° 2020-1598 du 16 décembre 2020 portant relèvement du salaire minimum de croissance", - "Montant du salaire minimum de croissance"]), ((date_courante_5 >= - date_of_numbers(2021,1,1)) and ((date_courante_5 <= - date_of_numbers(2021,12,31)) and ((residence_7 == - Collectivite(Collectivite_Code.Metropole, Unit())) or - ((residence_7 == - Collectivite(Collectivite_Code.Guadeloupe, Unit())) or - ((residence_7 == Collectivite(Collectivite_Code.Guyane, - Unit())) or ((residence_7 == - Collectivite(Collectivite_Code.Martinique, Unit())) or - ((residence_7 == - Collectivite(Collectivite_Code.LaReunion, Unit())) or - ((residence_7 == - Collectivite(Collectivite_Code.SaintBarthelemy, - Unit())) or ((residence_7 == - Collectivite(Collectivite_Code.SaintMartin, Unit())) or - (residence_7 == - Collectivite(Collectivite_Code.SaintPierreEtMiquelon, - Unit())))))))))))): + start_line=295, start_column=5, + end_line=304, end_column=6, law_headings=["Article 1", + "Décret n° 2020-1598 du 16 décembre 2020 portant relèvement du salaire minimum de croissance", + "Montant du salaire minimum de croissance"]), ((date_courante_5 >= + date_of_numbers(2021, 1, 1)) and ((date_courante_5 <= + date_of_numbers(2021, 12, 31)) and ((residence_7 == + Collectivite(Collectivite_Code.Metropole, Unit())) or + ((residence_7 == + Collectivite(Collectivite_Code.Guadeloupe, Unit())) or + ((residence_7 == Collectivite(Collectivite_Code.Guyane, + Unit())) or ((residence_7 == + Collectivite(Collectivite_Code.Martinique, Unit())) or + ((residence_7 == + Collectivite(Collectivite_Code.LaReunion, Unit())) or + ((residence_7 == + Collectivite(Collectivite_Code.SaintBarthelemy, + Unit())) or ((residence_7 == + Collectivite(Collectivite_Code.SaintMartin, Unit())) or + (residence_7 == + Collectivite(Collectivite_Code.SaintPierreEtMiquelon, + Unit())))))))))))): return money_of_cents_string("1025") else: raise EmptyError - def local_var_11(_:Any): + + def local_var_11(_: Any): if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=313, start_column=5, - end_line=315, end_column=6, law_headings=["Article 1", - "Décret n° 2020-1598 du 16 décembre 2020 portant relèvement du salaire minimum de croissance", - "Montant du salaire minimum de croissance"]), ((date_courante_5 >= - date_of_numbers(2021,1,1)) and ((date_courante_5 <= - date_of_numbers(2021,12,31)) and (residence_7 == - Collectivite(Collectivite_Code.Mayotte, - Unit()))))): + start_line=313, start_column=5, + end_line=315, end_column=6, law_headings=["Article 1", + "Décret n° 2020-1598 du 16 décembre 2020 portant relèvement du salaire minimum de croissance", + "Montant du salaire minimum de croissance"]), ((date_courante_5 >= + date_of_numbers(2021, 1, 1)) and ((date_courante_5 <= + date_of_numbers(2021, 12, 31)) and (residence_7 == + Collectivite(Collectivite_Code.Mayotte, + Unit()))))): return money_of_cents_string("774") else: raise EmptyError - def local_var_23(_:Any): + + def local_var_23(_: Any): return log_decision_taken(SourcePosition(filename="", - start_line=0, start_column=1, end_line=0, end_column=1, - law_headings=[]), False) - def local_var_25(_:Any): + start_line=0, start_column=1, end_line=0, end_column=1, + law_headings=[]), False) + + def local_var_25(_: Any): raise EmptyError local_var_10 = handle_default([local_var_11, local_var_13, - local_var_15, local_var_17, local_var_19, local_var_21], - local_var_23, local_var_25) + local_var_15, local_var_17, local_var_19, local_var_21], + local_var_23, local_var_25) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=44, start_column=12, end_line=44, end_column=24, - law_headings=["Prologue"])) + start_line=44, start_column=12, end_line=44, end_column=24, + law_headings=["Prologue"])) brut_horaire_9 = log_variable_definition(["Smic", "brut_horaire"], - local_var_10) - return SmicOut(date_courante_out = date_courante_5, - residence_out = residence_7, brut_horaire_out = brut_horaire_9) + local_var_10) + return SmicOut(date_courante_out=date_courante_5, + residence_out=residence_7, brut_horaire_out=brut_horaire_9) -def allocation_familiales_avril2008(allocation_familiales_avril2008_in_27:AllocationFamilialesAvril2008In): + +def allocation_familiales_avril2008(allocation_familiales_avril2008_in_27: AllocationFamilialesAvril2008In): age_minimum_alinea_1_l521_3_28 = allocation_familiales_avril2008_in_27.age_minimum_alinea_1_l521_3_in try: try: @@ -452,56 +457,60 @@ def allocation_familiales_avril2008(allocation_familiales_avril2008_in_27:Alloca local_var_30 = integer_of_string("16") except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=82, start_column=12, end_line=82, end_column=39, - law_headings=["Prologue"])) + start_line=82, start_column=12, end_line=82, end_column=39, + law_headings=["Prologue"])) age_minimum_alinea_1_l521_3_29 = log_variable_definition(["AllocationFamilialesAvril2008", - "âge_minimum_alinéa_1_l521_3"], local_var_30) - return AllocationFamilialesAvril2008Out(age_minimum_alinea_1_l521_3_out = age_minimum_alinea_1_l521_3_29) + "âge_minimum_alinéa_1_l521_3"], local_var_30) + return AllocationFamilialesAvril2008Out(age_minimum_alinea_1_l521_3_out=age_minimum_alinea_1_l521_3_29) -def enfant_le_plus_age(enfant_le_plus_age_in_31:EnfantLePlusAgeIn): + +def enfant_le_plus_age(enfant_le_plus_age_in_31: EnfantLePlusAgeIn): enfants_32 = enfant_le_plus_age_in_31.enfants_in le_plus_age_33 = enfant_le_plus_age_in_31.le_plus_age_in try: local_var_35 = enfants_32(Unit()) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=85, start_column=12, end_line=85, end_column=19, - law_headings=["Prologue"])) + start_line=85, start_column=12, end_line=85, end_column=19, + law_headings=["Prologue"])) enfants_34 = log_variable_definition(["EnfantLePlusÂgé", "enfants"], - local_var_35) + local_var_35) try: try: local_var_37 = le_plus_age_33(Unit()) except EmptyError: - def local_var_39(potentiel_plus_age_40:Any): + def local_var_39(potentiel_plus_age_40: Any): return potentiel_plus_age_40.age predicate_38 = local_var_39 - def local_var_41(acc_42:Any, item_43:Any): + + def local_var_41(acc_42: Any, item_43: Any): if (predicate_38(acc_42) > - predicate_38(item_43)): + predicate_38(item_43)): return acc_42 else: return item_43 local_var_37 = list_fold_left(local_var_41, - Enfant(identifiant = - integer_of_string("1"), - obligation_scolaire = SituationObligationScolaire(SituationObligationScolaire_Code.Pendant, - Unit()), remuneration_mensuelle = money_of_cents_string("0"), - date_de_naissance = date_of_numbers(1900,1,1), - age = integer_of_string("0"), - prise_en_charge = PriseEnCharge(PriseEnCharge_Code.EffectiveEtPermanente, - Unit()), - a_deja_ouvert_droit_aux_allocations_familiales = False), - enfants_34) + Enfant(identifiant=- integer_of_string("1"), + obligation_scolaire=SituationObligationScolaire(SituationObligationScolaire_Code.Pendant, + Unit()), remuneration_mensuelle=money_of_cents_string("0"), + date_de_naissance=date_of_numbers( + 1900, 1, 1), + age=integer_of_string("0"), + prise_en_charge=PriseEnCharge(PriseEnCharge_Code.EffectiveEtPermanente, + Unit()), + a_deja_ouvert_droit_aux_allocations_familiales=False), + enfants_34) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=86, start_column=12, end_line=86, end_column=23, - law_headings=["Prologue"])) + start_line=86, start_column=12, end_line=86, end_column=23, + law_headings=["Prologue"])) le_plus_age_36 = log_variable_definition(["EnfantLePlusÂgé", - "le_plus_âgé"], local_var_37) - return EnfantLePlusAgeOut(enfants_out = enfants_34, - le_plus_age_out = le_plus_age_36) + "le_plus_âgé"], local_var_37) + return EnfantLePlusAgeOut(enfants_out=enfants_34, + le_plus_age_out=le_plus_age_36) -def prestations_familiales(prestations_familiales_in_44:PrestationsFamilialesIn): + +def prestations_familiales(prestations_familiales_in_44: PrestationsFamilialesIn): droit_ouvert_45 = prestations_familiales_in_44.droit_ouvert_in conditions_hors_age_46 = prestations_familiales_in_44.conditions_hors_age_in plafond_l512_3_2_47 = prestations_familiales_in_44.plafond_l512_3_2_in @@ -518,100 +527,107 @@ def prestations_familiales(prestations_familiales_in_44:PrestationsFamilialesIn) local_var_55 = integer_of_string("20") except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=69, start_column=12, end_line=69, end_column=24, - law_headings=["Prologue"])) + start_line=69, start_column=12, end_line=69, end_column=24, + law_headings=["Prologue"])) age_l512_3_2_54 = log_variable_definition(["PrestationsFamiliales", - "âge_l512_3_2"], local_var_55) + "âge_l512_3_2"], local_var_55) try: local_var_57 = date_courante_50(Unit()) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=71, start_column=12, end_line=71, end_column=25, - law_headings=["Prologue"])) + start_line=71, start_column=12, end_line=71, end_column=25, + law_headings=["Prologue"])) date_courante_56 = log_variable_definition(["PrestationsFamiliales", - "date_courante"], local_var_57) + "date_courante"], local_var_57) try: local_var_59 = prestation_courante_51(Unit()) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=72, start_column=12, end_line=72, end_column=31, - law_headings=["Prologue"])) + start_line=72, start_column=12, end_line=72, end_column=31, + law_headings=["Prologue"])) prestation_courante_58 = log_variable_definition(["PrestationsFamiliales", - "prestation_courante"], local_var_59) + "prestation_courante"], local_var_59) try: local_var_61 = residence_52(Unit()) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=73, start_column=12, end_line=73, end_column=21, - law_headings=["Prologue"])) + start_line=73, start_column=12, end_line=73, end_column=21, + law_headings=["Prologue"])) residence_60 = log_variable_definition(["PrestationsFamiliales", - "résidence"], local_var_61) + "résidence"], local_var_61) try: try: local_var_63 = base_mensuelle_53(Unit()) except EmptyError: - def local_var_68(_:Any): + def local_var_68(_: Any): if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=22, start_column=5, - end_line=23, end_column=34, - law_headings=["Instruction ministérielle N°DSS/SD2B/2019/65 du 25 mars 2019 relative à la revalorisation au 1er avril 2019 des prestations familiales servies en métropole", - "Montant de la base mensuelle des allocations familiales"]), ((date_courante_56 >= - date_of_numbers(2019,4,1)) and (date_courante_56 < - date_of_numbers(2020,4,1)))): + start_line=22, start_column=5, + end_line=23, end_column=34, + law_headings=["Instruction ministérielle N°DSS/SD2B/2019/65 du 25 mars 2019 relative à la revalorisation au 1er avril 2019 des prestations familiales servies en métropole", + "Montant de la base mensuelle des allocations familiales"]), ((date_courante_56 >= + date_of_numbers(2019, 4, 1)) and (date_courante_56 < + date_of_numbers(2020, 4, 1)))): return money_of_cents_string("41316") else: raise EmptyError - def local_var_66(_:Any): + + def local_var_66(_: Any): if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=42, start_column=5, - end_line=43, end_column=34, - law_headings=["Instruction interministérielle no DSS/SD2B/2020/33 du 18 février 2020 relative à la revalorisation au 1er avril 2020 des prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à La Réunion, à Saint-Barthélemy, à Saint-Martin et dans le département de Mayotte", - "Montant de la base mensuelle des allocations familiales"]), ((date_courante_56 >= - date_of_numbers(2020,4,1)) and (date_courante_56 < - date_of_numbers(2021,4,1)))): + start_line=42, start_column=5, + end_line=43, end_column=34, + law_headings=["Instruction interministérielle no DSS/SD2B/2020/33 du 18 février 2020 relative à la revalorisation au 1er avril 2020 des prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à La Réunion, à Saint-Barthélemy, à Saint-Martin et dans le département de Mayotte", + "Montant de la base mensuelle des allocations familiales"]), ((date_courante_56 >= + date_of_numbers(2020, 4, 1)) and (date_courante_56 < + date_of_numbers(2021, 4, 1)))): return money_of_cents_string("41404") else: raise EmptyError - def local_var_64(_:Any): + + def local_var_64(_: Any): if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=58, start_column=5, - end_line=59, end_column=34, - law_headings=["Instruction interministérielle n°DSS/2B/2021/65 du 19 mars 2021 relative à la revalorisation au 1er avril 2021 des prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et dans le département de Mayotte", - "Montant de la base mensuelle des allocations familiales"]), ((date_courante_56 >= - date_of_numbers(2021,4,1)) and (date_courante_56 < - date_of_numbers(2022,4,1)))): + start_line=58, start_column=5, + end_line=59, end_column=34, + law_headings=["Instruction interministérielle n°DSS/2B/2021/65 du 19 mars 2021 relative à la revalorisation au 1er avril 2021 des prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et dans le département de Mayotte", + "Montant de la base mensuelle des allocations familiales"]), ((date_courante_56 >= + date_of_numbers(2021, 4, 1)) and (date_courante_56 < + date_of_numbers(2022, 4, 1)))): return money_of_cents_string("41481") else: raise EmptyError - def local_var_70(_:Any): + + def local_var_70(_: Any): return log_decision_taken(SourcePosition(filename="", - start_line=0, start_column=1, end_line=0, end_column=1, - law_headings=[]), False) - def local_var_72(_:Any): + start_line=0, start_column=1, end_line=0, end_column=1, + law_headings=[]), False) + + def local_var_72(_: Any): raise EmptyError local_var_63 = handle_default([local_var_64, local_var_66, - local_var_68], local_var_70, local_var_72) + local_var_68], local_var_70, local_var_72) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=75, start_column=12, end_line=75, end_column=26, - law_headings=["Prologue"])) + start_line=75, start_column=12, end_line=75, end_column=26, + law_headings=["Prologue"])) base_mensuelle_62 = log_variable_definition(["PrestationsFamiliales", - "base_mensuelle"], local_var_63) - def local_var_75(_:Unit): + "base_mensuelle"], local_var_63) + + def local_var_75(_: Unit): return log_variable_definition(["PrestationsFamiliales", - "smic.date_courante"], date_courante_56) + "smic.date_courante"], date_courante_56) smic_dot_date_courante_74 = local_var_75 - def local_var_78(_:Unit): + + def local_var_78(_: Unit): return log_variable_definition(["PrestationsFamiliales", - "smic.résidence"], residence_60) + "smic.résidence"], residence_60) smic_dot_residence_77 = local_var_78 - def local_var_81(_:Unit): + + def local_var_81(_: Unit): raise EmptyError result_80 = log_end_call(["PrestationsFamiliales", "smic", "Smic"], - log_begin_call(["PrestationsFamiliales", "smic", "Smic"], smic, - SmicIn(date_courante_in = smic_dot_date_courante_74, - residence_in = smic_dot_residence_77, - brut_horaire_in = local_var_81))) + log_begin_call(["PrestationsFamiliales", "smic", "Smic"], smic, + SmicIn(date_courante_in=smic_dot_date_courante_74, + residence_in=smic_dot_residence_77, + brut_horaire_in=local_var_81))) smic_dot_date_courante_83 = result_80.date_courante_out smic_dot_residence_84 = result_80.residence_out smic_dot_brut_horaire_85 = result_80.brut_horaire_out @@ -621,25 +637,25 @@ def prestations_familiales(prestations_familiales_in_44:PrestationsFamilialesIn) except EmptyError: try: if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=354, start_column=5, - end_line=359, end_column=30, - law_headings=["Article L751-1", - "Chapitre 1er : Généralités", - "Titre 5 : Dispositions particulières à la Guadeloupe, à la Guyane, à la Martinique, à La Réunion, à Saint-Barthélemy et à Saint-Martin", - "Livre 7 : Régimes divers - Dispositions diverses", - "Partie législative", - "Code de la sécurité sociale"]), ((residence_60 == - Collectivite(Collectivite_Code.Guadeloupe, Unit())) or - ((residence_60 == Collectivite(Collectivite_Code.Guyane, - Unit())) or ((residence_60 == - Collectivite(Collectivite_Code.Martinique, Unit())) or - ((residence_60 == - Collectivite(Collectivite_Code.LaReunion, Unit())) or - ((residence_60 == - Collectivite(Collectivite_Code.SaintBarthelemy, - Unit())) or (residence_60 == - Collectivite(Collectivite_Code.SaintMartin, - Unit())))))))): + start_line=354, start_column=5, + end_line=359, end_column=30, + law_headings=["Article L751-1", + "Chapitre 1er : Généralités", + "Titre 5 : Dispositions particulières à la Guadeloupe, à la Guyane, à la Martinique, à La Réunion, à Saint-Barthélemy et à Saint-Martin", + "Livre 7 : Régimes divers - Dispositions diverses", + "Partie législative", + "Code de la sécurité sociale"]), ((residence_60 == + Collectivite(Collectivite_Code.Guadeloupe, Unit())) or + ((residence_60 == Collectivite(Collectivite_Code.Guyane, + Unit())) or ((residence_60 == + Collectivite(Collectivite_Code.Martinique, Unit())) or + ((residence_60 == + Collectivite(Collectivite_Code.LaReunion, Unit())) or + ((residence_60 == + Collectivite(Collectivite_Code.SaintBarthelemy, + Unit())) or (residence_60 == + Collectivite(Collectivite_Code.SaintMartin, + Unit())))))))): local_var_87 = True else: raise EmptyError @@ -647,43 +663,43 @@ def prestations_familiales(prestations_familiales_in_44:PrestationsFamilialesIn) local_var_87 = False except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=70, start_column=12, end_line=70, end_column=35, - law_headings=["Prologue"])) + start_line=70, start_column=12, end_line=70, end_column=35, + law_headings=["Prologue"])) regime_outre_mer_l751_1_86 = log_variable_definition(["PrestationsFamiliales", - "régime_outre_mer_l751_1"], local_var_87) + "régime_outre_mer_l751_1"], local_var_87) try: try: local_var_89 = plafond_l512_3_2_47(Unit()) except EmptyError: try: if log_decision_taken(SourcePosition(filename="./securite_sociale_R.catala_fr", - start_line=216, start_column=18, - end_line=216, end_column=41, - law_headings=["Article R755-0-2", - "Chapitre 5 : Prestations familiales et prestations assimilées", - "Titre 5 : Départements d'outre-mer", - "Livre 7 : Régimes divers - Dispositions diverses", - "Partie réglementaire - Décrets en Conseil d'Etat", - "Code de la sécurité sociale"]), regime_outre_mer_l751_1_86): + start_line=216, start_column=18, + end_line=216, end_column=41, + law_headings=["Article R755-0-2", + "Chapitre 5 : Prestations familiales et prestations assimilées", + "Titre 5 : Départements d'outre-mer", + "Livre 7 : Régimes divers - Dispositions diverses", + "Partie réglementaire - Décrets en Conseil d'Etat", + "Code de la sécurité sociale"]), regime_outre_mer_l751_1_86): local_var_89 = ((smic_dot_brut_horaire_85 * - decimal_of_string("0.55")) * - decimal_of_string("169.")) + decimal_of_string("0.55")) * + decimal_of_string("169.")) else: raise EmptyError except EmptyError: local_var_89 = ((smic_dot_brut_horaire_85 * - decimal_of_string("0.55")) * decimal_of_string("169.")) + decimal_of_string("0.55")) * decimal_of_string("169.")) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=68, start_column=12, end_line=68, end_column=28, - law_headings=["Prologue"])) + start_line=68, start_column=12, end_line=68, end_column=28, + law_headings=["Prologue"])) plafond_l512_3_2_88 = log_variable_definition(["PrestationsFamiliales", - "plafond_l512_3_2"], local_var_89) + "plafond_l512_3_2"], local_var_89) try: try: local_var_91 = conditions_hors_age_46(Unit()) except EmptyError: - def local_var_91(param_92:Enfant): + def local_var_91(param_92: Enfant): try: try: match_arg_658 = param_92.obligation_scolaire @@ -717,17 +733,17 @@ def prestations_familiales(prestations_familiales_in_44:PrestationsFamilialesIn) _ = match_arg_660.value local_var_93 = False if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=68, start_column=5, - end_line=71, end_column=57, - law_headings=["Article L512-3", - "Chapitre 2 : Champ d'application", - "Titre 1 : Champ d'application - Généralités", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), (local_var_93 or - (local_var_97 or (local_var_101 and - (param_92.remuneration_mensuelle <= - plafond_l512_3_2_88))))): + start_line=68, start_column=5, + end_line=71, end_column=57, + law_headings=["Article L512-3", + "Chapitre 2 : Champ d'application", + "Titre 1 : Champ d'application - Généralités", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), (local_var_93 or + (local_var_97 or (local_var_101 and + (param_92.remuneration_mensuelle <= + plafond_l512_3_2_88))))): return True else: raise EmptyError @@ -735,21 +751,21 @@ def prestations_familiales(prestations_familiales_in_44:PrestationsFamilialesIn) return False except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=67, start_column=12, end_line=67, - end_column=31, law_headings=["Prologue"])) + start_line=67, start_column=12, end_line=67, + end_column=31, law_headings=["Prologue"])) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=67, start_column=12, end_line=67, end_column=31, - law_headings=["Prologue"])) + start_line=67, start_column=12, end_line=67, end_column=31, + law_headings=["Prologue"])) conditions_hors_age_90 = log_variable_definition(["PrestationsFamiliales", - "conditions_hors_âge"], local_var_91) + "conditions_hors_âge"], local_var_91) try: try: local_var_106 = droit_ouvert_45(Unit()) except EmptyError: - def local_var_106(param_107:Enfant): + def local_var_106(param_107: Enfant): try: - def local_var_114(_:Any): + def local_var_114(_: Any): match_arg_661 = param_107.obligation_scolaire if match_arg_661.code == SituationObligationScolaire_Code.Avant: _ = match_arg_661.value @@ -771,19 +787,20 @@ def prestations_familiales(prestations_familiales_in_44:PrestationsFamilialesIn) _ = match_arg_662.value local_var_116 = False if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=49, start_column=5, - end_line=50, end_column=50, - law_headings=["Article L512-3", - "Chapitre 2 : Champ d'application", - "Titre 1 : Champ d'application - Généralités", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), (local_var_116 or - local_var_120)): + start_line=49, start_column=5, + end_line=50, end_column=50, + law_headings=["Article L512-3", + "Chapitre 2 : Champ d'application", + "Titre 1 : Champ d'application - Généralités", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), (local_var_116 or + local_var_120)): return True else: raise EmptyError - def local_var_108(_:Any): + + def local_var_108(_: Any): match_arg_663 = param_107.obligation_scolaire if match_arg_663.code == SituationObligationScolaire_Code.Avant: _ = match_arg_663.value @@ -795,48 +812,51 @@ def prestations_familiales(prestations_familiales_in_44:PrestationsFamilialesIn) _ = match_arg_663.value local_var_110 = True if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=60, start_column=5, - end_line=62, end_column=32, - law_headings=["Article L512-3", - "Chapitre 2 : Champ d'application", - "Titre 1 : Champ d'application - Généralités", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), (local_var_110 and - ((param_107.remuneration_mensuelle <= - plafond_l512_3_2_88) and (param_107.age < - age_l512_3_2_54)))): + start_line=60, start_column=5, + end_line=62, end_column=32, + law_headings=["Article L512-3", + "Chapitre 2 : Champ d'application", + "Titre 1 : Champ d'application - Généralités", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), (local_var_110 and + ((param_107.remuneration_mensuelle <= + plafond_l512_3_2_88) and (param_107.age < + age_l512_3_2_54)))): return True else: raise EmptyError - def local_var_124(_:Any): + + def local_var_124(_: Any): return log_decision_taken(SourcePosition(filename="", - start_line=0, start_column=1, - end_line=0, end_column=1, law_headings=[]), True) - def local_var_126(_:Any): + start_line=0, start_column=1, + end_line=0, end_column=1, law_headings=[]), True) + + def local_var_126(_: Any): return False return handle_default([local_var_108, local_var_114], - local_var_124, local_var_126) + local_var_124, local_var_126) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=66, start_column=12, end_line=66, - end_column=24, law_headings=["Prologue"])) + start_line=66, start_column=12, end_line=66, + end_column=24, law_headings=["Prologue"])) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=66, start_column=12, end_line=66, end_column=24, - law_headings=["Prologue"])) + start_line=66, start_column=12, end_line=66, end_column=24, + law_headings=["Prologue"])) droit_ouvert_105 = log_variable_definition(["PrestationsFamiliales", - "droit_ouvert"], local_var_106) - return PrestationsFamilialesOut(droit_ouvert_out = droit_ouvert_105, - conditions_hors_age_out = conditions_hors_age_90, - plafond_l512_3_2_out = plafond_l512_3_2_88, - age_l512_3_2_out = age_l512_3_2_54, - regime_outre_mer_l751_1_out = regime_outre_mer_l751_1_86, - date_courante_out = date_courante_56, - prestation_courante_out = prestation_courante_58, - residence_out = residence_60, base_mensuelle_out = base_mensuelle_62) + "droit_ouvert"], local_var_106) + return PrestationsFamilialesOut(droit_ouvert_out=droit_ouvert_105, + conditions_hors_age_out=conditions_hors_age_90, + plafond_l512_3_2_out=plafond_l512_3_2_88, + age_l512_3_2_out=age_l512_3_2_54, + regime_outre_mer_l751_1_out=regime_outre_mer_l751_1_86, + date_courante_out=date_courante_56, + prestation_courante_out=prestation_courante_58, + residence_out=residence_60, base_mensuelle_out=base_mensuelle_62) -def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn): + +def allocations_familiales(allocations_familiales_in_128: AllocationsFamilialesIn): personne_charge_effective_permanente_est_parent_129 = allocations_familiales_in_128.personne_charge_effective_permanente_est_parent_in personne_charge_effective_permanente_remplit_titre__i_130 = allocations_familiales_in_128.personne_charge_effective_permanente_remplit_titre_I_in ressources_menage_131 = allocations_familiales_in_128.ressources_menage_in @@ -878,66 +898,68 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn plafond__i_i_d521_3_167 = allocations_familiales_in_128.plafond_II_d521_3_in try: try: - local_var_169 = personne_charge_effective_permanente_est_parent_129(Unit()) + local_var_169 = personne_charge_effective_permanente_est_parent_129( + Unit()) except EmptyError: local_var_169 = False except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=91, start_column=12, end_line=91, end_column=59, - law_headings=["Prologue"])) + start_line=91, start_column=12, end_line=91, end_column=59, + law_headings=["Prologue"])) personne_charge_effective_permanente_est_parent_168 = log_variable_definition(["AllocationsFamiliales", - "personne_charge_effective_permanente_est_parent"], local_var_169) + "personne_charge_effective_permanente_est_parent"], local_var_169) try: try: - local_var_171 = personne_charge_effective_permanente_remplit_titre__i_130(Unit()) + local_var_171 = personne_charge_effective_permanente_remplit_titre__i_130( + Unit()) except EmptyError: local_var_171 = False except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=92, start_column=12, end_line=92, end_column=64, - law_headings=["Prologue"])) + start_line=92, start_column=12, end_line=92, end_column=64, + law_headings=["Prologue"])) personne_charge_effective_permanente_remplit_titre__i_170 = log_variable_definition(["AllocationsFamiliales", - "personne_charge_effective_permanente_remplit_titre_I"], - local_var_171) + "personne_charge_effective_permanente_remplit_titre_I"], + local_var_171) try: local_var_173 = ressources_menage_131(Unit()) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=93, start_column=12, end_line=93, end_column=29, - law_headings=["Prologue"])) + start_line=93, start_column=12, end_line=93, end_column=29, + law_headings=["Prologue"])) ressources_menage_172 = log_variable_definition(["AllocationsFamiliales", - "ressources_ménage"], local_var_173) + "ressources_ménage"], local_var_173) try: local_var_175 = residence_132(Unit()) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=94, start_column=12, end_line=94, end_column=21, - law_headings=["Prologue"])) + start_line=94, start_column=12, end_line=94, end_column=21, + law_headings=["Prologue"])) residence_174 = log_variable_definition(["AllocationsFamiliales", - "résidence"], local_var_175) + "résidence"], local_var_175) try: local_var_177 = date_courante_133(Unit()) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=97, start_column=12, end_line=97, end_column=25, - law_headings=["Prologue"])) + start_line=97, start_column=12, end_line=97, end_column=25, + law_headings=["Prologue"])) date_courante_176 = log_variable_definition(["AllocationsFamiliales", - "date_courante"], local_var_177) + "date_courante"], local_var_177) try: local_var_179 = enfants_a_charge_134(Unit()) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=100, start_column=12, end_line=100, end_column=28, - law_headings=["Prologue"])) + start_line=100, start_column=12, end_line=100, end_column=28, + law_headings=["Prologue"])) enfants_a_charge_178 = log_variable_definition(["AllocationsFamiliales", - "enfants_à_charge"], local_var_179) + "enfants_à_charge"], local_var_179) try: try: local_var_181 = prise_en_compte_136(Unit()) except EmptyError: - def local_var_181(param_182:Enfant): + def local_var_181(param_182: Enfant): try: - def local_var_215(_:Any): + def local_var_215(_: Any): match_arg_664 = param_182.prise_en_charge if match_arg_664.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: _ = match_arg_664.value @@ -955,19 +977,20 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn _ = match_arg_664.value local_var_217 = False if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=184, start_column=5, - end_line=184, end_column=60, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_217): + start_line=184, start_column=5, + end_line=184, end_column=60, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), local_var_217): return PriseEnCompte(PriseEnCompte_Code.Complete, - Unit()) + Unit()) else: raise EmptyError - def local_var_207(_:Any): + + def local_var_207(_: Any): match_arg_665 = param_182.prise_en_charge if match_arg_665.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: _ = match_arg_665.value @@ -985,19 +1008,20 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn _ = match_arg_665.value local_var_209 = False if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=204, start_column=5, - end_line=204, end_column=69, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_209): + start_line=204, start_column=5, + end_line=204, end_column=69, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), local_var_209): return PriseEnCompte(PriseEnCompte_Code.Complete, - Unit()) + Unit()) else: raise EmptyError - def local_var_199(_:Any): + + def local_var_199(_: Any): match_arg_666 = param_182.prise_en_charge if match_arg_666.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: _ = match_arg_666.value @@ -1015,19 +1039,20 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn _ = match_arg_666.value local_var_201 = False if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=214, start_column=5, - end_line=214, end_column=70, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_201): + start_line=214, start_column=5, + end_line=214, end_column=70, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), local_var_201): return PriseEnCompte(PriseEnCompte_Code.Partagee, - Unit()) + Unit()) else: raise EmptyError - def local_var_191(_:Any): + + def local_var_191(_: Any): match_arg_667 = param_182.prise_en_charge if match_arg_667.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: _ = match_arg_667.value @@ -1045,19 +1070,20 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn _ = match_arg_667.value local_var_193 = True if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=253, start_column=5, - end_line=254, end_column=56, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_193): + start_line=253, start_column=5, + end_line=254, end_column=56, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), local_var_193): return PriseEnCompte(PriseEnCompte_Code.Zero, - Unit()) + Unit()) else: raise EmptyError - def local_var_183(_:Any): + + def local_var_183(_: Any): match_arg_668 = param_182.prise_en_charge if match_arg_668.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: _ = match_arg_668.value @@ -1075,45 +1101,47 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn _ = match_arg_668.value local_var_185 = False if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=263, start_column=5, - end_line=264, end_column=48, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_185): + start_line=263, start_column=5, + end_line=264, end_column=48, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), local_var_185): return PriseEnCompte(PriseEnCompte_Code.Complete, - Unit()) + Unit()) else: raise EmptyError - def local_var_223(_:Any): + + def local_var_223(_: Any): return log_decision_taken(SourcePosition(filename="", - start_line=0, start_column=1, - end_line=0, end_column=1, - law_headings=[]), False) - def local_var_225(_:Any): + start_line=0, start_column=1, + end_line=0, end_column=1, + law_headings=[]), False) + + def local_var_225(_: Any): raise EmptyError return handle_default([local_var_183, local_var_191, - local_var_199, local_var_207, local_var_215], - local_var_223, local_var_225) + local_var_199, local_var_207, local_var_215], + local_var_223, local_var_225) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=103, start_column=12, end_line=103, - end_column=27, law_headings=["Prologue"])) + start_line=103, start_column=12, end_line=103, + end_column=27, law_headings=["Prologue"])) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=103, start_column=12, end_line=103, end_column=27, - law_headings=["Prologue"])) + start_line=103, start_column=12, end_line=103, end_column=27, + law_headings=["Prologue"])) prise_en_compte_180 = log_variable_definition(["AllocationsFamiliales", - "prise_en_compte"], local_var_181) + "prise_en_compte"], local_var_181) try: try: local_var_228 = versement_137(Unit()) except EmptyError: - def local_var_228(param_229:Enfant): + def local_var_228(param_229: Enfant): try: - def local_var_262(_:Any): + def local_var_262(_: Any): match_arg_669 = param_229.prise_en_charge if match_arg_669.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: _ = match_arg_669.value @@ -1131,19 +1159,20 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn _ = match_arg_669.value local_var_264 = False if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=188, start_column=5, - end_line=188, end_column=60, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_264): + start_line=188, start_column=5, + end_line=188, end_column=60, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), local_var_264): return VersementAllocations(VersementAllocations_Code.Normal, - Unit()) + Unit()) else: raise EmptyError - def local_var_254(_:Any): + + def local_var_254(_: Any): match_arg_670 = param_229.prise_en_charge if match_arg_670.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: _ = match_arg_670.value @@ -1161,19 +1190,20 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn _ = match_arg_670.value local_var_256 = False if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=208, start_column=5, - end_line=208, end_column=69, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_256): + start_line=208, start_column=5, + end_line=208, end_column=69, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), local_var_256): return VersementAllocations(VersementAllocations_Code.Normal, - Unit()) + Unit()) else: raise EmptyError - def local_var_246(_:Any): + + def local_var_246(_: Any): match_arg_671 = param_229.prise_en_charge if match_arg_671.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: _ = match_arg_671.value @@ -1191,19 +1221,20 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn _ = match_arg_671.value local_var_248 = False if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=218, start_column=5, - end_line=218, end_column=70, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_248): + start_line=218, start_column=5, + end_line=218, end_column=70, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), local_var_248): return VersementAllocations(VersementAllocations_Code.Normal, - Unit()) + Unit()) else: raise EmptyError - def local_var_238(_:Any): + + def local_var_238(_: Any): match_arg_672 = param_229.prise_en_charge if match_arg_672.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: _ = match_arg_672.value @@ -1221,19 +1252,20 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn _ = match_arg_672.value local_var_240 = True if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=258, start_column=5, - end_line=259, end_column=56, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_240): + start_line=258, start_column=5, + end_line=259, end_column=56, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), local_var_240): return VersementAllocations(VersementAllocations_Code.AllocationVerseeAuxServicesSociaux, - Unit()) + Unit()) else: raise EmptyError - def local_var_230(_:Any): + + def local_var_230(_: Any): match_arg_673 = param_229.prise_en_charge if match_arg_673.code == PriseEnCharge_Code.GardeAlterneePartageAllocations: _ = match_arg_673.value @@ -1251,38 +1283,40 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn _ = match_arg_673.value local_var_232 = False if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=269, start_column=5, - end_line=270, end_column=48, - law_headings=["Article L521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), local_var_232): + start_line=269, start_column=5, + end_line=270, end_column=48, + law_headings=["Article L521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), local_var_232): return VersementAllocations(VersementAllocations_Code.Normal, - Unit()) + Unit()) else: raise EmptyError - def local_var_270(_:Any): + + def local_var_270(_: Any): return log_decision_taken(SourcePosition(filename="", - start_line=0, start_column=1, - end_line=0, end_column=1, - law_headings=[]), False) - def local_var_272(_:Any): + start_line=0, start_column=1, + end_line=0, end_column=1, + law_headings=[]), False) + + def local_var_272(_: Any): raise EmptyError return handle_default([local_var_230, local_var_238, - local_var_246, local_var_254, local_var_262], - local_var_270, local_var_272) + local_var_246, local_var_254, local_var_262], + local_var_270, local_var_272) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=104, start_column=12, end_line=104, - end_column=21, law_headings=["Prologue"])) + start_line=104, start_column=12, end_line=104, + end_column=21, law_headings=["Prologue"])) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=104, start_column=12, end_line=104, end_column=21, - law_headings=["Prologue"])) + start_line=104, start_column=12, end_line=104, end_column=21, + law_headings=["Prologue"])) versement_227 = log_variable_definition(["AllocationsFamiliales", - "versement"], local_var_228) + "versement"], local_var_228) try: try: local_var_275 = nombre_enfants_l521_1_162(Unit()) @@ -1290,10 +1324,10 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn local_var_275 = integer_of_string("3") except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=145, start_column=12, end_line=145, end_column=33, - law_headings=["Prologue"])) + start_line=145, start_column=12, end_line=145, end_column=33, + law_headings=["Prologue"])) nombre_enfants_l521_1_274 = log_variable_definition(["AllocationsFamiliales", - "nombre_enfants_l521_1"], local_var_275) + "nombre_enfants_l521_1"], local_var_275) try: try: local_var_277 = nombre_enfants_alinea_2_l521_3_164(Unit()) @@ -1301,56 +1335,66 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn local_var_277 = integer_of_string("3") except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=147, start_column=12, end_line=147, end_column=42, - law_headings=["Prologue"])) + start_line=147, start_column=12, end_line=147, end_column=42, + law_headings=["Prologue"])) nombre_enfants_alinea_2_l521_3_276 = log_variable_definition(["AllocationsFamiliales", - "nombre_enfants_alinéa_2_l521_3"], local_var_277) - def local_var_279(_:Unit): + "nombre_enfants_alinéa_2_l521_3"], local_var_277) + + def local_var_279(_: Unit): raise EmptyError result_278 = log_end_call(["AllocationsFamiliales", "version_avril_2008", - "AllocationFamilialesAvril2008"], - log_begin_call(["AllocationsFamiliales", "version_avril_2008", - "AllocationFamilialesAvril2008"], allocation_familiales_avril2008, - AllocationFamilialesAvril2008In(age_minimum_alinea_1_l521_3_in = local_var_279))) + "AllocationFamilialesAvril2008"], + log_begin_call(["AllocationsFamiliales", "version_avril_2008", + "AllocationFamilialesAvril2008"], allocation_familiales_avril2008, + AllocationFamilialesAvril2008In(age_minimum_alinea_1_l521_3_in=local_var_279))) version_avril_2008_dot_age_minimum_alinea_1_l521_3_281 = result_278.age_minimum_alinea_1_l521_3_out - def local_var_283(_:Unit): + + def local_var_283(_: Unit): return log_variable_definition(["AllocationsFamiliales", - "prestations_familiales.date_courante"], date_courante_176) + "prestations_familiales.date_courante"], date_courante_176) prestations_familiales_dot_date_courante_282 = local_var_283 - def local_var_286(_:Unit): + + def local_var_286(_: Unit): return log_variable_definition(["AllocationsFamiliales", - "prestations_familiales.prestation_courante"], - ElementPrestationsFamiliales(ElementPrestationsFamiliales_Code.AllocationsFamiliales, - Unit())) + "prestations_familiales.prestation_courante"], + ElementPrestationsFamiliales(ElementPrestationsFamiliales_Code.AllocationsFamiliales, + Unit())) prestations_familiales_dot_prestation_courante_285 = local_var_286 - def local_var_289(_:Unit): + + def local_var_289(_: Unit): return log_variable_definition(["AllocationsFamiliales", - "prestations_familiales.résidence"], residence_174) + "prestations_familiales.résidence"], residence_174) prestations_familiales_dot_residence_288 = local_var_289 - def local_var_292(_:Unit): + + def local_var_292(_: Unit): raise EmptyError - def local_var_294(_:Unit): + + def local_var_294(_: Unit): raise EmptyError - def local_var_296(_:Unit): + + def local_var_296(_: Unit): raise EmptyError - def local_var_298(_:Unit): + + def local_var_298(_: Unit): raise EmptyError - def local_var_300(_:Unit): + + def local_var_300(_: Unit): raise EmptyError - def local_var_302(_:Unit): + + def local_var_302(_: Unit): raise EmptyError result_291 = log_end_call(["AllocationsFamiliales", - "prestations_familiales", "PrestationsFamiliales"], - log_begin_call(["AllocationsFamiliales", "prestations_familiales", - "PrestationsFamiliales"], prestations_familiales, - PrestationsFamilialesIn(droit_ouvert_in = local_var_292, - conditions_hors_age_in = local_var_294, - plafond_l512_3_2_in = local_var_296, age_l512_3_2_in = local_var_298, - regime_outre_mer_l751_1_in = local_var_300, - date_courante_in = prestations_familiales_dot_date_courante_282, - prestation_courante_in = prestations_familiales_dot_prestation_courante_285, - residence_in = prestations_familiales_dot_residence_288, - base_mensuelle_in = local_var_302))) + "prestations_familiales", "PrestationsFamiliales"], + log_begin_call(["AllocationsFamiliales", "prestations_familiales", + "PrestationsFamiliales"], prestations_familiales, + PrestationsFamilialesIn(droit_ouvert_in=local_var_292, + conditions_hors_age_in=local_var_294, + plafond_l512_3_2_in=local_var_296, age_l512_3_2_in=local_var_298, + regime_outre_mer_l751_1_in=local_var_300, + date_courante_in=prestations_familiales_dot_date_courante_282, + prestation_courante_in=prestations_familiales_dot_prestation_courante_285, + residence_in=prestations_familiales_dot_residence_288, + base_mensuelle_in=local_var_302))) prestations_familiales_dot_droit_ouvert_304 = result_291.droit_ouvert_out prestations_familiales_dot_conditions_hors_age_305 = result_291.conditions_hors_age_out prestations_familiales_dot_plafond_l512_3_2_306 = result_291.plafond_l512_3_2_out @@ -1360,38 +1404,40 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn prestations_familiales_dot_prestation_courante_310 = result_291.prestation_courante_out prestations_familiales_dot_residence_311 = result_291.residence_out prestations_familiales_dot_base_mensuelle_312 = result_291.base_mensuelle_out - def local_var_314(_:Unit): + + def local_var_314(_: Unit): return log_variable_definition(["AllocationsFamiliales", - "enfant_le_plus_âgé.enfants"], enfants_a_charge_178) + "enfant_le_plus_âgé.enfants"], enfants_a_charge_178) enfant_le_plus_age_dot_enfants_313 = local_var_314 - def local_var_317(_:Unit): + + def local_var_317(_: Unit): raise EmptyError result_316 = log_end_call(["AllocationsFamiliales", - "enfant_le_plus_âgé", "EnfantLePlusÂgé"], - log_begin_call(["AllocationsFamiliales", "enfant_le_plus_âgé", - "EnfantLePlusÂgé"], enfant_le_plus_age, - EnfantLePlusAgeIn(enfants_in = enfant_le_plus_age_dot_enfants_313, - le_plus_age_in = local_var_317))) + "enfant_le_plus_âgé", "EnfantLePlusÂgé"], + log_begin_call(["AllocationsFamiliales", "enfant_le_plus_âgé", + "EnfantLePlusÂgé"], enfant_le_plus_age, + EnfantLePlusAgeIn(enfants_in=enfant_le_plus_age_dot_enfants_313, + le_plus_age_in=local_var_317))) enfant_le_plus_age_dot_enfants_319 = result_316.enfants_out enfant_le_plus_age_dot_le_plus_age_320 = result_316.le_plus_age_out try: try: local_var_322 = age_minimum_alinea_1_l521_3_163(Unit()) except EmptyError: - def local_var_322(param_323:Enfant): + def local_var_322(param_323: Enfant): try: try: if log_decision_taken(SourcePosition(filename="./securite_sociale_R.catala_fr", - start_line=83, start_column=19, - end_line=83, end_column=69, - law_headings=["Article R521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets en Conseil d'Etat", - "Code de la sécurité sociale"]), ((param_323.date_de_naissance + - duration_of_numbers(11,0,0)) <= - date_of_numbers(2008,4,30))): + start_line=83, start_column=19, + end_line=83, end_column=69, + law_headings=["Article R521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets en Conseil d'Etat", + "Code de la sécurité sociale"]), ((param_323.date_de_naissance + + duration_of_numbers(11, 0, 0)) <= + date_of_numbers(2008, 4, 30))): return version_avril_2008_dot_age_minimum_alinea_1_l521_3_281 else: raise EmptyError @@ -1399,207 +1445,218 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn return integer_of_string("14") except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=146, start_column=12, end_line=146, - end_column=39, law_headings=["Prologue"])) + start_line=146, start_column=12, end_line=146, + end_column=39, law_headings=["Prologue"])) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=146, start_column=12, end_line=146, end_column=39, - law_headings=["Prologue"])) + start_line=146, start_column=12, end_line=146, end_column=39, + law_headings=["Prologue"])) age_minimum_alinea_1_l521_3_321 = log_variable_definition(["AllocationsFamiliales", - "âge_minimum_alinéa_1_l521_3"], local_var_322) + "âge_minimum_alinéa_1_l521_3"], local_var_322) try: try: - local_var_325 = enfants_a_charge_droit_ouvert_prestation_familiale_135(Unit()) + local_var_325 = enfants_a_charge_droit_ouvert_prestation_familiale_135( + Unit()) except EmptyError: - def local_var_326(enfant_327:Any): + def local_var_326(enfant_327: Any): return log_end_call(["PrestationsFamiliales", - "droit_ouvert"], - log_variable_definition(["PrestationsFamiliales", - "droit_ouvert", "output"], - log_begin_call(["PrestationsFamiliales", "droit_ouvert"], - prestations_familiales_dot_droit_ouvert_304, - log_variable_definition(["PrestationsFamiliales", - "droit_ouvert", "input"], enfant_327)))) + "droit_ouvert"], + log_variable_definition(["PrestationsFamiliales", + "droit_ouvert", "output"], + log_begin_call(["PrestationsFamiliales", "droit_ouvert"], + prestations_familiales_dot_droit_ouvert_304, + log_variable_definition(["PrestationsFamiliales", + "droit_ouvert", "input"], enfant_327)))) local_var_325 = list_filter(local_var_326, enfants_a_charge_178) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=101, start_column=12, end_line=101, end_column=62, - law_headings=["Prologue"])) + start_line=101, start_column=12, end_line=101, end_column=62, + law_headings=["Prologue"])) enfants_a_charge_droit_ouvert_prestation_familiale_324 = log_variable_definition(["AllocationsFamiliales", - "enfants_à_charge_droit_ouvert_prestation_familiale"], - local_var_325) + "enfants_à_charge_droit_ouvert_prestation_familiale"], + local_var_325) try: try: local_var_329 = est_enfant_le_plus_age_165(Unit()) except EmptyError: - def local_var_329(param_330:Enfant): + def local_var_329(param_330: Enfant): try: return (enfant_le_plus_age_dot_le_plus_age_320 == - param_330) + param_330) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=148, start_column=12, end_line=148, - end_column=34, law_headings=["Prologue"])) + start_line=148, start_column=12, end_line=148, + end_column=34, law_headings=["Prologue"])) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=148, start_column=12, end_line=148, end_column=34, - law_headings=["Prologue"])) + start_line=148, start_column=12, end_line=148, end_column=34, + law_headings=["Prologue"])) est_enfant_le_plus_age_328 = log_variable_definition(["AllocationsFamiliales", - "est_enfant_le_plus_âgé"], local_var_329) + "est_enfant_le_plus_âgé"], local_var_329) try: try: local_var_332 = plafond__i_i_d521_3_167(Unit()) except EmptyError: - def local_var_339(_:Any): + def local_var_339(_: Any): if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=92, start_column=5, - end_line=92, end_column=69, - law_headings=["Circulaire interministérielle N° DSS/SD2B/2017/352 du 22 décembre 2017 relative à la revalorisation au 1er janvier 2018 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", - "Montant des plafonds de ressources"]), ((date_courante_176 >= - date_of_numbers(2018,1,1)) and (date_courante_176 <= - date_of_numbers(2018,12,31)))): + start_line=92, start_column=5, + end_line=92, end_column=69, + law_headings=["Circulaire interministérielle N° DSS/SD2B/2017/352 du 22 décembre 2017 relative à la revalorisation au 1er janvier 2018 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", + "Montant des plafonds de ressources"]), ((date_courante_176 >= + date_of_numbers(2018, 1, 1)) and (date_courante_176 <= + date_of_numbers(2018, 12, 31)))): return (money_of_cents_string("7877000") + - (money_of_cents_string("562800") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) + (money_of_cents_string("562800") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) else: raise EmptyError - def local_var_337(_:Any): + + def local_var_337(_: Any): if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=125, start_column=5, - end_line=125, end_column=69, - law_headings=["Instruction interministérielle n° DSS/SD2B/2018/279 du 17 décembre 2018 relative à la revalorisation au 1er janvier 2019 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", - "Montant des plafonds de ressources"]), ((date_courante_176 >= - date_of_numbers(2019,1,1)) and (date_courante_176 <= - date_of_numbers(2019,12,31)))): + start_line=125, start_column=5, + end_line=125, end_column=69, + law_headings=["Instruction interministérielle n° DSS/SD2B/2018/279 du 17 décembre 2018 relative à la revalorisation au 1er janvier 2019 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", + "Montant des plafonds de ressources"]), ((date_courante_176 >= + date_of_numbers(2019, 1, 1)) and (date_courante_176 <= + date_of_numbers(2019, 12, 31)))): return (money_of_cents_string("7955800") + - (money_of_cents_string("568400") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) + (money_of_cents_string("568400") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) else: raise EmptyError - def local_var_335(_:Any): + + def local_var_335(_: Any): if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=158, start_column=5, - end_line=158, end_column=69, - law_headings=["Instruction interministerielle no DSS/SD2B/2019/261 du 18 décembre 2019 relative à la revalorisation au 1er janvier 2020 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à La Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", - "Montant des plafonds de ressources"]), ((date_courante_176 >= - date_of_numbers(2020,1,1)) and (date_courante_176 <= - date_of_numbers(2020,12,31)))): + start_line=158, start_column=5, + end_line=158, end_column=69, + law_headings=["Instruction interministerielle no DSS/SD2B/2019/261 du 18 décembre 2019 relative à la revalorisation au 1er janvier 2020 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à La Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", + "Montant des plafonds de ressources"]), ((date_courante_176 >= + date_of_numbers(2020, 1, 1)) and (date_courante_176 <= + date_of_numbers(2020, 12, 31)))): return (money_of_cents_string("8083100") + - (money_of_cents_string("577500") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) + (money_of_cents_string("577500") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) else: raise EmptyError - def local_var_333(_:Any): + + def local_var_333(_: Any): if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=194, start_column=5, - end_line=194, end_column=69, law_headings=["Article 1", - "Arrêté du 14 décembre 2020 relatif au montant des plafonds de ressources de certaines prestations familiales et aux tranches du barème applicable au recouvrement des indus et à la saisie des prestations", - "Montant des plafonds de ressources"]), ((date_courante_176 >= - date_of_numbers(2021,1,1)) and (date_courante_176 <= - date_of_numbers(2021,12,31)))): + start_line=194, start_column=5, + end_line=194, end_column=69, law_headings=["Article 1", + "Arrêté du 14 décembre 2020 relatif au montant des plafonds de ressources de certaines prestations familiales et aux tranches du barème applicable au recouvrement des indus et à la saisie des prestations", + "Montant des plafonds de ressources"]), ((date_courante_176 >= + date_of_numbers(2021, 1, 1)) and (date_courante_176 <= + date_of_numbers(2021, 12, 31)))): return (money_of_cents_string("8155800") + - (money_of_cents_string("582700") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) + (money_of_cents_string("582700") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) else: raise EmptyError - def local_var_341(_:Any): + + def local_var_341(_: Any): return log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=308, start_column=14, - end_line=308, end_column=31, - law_headings=["Article D521-3", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), True) - def local_var_343(_:Any): + start_line=308, start_column=14, + end_line=308, end_column=31, + law_headings=["Article D521-3", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), True) + + def local_var_343(_: Any): return (money_of_cents_string("7830000") + - (money_of_cents_string("559500") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) + (money_of_cents_string("559500") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) local_var_332 = handle_default([local_var_333, local_var_335, - local_var_337, local_var_339], local_var_341, local_var_343) + local_var_337, local_var_339], local_var_341, local_var_343) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=150, start_column=12, end_line=150, end_column=29, - law_headings=["Prologue"])) + start_line=150, start_column=12, end_line=150, end_column=29, + law_headings=["Prologue"])) plafond__i_i_d521_3_331 = log_variable_definition(["AllocationsFamiliales", - "plafond_II_d521_3"], local_var_332) + "plafond_II_d521_3"], local_var_332) try: try: local_var_346 = plafond__i_d521_3_166(Unit()) except EmptyError: - def local_var_353(_:Any): + def local_var_353(_: Any): if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=85, start_column=5, - end_line=85, end_column=69, - law_headings=["Circulaire interministérielle N° DSS/SD2B/2017/352 du 22 décembre 2017 relative à la revalorisation au 1er janvier 2018 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", - "Montant des plafonds de ressources"]), ((date_courante_176 >= - date_of_numbers(2018,1,1)) and (date_courante_176 <= - date_of_numbers(2018,12,31)))): + start_line=85, start_column=5, + end_line=85, end_column=69, + law_headings=["Circulaire interministérielle N° DSS/SD2B/2017/352 du 22 décembre 2017 relative à la revalorisation au 1er janvier 2018 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", + "Montant des plafonds de ressources"]), ((date_courante_176 >= + date_of_numbers(2018, 1, 1)) and (date_courante_176 <= + date_of_numbers(2018, 12, 31)))): return (money_of_cents_string("5628600") + - (money_of_cents_string("562800") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) + (money_of_cents_string("562800") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) else: raise EmptyError - def local_var_351(_:Any): + + def local_var_351(_: Any): if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=118, start_column=5, - end_line=118, end_column=69, - law_headings=["Instruction interministérielle n° DSS/SD2B/2018/279 du 17 décembre 2018 relative à la revalorisation au 1er janvier 2019 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", - "Montant des plafonds de ressources"]), ((date_courante_176 >= - date_of_numbers(2019,1,1)) and (date_courante_176 <= - date_of_numbers(2019,12,31)))): + start_line=118, start_column=5, + end_line=118, end_column=69, + law_headings=["Instruction interministérielle n° DSS/SD2B/2018/279 du 17 décembre 2018 relative à la revalorisation au 1er janvier 2019 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à la Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", + "Montant des plafonds de ressources"]), ((date_courante_176 >= + date_of_numbers(2019, 1, 1)) and (date_courante_176 <= + date_of_numbers(2019, 12, 31)))): return (money_of_cents_string("5684900") + - (money_of_cents_string("568400") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) + (money_of_cents_string("568400") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) else: raise EmptyError - def local_var_349(_:Any): + + def local_var_349(_: Any): if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=151, start_column=5, - end_line=151, end_column=69, - law_headings=["Instruction interministerielle no DSS/SD2B/2019/261 du 18 décembre 2019 relative à la revalorisation au 1er janvier 2020 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à La Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", - "Montant des plafonds de ressources"]), ((date_courante_176 >= - date_of_numbers(2020,1,1)) and (date_courante_176 <= - date_of_numbers(2020,12,31)))): + start_line=151, start_column=5, + end_line=151, end_column=69, + law_headings=["Instruction interministerielle no DSS/SD2B/2019/261 du 18 décembre 2019 relative à la revalorisation au 1er janvier 2020 des plafonds de ressources d’attribution de certaines prestations familiales servies en métropole, en Guadeloupe, en Guyane, en Martinique, à La Réunion, à Saint-Barthélemy, à Saint-Martin et à Mayotte", + "Montant des plafonds de ressources"]), ((date_courante_176 >= + date_of_numbers(2020, 1, 1)) and (date_courante_176 <= + date_of_numbers(2020, 12, 31)))): return (money_of_cents_string("5775900") + - (money_of_cents_string("577500") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) + (money_of_cents_string("577500") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) else: raise EmptyError - def local_var_347(_:Any): + + def local_var_347(_: Any): if log_decision_taken(SourcePosition(filename="./decrets_divers.catala_fr", - start_line=178, start_column=5, - end_line=178, end_column=69, law_headings=["Article 1", - "Arrêté du 14 décembre 2020 relatif au montant des plafonds de ressources de certaines prestations familiales et aux tranches du barème applicable au recouvrement des indus et à la saisie des prestations", - "Montant des plafonds de ressources"]), ((date_courante_176 >= - date_of_numbers(2021,1,1)) and (date_courante_176 <= - date_of_numbers(2021,12,31)))): + start_line=178, start_column=5, + end_line=178, end_column=69, law_headings=["Article 1", + "Arrêté du 14 décembre 2020 relatif au montant des plafonds de ressources de certaines prestations familiales et aux tranches du barème applicable au recouvrement des indus et à la saisie des prestations", + "Montant des plafonds de ressources"]), ((date_courante_176 >= + date_of_numbers(2021, 1, 1)) and (date_courante_176 <= + date_of_numbers(2021, 12, 31)))): return (money_of_cents_string("5827900") + - (money_of_cents_string("582700") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) + (money_of_cents_string("582700") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) else: raise EmptyError - def local_var_355(_:Any): + + def local_var_355(_: Any): return log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=298, start_column=14, - end_line=298, end_column=30, - law_headings=["Article D521-3", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), True) - def local_var_357(_:Any): + start_line=298, start_column=14, + end_line=298, end_column=30, + law_headings=["Article D521-3", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), True) + + def local_var_357(_: Any): return (money_of_cents_string("5595000") + - (money_of_cents_string("559500") * - decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) + (money_of_cents_string("559500") * + decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)))) local_var_346 = handle_default([local_var_347, local_var_349, - local_var_351, local_var_353], local_var_355, local_var_357) + local_var_351, local_var_353], local_var_355, local_var_357) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=149, start_column=12, end_line=149, end_column=28, - law_headings=["Prologue"])) + start_line=149, start_column=12, end_line=149, end_column=28, + law_headings=["Prologue"])) plafond__i_d521_3_345 = log_variable_definition(["AllocationsFamiliales", - "plafond_I_d521_3"], local_var_346) + "plafond_I_d521_3"], local_var_346) try: try: local_var_360 = droit_ouvert_complement_157(Unit()) @@ -1607,16 +1664,16 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn try: try: if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=426, start_column=5, - end_line=427, end_column=71, - law_headings=["Article L755-12", - "Chapitre 5 : Prestations familiales et prestations assimilées", - "Titre 5 : Dispositions particulières à la Guadeloupe, à la Guyane, à la Martinique, à La Réunion, à Saint-Barthélemy et à Saint-Martin", - "Livre 7 : Régimes divers - Dispositions diverses", - "Partie législative", - "Code de la sécurité sociale"]), (prestations_familiales_dot_regime_outre_mer_l751_1_308 and - (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) == - integer_of_string("1")))): + start_line=426, start_column=5, + end_line=427, end_column=71, + law_headings=["Article L755-12", + "Chapitre 5 : Prestations familiales et prestations assimilées", + "Titre 5 : Dispositions particulières à la Guadeloupe, à la Guyane, à la Martinique, à La Réunion, à Saint-Barthélemy et à Saint-Martin", + "Livre 7 : Régimes divers - Dispositions diverses", + "Partie législative", + "Code de la sécurité sociale"]), (prestations_familiales_dot_regime_outre_mer_l751_1_308 and + (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) == + integer_of_string("1")))): local_var_360 = False else: raise EmptyError @@ -1626,56 +1683,56 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn local_var_360 = False except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=133, start_column=12, end_line=133, end_column=35, - law_headings=["Prologue"])) + start_line=133, start_column=12, end_line=133, end_column=35, + law_headings=["Prologue"])) droit_ouvert_complement_359 = log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_complément"], local_var_360) + "droit_ouvert_complément"], local_var_360) try: try: local_var_362 = droit_ouvert_forfaitaire_149(Unit()) except EmptyError: - def local_var_362(param_363:Enfant): + def local_var_362(param_363: Enfant): try: try: try: if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=420, start_column=6, - end_line=421, end_column=72, - law_headings=["Article L755-12", - "Chapitre 5 : Prestations familiales et prestations assimilées", - "Titre 5 : Dispositions particulières à la Guadeloupe, à la Guyane, à la Martinique, à La Réunion, à Saint-Barthélemy et à Saint-Martin", - "Livre 7 : Régimes divers - Dispositions diverses", - "Partie législative", - "Code de la sécurité sociale"]), (prestations_familiales_dot_regime_outre_mer_l751_1_308 and - (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) == - integer_of_string("1")))): + start_line=420, start_column=6, + end_line=421, end_column=72, + law_headings=["Article L755-12", + "Chapitre 5 : Prestations familiales et prestations assimilées", + "Titre 5 : Dispositions particulières à la Guadeloupe, à la Guyane, à la Martinique, à La Réunion, à Saint-Barthélemy et à Saint-Martin", + "Livre 7 : Régimes divers - Dispositions diverses", + "Partie législative", + "Code de la sécurité sociale"]), (prestations_familiales_dot_regime_outre_mer_l751_1_308 and + (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) == + integer_of_string("1")))): return False else: raise EmptyError except EmptyError: if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=119, start_column=5, - end_line=125, end_column=59, - law_headings=["Article L521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), ((list_length(enfants_a_charge_178) >= - nombre_enfants_alinea_2_l521_3_276) and - ((param_363.age == - prestations_familiales_dot_age_l512_3_2_307) and - (param_363.a_deja_ouvert_droit_aux_allocations_familiales and - log_end_call(["PrestationsFamiliales", - "conditions_hors_âge"], - log_variable_definition(["PrestationsFamiliales", - "conditions_hors_âge", "output"], - log_begin_call(["PrestationsFamiliales", - "conditions_hors_âge"], - prestations_familiales_dot_conditions_hors_age_305, - log_variable_definition(["PrestationsFamiliales", - "conditions_hors_âge", "input"], - param_363)))))))): + start_line=119, start_column=5, + end_line=125, end_column=59, + law_headings=["Article L521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), ((list_length(enfants_a_charge_178) >= + nombre_enfants_alinea_2_l521_3_276) and + ((param_363.age == + prestations_familiales_dot_age_l512_3_2_307) and + (param_363.a_deja_ouvert_droit_aux_allocations_familiales and + log_end_call(["PrestationsFamiliales", + "conditions_hors_âge"], + log_variable_definition(["PrestationsFamiliales", + "conditions_hors_âge", "output"], + log_begin_call(["PrestationsFamiliales", + "conditions_hors_âge"], + prestations_familiales_dot_conditions_hors_age_305, + log_variable_definition(["PrestationsFamiliales", + "conditions_hors_âge", "input"], + param_363)))))))): return True else: raise EmptyError @@ -1683,39 +1740,40 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn return False except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=121, start_column=12, end_line=121, - end_column=36, law_headings=["Prologue"])) + start_line=121, start_column=12, end_line=121, + end_column=36, law_headings=["Prologue"])) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=121, start_column=12, end_line=121, end_column=36, - law_headings=["Prologue"])) + start_line=121, start_column=12, end_line=121, end_column=36, + law_headings=["Prologue"])) droit_ouvert_forfaitaire_361 = log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_forfaitaire"], local_var_362) + "droit_ouvert_forfaitaire"], local_var_362) try: try: local_var_365 = nombre_total_enfants_146(Unit()) except EmptyError: - local_var_365 = decimal_of_integer(list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324)) + local_var_365 = decimal_of_integer(list_length( + enfants_a_charge_droit_ouvert_prestation_familiale_324)) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=116, start_column=12, end_line=116, end_column=32, - law_headings=["Prologue"])) + start_line=116, start_column=12, end_line=116, end_column=32, + law_headings=["Prologue"])) nombre_total_enfants_364 = log_variable_definition(["AllocationsFamiliales", - "nombre_total_enfants"], local_var_365) + "nombre_total_enfants"], local_var_365) try: try: local_var_367 = nombre_moyen_enfants_145(Unit()) except EmptyError: - def local_var_368(acc_369:Decimal, enfant_370:Any): + def local_var_368(acc_369: Decimal, enfant_370: Any): match_arg_674 = log_end_call(["AllocationsFamiliales", - "prise_en_compte"], - log_variable_definition(["AllocationsFamiliales", - "prise_en_compte", "output"], - log_begin_call(["AllocationsFamiliales", "prise_en_compte"], - prise_en_compte_180, - log_variable_definition(["AllocationsFamiliales", - "prise_en_compte", "input"], - enfant_370)))) + "prise_en_compte"], + log_variable_definition(["AllocationsFamiliales", + "prise_en_compte", "output"], + log_begin_call(["AllocationsFamiliales", "prise_en_compte"], + prise_en_compte_180, + log_variable_definition(["AllocationsFamiliales", + "prise_en_compte", "input"], + enfant_370)))) if match_arg_674.code == PriseEnCompte_Code.Complete: _ = match_arg_674.value local_var_371 = decimal_of_string("1.") @@ -1727,59 +1785,62 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn local_var_371 = decimal_of_string("0.") return (acc_369 + local_var_371) local_var_367 = list_fold_left(local_var_368, - decimal_of_string("0."), - enfants_a_charge_droit_ouvert_prestation_familiale_324) + decimal_of_string("0."), + enfants_a_charge_droit_ouvert_prestation_familiale_324) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=115, start_column=12, end_line=115, end_column=32, - law_headings=["Prologue"])) + start_line=115, start_column=12, end_line=115, end_column=32, + law_headings=["Prologue"])) nombre_moyen_enfants_366 = log_variable_definition(["AllocationsFamiliales", - "nombre_moyen_enfants"], local_var_367) + "nombre_moyen_enfants"], local_var_367) try: try: local_var_376 = montant_initial_base_premier_enfant_141(Unit()) except EmptyError: - def local_var_379(_:Any): + def local_var_379(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=356, start_column=6, - end_line=356, end_column=71, - law_headings=["Article D755-5", - "Chapitre 5 : Prestations familiales et prestations assimilées", - "Titre 5 : Départements d'outre-mer", - "Livre 7 : Régimes divers - Dispositions diverses", - "Partie réglementaire - Décrets simples"]), (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) != - integer_of_string("1"))): + start_line=356, start_column=6, + end_line=356, end_column=71, + law_headings=["Article D755-5", + "Chapitre 5 : Prestations familiales et prestations assimilées", + "Titre 5 : Départements d'outre-mer", + "Livre 7 : Régimes divers - Dispositions diverses", + "Partie réglementaire - Décrets simples"]), (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) != + integer_of_string("1"))): return money_of_cents_string("0") else: raise EmptyError - def local_var_377(_:Any): + + def local_var_377(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=360, start_column=6, - end_line=360, end_column=70, - law_headings=["Article D755-5", - "Chapitre 5 : Prestations familiales et prestations assimilées", - "Titre 5 : Départements d'outre-mer", - "Livre 7 : Régimes divers - Dispositions diverses", - "Partie réglementaire - Décrets simples"]), (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) == - integer_of_string("1"))): + start_line=360, start_column=6, + end_line=360, end_column=70, + law_headings=["Article D755-5", + "Chapitre 5 : Prestations familiales et prestations assimilées", + "Titre 5 : Départements d'outre-mer", + "Livre 7 : Régimes divers - Dispositions diverses", + "Partie réglementaire - Décrets simples"]), (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) == + integer_of_string("1"))): return (prestations_familiales_dot_base_mensuelle_312 * - decimal_of_string("0.0588")) + decimal_of_string("0.0588")) else: raise EmptyError - def local_var_381(_:Any): + + def local_var_381(_: Any): return log_decision_taken(SourcePosition(filename="", - start_line=0, start_column=1, end_line=0, end_column=1, - law_headings=[]), False) - def local_var_383(_:Any): + start_line=0, start_column=1, end_line=0, end_column=1, + law_headings=[]), False) + + def local_var_383(_: Any): raise EmptyError local_var_376 = handle_default([local_var_377, local_var_379], - local_var_381, local_var_383) + local_var_381, local_var_383) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=111, start_column=12, end_line=111, end_column=47, - law_headings=["Prologue"])) + start_line=111, start_column=12, end_line=111, end_column=47, + law_headings=["Prologue"])) montant_initial_base_premier_enfant_375 = log_variable_definition(["AllocationsFamiliales", - "montant_initial_base_premier_enfant"], local_var_376) + "montant_initial_base_premier_enfant"], local_var_376) try: try: local_var_386 = droit_ouvert_base_139(Unit()) @@ -1787,30 +1848,30 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn try: try: if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=406, start_column=5, - end_line=407, end_column=72, - law_headings=["Article L755-12", - "Chapitre 5 : Prestations familiales et prestations assimilées", - "Titre 5 : Dispositions particulières à la Guadeloupe, à la Guyane, à la Martinique, à La Réunion, à Saint-Barthélemy et à Saint-Martin", - "Livre 7 : Régimes divers - Dispositions diverses", - "Partie législative", - "Code de la sécurité sociale"]), (prestations_familiales_dot_regime_outre_mer_l751_1_308 and - (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) >= - integer_of_string("1")))): + start_line=406, start_column=5, + end_line=407, end_column=72, + law_headings=["Article L755-12", + "Chapitre 5 : Prestations familiales et prestations assimilées", + "Titre 5 : Dispositions particulières à la Guadeloupe, à la Guyane, à la Martinique, à La Réunion, à Saint-Barthélemy et à Saint-Martin", + "Livre 7 : Régimes divers - Dispositions diverses", + "Partie législative", + "Code de la sécurité sociale"]), (prestations_familiales_dot_regime_outre_mer_l751_1_308 and + (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) >= + integer_of_string("1")))): local_var_386 = True else: raise EmptyError except EmptyError: if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=101, start_column=5, - end_line=101, end_column=70, - law_headings=["Article L521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) >= - integer_of_string("2"))): + start_line=101, start_column=5, + end_line=101, end_column=70, + law_headings=["Article L521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) >= + integer_of_string("2"))): local_var_386 = True else: raise EmptyError @@ -1818,71 +1879,71 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn local_var_386 = False except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=109, start_column=12, end_line=109, end_column=29, - law_headings=["Prologue"])) + start_line=109, start_column=12, end_line=109, end_column=29, + law_headings=["Prologue"])) droit_ouvert_base_385 = log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_base"], local_var_386) + "droit_ouvert_base"], local_var_386) try: try: local_var_388 = droit_ouvert_majoration_152(Unit()) except EmptyError: - def local_var_388(param_389:Enfant): + def local_var_388(param_389: Enfant): try: try: try: if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=313, start_column=5, - end_line=315, end_column=58, - law_headings=["Article L521-3", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), ((list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) >= - nombre_enfants_alinea_2_l521_3_276) and - (param_389.age >= - log_end_call(["AllocationsFamiliales", - "âge_minimum_alinéa_1_l521_3"], - log_variable_definition(["AllocationsFamiliales", - "âge_minimum_alinéa_1_l521_3", "output"], - log_begin_call(["AllocationsFamiliales", - "âge_minimum_alinéa_1_l521_3"], - age_minimum_alinea_1_l521_3_321, - log_variable_definition(["AllocationsFamiliales", - "âge_minimum_alinéa_1_l521_3", "input"], - param_389))))))): + start_line=313, start_column=5, + end_line=315, end_column=58, + law_headings=["Article L521-3", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), ((list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) >= + nombre_enfants_alinea_2_l521_3_276) and + (param_389.age >= + log_end_call(["AllocationsFamiliales", + "âge_minimum_alinéa_1_l521_3"], + log_variable_definition(["AllocationsFamiliales", + "âge_minimum_alinéa_1_l521_3", "output"], + log_begin_call(["AllocationsFamiliales", + "âge_minimum_alinéa_1_l521_3"], + age_minimum_alinea_1_l521_3_321, + log_variable_definition(["AllocationsFamiliales", + "âge_minimum_alinéa_1_l521_3", "input"], + param_389))))))): return True else: raise EmptyError except EmptyError: if log_decision_taken(SourcePosition(filename="./securite_sociale_L.catala_fr", - start_line=299, start_column=5, - end_line=300, end_column=58, - law_headings=["Article L521-3", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie législative", - "Code de la sécurité sociale"]), (not log_end_call(["AllocationsFamiliales", - "est_enfant_le_plus_âgé"], - log_variable_definition(["AllocationsFamiliales", - "est_enfant_le_plus_âgé", "output"], - log_begin_call(["AllocationsFamiliales", - "est_enfant_le_plus_âgé"], - est_enfant_le_plus_age_328, - log_variable_definition(["AllocationsFamiliales", - "est_enfant_le_plus_âgé", "input"], - param_389)))) and (param_389.age >= - log_end_call(["AllocationsFamiliales", - "âge_minimum_alinéa_1_l521_3"], - log_variable_definition(["AllocationsFamiliales", - "âge_minimum_alinéa_1_l521_3", "output"], - log_begin_call(["AllocationsFamiliales", - "âge_minimum_alinéa_1_l521_3"], - age_minimum_alinea_1_l521_3_321, - log_variable_definition(["AllocationsFamiliales", - "âge_minimum_alinéa_1_l521_3", "input"], - param_389))))))): + start_line=299, start_column=5, + end_line=300, end_column=58, + law_headings=["Article L521-3", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie législative", + "Code de la sécurité sociale"]), (not log_end_call(["AllocationsFamiliales", + "est_enfant_le_plus_âgé"], + log_variable_definition(["AllocationsFamiliales", + "est_enfant_le_plus_âgé", "output"], + log_begin_call(["AllocationsFamiliales", + "est_enfant_le_plus_âgé"], + est_enfant_le_plus_age_328, + log_variable_definition(["AllocationsFamiliales", + "est_enfant_le_plus_âgé", "input"], + param_389)))) and (param_389.age >= + log_end_call(["AllocationsFamiliales", + "âge_minimum_alinéa_1_l521_3"], + log_variable_definition(["AllocationsFamiliales", + "âge_minimum_alinéa_1_l521_3", "output"], + log_begin_call(["AllocationsFamiliales", + "âge_minimum_alinéa_1_l521_3"], + age_minimum_alinea_1_l521_3_321, + log_variable_definition(["AllocationsFamiliales", + "âge_minimum_alinéa_1_l521_3", "input"], + param_389))))))): return True else: raise EmptyError @@ -1890,663 +1951,691 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn return False except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=126, start_column=12, end_line=126, - end_column=35, law_headings=["Prologue"])) + start_line=126, start_column=12, end_line=126, + end_column=35, law_headings=["Prologue"])) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=126, start_column=12, end_line=126, end_column=35, - law_headings=["Prologue"])) + start_line=126, start_column=12, end_line=126, end_column=35, + law_headings=["Prologue"])) droit_ouvert_majoration_387 = log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration"], local_var_388) + "droit_ouvert_majoration"], local_var_388) try: try: local_var_391 = complement_degressif_159(Unit()) except EmptyError: - def local_var_391(param_392:Money): + def local_var_391(param_392: Money): try: - def local_var_395(_:Any): + def local_var_395(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=162, start_column=5, - end_line=163, end_column=68, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), ((ressources_menage_172 > - plafond__i_d521_3_345) and - (ressources_menage_172 <= - (plafond__i_d521_3_345 + (param_392 * - decimal_of_string("12.")))))): + start_line=162, start_column=5, + end_line=163, end_column=68, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), ((ressources_menage_172 > + plafond__i_d521_3_345) and + (ressources_menage_172 <= + (plafond__i_d521_3_345 + (param_392 * + decimal_of_string("12.")))))): return ((plafond__i_d521_3_345 + ((param_392 * - decimal_of_string("12.")) - - ressources_menage_172)) * - (decimal_of_string("1.") / - decimal_of_string("12."))) + decimal_of_string("12.")) - + ressources_menage_172)) * + (decimal_of_string("1.") / + decimal_of_string("12."))) else: raise EmptyError - def local_var_393(_:Any): + + def local_var_393(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=170, start_column=5, - end_line=171, end_column=68, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), ((ressources_menage_172 > - plafond__i_i_d521_3_331) and - (ressources_menage_172 <= - (plafond__i_i_d521_3_331 + (param_392 * - decimal_of_string("12.")))))): + start_line=170, start_column=5, + end_line=171, end_column=68, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), ((ressources_menage_172 > + plafond__i_i_d521_3_331) and + (ressources_menage_172 <= + (plafond__i_i_d521_3_331 + (param_392 * + decimal_of_string("12.")))))): return ((plafond__i_i_d521_3_331 + ((param_392 * - decimal_of_string("12.")) - - ressources_menage_172)) * - (decimal_of_string("1.") / - decimal_of_string("12."))) + decimal_of_string("12.")) - + ressources_menage_172)) * + (decimal_of_string("1.") / + decimal_of_string("12."))) else: raise EmptyError - def local_var_397(_:Any): + + def local_var_397(_: Any): return log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=176, start_column=14, - end_line=176, end_column=34, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), True) - def local_var_399(_:Any): + start_line=176, start_column=14, + end_line=176, end_column=34, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), True) + + def local_var_399(_: Any): return money_of_cents_string("0") return handle_default([local_var_393, local_var_395], - local_var_397, local_var_399) + local_var_397, local_var_399) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=135, start_column=12, end_line=135, - end_column=32, law_headings=["Prologue"])) + start_line=135, start_column=12, end_line=135, + end_column=32, law_headings=["Prologue"])) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=135, start_column=12, end_line=135, end_column=32, - law_headings=["Prologue"])) + start_line=135, start_column=12, end_line=135, end_column=32, + law_headings=["Prologue"])) complement_degressif_390 = log_variable_definition(["AllocationsFamiliales", - "complément_dégressif"], local_var_391) + "complément_dégressif"], local_var_391) try: try: local_var_402 = montant_verse_forfaitaire_par_enfant_150(Unit()) except EmptyError: - def local_var_407(_:Any): + def local_var_407(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=215, start_column=5, - end_line=215, end_column=43, - law_headings=["Article D521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), (ressources_menage_172 <= - plafond__i_d521_3_345)): + start_line=215, start_column=5, + end_line=215, end_column=43, + law_headings=["Article D521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), (ressources_menage_172 <= + plafond__i_d521_3_345)): return (prestations_familiales_dot_base_mensuelle_312 * - decimal_of_string("0.20234")) + decimal_of_string("0.20234")) else: raise EmptyError - def local_var_405(_:Any): + + def local_var_405(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=229, start_column=5, - end_line=230, end_column=46, - law_headings=["Article D521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), ((ressources_menage_172 > - plafond__i_d521_3_345) and (ressources_menage_172 <= - plafond__i_i_d521_3_331))): + start_line=229, start_column=5, + end_line=230, end_column=46, + law_headings=["Article D521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), ((ressources_menage_172 > + plafond__i_d521_3_345) and (ressources_menage_172 <= + plafond__i_i_d521_3_331))): return (prestations_familiales_dot_base_mensuelle_312 * - decimal_of_string("0.1117")) + decimal_of_string("0.1117")) else: raise EmptyError - def local_var_403(_:Any): + + def local_var_403(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=243, start_column=5, - end_line=243, end_column=43, - law_headings=["Article D521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), (ressources_menage_172 > - plafond__i_i_d521_3_331)): + start_line=243, start_column=5, + end_line=243, end_column=43, + law_headings=["Article D521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), (ressources_menage_172 > + plafond__i_i_d521_3_331)): return (prestations_familiales_dot_base_mensuelle_312 * - decimal_of_string("0.0559")) + decimal_of_string("0.0559")) else: raise EmptyError - def local_var_409(_:Any): + + def local_var_409(_: Any): return log_decision_taken(SourcePosition(filename="", - start_line=0, start_column=1, end_line=0, end_column=1, - law_headings=[]), False) - def local_var_411(_:Any): + start_line=0, start_column=1, end_line=0, end_column=1, + law_headings=[]), False) + + def local_var_411(_: Any): raise EmptyError local_var_402 = handle_default([local_var_403, local_var_405, - local_var_407], local_var_409, local_var_411) + local_var_407], local_var_409, local_var_411) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=122, start_column=12, end_line=122, end_column=48, - law_headings=["Prologue"])) + start_line=122, start_column=12, end_line=122, end_column=48, + law_headings=["Prologue"])) montant_verse_forfaitaire_par_enfant_401 = log_variable_definition(["AllocationsFamiliales", - "montant_versé_forfaitaire_par_enfant"], local_var_402) + "montant_versé_forfaitaire_par_enfant"], local_var_402) try: try: - local_var_414 = montant_initial_base_troisieme_enfant_et_plus_143(Unit()) + local_var_414 = montant_initial_base_troisieme_enfant_et_plus_143( + Unit()) except EmptyError: - def local_var_419(_:Any): + def local_var_419(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=35, start_column=3, - end_line=35, end_column=41, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), (ressources_menage_172 <= - plafond__i_d521_3_345)): + start_line=35, start_column=3, + end_line=35, end_column=41, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), (ressources_menage_172 <= + plafond__i_d521_3_345)): if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) > - integer_of_string("2")): + integer_of_string("2")): return ((prestations_familiales_dot_base_mensuelle_312 * - decimal_of_string("0.41")) * - decimal_of_integer((list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) - - integer_of_string("2")))) + decimal_of_string("0.41")) * + decimal_of_integer((list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) - + integer_of_string("2")))) else: return money_of_cents_string("0") else: raise EmptyError - def local_var_417(_:Any): + + def local_var_417(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=74, start_column=3, - end_line=75, end_column=44, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), ((ressources_menage_172 > - plafond__i_d521_3_345) and (ressources_menage_172 <= - plafond__i_i_d521_3_331))): + start_line=74, start_column=3, + end_line=75, end_column=44, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), ((ressources_menage_172 > + plafond__i_d521_3_345) and (ressources_menage_172 <= + plafond__i_i_d521_3_331))): if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) > - integer_of_string("2")): + integer_of_string("2")): return ((prestations_familiales_dot_base_mensuelle_312 * - decimal_of_string("0.205")) * - decimal_of_integer((list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) - - integer_of_string("2")))) + decimal_of_string("0.205")) * + decimal_of_integer((list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) - + integer_of_string("2")))) else: return money_of_cents_string("0") else: raise EmptyError - def local_var_415(_:Any): + + def local_var_415(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=113, start_column=3, - end_line=113, end_column=41, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), (ressources_menage_172 > - plafond__i_i_d521_3_331)): + start_line=113, start_column=3, + end_line=113, end_column=41, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), (ressources_menage_172 > + plafond__i_i_d521_3_331)): if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) > - integer_of_string("2")): + integer_of_string("2")): return ((prestations_familiales_dot_base_mensuelle_312 * - decimal_of_string("0.1025")) * - decimal_of_integer((list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) - - integer_of_string("2")))) + decimal_of_string("0.1025")) * + decimal_of_integer((list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) - + integer_of_string("2")))) else: return money_of_cents_string("0") else: raise EmptyError - def local_var_421(_:Any): + + def local_var_421(_: Any): return log_decision_taken(SourcePosition(filename="", - start_line=0, start_column=1, end_line=0, end_column=1, - law_headings=[]), False) - def local_var_423(_:Any): + start_line=0, start_column=1, end_line=0, end_column=1, + law_headings=[]), False) + + def local_var_423(_: Any): raise EmptyError local_var_414 = handle_default([local_var_415, local_var_417, - local_var_419], local_var_421, local_var_423) + local_var_419], local_var_421, local_var_423) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=113, start_column=12, end_line=113, end_column=57, - law_headings=["Prologue"])) + start_line=113, start_column=12, end_line=113, end_column=57, + law_headings=["Prologue"])) montant_initial_base_troisieme_enfant_et_plus_413 = log_variable_definition(["AllocationsFamiliales", - "montant_initial_base_troisième_enfant_et_plus"], local_var_414) + "montant_initial_base_troisième_enfant_et_plus"], local_var_414) try: try: local_var_426 = montant_initial_base_deuxieme_enfant_142(Unit()) except EmptyError: - def local_var_431(_:Any): + def local_var_431(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=35, start_column=3, - end_line=35, end_column=41, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), (ressources_menage_172 <= - plafond__i_d521_3_345)): + start_line=35, start_column=3, + end_line=35, end_column=41, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), (ressources_menage_172 <= + plafond__i_d521_3_345)): if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) > - integer_of_string("1")): + integer_of_string("1")): return (prestations_familiales_dot_base_mensuelle_312 * - decimal_of_string("0.32")) + decimal_of_string("0.32")) else: return money_of_cents_string("0") else: raise EmptyError - def local_var_429(_:Any): + + def local_var_429(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=74, start_column=3, - end_line=75, end_column=44, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), ((ressources_menage_172 > - plafond__i_d521_3_345) and (ressources_menage_172 <= - plafond__i_i_d521_3_331))): + start_line=74, start_column=3, + end_line=75, end_column=44, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), ((ressources_menage_172 > + plafond__i_d521_3_345) and (ressources_menage_172 <= + plafond__i_i_d521_3_331))): if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) > - integer_of_string("1")): + integer_of_string("1")): return (prestations_familiales_dot_base_mensuelle_312 * - decimal_of_string("0.16")) + decimal_of_string("0.16")) else: return money_of_cents_string("0") else: raise EmptyError - def local_var_427(_:Any): + + def local_var_427(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=113, start_column=3, - end_line=113, end_column=41, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), (ressources_menage_172 > - plafond__i_i_d521_3_331)): + start_line=113, start_column=3, + end_line=113, end_column=41, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), (ressources_menage_172 > + plafond__i_i_d521_3_331)): if (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) > - integer_of_string("1")): + integer_of_string("1")): return (prestations_familiales_dot_base_mensuelle_312 * - decimal_of_string("0.08")) + decimal_of_string("0.08")) else: return money_of_cents_string("0") else: raise EmptyError - def local_var_433(_:Any): + + def local_var_433(_: Any): return log_decision_taken(SourcePosition(filename="", - start_line=0, start_column=1, end_line=0, end_column=1, - law_headings=[]), False) - def local_var_435(_:Any): + start_line=0, start_column=1, end_line=0, end_column=1, + law_headings=[]), False) + + def local_var_435(_: Any): raise EmptyError local_var_426 = handle_default([local_var_427, local_var_429, - local_var_431], local_var_433, local_var_435) + local_var_431], local_var_433, local_var_435) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=112, start_column=12, end_line=112, end_column=48, - law_headings=["Prologue"])) + start_line=112, start_column=12, end_line=112, end_column=48, + law_headings=["Prologue"])) montant_initial_base_deuxieme_enfant_425 = log_variable_definition(["AllocationsFamiliales", - "montant_initial_base_deuxième_enfant"], local_var_426) + "montant_initial_base_deuxième_enfant"], local_var_426) try: try: local_var_438 = rapport_enfants_total_moyen_144(Unit()) except EmptyError: if (nombre_total_enfants_364 == - decimal_of_string("0.")): + decimal_of_string("0.")): local_var_438 = decimal_of_string("0.") else: local_var_438 = (nombre_moyen_enfants_366 / - nombre_total_enfants_364) + nombre_total_enfants_364) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=114, start_column=12, end_line=114, end_column=39, - law_headings=["Prologue"])) + start_line=114, start_column=12, end_line=114, end_column=39, + law_headings=["Prologue"])) rapport_enfants_total_moyen_437 = log_variable_definition(["AllocationsFamiliales", - "rapport_enfants_total_moyen"], local_var_438) + "rapport_enfants_total_moyen"], local_var_438) try: try: local_var_440 = montant_initial_metropole_majoration_153(Unit()) except EmptyError: - def local_var_440(param_441:Enfant): + def local_var_440(param_441: Enfant): try: - def local_var_448(_:Any): + def local_var_448(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=55, start_column=3, - end_line=55, end_column=41, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), ((ressources_menage_172 <= - plafond__i_d521_3_345) and - log_end_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "output"], - log_begin_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - droit_ouvert_majoration_387, - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "input"], - param_441)))))): + start_line=55, start_column=3, + end_line=55, end_column=41, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), ((ressources_menage_172 <= + plafond__i_d521_3_345) and + log_end_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "output"], + log_begin_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], + droit_ouvert_majoration_387, + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "input"], + param_441)))))): return (prestations_familiales_dot_base_mensuelle_312 * - decimal_of_string("0.16")) + decimal_of_string("0.16")) else: raise EmptyError - def local_var_446(_:Any): + + def local_var_446(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=95, start_column=3, - end_line=96, end_column=44, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), (((ressources_menage_172 > - plafond__i_d521_3_345) and - (ressources_menage_172 <= - plafond__i_i_d521_3_331)) and - log_end_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "output"], - log_begin_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - droit_ouvert_majoration_387, - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "input"], - param_441)))))): + start_line=95, start_column=3, + end_line=96, end_column=44, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), (((ressources_menage_172 > + plafond__i_d521_3_345) and + (ressources_menage_172 <= + plafond__i_i_d521_3_331)) and + log_end_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "output"], + log_begin_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], + droit_ouvert_majoration_387, + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "input"], + param_441)))))): return (prestations_familiales_dot_base_mensuelle_312 * - decimal_of_string("0.08")) + decimal_of_string("0.08")) else: raise EmptyError - def local_var_444(_:Any): + + def local_var_444(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=132, start_column=3, - end_line=132, end_column=41, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), ((ressources_menage_172 > - plafond__i_i_d521_3_331) and - log_end_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "output"], - log_begin_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - droit_ouvert_majoration_387, - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "input"], - param_441)))))): + start_line=132, start_column=3, + end_line=132, end_column=41, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), ((ressources_menage_172 > + plafond__i_i_d521_3_331) and + log_end_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "output"], + log_begin_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], + droit_ouvert_majoration_387, + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "input"], + param_441)))))): return (prestations_familiales_dot_base_mensuelle_312 * - decimal_of_string("0.04")) + decimal_of_string("0.04")) else: raise EmptyError - def local_var_442(_:Any): + + def local_var_442(_: Any): if log_decision_taken(SourcePosition(filename="./epilogue.catala_fr", - start_line=29, start_column=5, - end_line=29, end_column=44, - law_headings=["Règles diverses", - "Épilogue"]), not log_end_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "output"], - log_begin_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - droit_ouvert_majoration_387, - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "input"], - param_441))))): + start_line=29, start_column=5, + end_line=29, end_column=44, + law_headings=["Règles diverses", + "Épilogue"]), not log_end_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "output"], + log_begin_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], + droit_ouvert_majoration_387, + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "input"], + param_441))))): return money_of_cents_string("0") else: raise EmptyError - def local_var_450(_:Any): + + def local_var_450(_: Any): return log_decision_taken(SourcePosition(filename="", - start_line=0, start_column=1, - end_line=0, end_column=1, - law_headings=[]), False) - def local_var_452(_:Any): + start_line=0, start_column=1, + end_line=0, end_column=1, + law_headings=[]), False) + + def local_var_452(_: Any): raise EmptyError return handle_default([local_var_442, local_var_444, - local_var_446, local_var_448], local_var_450, - local_var_452) + local_var_446, local_var_448], local_var_450, + local_var_452) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=127, start_column=12, end_line=127, - end_column=48, law_headings=["Prologue"])) + start_line=127, start_column=12, end_line=127, + end_column=48, law_headings=["Prologue"])) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=127, start_column=12, end_line=127, end_column=48, - law_headings=["Prologue"])) + start_line=127, start_column=12, end_line=127, end_column=48, + law_headings=["Prologue"])) montant_initial_metropole_majoration_439 = log_variable_definition(["AllocationsFamiliales", - "montant_initial_métropole_majoration"], local_var_440) + "montant_initial_métropole_majoration"], local_var_440) try: try: local_var_455 = montant_verse_forfaitaire_151(Unit()) except EmptyError: - def local_var_456(acc_457:Integer, enfant_458:Any): + def local_var_456(acc_457: Integer, enfant_458: Any): if log_end_call(["AllocationsFamiliales", - "droit_ouvert_forfaitaire"], - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_forfaitaire", "output"], - log_begin_call(["AllocationsFamiliales", - "droit_ouvert_forfaitaire"], - droit_ouvert_forfaitaire_361, - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_forfaitaire", "input"], - enfant_458)))): + "droit_ouvert_forfaitaire"], + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_forfaitaire", "output"], + log_begin_call(["AllocationsFamiliales", + "droit_ouvert_forfaitaire"], + droit_ouvert_forfaitaire_361, + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_forfaitaire", "input"], + enfant_458)))): return (acc_457 + integer_of_string("1")) else: return acc_457 local_var_455 = (montant_verse_forfaitaire_par_enfant_401 * - decimal_of_integer(list_fold_left(local_var_456, - integer_of_string("0"), enfants_a_charge_178))) + decimal_of_integer(list_fold_left(local_var_456, + integer_of_string("0"), enfants_a_charge_178))) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=123, start_column=12, end_line=123, end_column=37, - law_headings=["Prologue"])) + start_line=123, start_column=12, end_line=123, end_column=37, + law_headings=["Prologue"])) montant_verse_forfaitaire_454 = log_variable_definition(["AllocationsFamiliales", - "montant_versé_forfaitaire"], local_var_455) + "montant_versé_forfaitaire"], local_var_455) try: try: local_var_460 = montant_initial_base_140(Unit()) except EmptyError: try: if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=350, start_column=5, - end_line=351, end_column=69, - law_headings=["Article D755-5", - "Chapitre 5 : Prestations familiales et prestations assimilées", - "Titre 5 : Départements d'outre-mer", - "Livre 7 : Régimes divers - Dispositions diverses", - "Partie réglementaire - Décrets simples"]), (prestations_familiales_dot_regime_outre_mer_l751_1_308 and - (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) == - integer_of_string("1")))): + start_line=350, start_column=5, + end_line=351, end_column=69, + law_headings=["Article D755-5", + "Chapitre 5 : Prestations familiales et prestations assimilées", + "Titre 5 : Départements d'outre-mer", + "Livre 7 : Régimes divers - Dispositions diverses", + "Partie réglementaire - Décrets simples"]), (prestations_familiales_dot_regime_outre_mer_l751_1_308 and + (list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) == + integer_of_string("1")))): local_var_460 = montant_initial_base_premier_enfant_375 else: raise EmptyError except EmptyError: local_var_460 = (montant_initial_base_deuxieme_enfant_425 + - montant_initial_base_troisieme_enfant_et_plus_413) + montant_initial_base_troisieme_enfant_et_plus_413) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=110, start_column=12, end_line=110, end_column=32, - law_headings=["Prologue"])) + start_line=110, start_column=12, end_line=110, end_column=32, + law_headings=["Prologue"])) montant_initial_base_459 = log_variable_definition(["AllocationsFamiliales", - "montant_initial_base"], local_var_460) + "montant_initial_base"], local_var_460) try: try: local_var_462 = montant_initial_majoration_154(Unit()) except EmptyError: - def local_var_462(param_463:Enfant): + def local_var_462(param_463: Enfant): try: - def local_var_466(_:Any): + def local_var_466(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=373, start_column=5, - end_line=376, end_column=42, - law_headings=["Article D755-5", - "Chapitre 5 : Prestations familiales et prestations assimilées", - "Titre 5 : Départements d'outre-mer", - "Livre 7 : Régimes divers - Dispositions diverses", - "Partie réglementaire - Décrets simples"]), (log_end_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "output"], - log_begin_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - droit_ouvert_majoration_387, - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "input"], - param_463)))) and - (prestations_familiales_dot_regime_outre_mer_l751_1_308 and - ((list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) == - integer_of_string("1")) and ((param_463.age >= - integer_of_string("11")) and (param_463.age < - integer_of_string("16"))))))): + start_line=373, start_column=5, + end_line=376, end_column=42, + law_headings=["Article D755-5", + "Chapitre 5 : Prestations familiales et prestations assimilées", + "Titre 5 : Départements d'outre-mer", + "Livre 7 : Régimes divers - Dispositions diverses", + "Partie réglementaire - Décrets simples"]), (log_end_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "output"], + log_begin_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], + droit_ouvert_majoration_387, + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "input"], + param_463)))) and + (prestations_familiales_dot_regime_outre_mer_l751_1_308 and + ((list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) == + integer_of_string("1")) and ((param_463.age >= + integer_of_string("11")) and (param_463.age < + integer_of_string("16"))))))): return (prestations_familiales_dot_base_mensuelle_312 * - decimal_of_string("0.0369")) + decimal_of_string("0.0369")) else: raise EmptyError - def local_var_464(_:Any): + + def local_var_464(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=382, start_column=5, - end_line=385, end_column=23, - law_headings=["Article D755-5", - "Chapitre 5 : Prestations familiales et prestations assimilées", - "Titre 5 : Départements d'outre-mer", - "Livre 7 : Régimes divers - Dispositions diverses", - "Partie réglementaire - Décrets simples"]), (log_end_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "output"], - log_begin_call(["AllocationsFamiliales", - "droit_ouvert_majoration"], - droit_ouvert_majoration_387, - log_variable_definition(["AllocationsFamiliales", - "droit_ouvert_majoration", "input"], - param_463)))) and - (prestations_familiales_dot_regime_outre_mer_l751_1_308 and - ((list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) == - integer_of_string("1")) and (param_463.age >= - integer_of_string("16")))))): + start_line=382, start_column=5, + end_line=385, end_column=23, + law_headings=["Article D755-5", + "Chapitre 5 : Prestations familiales et prestations assimilées", + "Titre 5 : Départements d'outre-mer", + "Livre 7 : Régimes divers - Dispositions diverses", + "Partie réglementaire - Décrets simples"]), (log_end_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "output"], + log_begin_call(["AllocationsFamiliales", + "droit_ouvert_majoration"], + droit_ouvert_majoration_387, + log_variable_definition(["AllocationsFamiliales", + "droit_ouvert_majoration", "input"], + param_463)))) and + (prestations_familiales_dot_regime_outre_mer_l751_1_308 and + ((list_length(enfants_a_charge_droit_ouvert_prestation_familiale_324) == + integer_of_string("1")) and (param_463.age >= + integer_of_string("16")))))): return (prestations_familiales_dot_base_mensuelle_312 * - decimal_of_string("0.0567")) + decimal_of_string("0.0567")) else: raise EmptyError - def local_var_468(_:Any): + + def local_var_468(_: Any): return log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=22, start_column=14, - end_line=22, end_column=40, - law_headings=["Article D521-1", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), True) - def local_var_470(_:Any): + start_line=22, start_column=14, + end_line=22, end_column=40, + law_headings=["Article D521-1", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), True) + + def local_var_470(_: Any): return log_end_call(["AllocationsFamiliales", - "montant_initial_métropole_majoration"], - log_variable_definition(["AllocationsFamiliales", - "montant_initial_métropole_majoration", - "output"], - log_begin_call(["AllocationsFamiliales", - "montant_initial_métropole_majoration"], - montant_initial_metropole_majoration_439, - log_variable_definition(["AllocationsFamiliales", - "montant_initial_métropole_majoration", - "input"], param_463)))) + "montant_initial_métropole_majoration"], + log_variable_definition(["AllocationsFamiliales", + "montant_initial_métropole_majoration", + "output"], + log_begin_call(["AllocationsFamiliales", + "montant_initial_métropole_majoration"], + montant_initial_metropole_majoration_439, + log_variable_definition(["AllocationsFamiliales", + "montant_initial_métropole_majoration", + "input"], param_463)))) return handle_default([local_var_464, local_var_466], - local_var_468, local_var_470) + local_var_468, local_var_470) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=128, start_column=12, end_line=128, - end_column=38, law_headings=["Prologue"])) + start_line=128, start_column=12, end_line=128, + end_column=38, law_headings=["Prologue"])) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=128, start_column=12, end_line=128, end_column=38, - law_headings=["Prologue"])) + start_line=128, start_column=12, end_line=128, end_column=38, + law_headings=["Prologue"])) montant_initial_majoration_461 = log_variable_definition(["AllocationsFamiliales", - "montant_initial_majoration"], local_var_462) + "montant_initial_majoration"], local_var_462) try: try: - local_var_473 = montant_verse_complement_pour_forfaitaire_161(Unit()) + local_var_473 = montant_verse_complement_pour_forfaitaire_161( + Unit()) except EmptyError: - def local_var_476(_:Any): + def local_var_476(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=262, start_column=5, - end_line=264, end_column=42, - law_headings=["Article D521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), ((ressources_menage_172 > - plafond__i_d521_3_345) and (ressources_menage_172 <= - (plafond__i_d521_3_345 + (montant_verse_forfaitaire_454 * - decimal_of_string("12.")))))): + start_line=262, start_column=5, + end_line=264, end_column=42, + law_headings=["Article D521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), ((ressources_menage_172 > + plafond__i_d521_3_345) and (ressources_menage_172 <= + (plafond__i_d521_3_345 + (montant_verse_forfaitaire_454 * + decimal_of_string("12.")))))): return ((plafond__i_d521_3_345 + - ((montant_verse_forfaitaire_454 * - decimal_of_string("12.")) - ressources_menage_172)) * - (decimal_of_string("1.") / decimal_of_string("12."))) + ((montant_verse_forfaitaire_454 * + decimal_of_string("12.")) - ressources_menage_172)) * + (decimal_of_string("1.") / decimal_of_string("12."))) else: raise EmptyError - def local_var_474(_:Any): + + def local_var_474(_: Any): if log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=272, start_column=5, - end_line=274, end_column=41, - law_headings=["Article D521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), ((ressources_menage_172 > - plafond__i_i_d521_3_331) and (ressources_menage_172 <= - (plafond__i_i_d521_3_331 + - (montant_verse_forfaitaire_454 * - decimal_of_string("12.")))))): + start_line=272, start_column=5, + end_line=274, end_column=41, + law_headings=["Article D521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), ((ressources_menage_172 > + plafond__i_i_d521_3_331) and (ressources_menage_172 <= + (plafond__i_i_d521_3_331 + + (montant_verse_forfaitaire_454 * + decimal_of_string("12.")))))): return ((plafond__i_i_d521_3_331 + - ((montant_verse_forfaitaire_454 * - decimal_of_string("12.")) - ressources_menage_172)) * - (decimal_of_string("1.") / decimal_of_string("12."))) + ((montant_verse_forfaitaire_454 * + decimal_of_string("12.")) - ressources_menage_172)) * + (decimal_of_string("1.") / decimal_of_string("12."))) else: raise EmptyError - def local_var_478(_:Any): + + def local_var_478(_: Any): return log_decision_taken(SourcePosition(filename="./securite_sociale_D.catala_fr", - start_line=280, start_column=14, - end_line=280, end_column=55, - law_headings=["Article D521-2", - "Chapitre 1er : Allocations familiales", - "Titre 2 : Prestations générales d'entretien", - "Livre 5 : Prestations familiales et prestations assimilées", - "Partie réglementaire - Décrets simples"]), True) - def local_var_480(_:Any): + start_line=280, start_column=14, + end_line=280, end_column=55, + law_headings=["Article D521-2", + "Chapitre 1er : Allocations familiales", + "Titre 2 : Prestations générales d'entretien", + "Livre 5 : Prestations familiales et prestations assimilées", + "Partie réglementaire - Décrets simples"]), True) + + def local_var_480(_: Any): return money_of_cents_string("0") local_var_473 = handle_default([local_var_474, local_var_476], - local_var_478, local_var_480) + local_var_478, local_var_480) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=137, start_column=12, end_line=137, end_column=53, - law_headings=["Prologue"])) + start_line=137, start_column=12, end_line=137, end_column=53, + law_headings=["Prologue"])) montant_verse_complement_pour_forfaitaire_472 = log_variable_definition(["AllocationsFamiliales", - "montant_versé_complément_pour_forfaitaire"], local_var_473) + "montant_versé_complément_pour_forfaitaire"], local_var_473) try: try: local_var_483 = montant_avec_garde_alternee_base_147(Unit()) except EmptyError: local_var_483 = (montant_initial_base_459 * - rapport_enfants_total_moyen_437) + rapport_enfants_total_moyen_437) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=117, start_column=12, end_line=117, end_column=44, - law_headings=["Prologue"])) + start_line=117, start_column=12, end_line=117, end_column=44, + law_headings=["Prologue"])) montant_avec_garde_alternee_base_482 = log_variable_definition(["AllocationsFamiliales", - "montant_avec_garde_alternée_base"], local_var_483) + "montant_avec_garde_alternée_base"], local_var_483) try: try: local_var_485 = montant_avec_garde_alternee_majoration_155(Unit()) except EmptyError: - def local_var_485(param_486:Enfant): + def local_var_485(param_486: Enfant): try: match_arg_675 = log_end_call(["AllocationsFamiliales", - "prise_en_compte"], - log_variable_definition(["AllocationsFamiliales", - "prise_en_compte", "output"], - log_begin_call(["AllocationsFamiliales", - "prise_en_compte"], prise_en_compte_180, - log_variable_definition(["AllocationsFamiliales", - "prise_en_compte", "input"], - param_486)))) + "prise_en_compte"], + log_variable_definition(["AllocationsFamiliales", + "prise_en_compte", "output"], + log_begin_call(["AllocationsFamiliales", + "prise_en_compte"], prise_en_compte_180, + log_variable_definition(["AllocationsFamiliales", + "prise_en_compte", "input"], + param_486)))) if match_arg_675.code == PriseEnCompte_Code.Complete: _ = match_arg_675.value local_var_487 = decimal_of_string("1.") @@ -2557,25 +2646,25 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn _ = match_arg_675.value local_var_487 = decimal_of_string("0.") return (log_end_call(["AllocationsFamiliales", - "montant_initial_majoration"], - log_variable_definition(["AllocationsFamiliales", - "montant_initial_majoration", "output"], - log_begin_call(["AllocationsFamiliales", - "montant_initial_majoration"], - montant_initial_majoration_461, - log_variable_definition(["AllocationsFamiliales", - "montant_initial_majoration", "input"], - param_486)))) * local_var_487) + "montant_initial_majoration"], + log_variable_definition(["AllocationsFamiliales", + "montant_initial_majoration", "output"], + log_begin_call(["AllocationsFamiliales", + "montant_initial_majoration"], + montant_initial_majoration_461, + log_variable_definition(["AllocationsFamiliales", + "montant_initial_majoration", "input"], + param_486)))) * local_var_487) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=129, start_column=12, end_line=129, - end_column=50, law_headings=["Prologue"])) + start_line=129, start_column=12, end_line=129, + end_column=50, law_headings=["Prologue"])) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=129, start_column=12, end_line=129, end_column=50, - law_headings=["Prologue"])) + start_line=129, start_column=12, end_line=129, end_column=50, + law_headings=["Prologue"])) montant_avec_garde_alternee_majoration_484 = log_variable_definition(["AllocationsFamiliales", - "montant_avec_garde_alternée_majoration"], local_var_485) + "montant_avec_garde_alternée_majoration"], local_var_485) try: try: local_var_492 = montant_verse_base_148(Unit()) @@ -2586,130 +2675,133 @@ def allocations_familiales(allocations_familiales_in_128:AllocationsFamilialesIn local_var_492 = money_of_cents_string("0") except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=118, start_column=12, end_line=118, end_column=30, - law_headings=["Prologue"])) + start_line=118, start_column=12, end_line=118, end_column=30, + law_headings=["Prologue"])) montant_verse_base_491 = log_variable_definition(["AllocationsFamiliales", - "montant_versé_base"], local_var_492) + "montant_versé_base"], local_var_492) try: try: local_var_494 = montant_verse_majoration_156(Unit()) except EmptyError: if droit_ouvert_base_385: - def local_var_495(acc_496:Money, enfant_497:Any): + def local_var_495(acc_496: Money, enfant_497: Any): return (acc_496 + log_end_call(["AllocationsFamiliales", - "montant_avec_garde_alternée_majoration"], - log_variable_definition(["AllocationsFamiliales", - "montant_avec_garde_alternée_majoration", "output"], - log_begin_call(["AllocationsFamiliales", - "montant_avec_garde_alternée_majoration"], - montant_avec_garde_alternee_majoration_484, - log_variable_definition(["AllocationsFamiliales", - "montant_avec_garde_alternée_majoration", "input"], - enfant_497))))) + "montant_avec_garde_alternée_majoration"], + log_variable_definition(["AllocationsFamiliales", + "montant_avec_garde_alternée_majoration", "output"], + log_begin_call(["AllocationsFamiliales", + "montant_avec_garde_alternée_majoration"], + montant_avec_garde_alternee_majoration_484, + log_variable_definition(["AllocationsFamiliales", + "montant_avec_garde_alternée_majoration", "input"], + enfant_497))))) local_var_494 = list_fold_left(local_var_495, - money_of_cents_string("0"), enfants_a_charge_178) + money_of_cents_string("0"), enfants_a_charge_178) else: local_var_494 = money_of_cents_string("0") except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=130, start_column=12, end_line=130, end_column=36, - law_headings=["Prologue"])) + start_line=130, start_column=12, end_line=130, end_column=36, + law_headings=["Prologue"])) montant_verse_majoration_493 = log_variable_definition(["AllocationsFamiliales", - "montant_versé_majoration"], local_var_494) + "montant_versé_majoration"], local_var_494) try: try: - local_var_499 = montant_base_complement_pour_base_et_majoration_158(Unit()) + local_var_499 = montant_base_complement_pour_base_et_majoration_158( + Unit()) except EmptyError: local_var_499 = (montant_verse_base_491 + - montant_verse_majoration_493) + montant_verse_majoration_493) except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=134, start_column=12, end_line=134, end_column=59, - law_headings=["Prologue"])) + start_line=134, start_column=12, end_line=134, end_column=59, + law_headings=["Prologue"])) montant_base_complement_pour_base_et_majoration_498 = log_variable_definition(["AllocationsFamiliales", - "montant_base_complément_pour_base_et_majoration"], local_var_499) + "montant_base_complément_pour_base_et_majoration"], local_var_499) try: try: - local_var_501 = montant_verse_complement_pour_base_et_majoration_160(Unit()) + local_var_501 = montant_verse_complement_pour_base_et_majoration_160( + Unit()) except EmptyError: if droit_ouvert_complement_359: local_var_501 = log_end_call(["AllocationsFamiliales", - "complément_dégressif"], - log_variable_definition(["AllocationsFamiliales", - "complément_dégressif", "output"], - log_begin_call(["AllocationsFamiliales", - "complément_dégressif"], complement_degressif_390, - log_variable_definition(["AllocationsFamiliales", - "complément_dégressif", "input"], - montant_base_complement_pour_base_et_majoration_498)))) + "complément_dégressif"], + log_variable_definition(["AllocationsFamiliales", + "complément_dégressif", "output"], + log_begin_call(["AllocationsFamiliales", + "complément_dégressif"], complement_degressif_390, + log_variable_definition(["AllocationsFamiliales", + "complément_dégressif", "input"], + montant_base_complement_pour_base_et_majoration_498)))) else: local_var_501 = money_of_cents_string("0") except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=136, start_column=12, end_line=136, end_column=60, - law_headings=["Prologue"])) + start_line=136, start_column=12, end_line=136, end_column=60, + law_headings=["Prologue"])) montant_verse_complement_pour_base_et_majoration_500 = log_variable_definition(["AllocationsFamiliales", - "montant_versé_complément_pour_base_et_majoration"], local_var_501) + "montant_versé_complément_pour_base_et_majoration"], local_var_501) try: try: local_var_503 = montant_verse_138(Unit()) except EmptyError: if droit_ouvert_base_385: local_var_503 = (montant_verse_base_491 + - (montant_verse_majoration_493 + - (montant_verse_forfaitaire_454 + - (montant_verse_complement_pour_base_et_majoration_500 + - montant_verse_complement_pour_forfaitaire_472)))) + (montant_verse_majoration_493 + + (montant_verse_forfaitaire_454 + + (montant_verse_complement_pour_base_et_majoration_500 + + montant_verse_complement_pour_forfaitaire_472)))) else: local_var_503 = money_of_cents_string("0") except EmptyError: raise NoValueProvided(SourcePosition(filename="./prologue.catala_fr", - start_line=106, start_column=12, end_line=106, end_column=25, - law_headings=["Prologue"])) + start_line=106, start_column=12, end_line=106, end_column=25, + law_headings=["Prologue"])) montant_verse_502 = log_variable_definition(["AllocationsFamiliales", - "montant_versé"], local_var_503) + "montant_versé"], local_var_503) assert (personne_charge_effective_permanente_est_parent_168 or - (not personne_charge_effective_permanente_est_parent_168 and - personne_charge_effective_permanente_remplit_titre__i_170)) - return AllocationsFamilialesOut(personne_charge_effective_permanente_est_parent_out = personne_charge_effective_permanente_est_parent_168, - personne_charge_effective_permanente_remplit_titre_I_out = personne_charge_effective_permanente_remplit_titre__i_170, - ressources_menage_out = ressources_menage_172, - residence_out = residence_174, date_courante_out = date_courante_176, - enfants_a_charge_out = enfants_a_charge_178, - enfants_a_charge_droit_ouvert_prestation_familiale_out = enfants_a_charge_droit_ouvert_prestation_familiale_324, - prise_en_compte_out = prise_en_compte_180, - versement_out = versement_227, montant_verse_out = montant_verse_502, - droit_ouvert_base_out = droit_ouvert_base_385, - montant_initial_base_out = montant_initial_base_459, - montant_initial_base_premier_enfant_out = montant_initial_base_premier_enfant_375, - montant_initial_base_deuxieme_enfant_out = montant_initial_base_deuxieme_enfant_425, - montant_initial_base_troisieme_enfant_et_plus_out = montant_initial_base_troisieme_enfant_et_plus_413, - rapport_enfants_total_moyen_out = rapport_enfants_total_moyen_437, - nombre_moyen_enfants_out = nombre_moyen_enfants_366, - nombre_total_enfants_out = nombre_total_enfants_364, - montant_avec_garde_alternee_base_out = montant_avec_garde_alternee_base_482, - montant_verse_base_out = montant_verse_base_491, - droit_ouvert_forfaitaire_out = droit_ouvert_forfaitaire_361, - montant_verse_forfaitaire_par_enfant_out = montant_verse_forfaitaire_par_enfant_401, - montant_verse_forfaitaire_out = montant_verse_forfaitaire_454, - droit_ouvert_majoration_out = droit_ouvert_majoration_387, - montant_initial_metropole_majoration_out = montant_initial_metropole_majoration_439, - montant_initial_majoration_out = montant_initial_majoration_461, - montant_avec_garde_alternee_majoration_out = montant_avec_garde_alternee_majoration_484, - montant_verse_majoration_out = montant_verse_majoration_493, - droit_ouvert_complement_out = droit_ouvert_complement_359, - montant_base_complement_pour_base_et_majoration_out = montant_base_complement_pour_base_et_majoration_498, - complement_degressif_out = complement_degressif_390, - montant_verse_complement_pour_base_et_majoration_out = montant_verse_complement_pour_base_et_majoration_500, - montant_verse_complement_pour_forfaitaire_out = montant_verse_complement_pour_forfaitaire_472, - nombre_enfants_l521_1_out = nombre_enfants_l521_1_274, - age_minimum_alinea_1_l521_3_out = age_minimum_alinea_1_l521_3_321, - nombre_enfants_alinea_2_l521_3_out = nombre_enfants_alinea_2_l521_3_276, - est_enfant_le_plus_age_out = est_enfant_le_plus_age_328, - plafond_I_d521_3_out = plafond__i_d521_3_345, - plafond_II_d521_3_out = plafond__i_i_d521_3_331) + (not personne_charge_effective_permanente_est_parent_168 and + personne_charge_effective_permanente_remplit_titre__i_170)) + return AllocationsFamilialesOut(personne_charge_effective_permanente_est_parent_out=personne_charge_effective_permanente_est_parent_168, + personne_charge_effective_permanente_remplit_titre_I_out=personne_charge_effective_permanente_remplit_titre__i_170, + ressources_menage_out=ressources_menage_172, + residence_out=residence_174, date_courante_out=date_courante_176, + enfants_a_charge_out=enfants_a_charge_178, + enfants_a_charge_droit_ouvert_prestation_familiale_out=enfants_a_charge_droit_ouvert_prestation_familiale_324, + prise_en_compte_out=prise_en_compte_180, + versement_out=versement_227, montant_verse_out=montant_verse_502, + droit_ouvert_base_out=droit_ouvert_base_385, + montant_initial_base_out=montant_initial_base_459, + montant_initial_base_premier_enfant_out=montant_initial_base_premier_enfant_375, + montant_initial_base_deuxieme_enfant_out=montant_initial_base_deuxieme_enfant_425, + montant_initial_base_troisieme_enfant_et_plus_out=montant_initial_base_troisieme_enfant_et_plus_413, + rapport_enfants_total_moyen_out=rapport_enfants_total_moyen_437, + nombre_moyen_enfants_out=nombre_moyen_enfants_366, + nombre_total_enfants_out=nombre_total_enfants_364, + montant_avec_garde_alternee_base_out=montant_avec_garde_alternee_base_482, + montant_verse_base_out=montant_verse_base_491, + droit_ouvert_forfaitaire_out=droit_ouvert_forfaitaire_361, + montant_verse_forfaitaire_par_enfant_out=montant_verse_forfaitaire_par_enfant_401, + montant_verse_forfaitaire_out=montant_verse_forfaitaire_454, + droit_ouvert_majoration_out=droit_ouvert_majoration_387, + montant_initial_metropole_majoration_out=montant_initial_metropole_majoration_439, + montant_initial_majoration_out=montant_initial_majoration_461, + montant_avec_garde_alternee_majoration_out=montant_avec_garde_alternee_majoration_484, + montant_verse_majoration_out=montant_verse_majoration_493, + droit_ouvert_complement_out=droit_ouvert_complement_359, + montant_base_complement_pour_base_et_majoration_out=montant_base_complement_pour_base_et_majoration_498, + complement_degressif_out=complement_degressif_390, + montant_verse_complement_pour_base_et_majoration_out=montant_verse_complement_pour_base_et_majoration_500, + montant_verse_complement_pour_forfaitaire_out=montant_verse_complement_pour_forfaitaire_472, + nombre_enfants_l521_1_out=nombre_enfants_l521_1_274, + age_minimum_alinea_1_l521_3_out=age_minimum_alinea_1_l521_3_321, + nombre_enfants_alinea_2_l521_3_out=nombre_enfants_alinea_2_l521_3_276, + est_enfant_le_plus_age_out=est_enfant_le_plus_age_328, + plafond_I_d521_3_out=plafond__i_d521_3_345, + plafond_II_d521_3_out=plafond__i_i_d521_3_331) -def interface_allocations_familiales(interface_allocations_familiales_in_504:InterfaceAllocationsFamilialesIn): + +def interface_allocations_familiales(interface_allocations_familiales_in_504: InterfaceAllocationsFamilialesIn): date_courante_505 = interface_allocations_familiales_in_504.date_courante_in enfants_506 = interface_allocations_familiales_in_504.enfants_in enfants_a_charge_507 = interface_allocations_familiales_in_504.enfants_a_charge_in @@ -2722,248 +2814,289 @@ def interface_allocations_familiales(interface_allocations_familiales_in_504:Int local_var_514 = date_courante_505(Unit()) except EmptyError: raise NoValueProvided(SourcePosition(filename="./epilogue.catala_fr", - start_line=78, start_column=12, end_line=78, end_column=25, - law_headings=["Interface du programme", "Épilogue"])) + start_line=78, start_column=12, end_line=78, end_column=25, + law_headings=["Interface du programme", "Épilogue"])) date_courante_513 = log_variable_definition(["InterfaceAllocationsFamiliales", - "date_courante"], local_var_514) + "date_courante"], local_var_514) try: local_var_516 = enfants_506(Unit()) except EmptyError: raise NoValueProvided(SourcePosition(filename="./epilogue.catala_fr", - start_line=79, start_column=12, end_line=79, end_column=19, - law_headings=["Interface du programme", "Épilogue"])) + start_line=79, start_column=12, end_line=79, end_column=19, + law_headings=["Interface du programme", "Épilogue"])) enfants_515 = log_variable_definition(["InterfaceAllocationsFamiliales", - "enfants"], local_var_516) + "enfants"], local_var_516) try: local_var_518 = ressources_menage_508(Unit()) except EmptyError: raise NoValueProvided(SourcePosition(filename="./epilogue.catala_fr", - start_line=82, start_column=12, end_line=82, end_column=29, - law_headings=["Interface du programme", "Épilogue"])) + start_line=82, start_column=12, end_line=82, end_column=29, + law_headings=["Interface du programme", "Épilogue"])) ressources_menage_517 = log_variable_definition(["InterfaceAllocationsFamiliales", - "ressources_ménage"], local_var_518) + "ressources_ménage"], local_var_518) try: local_var_520 = residence_509(Unit()) except EmptyError: raise NoValueProvided(SourcePosition(filename="./epilogue.catala_fr", - start_line=83, start_column=12, end_line=83, end_column=21, - law_headings=["Interface du programme", "Épilogue"])) + start_line=83, start_column=12, end_line=83, end_column=21, + law_headings=["Interface du programme", "Épilogue"])) residence_519 = log_variable_definition(["InterfaceAllocationsFamiliales", - "résidence"], local_var_520) + "résidence"], local_var_520) try: try: - local_var_522 = personne_charge_effective_permanente_est_parent_511(Unit()) + local_var_522 = personne_charge_effective_permanente_est_parent_511( + Unit()) except EmptyError: local_var_522 = False except EmptyError: raise NoValueProvided(SourcePosition(filename="./epilogue.catala_fr", - start_line=85, start_column=12, end_line=85, end_column=59, - law_headings=["Interface du programme", "Épilogue"])) + start_line=85, start_column=12, end_line=85, end_column=59, + law_headings=["Interface du programme", "Épilogue"])) personne_charge_effective_permanente_est_parent_521 = log_variable_definition(["InterfaceAllocationsFamiliales", - "personne_charge_effective_permanente_est_parent"], local_var_522) + "personne_charge_effective_permanente_est_parent"], local_var_522) try: try: - local_var_524 = personne_charge_effective_permanente_remplit_titre__i_512(Unit()) + local_var_524 = personne_charge_effective_permanente_remplit_titre__i_512( + Unit()) except EmptyError: local_var_524 = False except EmptyError: raise NoValueProvided(SourcePosition(filename="./epilogue.catala_fr", - start_line=86, start_column=12, end_line=86, end_column=64, - law_headings=["Interface du programme", "Épilogue"])) + start_line=86, start_column=12, end_line=86, end_column=64, + law_headings=["Interface du programme", "Épilogue"])) personne_charge_effective_permanente_remplit_titre__i_523 = log_variable_definition(["InterfaceAllocationsFamiliales", - "personne_charge_effective_permanente_remplit_titre_I"], - local_var_524) + "personne_charge_effective_permanente_remplit_titre_I"], + local_var_524) try: try: local_var_526 = enfants_a_charge_507(Unit()) except EmptyError: - def local_var_527(enfant_528:Any): + def local_var_527(enfant_528: Any): if ((enfant_528.d_date_de_naissance + - duration_of_numbers(3,0,0)) >= - date_courante_513): + duration_of_numbers(3, 0, 0)) >= + date_courante_513): local_var_529 = SituationObligationScolaire(SituationObligationScolaire_Code.Avant, - Unit()) + Unit()) else: if ((enfant_528.d_date_de_naissance + - duration_of_numbers(16,0,0)) >= - date_courante_513): + duration_of_numbers(16, 0, 0)) >= + date_courante_513): local_var_529 = SituationObligationScolaire(SituationObligationScolaire_Code.Pendant, - Unit()) + Unit()) else: local_var_529 = SituationObligationScolaire(SituationObligationScolaire_Code.Apres, - Unit()) - return Enfant(identifiant = enfant_528.d_identifiant, - obligation_scolaire = local_var_529, - remuneration_mensuelle = enfant_528.d_remuneration_mensuelle, - date_de_naissance = enfant_528.d_date_de_naissance, - age = year_of_date((date_of_numbers(0,1,1) + - (date_courante_513 - enfant_528.d_date_de_naissance))), - prise_en_charge = enfant_528.d_prise_en_charge, - a_deja_ouvert_droit_aux_allocations_familiales = enfant_528.d_a_deja_ouvert_droit_aux_allocations_familiales) + Unit()) + return Enfant(identifiant=enfant_528.d_identifiant, + obligation_scolaire=local_var_529, + remuneration_mensuelle=enfant_528.d_remuneration_mensuelle, + date_de_naissance=enfant_528.d_date_de_naissance, + age=year_of_date((date_of_numbers(0, 1, 1) + + (date_courante_513 - enfant_528.d_date_de_naissance))), + prise_en_charge=enfant_528.d_prise_en_charge, + a_deja_ouvert_droit_aux_allocations_familiales=enfant_528.d_a_deja_ouvert_droit_aux_allocations_familiales) local_var_526 = list_map(local_var_527, enfants_515) except EmptyError: raise NoValueProvided(SourcePosition(filename="./epilogue.catala_fr", - start_line=80, start_column=12, end_line=80, end_column=28, - law_headings=["Interface du programme", "Épilogue"])) + start_line=80, start_column=12, end_line=80, end_column=28, + law_headings=["Interface du programme", "Épilogue"])) enfants_a_charge_525 = log_variable_definition(["InterfaceAllocationsFamiliales", - "enfants_à_charge"], local_var_526) - def local_var_531(_:Unit): + "enfants_à_charge"], local_var_526) + + def local_var_531(_: Unit): try: if log_decision_taken(SourcePosition(filename="./epilogue.catala_fr", - start_line=95, start_column=20, end_line=95, end_column=67, - law_headings=["Interface du programme", - "Épilogue"]), personne_charge_effective_permanente_est_parent_521): + start_line=95, start_column=20, end_line=95, end_column=67, + law_headings=["Interface du programme", + "Épilogue"]), personne_charge_effective_permanente_est_parent_521): local_var_533 = True else: raise EmptyError except EmptyError: local_var_533 = False return log_variable_definition(["InterfaceAllocationsFamiliales", - "allocations_familiales.personne_charge_effective_permanente_est_parent"], - local_var_533) + "allocations_familiales.personne_charge_effective_permanente_est_parent"], + local_var_533) allocations_familiales_dot_personne_charge_effective_permanente_est_parent_530 = local_var_531 - def local_var_535(_:Unit): + + def local_var_535(_: Unit): try: if log_decision_taken(SourcePosition(filename="./epilogue.catala_fr", - start_line=98, start_column=20, end_line=98, end_column=72, - law_headings=["Interface du programme", - "Épilogue"]), personne_charge_effective_permanente_remplit_titre__i_523): + start_line=98, start_column=20, end_line=98, end_column=72, + law_headings=["Interface du programme", + "Épilogue"]), personne_charge_effective_permanente_remplit_titre__i_523): local_var_537 = True else: raise EmptyError except EmptyError: local_var_537 = False return log_variable_definition(["InterfaceAllocationsFamiliales", - "allocations_familiales.personne_charge_effective_permanente_remplit_titre_I"], - local_var_537) + "allocations_familiales.personne_charge_effective_permanente_remplit_titre_I"], + local_var_537) allocations_familiales_dot_personne_charge_effective_permanente_remplit_titre__i_534 = local_var_535 - def local_var_539(_:Unit): + + def local_var_539(_: Unit): return log_variable_definition(["InterfaceAllocationsFamiliales", - "allocations_familiales.ressources_ménage"], - ressources_menage_517) + "allocations_familiales.ressources_ménage"], + ressources_menage_517) allocations_familiales_dot_ressources_menage_538 = local_var_539 - def local_var_542(_:Unit): + + def local_var_542(_: Unit): return log_variable_definition(["InterfaceAllocationsFamiliales", - "allocations_familiales.résidence"], residence_519) + "allocations_familiales.résidence"], residence_519) allocations_familiales_dot_residence_541 = local_var_542 - def local_var_545(_:Unit): + + def local_var_545(_: Unit): return log_variable_definition(["InterfaceAllocationsFamiliales", - "allocations_familiales.date_courante"], date_courante_513) + "allocations_familiales.date_courante"], date_courante_513) allocations_familiales_dot_date_courante_544 = local_var_545 - def local_var_548(_:Unit): + + def local_var_548(_: Unit): return log_variable_definition(["InterfaceAllocationsFamiliales", - "allocations_familiales.enfants_à_charge"], - enfants_a_charge_525) + "allocations_familiales.enfants_à_charge"], + enfants_a_charge_525) allocations_familiales_dot_enfants_a_charge_547 = local_var_548 - def local_var_551(_:Unit): + + def local_var_551(_: Unit): raise EmptyError - def local_var_553(_:Unit): + + def local_var_553(_: Unit): raise EmptyError - def local_var_555(_:Unit): + + def local_var_555(_: Unit): raise EmptyError - def local_var_557(_:Unit): + + def local_var_557(_: Unit): raise EmptyError - def local_var_559(_:Unit): + + def local_var_559(_: Unit): raise EmptyError - def local_var_561(_:Unit): + + def local_var_561(_: Unit): raise EmptyError - def local_var_563(_:Unit): + + def local_var_563(_: Unit): raise EmptyError - def local_var_565(_:Unit): + + def local_var_565(_: Unit): raise EmptyError - def local_var_567(_:Unit): + + def local_var_567(_: Unit): raise EmptyError - def local_var_569(_:Unit): + + def local_var_569(_: Unit): raise EmptyError - def local_var_571(_:Unit): + + def local_var_571(_: Unit): raise EmptyError - def local_var_573(_:Unit): + + def local_var_573(_: Unit): raise EmptyError - def local_var_575(_:Unit): + + def local_var_575(_: Unit): raise EmptyError - def local_var_577(_:Unit): + + def local_var_577(_: Unit): raise EmptyError - def local_var_579(_:Unit): + + def local_var_579(_: Unit): raise EmptyError - def local_var_581(_:Unit): + + def local_var_581(_: Unit): raise EmptyError - def local_var_583(_:Unit): + + def local_var_583(_: Unit): raise EmptyError - def local_var_585(_:Unit): + + def local_var_585(_: Unit): raise EmptyError - def local_var_587(_:Unit): + + def local_var_587(_: Unit): raise EmptyError - def local_var_589(_:Unit): + + def local_var_589(_: Unit): raise EmptyError - def local_var_591(_:Unit): + + def local_var_591(_: Unit): raise EmptyError - def local_var_593(_:Unit): + + def local_var_593(_: Unit): raise EmptyError - def local_var_595(_:Unit): + + def local_var_595(_: Unit): raise EmptyError - def local_var_597(_:Unit): + + def local_var_597(_: Unit): raise EmptyError - def local_var_599(_:Unit): + + def local_var_599(_: Unit): raise EmptyError - def local_var_601(_:Unit): + + def local_var_601(_: Unit): raise EmptyError - def local_var_603(_:Unit): + + def local_var_603(_: Unit): raise EmptyError - def local_var_605(_:Unit): + + def local_var_605(_: Unit): raise EmptyError - def local_var_607(_:Unit): + + def local_var_607(_: Unit): raise EmptyError - def local_var_609(_:Unit): + + def local_var_609(_: Unit): raise EmptyError - def local_var_611(_:Unit): + + def local_var_611(_: Unit): raise EmptyError - def local_var_613(_:Unit): + + def local_var_613(_: Unit): raise EmptyError - def local_var_615(_:Unit): + + def local_var_615(_: Unit): raise EmptyError result_550 = log_end_call(["InterfaceAllocationsFamiliales", - "allocations_familiales", "AllocationsFamiliales"], - log_begin_call(["InterfaceAllocationsFamiliales", - "allocations_familiales", "AllocationsFamiliales"], - allocations_familiales, - AllocationsFamilialesIn(personne_charge_effective_permanente_est_parent_in = allocations_familiales_dot_personne_charge_effective_permanente_est_parent_530, - personne_charge_effective_permanente_remplit_titre_I_in = allocations_familiales_dot_personne_charge_effective_permanente_remplit_titre__i_534, - ressources_menage_in = allocations_familiales_dot_ressources_menage_538, - residence_in = allocations_familiales_dot_residence_541, - date_courante_in = allocations_familiales_dot_date_courante_544, - enfants_a_charge_in = allocations_familiales_dot_enfants_a_charge_547, - enfants_a_charge_droit_ouvert_prestation_familiale_in = local_var_551, - prise_en_compte_in = local_var_553, versement_in = local_var_555, - montant_verse_in = local_var_557, - droit_ouvert_base_in = local_var_559, - montant_initial_base_in = local_var_561, - montant_initial_base_premier_enfant_in = local_var_563, - montant_initial_base_deuxieme_enfant_in = local_var_565, - montant_initial_base_troisieme_enfant_et_plus_in = local_var_567, - rapport_enfants_total_moyen_in = local_var_569, - nombre_moyen_enfants_in = local_var_571, - nombre_total_enfants_in = local_var_573, - montant_avec_garde_alternee_base_in = local_var_575, - montant_verse_base_in = local_var_577, - droit_ouvert_forfaitaire_in = local_var_579, - montant_verse_forfaitaire_par_enfant_in = local_var_581, - montant_verse_forfaitaire_in = local_var_583, - droit_ouvert_majoration_in = local_var_585, - montant_initial_metropole_majoration_in = local_var_587, - montant_initial_majoration_in = local_var_589, - montant_avec_garde_alternee_majoration_in = local_var_591, - montant_verse_majoration_in = local_var_593, - droit_ouvert_complement_in = local_var_595, - montant_base_complement_pour_base_et_majoration_in = local_var_597, - complement_degressif_in = local_var_599, - montant_verse_complement_pour_base_et_majoration_in = local_var_601, - montant_verse_complement_pour_forfaitaire_in = local_var_603, - nombre_enfants_l521_1_in = local_var_605, - age_minimum_alinea_1_l521_3_in = local_var_607, - nombre_enfants_alinea_2_l521_3_in = local_var_609, - est_enfant_le_plus_age_in = local_var_611, - plafond_I_d521_3_in = local_var_613, - plafond_II_d521_3_in = local_var_615))) + "allocations_familiales", "AllocationsFamiliales"], + log_begin_call(["InterfaceAllocationsFamiliales", + "allocations_familiales", "AllocationsFamiliales"], + allocations_familiales, + AllocationsFamilialesIn(personne_charge_effective_permanente_est_parent_in=allocations_familiales_dot_personne_charge_effective_permanente_est_parent_530, + personne_charge_effective_permanente_remplit_titre_I_in=allocations_familiales_dot_personne_charge_effective_permanente_remplit_titre__i_534, + ressources_menage_in=allocations_familiales_dot_ressources_menage_538, + residence_in=allocations_familiales_dot_residence_541, + date_courante_in=allocations_familiales_dot_date_courante_544, + enfants_a_charge_in=allocations_familiales_dot_enfants_a_charge_547, + enfants_a_charge_droit_ouvert_prestation_familiale_in=local_var_551, + prise_en_compte_in=local_var_553, versement_in=local_var_555, + montant_verse_in=local_var_557, + droit_ouvert_base_in=local_var_559, + montant_initial_base_in=local_var_561, + montant_initial_base_premier_enfant_in=local_var_563, + montant_initial_base_deuxieme_enfant_in=local_var_565, + montant_initial_base_troisieme_enfant_et_plus_in=local_var_567, + rapport_enfants_total_moyen_in=local_var_569, + nombre_moyen_enfants_in=local_var_571, + nombre_total_enfants_in=local_var_573, + montant_avec_garde_alternee_base_in=local_var_575, + montant_verse_base_in=local_var_577, + droit_ouvert_forfaitaire_in=local_var_579, + montant_verse_forfaitaire_par_enfant_in=local_var_581, + montant_verse_forfaitaire_in=local_var_583, + droit_ouvert_majoration_in=local_var_585, + montant_initial_metropole_majoration_in=local_var_587, + montant_initial_majoration_in=local_var_589, + montant_avec_garde_alternee_majoration_in=local_var_591, + montant_verse_majoration_in=local_var_593, + droit_ouvert_complement_in=local_var_595, + montant_base_complement_pour_base_et_majoration_in=local_var_597, + complement_degressif_in=local_var_599, + montant_verse_complement_pour_base_et_majoration_in=local_var_601, + montant_verse_complement_pour_forfaitaire_in=local_var_603, + nombre_enfants_l521_1_in=local_var_605, + age_minimum_alinea_1_l521_3_in=local_var_607, + nombre_enfants_alinea_2_l521_3_in=local_var_609, + est_enfant_le_plus_age_in=local_var_611, + plafond_I_d521_3_in=local_var_613, + plafond_II_d521_3_in=local_var_615))) allocations_familiales_dot_personne_charge_effective_permanente_est_parent_617 = result_550.personne_charge_effective_permanente_est_parent_out allocations_familiales_dot_personne_charge_effective_permanente_remplit_titre__i_618 = result_550.personne_charge_effective_permanente_remplit_titre_I_out allocations_familiales_dot_ressources_menage_619 = result_550.ressources_menage_out @@ -3010,14 +3143,14 @@ def interface_allocations_familiales(interface_allocations_familiales_in_504:Int local_var_657 = allocations_familiales_dot_montant_verse_626 except EmptyError: raise NoValueProvided(SourcePosition(filename="./epilogue.catala_fr", - start_line=84, start_column=12, end_line=84, end_column=25, - law_headings=["Interface du programme", "Épilogue"])) + start_line=84, start_column=12, end_line=84, end_column=25, + law_headings=["Interface du programme", "Épilogue"])) montant_verse_656 = log_variable_definition(["InterfaceAllocationsFamiliales", - "montant_versé"], local_var_657) - return InterfaceAllocationsFamilialesOut(date_courante_out = date_courante_513, - enfants_out = enfants_515, - enfants_a_charge_out = enfants_a_charge_525, - ressources_menage_out = ressources_menage_517, - residence_out = residence_519, montant_verse_out = montant_verse_656, - personne_charge_effective_permanente_est_parent_out = personne_charge_effective_permanente_est_parent_521, - personne_charge_effective_permanente_remplit_titre_I_out = personne_charge_effective_permanente_remplit_titre__i_523) \ No newline at end of file + "montant_versé"], local_var_657) + return InterfaceAllocationsFamilialesOut(date_courante_out=date_courante_513, + enfants_out=enfants_515, + enfants_a_charge_out=enfants_a_charge_525, + ressources_menage_out=ressources_menage_517, + residence_out=residence_519, montant_verse_out=montant_verse_656, + personne_charge_effective_permanente_est_parent_out=personne_charge_effective_permanente_est_parent_521, + personne_charge_effective_permanente_remplit_titre_I_out=personne_charge_effective_permanente_remplit_titre__i_523) diff --git a/french_law/python/catala_runtime.py b/french_law/python/catala_runtime.py index b28d2bbb..fa71254e 100644 --- a/french_law/python/catala_runtime.py +++ b/french_law/python/catala_runtime.py @@ -11,26 +11,247 @@ from gmpy2 import log2, mpz, mpq, mpfr, mpc # type: ignore import datetime -import dateutil.relativedelta # type: ignore -from typing import NewType, List, Callable, Tuple, Optional, TypeVar, Iterable +import dateutil.relativedelta +from typing import NewType, List, Callable, Tuple, Optional, TypeVar, Iterable, Union from functools import reduce Alpha = TypeVar('Alpha') Beta = TypeVar('Beta') -# ===== -# Types -# ===== +# ============ +# Type classes +# ============ -Integer = NewType('Integer', object) -Decimal = NewType('Decimal', object) -Money = NewType('Money', Integer) -Date = NewType('Date', datetime.date) -Duration = NewType('Duration', object) + +class Integer: + def __init__(self, value: Union[str, int]) -> None: + self.value = mpz(value) + + def __add__(self, other: 'Integer') -> 'Integer': + return Integer(self.value + other.value) + + def __sub__(self, other: 'Integer') -> 'Integer': + return Integer(self.value - other.value) + + def __mul__(self, other: 'Integer') -> 'Integer': + return Integer(self.value * other.value) + + def __truediv__(self, other: 'Integer') -> 'Integer': + return Integer(self.value // other.value) + + def __neg__(self: 'Integer') -> 'Integer': + return Integer(- self.value) + + def __lt__(self, other: 'Integer') -> bool: + return self.value < other.value + + def __le__(self, other: 'Integer') -> bool: + return self.value <= other.value + + def __gt__(self, other: 'Integer') -> bool: + return self.value > other.value + + def __ge__(self, other: 'Integer') -> bool: + return self.value >= other.value + + def __ne__(self, other: object) -> bool: + if isinstance(other, Integer): + return self.value != other.value + else: + return True + + def __eq__(self, other: object) -> bool: + if isinstance(other, Integer): + return self.value == other.value + else: + return False + + +class Decimal: + def __init__(self, value: Union[str, int, float, Integer]) -> None: + self.value = mpq(value) + + def __add__(self, other: 'Decimal') -> 'Decimal': + return Decimal(self.value + other.value) + + def __sub__(self, other: 'Decimal') -> 'Decimal': + return Decimal(self.value - other.value) + + def __mul__(self, other: 'Decimal') -> 'Decimal': + return Decimal(self.value * other.value) + + def __truediv__(self, other: 'Decimal') -> 'Decimal': + return Decimal(self.value / other.value) + + def __neg__(self: 'Decimal') -> 'Decimal': + return Decimal(- self.value) + + def __lt__(self, other: 'Decimal') -> bool: + return self.value < other.value + + def __le__(self, other: 'Decimal') -> bool: + return self.value <= other.value + + def __gt__(self, other: 'Decimal') -> bool: + return self.value > other.value + + def __ge__(self, other: 'Decimal') -> bool: + return self.value >= other.value + + def __ne__(self, other: object) -> bool: + if isinstance(other, Decimal): + return self.value != other.value + else: + return True + + def __eq__(self, other: object) -> bool: + if isinstance(other, Decimal): + return self.value == other.value + else: + return False + + +class Money: + def __init__(self, value: Integer) -> None: + self.value = value + + def __add__(self, other: 'Money') -> 'Money': + return Money(self.value + other.value) + + def __sub__(self, other: 'Money') -> 'Money': + return Money(self.value - other.value) + + def __mul__(self, other: Decimal) -> 'Money': + return Money(Integer(self.value.value * other.value)) + + def __truediv__(self, other: 'Money') -> Decimal: + return Decimal(mpq(self.value.value / other.value.value)) + + def __neg__(self: 'Money') -> 'Money': + return Money(- self.value) + + def __lt__(self, other: 'Money') -> bool: + return self.value < other.value + + def __le__(self, other: 'Money') -> bool: + return self.value <= other.value + + def __gt__(self, other: 'Money') -> bool: + return self.value > other.value + + def __ge__(self, other: 'Money') -> bool: + return self.value >= other.value + + def __ne__(self, other: object) -> bool: + if isinstance(other, Money): + return self.value != other.value + else: + return True + + def __eq__(self, other: object) -> bool: + if isinstance(other, Money): + return self.value == other.value + else: + return False + + +class Date: + def __init__(self, value: datetime.date) -> None: + self.value = value + + def __add__(self, other: 'Duration') -> 'Date': + return Date(self.value + other.value) + + def __sub__(self, other: 'Date') -> 'Duration': + # Careful: invert argument order + return Duration(dateutil.relativedelta.relativedelta(other.value, self.value)) + + def __lt__(self, other: 'Date') -> bool: + return self.value < other.value + + def __le__(self, other: 'Date') -> bool: + return self.value <= other.value + + def __gt__(self, other: 'Date') -> bool: + return self.value > other.value + + def __ge__(self, other: 'Date') -> bool: + return self.value >= other.value + + def __ne__(self, other: object) -> bool: + if isinstance(other, Date): + return self.value != other.value + else: + return True + + def __eq__(self, other: object) -> bool: + if isinstance(other, Date): + return self.value == other.value + else: + return False + + +class Duration: + def __init__(self, value: dateutil.relativedelta.relativedelta) -> None: + self.value = value + + def __add__(self, other: 'Duration') -> 'Duration': + return Duration(self.value + other.value) + + def __sub__(self, other: 'Duration') -> 'Duration': + return Duration(self.value - other.value) + + def __neg__(self: 'Duration') -> 'Duration': + return Duration(- self.value) + + def __lt__(self, other: 'Duration') -> bool: + x = self.value.normalized() + y = other.value.normalized() + if (x.years != 0 or y.years != 0 or x.months != 0 or y.months != 0): + raise Exception("Can only compare durations expressed in days") + else: + return x.days < y.days + + def __le__(self, other: 'Duration') -> bool: + x = self.value.normalized() + y = other.value.normalized() + if (x.years != 0 or y.years != 0 or x.months != 0 or y.months != 0): + raise Exception("Can only compare durations expressed in days") + else: + return x.days <= y.days + + def __gt__(self, other: 'Duration') -> bool: + x = self.value.normalized() + y = other.value.normalized() + if (x.years != 0 or y.years != 0 or x.months != 0 or y.months != 0): + raise Exception("Can only compare durations expressed in days") + else: + return x.days > y.days + + def __ge__(self, other: 'Duration') -> bool: + x = self.value.normalized() + y = other.value.normalized() + if (x.years != 0 or y.years != 0 or x.months != 0 or y.months != 0): + raise Exception("Can only compare durations expressed in days") + else: + return x.days >= y.days + + def __ne__(self, other: object) -> bool: + if isinstance(other, Duration): + return self.value != other.value + else: + return True + + def __eq__(self, other: object) -> bool: + if isinstance(other, Duration): + return self.value == other.value + else: + return False class Unit: - pass + def __init__(self) -> None: + ... class SourcePosition: @@ -69,58 +290,6 @@ class NoValueProvided(Exception): def __init__(self, source_position: SourcePosition) -> None: self.source_position = SourcePosition - -def raise_(ex): - raise ex - - -class TryCatch: - def __init__(self, fun, *args, **kwargs): - self.fun = fun - self.args = args - self.kwargs = kwargs - - self.exception_types_and_handlers = [] - self.finalize = None - - def rescue(self, exception_types, handler): - if not isinstance(exception_types, Iterable): - exception_types = (exception_types,) - - self.exception_types_and_handlers.append((exception_types, handler)) - return self - - def ensure(self, finalize, *finalize_args, **finalize_kwargs): - if self.finalize is not None: - raise Exception('ensure() called twice') - - self.finalize = finalize - self.finalize_args = finalize_args - self.finalize_kwargs = finalize_kwargs - return self - - def __call__(self): - try: - return self.fun(*self.args, **self.kwargs) - - except BaseException as exc: - handler = self.find_applicable_handler(exc) - if handler is None: - raise - return handler(exc) - - finally: - if self.finalize is not None: - self.finalize() - - def find_applicable_handler(self, exc): - applicable_handlers = ( - handler - for exception_types, handler in self.exception_types_and_handlers - if isinstance(exc, exception_types) - ) - return next(applicable_handlers, None) - # ============================ # Constructors and conversions # ============================ @@ -131,19 +300,19 @@ class TryCatch: def money_of_cents_string(v: str) -> Money: - return Money(mpz(v)) + return Money(Integer(v)) def money_of_cents_int(v: int) -> Money: - return Money(mpz(v)) + return Money(Integer(v)) def money_of_cents_integer(v: Integer) -> Money: - return Money(mpz(v)) + return Money(v) def money_to_float(m: Money) -> float: - return float(mpfr(mpq(m, 100))) + return float(mpfr(mpq(m.value.value, 100))) def money_to_string(m: Money) -> str: @@ -151,7 +320,7 @@ def money_to_string(m: Money) -> str: def money_to_cents(m: Money) -> Integer: - return m + return m.value # -------- # Decimals @@ -159,23 +328,23 @@ def money_to_cents(m: Money) -> Integer: def decimal_of_string(d: str) -> Decimal: - return Decimal(mpq(d)) + return Decimal(d) def decimal_to_float(d: Decimal) -> float: - return float(mpfr(d)) + return float(mpfr(d.value)) def decimal_of_float(d: float) -> Decimal: - return Decimal(mpq(d)) + return Decimal(d) def decimal_of_integer(d: Integer) -> Decimal: - return Decimal(mpq(d)) + return Decimal(d.value) def decimal_to_string(precision: int, i: Decimal) -> str: - return "{1:.{0}}".format(precision, mpfr(i, precision * 10 // 2)) + return "{1:.{0}}".format(precision, mpfr(i.value, precision * 10 // 2)) # -------- # Integers @@ -183,19 +352,19 @@ def decimal_to_string(precision: int, i: Decimal) -> str: def integer_of_string(s: str) -> Integer: - return Integer(mpz(s)) + return Integer(s) def integer_to_string(d: Integer) -> str: - return str(d) + return str(d.value) def integer_of_int(d: int) -> Integer: - return Integer(mpz(d)) + return Integer(d) def integer_to_int(d: Integer) -> int: - return int(d) # type: ignore + return int(d.value) def integer_exponentiation(i: Integer, e: int) -> Integer: @@ -203,7 +372,7 @@ def integer_exponentiation(i: Integer, e: int) -> Integer: def integer_log2(i: Integer) -> int: - return int(log2(i)) + return int(log2(i.value)) # ----- # Dates @@ -211,19 +380,19 @@ def integer_log2(i: Integer) -> int: def day_of_month_of_date(d: Date) -> Integer: - return integer_of_int(d.day) + return integer_of_int(d.value.day) def month_number_of_date(d: Date) -> Integer: - return integer_of_int(d.month) + return integer_of_int(d.value.month) def year_of_date(d: Date) -> Integer: - return integer_of_int(d.year) + return integer_of_int(d.value.year) def date_to_string(d: Date) -> str: - return "{}".format(d) + return "{}".format(d.value) def date_of_numbers(year: int, month: int, day: int) -> Date: @@ -239,11 +408,11 @@ def duration_of_numbers(years: int, months: int, days: int) -> Duration: def duration_to_years_months_days(d: Duration) -> Tuple[int, int, int]: - return (d.years, d.months, d.days) # type: ignore + return (d.value.years, d.value.months, d.value.days) # type: ignore def duration_to_string(s: Duration) -> str: - return "{}".format(s) + return "{}".format(s.value) # ----- # Lists @@ -297,9 +466,10 @@ def handle_default( return acc -def no_input() -> Callable[[], Alpha]: - # From https://stackoverflow.com/questions/8294618/define-a-lambda-expression-that-raises-an-exception - return (_ for _ in ()).throw(EmptyError) +def no_input() -> Callable[[Unit], Alpha]: + def closure(_: Unit()): + raise EmptyError + return closure # ======= # Logging diff --git a/french_law/python/dependencies.txt b/french_law/python/dependencies.txt index 4854f0f3..8d8b0fb1 100644 --- a/french_law/python/dependencies.txt +++ b/french_law/python/dependencies.txt @@ -2,4 +2,6 @@ gmpy2 typing mypy python-dateutil +types-python-dateutil sphinx +autopep8 \ No newline at end of file