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

Cleanup primitive #232

Merged
merged 75 commits into from
Jul 11, 2024
Merged
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
9c9634d
Nettoyage mast_to_mir
david-michel1 Mar 11, 2024
687458e
Nettoyage Bir
david-michel1 Mar 13, 2024
0877b62
Nettoyage, suite
david-michel1 Mar 14, 2024
22c017c
Nettoyage, suite
david-michel1 Mar 18, 2024
136d6bb
Ajout fichiers Com(mun)
david-michel1 Mar 18, 2024
9404cd3
Nettoyage, suite
david-michel1 Mar 19, 2024
3ef3fc9
Optimisation de l'interpréteur en cours
david-michel1 Mar 20, 2024
3ea2fc2
Optimisation de l'interpéteur, suite
david-michel1 Mar 21, 2024
6e5d2f9
Optimisation de l'interpréteur, suite
david-michel1 Mar 22, 2024
1094b50
Optimisation de l'interpréteur
david-michel1 Mar 22, 2024
addd191
Élimination du Bir
david-michel1 Mar 22, 2024
712f363
Optimisation de l'interpréteur
david-michel1 Mar 26, 2024
e75e029
Nettoyage, suite
david-michel1 Mar 28, 2024
b56e8f7
Nettoyage, suite
david-michel1 Mar 29, 2024
4be77a8
Nettoyage, suite
david-michel1 Mar 29, 2024
05aa4d5
Nettoyage, suite
david-michel1 Apr 2, 2024
0f1861b
rebase master
david-michel1 Apr 30, 2024
840b2bc
update commit mlang-deps points to
noeensarguet Apr 30, 2024
11ab6b6
Sccript de MàJ de mlang-deps inutile
david-michel1 May 2, 2024
4ccec9a
Passage au mode multithread.
david-michel1 May 7, 2024
c083357
Variables temporaires pour les règles
david-michel1 May 14, 2024
f0565d5
Généralisation des règles et des cibles.
david-michel1 May 14, 2024
7ebf6ef
Taille des variables
david-michel1 May 14, 2024
4de70c8
Introduction des références de variables
david-michel1 May 15, 2024
b9e3532
Formatage de mlang.h
david-michel1 May 15, 2024
75c5f42
Variables temporaires dans irdata
david-michel1 May 22, 2024
04eb3a7
Changements dirers
david-michel1 May 24, 2024
b15fb8e
Gestion des références dans le backend C
david-michel1 May 27, 2024
f8d7234
Arguments de cible (instable)
david-michel1 May 28, 2024
a4435bc
Arguments pour les cibles
david-michel1 May 29, 2024
555526a
Itérateurs avec listes de variables.
david-michel1 May 30, 2024
9d20b9c
Suppression de Dgfip_varid.var_id_map
david-michel1 May 30, 2024
cb8fc03
Ajout des fonctions (syntaxe)
david-michel1 Jun 4, 2024
f9c8b16
Fonctions définissables.
david-michel1 Jun 6, 2024
ef4ec22
Construction quand-faire-sinon
david-michel1 Jun 11, 2024
740ac37
Nettoyage mast_to_mir
david-michel1 Mar 11, 2024
cb737a1
Nettoyage Bir
david-michel1 Mar 13, 2024
6037588
Nettoyage, suite
david-michel1 Mar 14, 2024
cc3c5ca
Nettoyage, suite
david-michel1 Mar 18, 2024
2bcd115
Ajout fichiers Com(mun)
david-michel1 Mar 18, 2024
0ce02ba
Nettoyage, suite
david-michel1 Mar 19, 2024
d764af4
Optimisation de l'interpréteur en cours
david-michel1 Mar 20, 2024
a0b7675
Optimisation de l'interpéteur, suite
david-michel1 Mar 21, 2024
c39cd47
Optimisation de l'interpréteur, suite
david-michel1 Mar 22, 2024
7ee8bea
Optimisation de l'interpréteur
david-michel1 Mar 22, 2024
ca4ae37
Élimination du Bir
david-michel1 Mar 22, 2024
68ef9ca
Optimisation de l'interpréteur
david-michel1 Mar 26, 2024
ff916c8
Nettoyage, suite
david-michel1 Mar 28, 2024
f172ce0
Nettoyage, suite
david-michel1 Mar 29, 2024
060e4ed
Nettoyage, suite
david-michel1 Mar 29, 2024
b258168
Nettoyage, suite
david-michel1 Apr 2, 2024
136af70
rebase master
david-michel1 Apr 30, 2024
f09b3ba
update commit mlang-deps points to
noeensarguet Apr 30, 2024
5a1f124
Sccript de MàJ de mlang-deps inutile
david-michel1 May 2, 2024
1731690
Passage au mode multithread.
david-michel1 May 7, 2024
d82c6f9
Variables temporaires pour les règles
david-michel1 May 14, 2024
af6579e
Généralisation des règles et des cibles.
david-michel1 May 14, 2024
6c0fdee
Taille des variables
david-michel1 May 14, 2024
8c37ca7
Introduction des références de variables
david-michel1 May 15, 2024
b3b9b86
Formatage de mlang.h
david-michel1 May 15, 2024
713eea1
Variables temporaires dans irdata
david-michel1 May 22, 2024
bcb3944
Changements dirers
david-michel1 May 24, 2024
2c92654
Gestion des références dans le backend C
david-michel1 May 27, 2024
a944dfd
Arguments de cible (instable)
david-michel1 May 28, 2024
142e51b
Arguments pour les cibles
david-michel1 May 29, 2024
f42d0aa
Itérateurs avec listes de variables.
david-michel1 May 30, 2024
c4b0c57
Suppression de Dgfip_varid.var_id_map
david-michel1 May 30, 2024
53399e7
Ajout des fonctions (syntaxe)
david-michel1 Jun 4, 2024
d26ccc2
Fonctions définissables.
david-michel1 Jun 6, 2024
92ef066
Construction quand-faire-sinon
david-michel1 Jun 11, 2024
7fc5f91
Merge branch 'cleanup_primitive' of https://github.com/MLanguage/mlan…
david-michel1 Jun 13, 2024
8997798
Merge
david-michel1 Jun 13, 2024
cacf335
Bir vers Mir.
david-michel1 Jun 13, 2024
8950d38
Merge branch 'master' into cleanup_primitive
denismerigoux Jul 11, 2024
b19a705
Remove obsolete Java backend
denismerigoux Jul 11, 2024
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
14 changes: 2 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,18 @@ include $(ROOT_DIR)/makefiles/c_backend.mk
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
clean_backend clean_backend_c clean_backend_exe clean_backend_tmp clean_backend_res clean_backend_all

