Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expérimentation M++ #227

Merged
merged 80 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from 73 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
b846cfe
Ajout des cibles (assignations et si/sinon/alors).
david-michel1 Sep 7, 2023
6447820
Cibles: ajout du calcul des domaines.
Sep 12, 2023
c8f9645
Enrichissement des filtres de vérifs.
david-michel1 Sep 13, 2023
1d44023
Remplacement de dgfip_base.mpp par des cibles.
Sep 14, 2023
bdb5fba
Ajout des instructions "afficher" et "afficher_erreur".
david-michel1 Sep 15, 2023
6f05635
Préparation des itérateurs dans le backend C.
david-michel1 Sep 19, 2023
a33d437
Introduction des itérateurs dans l'interpréteur.
david-michel1 Sep 21, 2023
0f83ad1
Itérateurs pour le backend C.
Sep 25, 2023
4317fc2
Environnements de restauration.
david-michel1 Sep 26, 2023
3cc7fe1
Traduction du primitif ml vers M en cours.
david-michel1 Sep 27, 2023
898a326
Primitif unifié
Sep 28, 2023
ad6dd65
Séparation de la logique d'expansion des macros/constantes.
Oct 9, 2023
33d5f85
Découplage de la gestion des macros (boucles et constantes).
david-michel1 Oct 10, 2023
4a66970
Généralisation des accès aux tableaux.
david-michel1 Oct 10, 2023
af31e40
Généralisation des tableaux dasn les itérateurs.
Oct 11, 2023
ec11e28
Primitif 2019 interprété en M.
Oct 11, 2023
bc1e58c
Forcer les déclarations ordonnées dans les fichiers M.
david-michel1 Oct 12, 2023
294236b
Oubli d'un ficher...
david-michel1 Oct 13, 2023
c0c0ff1
Gestion améliorée des domaines.
Oct 14, 2023
0bba81d
Suite de la validation du code M.
david-michel1 Oct 17, 2023
0466e23
Fuzzing primitif 2022
david-michel1 Oct 20, 2023
6fd7d16
Fiabilisation de l'analyse M, suite.
Oct 20, 2023
6fa311c
Merge branch 'experimentation_mpp' of https://github.com/MLanguage/ml…
Oct 20, 2023
53c81ad
Ordonnancement des règles.
Oct 24, 2023
6c556ca
Validité des enchaîneurs.
Oct 26, 2023
9f9bdd6
Vérifs des vérifs
david-michel1 Oct 27, 2023
d2e63ec
Vérifs des vérifs (suite).
david-michel1 Oct 28, 2023
4375b33
Appels de verifs
david-michel1 Nov 7, 2023
1da2e0a
heck_validity, suite et fin.
david-michel1 Nov 9, 2023
fb94a02
Compilation des cibles dans des fichiers séparés.
david-michel1 Nov 15, 2023
b8246db
Nettoyage de la grammaire.
david-michel1 Nov 15, 2023
4879aac
Déclaration de variables n'importe où.
david-michel1 Nov 20, 2023
abd5877
Commentaires multilignes (#{...}#)
david-michel1 Nov 21, 2023
9c784f3
COmmentaires multilignes ( #{ ... }# ).
david-michel1 Nov 21, 2023
5d26e67
2021
david-michel1 Nov 24, 2023
b483e14
Simplification de l'interface du backend C
david-michel1 Nov 28, 2023
22c7e0e
Simplicicationd el'interface du backend C.
david-michel1 Nov 29, 2023
2e6c875
Merge branch 'master' into experimentation_mpp
Nov 29, 2023
a646c67
Correction du merge.
david-michel1 Nov 29, 2023
e1e4da3
Remove java testing as it is deprecated
Nov 29, 2023
98e3119
Supression du test_java_backend (et nettoyage de mast_to_mir.ml).
david-michel1 Nov 29, 2023
09e159b
Travail sur l'intervace C.
david-michel1 Dec 4, 2023
b50da42
Travail sur l'interface C.
david-michel1 Dec 5, 2023
ba4d6bf
Interface C.
david-michel1 Dec 5, 2023
e3bc2e7
Interface C.
david-michel1 Dec 5, 2023
35bc3a6
vail sur les makefiles.
david-michel1 Dec 6, 2023
d3b4623
Les makefiles c'est de la m...
david-michel1 Dec 12, 2023
ef27c91
Correction année dans le Makefile.
david-michel1 Dec 13, 2023
bfc99e3
Makefiles
david-michel1 Dec 13, 2023
96af195
Makefiles
david-michel1 Dec 13, 2023
6fbc9cb
Makefiles
david-michel1 Dec 15, 2023
9ebee8e
Comparaisons à un epsilon près + makefiles.
david-michel1 Dec 19, 2023
781c162
Suppression du mpp.
david-michel1 Dec 20, 2023
6336b69
Primitif 2022
david-michel1 Jan 9, 2024
98077fc
Indentation de l'affichage.
david-michel1 Jan 18, 2024
32047d0
Primitif 2022
david-michel1 Jan 30, 2024
09e00f3
Primitif 2022 inteprété
david-michel1 Jan 31, 2024
4560604
Gestion des erreurs.
david-michel1 Feb 6, 2024
11fa71a
Ordre des vérifs + erreurs bloquantes.
david-michel1 Feb 8, 2024
7add6d8
Gestion des anomalies, interpréteur + backend C
david-michel1 Feb 15, 2024
07edd68
Interface C DGFiP.
david-michel1 Feb 20, 2024
7c03718
Intégration du M étendu dans le backend C.
david-michel1 Feb 22, 2024
76526c2
Modifs irdata dans tous les backends C.
david-michel1 Feb 27, 2024
3d8500c
Correction makefiles.
david-michel1 Feb 28, 2024
d57a0df
Suppression de Mir.program_conds
david-michel1 Feb 28, 2024
4fa098c
Suppression program_rules.
david-michel1 Feb 28, 2024
a479d38
Simplification de l'interface (encore des erreurs).
david-michel1 Feb 28, 2024
85378b0
Nettoyage
david-michel1 Feb 29, 2024
be59871
Modifications suites à commentaires
david-michel1 Mar 4, 2024
3f9969d
Nettoyage
david-michel1 Mar 5, 2024
1865df3
Nettoyage
david-michel1 Mar 5, 2024
6f9d00c
Nettoyage
david-michel1 Mar 5, 2024
1a89a59
déplacement des fichiers cibles.m
david-michel1 Mar 6, 2024
6df95cd
Déplacement de Irj vers test_framework
david-michel1 Mar 6, 2024
3e3edea
Merge branch 'master' into experimentation_mpp
denismerigoux Mar 7, 2024
85ea298
Remove annoying ocamlformat behavior
denismerigoux Mar 7, 2024
5afe83c
Nettoyage et ajout du script DGFiP.
david-michel1 Mar 7, 2024
70a4906
Bug "Out of memory" dans le backend ML
david-michel1 Mar 7, 2024
dad7eaa
Nettoyage du backend ML
david-michel1 Mar 7, 2024
2d10ecd
Rafistolage du backend ML (out of memory).
david-michel1 Mar 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 0 additions & 8 deletions .github/workflows/check_correctness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,3 @@ jobs:
eval $(opam env)
make test_dgfip_c_backend

- name: Test Java backend
run: |
eval $(opam env)
make test_java_backend




121 changes: 33 additions & 88 deletions Makefile
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, c'est une grosse réécriture des Makefiles mais ta nouvelle organisation m'a l'air assez propre donc je suis pas contre changer ça. Par contre ça mérite de la doc, notamment une réécriture du README.md, pour expliquer comment appeler tes nouveaux Makefile pour builder, tester, etc.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On va essayer...

Original file line number Diff line number Diff line change
@@ -1,105 +1,50 @@
# Check Makefile.config.template if you want to override some of the flags
# in this Makefile.

include Makefile.include

ifeq ($(CODE_COVERAGE), 1)
CODE_COVERAGE_FLAG=--code_coverage
else
CODE_COVERAGE_FLAG=
endif

ifeq ($(TEST_FILTER), 1)
TEST_FILTER_FLAG=--dgfip_test_filter
else
TEST_FILTER_FLAG=
ifndef ROOT_DIR
ROOT_DIR:=$(realpath $(dir $(realpath $(lastword $(MAKEFILE_LIST)))))
endif

TEST_ERROR_MARGIN?=0.

MLANG_INTERPRETER_OPTS=\
--test_error_margin=$(TEST_ERROR_MARGIN) \
--mpp_file=$(MPP_FILE) \
--mpp_function=$(MPP_FUNCTION)

MLANG=$(MLANG_BIN) $(MLANG_DEFAULT_OPTS) $(MLANG_INTERPRETER_OPTS) $(CODE_COVERAGE_FLAG)

default: build

##################################################
# Initializing the project
##################################################

# Workaround for Opam 2.0 bug. Empty switch creation then installation could be a one line
# "opam switch create . --deps-only" otherwise
create-switch:
opam switch create . --empty

init-without-switch:
opam install . --deps-only
git submodule update --init

init: create-switch init-without-switch
CURR_DIR:=$(realpath $(shell pwd))

deps:
opam switch reinstall --deps-only
git submodule update
YEAR?=2020

##################################################
# Building the compiler
##################################################
include $(ROOT_DIR)/makefiles/functions.mk
include $(ROOT_DIR)/makefiles/variables.mk
-include $(ROOT_DIR)/makefiles/svn.mk
include $(ROOT_DIR)/makefiles/mlang.mk
include $(ROOT_DIR)/makefiles/c_backend.mk
-include $(ROOT_DIR)/makefiles/dgfip_backend.mk

format:
dune build @fmt --auto-promote | true
.PHONY: default \
create-switch init-without-switch init deps \
format dune build build-static \
doc \
test tests quick_test test_one \
calc_dir info_c calc_o dgfip_c_backend compile_dgfip_c_backend \
backend_tests test_dgfip_c_backend \
clean_backend clean_backend_c clean_backend_exe clean_backend_tmp clean_backend_res clean_backend_all \
test_java_backend

build: format dune

dune:
dune build $(DUNE_OPTIONS)

# Run only in an opam switch with musl and static options activated
build-static: DUNE_OPTIONS+=--profile=static
build-static: build

##################################################
# Testing the compiler
##################################################

# use: TEST_FILE=bla make test
test: build
$(MLANG) --run_test=$(TEST_FILE) $(SOURCE_FILES)

# use: TESTS_DIR=bla make test
tests: build
$(MLANG) $(MLANGOPTS) --run_all_tests=$(TESTS_DIR) $(TEST_FILTER_FLAG) $(SOURCE_FILES)

test_java_backend: build
ifeq ($(OPTIMIZE), 0)
@echo "\033[0;31mWarning, non-optimized Java files cannot be executed for now (too many constants for the JVM)\033[0m"
else
endif
$(MAKE) -C examples/java/ run_tests

test_dgfip_c_backend: build
$(MAKE) -C examples/dgfip_c/ml_primitif backend_tests
FORCE:

quick_test: build
$(MLANG) --backend interpreter --function_spec $(M_SPEC_FILE) $(SOURCE_FILES)
.DEFAULT_GOAL:=default

all: tests test_java_backend test_dgfip_c_backend quick_test
default: FORCE build

##################################################
# Doc
##################################################
test_java_backend: FORCE build
@echo "\033[0;31mWarning: Java backend not supported\033[0m"
#ifeq ($(OPTIMIZE), 0)
# @echo "\033[0;31mWarning, non-optimized Java files cannot be executed for now (too many constants for the JVM)\033[0m"
#else
#endif
# $(MAKE) -C examples/java/ run_tests

doc: FORCE build
dune build @doc
ln -fs $(shell pwd)/_build/default/_doc/_html/index.html doc/doc.html
all: FORCE quick_test tests test_dgfip_c_backend test_java_backend

clean:
$(MAKE) -C examples/dgfip_c/ml_primitif cleanall
$(MAKE) -C examples/java clean
clean: FORCE
$(call make_in,$(DGFIP_DIR),clean_backend_all)
# $(MAKE) -C examples/java clean
rm -f doc/doc.html
dune clean

FORCE:
70 changes: 0 additions & 70 deletions Makefile.config.template

This file was deleted.

112 changes: 0 additions & 112 deletions Makefile.include

This file was deleted.

Loading