Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
b17bb9a
Pour compilation du brouillon correctif
david-michel1 Sep 23, 2025
910462e
Adding new stop instruction to M++
Stevendeo Jun 17, 2025
fdf5d2f
Ajout de saisie environnement
david-michel1 Sep 25, 2025
93f9740
Ajout du correctif 2022
david-michel1 Sep 30, 2025
52a5b4e
Instruction stop (#282)
david-michel1 Sep 30, 2025
96a9bfb
re_traces obsolète
david-michel1 Sep 30, 2025
36d9da1
Ajout d'une instruction 'quitter'
Stevendeo Oct 1, 2025
4ea0c17
Instruction quitter dédiée aux cibles et quitte la cible principale
Stevendeo Oct 3, 2025
9eb37ad
Poetry
Stevendeo Oct 7, 2025
03336e2
Rename quitter to stop application
Stevendeo Oct 14, 2025
299b8b5
Interpreter and C backend with brand new stops
Stevendeo Oct 14, 2025
5ada605
Poetry
Stevendeo Oct 14, 2025
0ab6bff
[branche adaptation_correctif] Instruction stop étendue (#284)
david-michel1 Oct 20, 2025
a9fc71b
Ajout de "stop application" dans le code correctif
david-michel1 Oct 20, 2025
fd92c50
Correction des boucles numériques
david-michel1 Oct 28, 2025
a4a1d1f
Adding switch instruction and cleaning stanzas
Stevendeo Oct 28, 2025
86fd1a6
Expansion & validation of switch instruction
Stevendeo Oct 28, 2025
56b6df2
Compilation to C + exclusive switch
Stevendeo Oct 28, 2025
99ce795
Better types
Stevendeo Oct 28, 2025
dbc4500
Update tests and removing extra semicolon
Stevendeo Oct 28, 2025
0cb3f7a
Adding missing dune files
Stevendeo Oct 30, 2025
d38c8cf
defaut -> par_defaut
Stevendeo Oct 30, 2025
b6ea746
Rework of dune stanzas + new switch case instruction (#286)
david-michel1 Oct 30, 2025
c7d0ed8
Ajout de cherche_varinfo_statique
david-michel1 Nov 18, 2025
44cecf7
Nouveau backend c dans c_driver.
david-michel1 Nov 20, 2025
82f2249
Allowing multiple cases for a same switch block
Stevendeo Nov 12, 2025
fc964f3
Starting to rework correctif with switches
Stevendeo Nov 18, 2025
9abc977
Fixing reverse order of intructions
Stevendeo Nov 19, 2025
4e72fed
More switches
Stevendeo Nov 19, 2025
ed26846
More switches
Stevendeo Nov 21, 2025
983ad04
Aiguillages factorisés (#288)
Stevendeo Nov 21, 2025
92e4f5f
Correctif 2023
david-michel1 Nov 25, 2025
a0f264a
Correctifs 2024-2025
david-michel1 Nov 27, 2025
585e1ff
Correctif 2025
david-michel1 Dec 2, 2025
c6d3a0f
Correctif 2025
david-michel1 Dec 4, 2025
9725c92
Testing IRJ checker
Stevendeo Oct 30, 2025
b5b76ba
Cleaner exit when invalid argument of irj_checker
Stevendeo Oct 30, 2025
d7e1d0e
Test irj checker (#287)
Stevendeo Dec 9, 2025
f9978ff
Split Cli into Cli (for argument parsing) and Config
lambdalex-ocp Sep 16, 2025
8d35b06
remove dep_graph_file option
lambdalex-ocp Dec 2, 2025
00a7996
Split cli config correctif (#293)
Stevendeo Dec 11, 2025
e9416e5
Correctif 2025
david-michel1 Dec 11, 2025
65d0abb
Rework command line parsing to properly avoid errors when fetching help
Stevendeo Dec 11, 2025
94b6d6e
Correctif 2025
david-michel1 Dec 11, 2025
781b118
Correctif 2025
david-michel1 Dec 11, 2025
3a12c0a
Correction de la lecture des arguments en ligne de commande (#294)
Stevendeo Dec 15, 2025
61acd20
Start of a M documentation
Stevendeo Nov 13, 2025
bd817d8
Définition de variables
Stevendeo Dec 3, 2025
743ce19
Arith
Stevendeo Dec 3, 2025
0bcaa63
More syntax info
Stevendeo Dec 5, 2025
05cac91
Minimal doc for IRJ files
Stevendeo Dec 9, 2025
33b3c63
Documentation de l'utilisation des fichiers IRJ
Stevendeo Dec 9, 2025
f9a58d2
Documentation détaillée de la syntaxe de David
Stevendeo Dec 9, 2025
ca7e7d3
Rajout de certains mots clef
Stevendeo Dec 10, 2025
6cd19dd
Retravail de l'index
Stevendeo Dec 10, 2025
b9e7534
Poesie
Stevendeo Dec 10, 2025
104f569
Ajout de la génération de documentation au format PDF
Stevendeo Dec 10, 2025
7eb8d78
Verification d'installation de sphinx-doc
Stevendeo Dec 10, 2025
099f559
Un peu d'infos sur mlang
Stevendeo Dec 10, 2025
71d6514
Un peu plus d'infos sur mlang
Stevendeo Dec 10, 2025
62934b4
Suppression des inter-lignes
Stevendeo Dec 10, 2025
de40d2c
Déplacement du pré-traitement dans la section mlang
Stevendeo Dec 10, 2025
0e3b26d
Poesie
Stevendeo Dec 10, 2025
e3996e0
Déplacement d'arithmetique dans syntaxe et ajout d'un exemple
Stevendeo Dec 15, 2025
4940100
Poesie
Stevendeo Dec 15, 2025
70318ad
Plein de fonctions rajoutées
Stevendeo Dec 15, 2025
4031b41
Exclusion des variables à ne pas tester
david-michel1 Dec 16, 2025
f259a9c
Encore plein de fonctions en plus
Stevendeo Dec 16, 2025
0b42bde
Exemple sur les fonctions
Stevendeo Dec 16, 2025
b7aa666
Poesie
Stevendeo Dec 16, 2025
a65c2f0
Correction accès aux champs dans l'intérpréteur
david-michel1 Dec 16, 2025
7ec878a
OLIVE
Stevendeo Dec 16, 2025
3c72774
Déplacement dans doc
Stevendeo Dec 16, 2025
aec2d86
Ajout d'une regle pour construire la doc facilement
Stevendeo Dec 16, 2025
a9a9cf7
Documentation du langage M (#291)
Stevendeo Dec 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/check_correctness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ jobs:
eval $(opam env)
OPTIMIZE=0 make tests

- name: Test irj-checker
run: |
eval $(opam env)
make test_irj

- name: Test DGFIP C backend
run: |
eval $(opam env)
Expand Down
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,16 @@ clean: FORCE remise_a_zero_versionnage
rm -f doc/doc.html
dune clean

doc-deps: FORCE
python3 -m venv .venv
.venv/bin/pip install sphinx myst-parser

sphinx-doc: FORCE
@command -v .venv/bin/sphinx-build >/dev/null 2>&1 || \
{ echo "Pour construire la documentation, vous avez besoin de sphinx-build avec \
l'extension 'myst-parser'. Lancez `make doc-deps`."; exit 1; }
rm -rf _build/default/doc/*
cp -rf doc/* _build/default/doc/
mkdir -p examples/doc
.venv/bin/sphinx-build -M html _build/default/doc/ examples/doc
.venv/bin/sphinx-build -M latexpdf _build/default/doc/ examples/doc
8 changes: 0 additions & 8 deletions compare_traces.sh

This file was deleted.

Binary file removed doc/architecture.png
Binary file not shown.
27 changes: 27 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'MLang'
copyright = '2025, Direction Générale des FInances Publiques'
author = 'Direction Générale des FInances Publiques'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ['myst_parser']

templates_path = ['_templates']
exclude_patterns = []

language = 'fr'

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_static_path = ['_static']
322 changes: 322 additions & 0 deletions doc/exemples/fonctions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,322 @@
(exemples/fonctions)=

# Les fonctions

## Fichier test : test.m
```
espace_variables GLOBAL : par_defaut;
domaine regle mon_domaine_de_regle: par_defaut;
domaine verif mon_domaine_de_verifications: par_defaut;
application mon_application;
variable calculee : attribut mon_attribut;

evenement
: valeur ev_val
: variable ev_var;

X : calculee mon_attribut = 0 : "";
TAB : tableau[10] calculee mon_attribut = 2 : "";

cible init_tab:
application : mon_application;
iterer : variable I : entre 0..(taille(TAB) - 1) increment 1 : dans (
TAB[I] = I;
)

cible reinit_tab:
application : mon_application;
iterer : variable I : entre 0..(taille(TAB) - 1) increment 1 : dans (
TAB[I] = indefini;
)

cible test_abs:
application : mon_application;
afficher "\n__ABS__";
afficher "\n abs(indefini) = ";
afficher (abs(indefini));
afficher "\n abs(1) = ";
afficher (abs(1));
afficher "\n abs(-1) = ";
afficher (abs(-1));
afficher "\n";

cible test_arr:
application : mon_application;
afficher "\n__ARR__";
afficher "\n arr(indefini) = ";
afficher (arr(indefini));
afficher "\n arr(1.8) = ";
afficher (arr(1.8));
afficher "\n arr(-1.7) = ";
afficher (arr(-1.7));
afficher "\n";

cible test_attribut:
application : mon_application;
afficher "\n__ATTRIBUT__";
afficher "\n attribut(X, mon_attribut) = ";
afficher (attribut(X, mon_attribut));
afficher "\n attribut(TAB, mon_attribut) = ";
afficher (attribut(TAB, mon_attribut));
afficher "\n";

cible test_champ_evenement_base:
application : mon_application;
afficher "\n champ_evenement(0, ev_val) = ";
afficher (champ_evenement (0,ev_val));
afficher "\n champ_evenement(0, ev_var) = ";
afficher (champ_evenement (0,ev_var));
afficher "\n";

cible test_champ_evenement:
application : mon_application;
afficher "\n__CHAMP_EVENEMENT__";
arranger_evenements
: ajouter 1
: dans (
afficher "\nAvant d'initialiser les champs de l'événement:";
calculer cible test_champ_evenement_base;
champ_evenement (0,ev_var) reference X;
champ_evenement (0,ev_val) = 42;
X = 2;
afficher "\n Après avoir initialisé les champs de l'événement:";
calculer cible test_champ_evenement_base;
X = indefini;
)

cible test_inf:
application : mon_application;
afficher "\n__INF__";
afficher "\n inf(indefini) = ";
afficher (inf(indefini));
afficher "\n inf(1.8) = ";
afficher (inf(1.8));
afficher "\n inf(-1.7) = ";
afficher (inf(-1.7));
afficher "\n";

cible test_max:
application : mon_application;
afficher "\n__MAX__";
afficher "\n max(indefini, indefini) = ";
afficher (max(indefini, indefini));
afficher "\n max(-1, indefini) = ";
afficher (max(-1, indefini));
afficher "\n max(indefini, -1) = ";
afficher (max(indefini, -1));
afficher "\n max(1, indefini) = ";
afficher (max(1, indefini));
afficher "\n";

cible test_meme_variable:
application : mon_application;
afficher "\n__MEME_VARIABLE__";
afficher "\n meme_variable(X,X) = ";
afficher (meme_variable(X,X));
afficher "\n meme_variable(X,TAB) = ";
afficher (meme_variable(X,TAB));
afficher "\n meme_variable(TAB[0],TAB) = ";
afficher (meme_variable(TAB[0],TAB));
afficher "\n";

cible test_min:
application : mon_application;
afficher "\n__MIN__";
afficher "\n min(indefini, indefini) = ";
afficher (min(indefini, indefini));
afficher "\n min(1, indefini) = ";
afficher (min(1, indefini));
afficher "\n min(indefini, 1) = ";
afficher (min(indefini, 1));
afficher "\n min(-1, indefini) = ";
afficher (min(-1, indefini));
afficher "\n";

cible test_multimax_base:
application : mon_application;
afficher "\n multimax(indefini, TAB) = ";
afficher (multimax(indefini, TAB));
afficher "\n multimax(7, TAB) = ";
afficher (multimax(7, TAB));
afficher "\n multimax(taille(TAB) + 1, TAB) = ";
afficher (multimax(taille(TAB) + 1, TAB));
afficher "\n multimax(0, TAB) = ";
afficher (multimax(0, TAB));
afficher "\n multimax(-1, TAB) = ";
afficher (multimax(-1, TAB));

cible test_multimax:
application : mon_application;
afficher "\n__MULTIMAX__";
afficher "\nAvant initialisation du tableau :";
calculer cible test_multimax_base;
calculer cible init_tab;
afficher "\nAprès initialisation du tableau :";
calculer cible test_multimax_base;
calculer cible reinit_tab;
afficher "\n";

cible test_nb_evenements_base:
application : mon_application;
afficher "\n nb_evenements() = ";
afficher (nb_evenements ());
afficher "\n";

cible test_nb_evenements:
application : mon_application;
afficher "\n__NB_EVENEMENTS__";
afficher "\nAvant la définition d'un événement :";
calculer cible test_nb_evenements_base;
arranger_evenements
: ajouter 1
: dans (
afficher "\nPendant la définition d'un événement :";
calculer cible test_nb_evenements_base;
)
afficher "\nAprès la définition d'un événement :";
calculer cible test_nb_evenements_base;

cible test_null:
application : mon_application;
afficher "\n__NULL__";
afficher "\n null(indefini) = ";
afficher (null(indefini));
afficher "\n null(0) = ";
afficher (null(0));
afficher "\n null(1) = ";
afficher (null(1));
afficher "\n";

cible test_positif:
application : mon_application;
afficher "\n__POSITIF__";
afficher "\n positif(indefini) = ";
afficher (positif(indefini));
afficher "\n positif(0) = ";
afficher (positif(0));
afficher "\n positif(1) = ";
afficher (positif(1));
afficher "\n positif(-1) = ";
afficher (positif(-1));
afficher "\n";

cible test_positif_ou_nul:
application : mon_application;
afficher "\n__POSITIF OU NUL__";
afficher "\n positif_ou_nul(indefini) = ";
afficher (positif_ou_nul(indefini));
afficher "\n positif_ou_nul(0) = ";
afficher (positif_ou_nul(0));
afficher "\n positif_ou_nul(1) = ";
afficher (positif_ou_nul(1));
afficher "\n positif_ou_nul(-1) = ";
afficher (positif_ou_nul(-1));
afficher "\n";

cible test_present:
application : mon_application;
afficher "\n__PRESENT__";
afficher "\n present(indefini) = ";
afficher (present(indefini));
afficher "\n present(0) = ";
afficher (present(0));
afficher "\n present(1) = ";
afficher (present(1));
afficher "\n";

cible test_somme:
application : mon_application;
afficher "\n__SOMME__";
afficher "\n somme() = ";
afficher (somme());
afficher "\n somme(indefini) = ";
afficher (somme(indefini));
afficher "\n somme(1, indefini) = ";
afficher (somme(1, indefini));
afficher "\n somme(1, 2, 3, 4, 5) = ";
afficher (somme(1, 2, 3, 4, 5));
afficher "\n";

cible test_supzero:
application : mon_application;
afficher "\n__SUPZERO__";
afficher "\n supzero(indefini) = ";
afficher (supzero(indefini));
afficher "\n supzero(42) = ";
afficher (supzero(42));
afficher "\n supzero(-1) = ";
afficher (supzero(-1));
afficher "\n supzero(0) = ";
afficher (supzero(0));
afficher "\n";

cible test_taille:
application : mon_application;
afficher "\n__TAILLE__";
afficher "\n taille(TAB) = ";
afficher (taille(TAB));
afficher "\n taille(X) = ";
afficher (taille(X));
afficher "\n";

cible fun_test:
application : mon_application;
# Abs
calculer cible test_abs;
# Arr
calculer cible test_arr;
# Attribut
calculer cible test_attribut;
# Champ evenement
calculer cible test_champ_evenement;
# Inf
calculer cible test_inf;
# Max
calculer cible test_max;
# Meme variable
calculer cible test_meme_variable;
# Min
calculer cible test_min;
# Multimax
calculer cible test_multimax;
# Null
calculer cible test_nb_evenements;
# Null
calculer cible test_null;
# Positif
calculer cible test_positif;
# Positif ou nul
calculer cible test_positif_ou_nul;
# Présent
calculer cible test_present;
# Somme
calculer cible test_somme;
# Supzero
calculer cible test_supzero;
# Taille
calculer cible test_taille;
```

## Fichier irj : test.irj

```
#NOM
MON-TEST
#ENTREES-PRIMITIF
#CONTROLES-PRIMITIF
#RESULTATS-PRIMITIF
#ENTREES-CORRECTIF
#CONTROLES-CORRECTIF
#RESULTATS-CORRECTIF
##
```

## Commande

```
mlang test.m \
--without_dfgip_m \
-A mon_application \
--mpp_function fun_test \
--run_test test.irj
```
Loading
Loading