FORCE:

.DEFAULT_GOAL:=default

default: FORCE build

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

all: FORCE quick_test tests test_dgfip_c_backend test_java_backend
all: FORCE quick_test tests test_dgfip_c_backend

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

23 changes: 1 addition & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,26 +74,6 @@ The interpreter and the C backend in `examples/dgfip_c/` should be usable straig
as the C compiler was installed for Opam. Mlang results are tested on GCC and Clang, the latter
being preferred if available.

The Java backend in `examples/java/` requires Java development environment.
The generated code targets Java 7, and could be used with OpenJDK 1.7 or more.
However, the test harness code requires Java 8, so to use the automated backend tests, we ask for
OpenJDK 1.8 or more.

For Debian-based distributions, you can try:

sudo apt install default-jdk

For Red Hat-based distributions, depending on your version:

sudo yum install java-1.8.0-openjdk-devel

or

sudo yum install java-11-openjdk-devel

NB : if you are using JDK 1.8, in order to cross-compile the generated code to 1.7, you would also need JDK 1.7
installed in order to provide the correct version of the base classes.

## Usage

Mlang also need an M file to know how to run the "liquidations multiples"
Expand Down Expand Up @@ -131,8 +111,7 @@ their internal tooling. The `--run_test` and `--run_all_tests` options ease
the testing process of the interpreter (with or without optimizations) and
report test errors in a convenient format.

Mlang backends are also tested using the same `FIP` format, see for instance
`examples/java/backend_test`.
Mlang backends are also tested using the same `FIP` format.

When running `--run_all_tests`, you can enable code coverage instrumentation
with the `--code_coverage` option. Another interesting option is `--precision`,
Expand Down
20 changes: 0 additions & 20 deletions UpdateMlangDeps.sh

This file was deleted.

4 changes: 1 addition & 3 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ code.
To know more about using a particular Mlang backend, please read the dedicated
`README.md` inside the correct folder:

* [C](c/README.md)
* [Java](java/README.md)
* [Python](python/README.md)
* [C](dgfip_c/README.md)

### Configuring the generated file

Expand Down
15 changes: 8 additions & 7 deletions examples/dgfip_c/ml_primitif/ml_driver/common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ type type_ = Reel | Booleen | Date
type domaine = Indefini | Contexte | Famille | Revenu |
RevenuCorr | Variation | Penalite

external init_errs : unit -> unit = "ml_init_errs"
external get_err_list : unit -> string list = "ml_get_err_list"
external free_errs : unit -> unit = "ml_free_errs"

let get_errs () =
List.fold_left (fun res e -> StrSet.add e res) StrSet.empty (get_err_list ())

module Var = struct

type t = {
Expand Down Expand Up @@ -301,3 +294,11 @@ module TGV = struct
) var_list

end

external init_errs : TGV.t -> unit = "ml_init_errs"
external get_err_list : TGV.t -> string list = "ml_get_err_list"
external free_errs : TGV.t -> unit = "ml_free_errs"

let get_errs tgv =
List.fold_left (fun res e -> StrSet.add e res) StrSet.empty (get_err_list tgv)

Loading
Loading