From a32dfa31f91f3b938681e3c8b5a063f3905b4b50 Mon Sep 17 00:00:00 2001
From: Pascal Raymond <Pascal.Raymond@imag.fr>
Date: Mon, 9 Jul 2012 18:57:22 +0200
Subject: [PATCH] pas grand chose

---
 ALIRE                    | 16 +++++++++++++++-
 ALIRE.compil-des-nodes   | 14 ++++++++++++++
 moretests/test.res.exp   | 32 ++++++++++++++++++++++++++------
 map2.lus => overload.lus | 10 +++-------
 4 files changed, 58 insertions(+), 14 deletions(-)
 create mode 100644 ALIRE.compil-des-nodes
 rename map2.lus => overload.lus (59%)

diff --git a/ALIRE b/ALIRE
index 2aa89720..ffa6aa70 100644
--- a/ALIRE
+++ b/ALIRE
@@ -23,7 +23,21 @@ En cours :
 
 ETAT COURANT
 
-19/07
+-----------------------------------------------------------
+12/07/09
+
+--> Les expressions de noeud qui s'avèrent polymorphes et/ou
+  surchargés, sont :
+  - acceptées dans les val_exp, à condition que l'utilisation
+    lève l'ambiguité
+  - refusées dans les "node alias"
+
+  = PLUS TARD : il faudrait que les noeuds qui s'avèrent polymorphes
+    et/ou surchargés soient traités comme de MACROS avec un STATIG ARG
+    de nature TYPE implicite
+
+-----------------------------------------------------------
+12/07/05
 
 - completement séparé la compil de l'affichage, du coup
   on a débranché l'ancien source_to_source
diff --git a/ALIRE.compil-des-nodes b/ALIRE.compil-des-nodes
new file mode 100644
index 00000000..bd61621d
--- /dev/null
+++ b/ALIRE.compil-des-nodes
@@ -0,0 +1,14 @@
+
+compile_all ->
+
+compile_all_nodes ->
+
+compile_all_item node_check_interface ->
+  node_check_interface:cache on ->
+
+node_check_interface_do
+
+node_check
+
+node_check_do
+
diff --git a/moretests/test.res.exp b/moretests/test.res.exp
index c864e7b3..7d04aa16 100644
--- a/moretests/test.res.exp
+++ b/moretests/test.res.exp
@@ -54,20 +54,40 @@ where [options] can be:
 	 Display this message.
 
 ----------------------------------------------------------------------
-====> ../obj/lus2lic -vl 2 --nonreg-test should_work/aliases/alias.lus
---  ../obj/lus2lic -vl 2 --nonreg-test should_work/aliases/alias.lus
+====> ../objlinux/lus2lic -vl 2 --nonreg-test should_work/aliases/alias.lus
+--  ../objlinux/lus2lic -vl 2 --nonreg-test should_work/aliases/alias.lus
+type bool_4 = bool^4 (*abstract in the source*);
+type bool_4_5 = bool_4^5 (*abstract in the source*);
 type alias::a = int^42;
 type alias::bool_4;
 type alias::bool_4a;
 type alias::bool_4b;
-type alias::bool_4c = bool^4 (*abstract in the source*);
-type alias::bool_4c_5 = alias::bool_4c^5 (*abstract in the source*);
-type alias::str = struct  {foo : alias::t_42_9; bar : alias::bool_4c_5};
+type alias::str = struct  {foo : alias::t_42_9; bar : bool_4_5};
 type alias::t = enum {alias::Bleu, alias::Blanc};
-type alias::t1 = alias::bool_4c^5;
+type alias::t1 = bool_4^5;
 type alias::t_42 = alias::t^42 (*abstract in the source*);
 type alias::t_42_9 = alias::t_42^9 (*abstract in the source*);
 const alias::c2 : alias::t;
 const alias::huit = 9;
 const alias::toto = 42;
+
+----------------------------------------------------------------------
+====> ../objlinux/lus2lic -vl 2 --nonreg-test should_work/aliases/ex.lus
+--  ../objlinux/lus2lic -vl 2 --nonreg-test should_work/aliases/ex.lus
+type bool_11 = bool^11 (*abstract in the source*);
+type bool_11_22 = bool_11^22 (*abstract in the source*);
+type int_1 = int^1 (*abstract in the source*);
+type int_1_2 = int_1^2 (*abstract in the source*);
+type int_1_2_3 = int_1_2^3 (*abstract in the source*);
+type int_1_2_3_4 = int_1_2_3^4 (*abstract in the source*);
+type ex::s = struct  {x : int_1_2_3_4; y : ex::s1};
+type ex::s1 = struct  {x : int; y : int_1_2_3_4};
+type ex::t = int_1_2_3^4;
+type ex::t1 = int_1_2_3_4^4;
+type ex::t2 = struct  {a : int; b : bool_11_22};
+node ex::ex(a:ex::s) returns (b:int);
+let
+   b = a.x[0][0][0][0] + a.y.y[0][0][0][0];
+tel
+-- end of node ex::ex
 Those tests are supposed to generate errors
diff --git a/map2.lus b/overload.lus
similarity index 59%
rename from map2.lus
rename to overload.lus
index ee1ea4a4..b20d1c8e 100644
--- a/map2.lus
+++ b/overload.lus
@@ -1,13 +1,9 @@
 
+
 node titi = map<<+,4>>;
 
 node toto(x,y: int^4) returns (o: int^4);
-let
-	(* o = map<<+, 4>>(x,y); *)
-	o = titi(x,y);
-tel
+let o = titi(x,y); tel
 
 node tutu(x,y: real^4) returns (o: real^4);
-let
-	o = titi(x,y);
-tel
+let o = titi(x,y); tel
-- 
GitLab