diff --git a/src/compiledDataDump.ml b/src/compiledDataDump.ml index 54215489f21a11abfb9534eb333da0798351564b..2e72313f25ac2701fc0895b544abe13869ec0443 100644 --- a/src/compiledDataDump.ml +++ b/src/compiledDataDump.ml @@ -1,15 +1,22 @@ +(** Time-stamp: <modified the 04/07/2008 (at 17:25) by Erwan Jahier> *) + +(* Call it LicDump? *) open CompiledData open Printf open Lxm - - let (long : Ident.long -> string) = Ident.string_of_long (* fun id -> *) (* let str = Ident.string_of_long id in *) (* Str.global_replace (Str.regexp "::") "__" str *) +let type_alias_table = Hashtbl.create 0 + +(* prefix used to prefix user type name in order to avoid name clashed with + the alias type name that are generated by the compiler. *) +let prefix = "_" + let rec string_of_const_eff = ( function | Bool_const_eff true -> "true" @@ -65,13 +72,60 @@ and string_of_type_eff = function | Bool_type_eff -> "bool" | Int_type_eff -> "int" | Real_type_eff -> "real" - | External_type_eff name -> long name - | Enum_type_eff (name, _) -> long name - | Array_type_eff (ty, sz) -> sprintf "%s^%d" (string_of_type_eff ty) sz - | Struct_type_eff (name, _) -> long name + | External_type_eff name -> prefix ^ (long name) + | Enum_type_eff (name, _) -> prefix ^ (long name) + | Array_type_eff (ty, sz) -> array_alias ty sz + | Struct_type_eff (name, _) -> prefix ^ (long name) | Any -> "a" | Overload -> "o" + +(******************************************************************************) +(** Stuff to manage generated type alias + + Indeed instead of printing: + + node toto(x: int ^ 4) ... + + we want to print something like : + + type int4 = int ^ 4; + node toto(x: int4) ... + + That may occur only for array actually. + + To do that, we maintain a table of type alias that we fill each time + we want to print (via string_of_type_eff) a type that is not a named type. + Then, at the end, we will dump that table in the lic file. + + This table is filled by [array_alias]. + + In order to avoid name clashes, we prefix all user name type by [prefix] (cf + at the top of this file). + +*) +and (array_alias : type_eff -> int -> string) = + fun t size -> + let array_t = Array_type_eff(t,size) in + try + Hashtbl.find type_alias_table array_t + with Not_found -> + let alias_t = string_of_type_eff t in + let res = "A_"^ alias_t ^ "_" ^(string_of_int size) in + Hashtbl.add type_alias_table array_t res; + res + +and dump_type_alias oc = + let p = output_string oc in + if Hashtbl.length type_alias_table > 0 then p "-- automatically defined aliases:"; + Hashtbl.iter + (fun type_eff alias_name -> + p ("\ntype " ^ alias_name ^ " = " ^ (string_def_of_type_eff type_eff)^";") + ) + type_alias_table + +(******************************************************************************) + and (type_eff_list_to_string :type_eff list -> string) = fun tel -> @@ -311,7 +365,7 @@ and (string_of_node_def : node_def_eff -> string list) = and (type_decl: Ident.long -> type_eff -> string) = fun tname teff -> - "type " ^ (long tname) ^ + "type " ^ prefix ^ (long tname) ^ (match teff with | External_type_eff _ -> ";\n" | _ -> " = " ^ (string_def_of_type_eff teff) ^ ";\n" @@ -346,7 +400,7 @@ and (node_of_node_exp_eff: node_exp_eff -> string) = (string_of_node_key_rec neff.node_key_eff) ^ "\n" ) ) - + and string_of_clock2 (ck : clock_eff) = let rec string_of_clock2_aux ck = diff --git a/src/lazyCompiler.ml b/src/lazyCompiler.ml index b3edd1806dc41bef33dfc35222863b4b7bda9ab3..c9ceac2fbaeafdf8b921389e08a638ee2c28267f 100644 --- a/src/lazyCompiler.ml +++ b/src/lazyCompiler.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 03/07/2008 (at 16:39) by Erwan Jahier> *) +(** Time-stamp: <modified the 04/07/2008 (at 15:52) by Erwan Jahier> *) open Lxm @@ -403,7 +403,7 @@ and (type_check_do: t -> Ident.long -> Lxm.t -> SymbolTab.t -> bool -> if not provide_flag then output_string !Global.oc (CompiledDataDump.type_decl type_name type_eff); type_eff - ) + ) with (* capte et complete/stoppe les recursions *) Recursion_error (root, stack) -> diff --git a/src/main.ml b/src/main.ml index 6786f057238ff45719aa6fedee73c5da3a18abb8..405283e349503efea07d34b5b6235371c0441856 100644 --- a/src/main.ml +++ b/src/main.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 26/06/2008 (at 14:49) by Erwan Jahier> *) +(** Time-stamp: <modified the 04/07/2008 (at 16:31) by Erwan Jahier> *) (** Here follows a description of the different modules used by this lus2lic compiler. @@ -235,6 +235,7 @@ let main = ( in if !Global.outfile <> "" then Global.oc := open_out !Global.outfile; Compile.doit nsl main_node; + CompiledDataDump.dump_type_alias !Global.oc; close_out !Global.oc ) with Sys_error(s) -> diff --git a/src/test/test.res.exp b/src/test/test.res.exp index be882d541cad2078e1f2becca7200769d2dc5b0e..3252c36aeef3fdf05e57a6ab56bce7a526c0f6a3 100644 --- a/src/test/test.res.exp +++ b/src/test/test.res.exp @@ -13,7 +13,7 @@ tel ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/Int.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/Int.lus const Int8::n = 8; -type Int8::Int = bool^8; +type _Int8::Int = bool^8; const Int8::zero = [false, false, false, false, false, false, false, false]; function Int8::fulladd( @@ -28,27 +28,28 @@ let co = (((ci and x) or (x and y)) or (y and ci)); tel -- end of node Int8::fulladd -function Int8::incr(x:bool^8) returns (incr:bool^8); +function Int8::incr(x:A_bool_8) returns (incr:A_bool_8); var co:bool; let (co, incr) = fillred<<node Int8::fulladd, const 8>>(true, x, zero); tel -- end of node Int8::incr -function Int8::add(x:bool^8; y:bool^8) returns (sum:bool^8); +function Int8::add(x:A_bool_8; y:A_bool_8) returns (sum:A_bool_8); var co:bool; let (co, sum) = fillred<<node Int8::fulladd, const 8>>(false, x, y); tel -- end of node Int8::add -node mainPack::Nat(evt:bool; reset:bool) returns (nat:Int8::Int); +node mainPack::Nat(evt:bool; reset:bool) returns (nat:_Int8::Int); let nat = if (true -> reset) then (Int8::zero) else ( if (evt) then (Int8::incr(pre(nat))) else (pre(nat))); tel -- end of node mainPack::Nat - +-- automatically defined aliases: +type A_bool_8 = bool^8; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/PCOND.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/PCOND.lus @@ -170,37 +171,37 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/Watch.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/Watch.lus -type Watch::STATUS_TYPE; -type Watch::ALARM_TIME_TYPE; -type Watch::WATCH_TIME_POSITION; -type Watch::ALARM_TIME_POSITION; -type Watch::DISPLAY_TYPE; -type Watch::WATCH_TIME_TYPE; -type Watch::STOPWATCH_TIME_TYPE; -type Watch::MAIN_DISPLAY_TYPE; -type Watch::LABELS_TYPE; -type Watch::DISPLAY_POSITION; -type Watch::MINI_DISPLAY_TYPE; -type Watch::string; -const Watch::INITIAL_WATCH_POSITION:Watch::WATCH_TIME_POSITION; -const Watch::INITIAL_WATCH_TIME:Watch::WATCH_TIME_TYPE; +type _Watch::STATUS_TYPE; +type _Watch::ALARM_TIME_TYPE; +type _Watch::WATCH_TIME_POSITION; +type _Watch::ALARM_TIME_POSITION; +type _Watch::DISPLAY_TYPE; +type _Watch::WATCH_TIME_TYPE; +type _Watch::STOPWATCH_TIME_TYPE; +type _Watch::MAIN_DISPLAY_TYPE; +type _Watch::LABELS_TYPE; +type _Watch::DISPLAY_POSITION; +type _Watch::MINI_DISPLAY_TYPE; +type _Watch::string; +const Watch::INITIAL_WATCH_POSITION:_Watch::WATCH_TIME_POSITION; +const Watch::INITIAL_WATCH_TIME:_Watch::WATCH_TIME_TYPE; const Watch::ALARM_DURATION:int; -const Watch::stringST:Watch::string; -const Watch::stringAL:Watch::string; -const Watch::INITIAL_ALARM_TIME:Watch::ALARM_TIME_TYPE; -const Watch::INITIAL_ALARM_POSITION:Watch::ALARM_TIME_POSITION; -const Watch::NULL_POSITION:Watch::DISPLAY_POSITION; -const Watch::INITIAL_STOPWATCH_TIME:Watch::STOPWATCH_TIME_TYPE; +const Watch::stringST:_Watch::string; +const Watch::stringAL:_Watch::string; +const Watch::INITIAL_ALARM_TIME:_Watch::ALARM_TIME_TYPE; +const Watch::INITIAL_ALARM_POSITION:_Watch::ALARM_TIME_POSITION; +const Watch::NULL_POSITION:_Watch::DISPLAY_POSITION; +const Watch::INITIAL_STOPWATCH_TIME:_Watch::STOPWATCH_TIME_TYPE; extern function Watch::ALARM_TO_DISPLAY_POS( - apos:Watch::ALARM_TIME_POSITION) + apos:_Watch::ALARM_TIME_POSITION) returns ( - dpos:Watch::DISPLAY_POSITION); + dpos:_Watch::DISPLAY_POSITION); extern function Watch::INCREMENT_STOPWATCH_TIME( - time:Watch::STOPWATCH_TIME_TYPE) + time:_Watch::STOPWATCH_TIME_TYPE) returns ( - newtime:Watch::STOPWATCH_TIME_TYPE); + newtime:_Watch::STOPWATCH_TIME_TYPE); node Watch::TWO_STATES( init:bool; @@ -223,61 +224,61 @@ tel -- end of node Watch::DIVIDE extern function Watch::MAKE_DISPLAY( - main:Watch::MAIN_DISPLAY_TYPE; - mini:Watch::MINI_DISPLAY_TYPE; - alpha:Watch::string; - status:Watch::STATUS_TYPE; - enhanced:Watch::DISPLAY_POSITION; - labels:Watch::LABELS_TYPE) + main:_Watch::MAIN_DISPLAY_TYPE; + mini:_Watch::MINI_DISPLAY_TYPE; + alpha:_Watch::string; + status:_Watch::STATUS_TYPE; + enhanced:_Watch::DISPLAY_POSITION; + labels:_Watch::LABELS_TYPE) returns ( - display:Watch::DISPLAY_TYPE); + display:_Watch::DISPLAY_TYPE); extern function Watch::WATCH_TIME_TO_MAIN_DISPLAY( - time:Watch::WATCH_TIME_TYPE) + time:_Watch::WATCH_TIME_TYPE) returns ( - display:Watch::MAIN_DISPLAY_TYPE); + display:_Watch::MAIN_DISPLAY_TYPE); extern function Watch::WATCH_DATE_TO_MINI_DISPLAY( - time:Watch::WATCH_TIME_TYPE) + time:_Watch::WATCH_TIME_TYPE) returns ( - display:Watch::MINI_DISPLAY_TYPE); + display:_Watch::MINI_DISPLAY_TYPE); extern function Watch::WATCH_DAY_TO_ALPHA_DISPLAY( - time:Watch::WATCH_TIME_TYPE) + time:_Watch::WATCH_TIME_TYPE) returns ( - display:Watch::string); + display:_Watch::string); extern function Watch::STOPWATCH_TIME_TO_MAIN_DISPLAY( - time:Watch::STOPWATCH_TIME_TYPE) + time:_Watch::STOPWATCH_TIME_TYPE) returns ( - display:Watch::MAIN_DISPLAY_TYPE); + display:_Watch::MAIN_DISPLAY_TYPE); extern function Watch::WATCH_TIME_TO_MINI_DISPLAY( - time:Watch::WATCH_TIME_TYPE) + time:_Watch::WATCH_TIME_TYPE) returns ( - display:Watch::MINI_DISPLAY_TYPE); + display:_Watch::MINI_DISPLAY_TYPE); extern function Watch::ALARM_TIME_TO_MAIN_DISPLAY( - time:Watch::ALARM_TIME_TYPE) + time:_Watch::ALARM_TIME_TYPE) returns ( - display:Watch::MAIN_DISPLAY_TYPE); + display:_Watch::MAIN_DISPLAY_TYPE); node Watch::DISPLAY( mode_is_watch:bool; mode_is_stopwatch:bool; mode_is_alarm:bool; - watch_time:Watch::WATCH_TIME_TYPE; - stopwatch_time:Watch::STOPWATCH_TIME_TYPE; - alarm_time:Watch::ALARM_TIME_TYPE; - position_enhanced:Watch::DISPLAY_POSITION; - status:Watch::STATUS_TYPE; - labels:Watch::LABELS_TYPE) + watch_time:_Watch::WATCH_TIME_TYPE; + stopwatch_time:_Watch::STOPWATCH_TIME_TYPE; + alarm_time:_Watch::ALARM_TIME_TYPE; + position_enhanced:_Watch::DISPLAY_POSITION; + status:_Watch::STATUS_TYPE; + labels:_Watch::LABELS_TYPE) returns ( - display:Watch::DISPLAY_TYPE); + display:_Watch::DISPLAY_TYPE); var - main_display:Watch::MAIN_DISPLAY_TYPE; - mini_display:Watch::MINI_DISPLAY_TYPE; - alpha_display:Watch::string; + main_display:_Watch::MAIN_DISPLAY_TYPE; + mini_display:_Watch::MINI_DISPLAY_TYPE; + alpha_display:_Watch::string; let display = Watch::MAKE_DISPLAY(main_display, mini_display, alpha_display, status, position_enhanced, labels); @@ -295,8 +296,8 @@ tel extern function Watch::SOMME(i1:int; i2:int; i3:int) returns (somme:int); extern function Watch::COMPARE_WATCH_ALARM_TIME( - watch_time:Watch::WATCH_TIME_TYPE; - alarm_time:Watch::ALARM_TIME_TYPE) + watch_time:_Watch::WATCH_TIME_TYPE; + alarm_time:_Watch::ALARM_TIME_TYPE) returns ( result:bool); node Watch::EDGE(b:bool) returns (edge:bool); @@ -306,20 +307,20 @@ tel -- end of node Watch::EDGE extern function Watch::TOGGLE_24H_IN_ALARM_MODE( - time:Watch::ALARM_TIME_TYPE) + time:_Watch::ALARM_TIME_TYPE) returns ( - newtime:Watch::ALARM_TIME_TYPE); + newtime:_Watch::ALARM_TIME_TYPE); extern function Watch::SET_ALARM_TIME( - time:Watch::ALARM_TIME_TYPE; - position:Watch::ALARM_TIME_POSITION) + time:_Watch::ALARM_TIME_TYPE; + position:_Watch::ALARM_TIME_POSITION) returns ( - new_time:Watch::ALARM_TIME_TYPE); + new_time:_Watch::ALARM_TIME_TYPE); extern function Watch::NEXT_ALARM_TIME_POSITION( - position:Watch::ALARM_TIME_POSITION) + position:_Watch::ALARM_TIME_POSITION) returns ( - new_position:Watch::ALARM_TIME_POSITION); + new_position:_Watch::ALARM_TIME_POSITION); node Watch::ALARM( toggle_24h:bool; @@ -329,14 +330,14 @@ node Watch::ALARM( next_position:bool; stop_beep:bool; second:bool; - watch_time:Watch::WATCH_TIME_TYPE) + watch_time:_Watch::WATCH_TIME_TYPE) returns ( - time:Watch::ALARM_TIME_TYPE; + time:_Watch::ALARM_TIME_TYPE; status:bool; - enhance:Watch::ALARM_TIME_POSITION; + enhance:_Watch::ALARM_TIME_POSITION; beep:int); var - position_set:Watch::ALARM_TIME_POSITION; + position_set:_Watch::ALARM_TIME_POSITION; start_beeping:bool; time_out:bool; count:int; @@ -372,12 +373,12 @@ extern function Watch::LABELS( mode_is_set_watch:bool; mode_is_set_alarm:bool) returns ( - labels:Watch::LABELS_TYPE); + labels:_Watch::LABELS_TYPE); extern function Watch::WATCH_TO_DISPLAY_POS( - wpos:Watch::WATCH_TIME_POSITION) + wpos:_Watch::WATCH_TIME_POSITION) returns ( - dpos:Watch::DISPLAY_POSITION); + dpos:_Watch::DISPLAY_POSITION); extern function Watch::STATUS( alarm_is_set:bool; @@ -385,44 +386,44 @@ extern function Watch::STATUS( stopwatch_running:bool; stopwatch_lapping:bool) returns ( - status:Watch::STATUS_TYPE); + status:_Watch::STATUS_TYPE); extern function Watch::IS_O_CLOCK( - time:Watch::WATCH_TIME_TYPE) + time:_Watch::WATCH_TIME_TYPE) returns ( is_o_clock:bool); extern function Watch::INCREMENT_WATCH_TIME( - time:Watch::WATCH_TIME_TYPE) + time:_Watch::WATCH_TIME_TYPE) returns ( - newtime:Watch::WATCH_TIME_TYPE); + newtime:_Watch::WATCH_TIME_TYPE); extern function Watch::TOGGLE_24H_IN_WATCH_MODE( - time:Watch::WATCH_TIME_TYPE) + time:_Watch::WATCH_TIME_TYPE) returns ( - newtime:Watch::WATCH_TIME_TYPE); + newtime:_Watch::WATCH_TIME_TYPE); extern function Watch::CONFIRM_TIME( - time:Watch::WATCH_TIME_TYPE) + time:_Watch::WATCH_TIME_TYPE) returns ( - new_time:Watch::WATCH_TIME_TYPE); + new_time:_Watch::WATCH_TIME_TYPE); extern function Watch::INCREMENT_WATCH_TIME_IN_SET_MODE( - time:Watch::WATCH_TIME_TYPE; - position:Watch::WATCH_TIME_POSITION) + time:_Watch::WATCH_TIME_TYPE; + position:_Watch::WATCH_TIME_POSITION) returns ( - new_time:Watch::WATCH_TIME_TYPE); + new_time:_Watch::WATCH_TIME_TYPE); extern function Watch::SET_WATCH_TIME( - time:Watch::WATCH_TIME_TYPE; - position:Watch::WATCH_TIME_POSITION) + time:_Watch::WATCH_TIME_TYPE; + position:_Watch::WATCH_TIME_POSITION) returns ( - new_time:Watch::WATCH_TIME_TYPE); + new_time:_Watch::WATCH_TIME_TYPE); extern function Watch::NEXT_WATCH_TIME_POSITION( - position:Watch::WATCH_TIME_POSITION) + position:_Watch::WATCH_TIME_POSITION) returns ( - new_position:Watch::WATCH_TIME_POSITION); + new_position:_Watch::WATCH_TIME_POSITION); node Watch::WATCH( second:bool; @@ -432,12 +433,12 @@ node Watch::WATCH( next_position:bool; set:bool) returns ( - time:Watch::WATCH_TIME_TYPE; - enhance:Watch::WATCH_TIME_POSITION; + time:_Watch::WATCH_TIME_TYPE; + enhance:_Watch::WATCH_TIME_POSITION; chime_is_set:bool; beep:int); var - position_set:Watch::WATCH_TIME_POSITION; + position_set:_Watch::WATCH_TIME_POSITION; internal_chime_is_set:int; let internal_chime_is_set = 0 -> if (toggle_chime) then ( if @@ -463,7 +464,7 @@ tel -- end of node Watch::WATCH extern function Watch::IS_ZERO_MOD_10_MN( - time:Watch::STOPWATCH_TIME_TYPE) + time:_Watch::STOPWATCH_TIME_TYPE) returns ( is_zero:bool); @@ -472,14 +473,14 @@ node Watch::STOPWATCH( start_stop:bool; lap:bool) returns ( - time:Watch::STOPWATCH_TIME_TYPE; + time:_Watch::STOPWATCH_TIME_TYPE; run_state:bool; lap_state:bool; beep:int); var reset:bool; must_beep:bool; - internal_time:Watch::STOPWATCH_TIME_TYPE; + internal_time:_Watch::STOPWATCH_TIME_TYPE; let reset = false -> (lap and pre((not(run_state) and not(lap_state)))); run_state = Watch::TWO_STATES(false, start_stop, start_stop); @@ -556,17 +557,17 @@ node Watch::Watch( LOWRIGHT:bool; time_unit:bool) returns ( - display:Watch::DISPLAY_TYPE; + display:_Watch::DISPLAY_TYPE; beep:int); var - watch_time:Watch::WATCH_TIME_TYPE; - watch_position_enhanced:Watch::WATCH_TIME_POSITION; - alarm_time:Watch::ALARM_TIME_TYPE; - alarm_position_enhanced:Watch::ALARM_TIME_POSITION; - stopwatch_time:Watch::STOPWATCH_TIME_TYPE; - position_enhanced:Watch::DISPLAY_POSITION; - status:Watch::STATUS_TYPE; - labels:Watch::LABELS_TYPE; + watch_time:_Watch::WATCH_TIME_TYPE; + watch_position_enhanced:_Watch::WATCH_TIME_POSITION; + alarm_time:_Watch::ALARM_TIME_TYPE; + alarm_position_enhanced:_Watch::ALARM_TIME_POSITION; + stopwatch_time:_Watch::STOPWATCH_TIME_TYPE; + position_enhanced:_Watch::DISPLAY_POSITION; + status:_Watch::STATUS_TYPE; + labels:_Watch::LABELS_TYPE; alarm_is_set:bool; mode_is_watch:bool; mode_is_stopwatch:bool; @@ -1214,7 +1215,7 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/deconne.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/deconne.lus -type deconne::pendule; +type _deconne::pendule; const deconne::G = 10.000000; const deconne::L = 2.000000; const deconne::T = 0.100000; @@ -1225,10 +1226,10 @@ extern function deconne::make_pend( x:real; y:real) returns ( - p:deconne::pendule); + p:_deconne::pendule); extern function deconne::cos(x:real) returns (y:real); extern function deconne::sin(x:real) returns (y:real); -node deconne::deconne(delta:real) returns (p:deconne::pendule); +node deconne::deconne(delta:real) returns (p:_deconne::pendule); var teta:real; x0:real; @@ -1283,12 +1284,12 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/dependeur_struct.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/dependeur_struct.lus -type dependeur_struct::time = struct {h : int; m : int; s : int; ms : int}; +type _dependeur_struct::time = struct {h : int; m : int; s : int; ms : int}; node dependeur_struct::dependeur_struct( time_in_ms:int) returns ( - theTime:dependeur_struct::time); + theTime:_dependeur_struct::time); var time_in_min:int; time_in_second:int; @@ -1334,15 +1335,15 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/enum.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/enum.lus -type enum::couleur = enum {enum::bleu, enum::blanc, enum::rouge}; -type enum::color = enum {enum::blue, enum::white, enum::redd}; +type _enum::couleur = enum {enum::bleu, enum::blanc, enum::rouge}; +type _enum::color = enum {enum::blue, enum::white, enum::redd}; const enum::bleu; const enum::blanc; const enum::redd; const enum::rouge; const enum::blue; const enum::white; -node enum::boo(e:int) returns (c:enum::couleur; c2:enum::color); +node enum::boo(e:int) returns (c:_enum::couleur; c2:_enum::color); let c = if ((e = 0)) then (bleu) else ( if ((e = 1)) then (blanc) else (rouge)); @@ -1378,17 +1379,23 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/ex.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/ex.lus -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}; -type ex::s1 = struct {x : int; y : int^1^2^3^4}; -type ex::s = struct {x : int^1^2^3^4; y : ex::s1}; -node ex::ex(a:ex::s) returns (b:int); +type _ex::t = A_A_A_int_1_2_3^4; +type _ex::t1 = A_A_A_A_int_1_2_3_4^4; +type _ex::t2 = struct {a : int; b : A_A_bool_11_22}; +type _ex::s1 = struct {x : int; y : A_A_A_A_int_1_2_3_4}; +type _ex::s = struct {x : A_A_A_A_int_1_2_3_4; y : _ex::s1}; +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 - +-- automatically defined aliases: +type A_A_A_A_int_1_2_3_4 = A_A_A_int_1_2_3^4; +type A_A_bool_11_22 = A_bool_11^22; +type A_bool_11 = bool^11; +type A_A_A_int_1_2_3 = A_A_int_1_2^3; +type A_A_int_1_2 = A_int_1^2; +type A_int_1 = int^1; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/exclusion.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/exclusion.lus @@ -1449,30 +1456,30 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/hanane.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/hanane.lus -type hanane::t1; +type _hanane::t1; const hanane::a = 4; -type hanane::string = int^4; -type hanane::string2d = int^4^4; -type hanane::structT = struct {x : int; y : real; z : int^4^4^4}; -type hanane::t2; -type hanane::t3; -type hanane::tabStruct = hanane::structT^2; +type _hanane::string = int^4; +type _hanane::string2d = A_int_4^4; +type _hanane::structT = struct {x : int; y : real; z : A_A_A_int_4_4_4}; +type _hanane::t2; +type _hanane::t3; +type _hanane::tabStruct = _hanane::structT^2; const hanane::b = true; const hanane::c = 3.140000; node hanane::hanane( a1:bool; - b1:int^4^4 when a1; - c1:hanane::structT^2 when a1) + b1:A_A_int_4_4 when a1; + c1:A__hanane::structT_2 when a1) returns ( res:bool when a1); var - h1:int^4; - h2:hanane::structT^2; + h1:A_int_4; + h2:A__hanane::structT_2; h3:int when a1; h4:real when a1; - h5:int^4^4^4 when a1; - h6:int^4^4; + h5:A_A_A_int_4_4_4 when a1; + h6:A_A_int_4_4; let res = (h1[0] > 1) when a1; h1 = current ( if (pre(res)) then (b1[1]) else (b1[2])); @@ -1483,7 +1490,11 @@ let h6 = current (c1[1].z[2]); tel -- end of node hanane::hanane - +-- automatically defined aliases: +type A_A_A_int_4_4_4 = A_A_int_4_4^4; +type A_A_int_4_4 = A_int_4^4; +type A__hanane::structT_2 = _hanane::structT^2; +type A_int_4 = int^4; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/import1.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/import1.lus @@ -1762,8 +1773,8 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mm.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/mm.lus -type mm::pair = struct {a : int; b : int}; -type mm::pairpair = struct {a : mm::pair; b : mm::pair}; +type _mm::pair = struct {a : int; b : int}; +type _mm::pairpair = struct {a : _mm::pair; b : _mm::pair}; node mm::mm(a:int; b:int) returns (min:int; max:int); let (min, max) = if ((a > b)) then ((b, a)) else ((a, b)); @@ -1773,9 +1784,9 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mm1.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/mm1.lus -type mm1::pair = struct {a : int; b : int}; -type mm1::pairpair = struct {a : mm1::pair; b : mm1::pair}; -node mm1::mm1(a:int; b:int) returns (y:mm1::pair); +type _mm1::pair = struct {a : int; b : int}; +type _mm1::pairpair = struct {a : _mm1::pair; b : _mm1::pair}; +node mm1::mm1(a:int; b:int) returns (y:_mm1::pair); let (y.a, y.b) = if ((a > b)) then ((b, a)) else ((a, b)); tel @@ -1784,9 +1795,9 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mm22.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/mm22.lus -type mm22::pair = struct {a : int; b : int}; -type mm22::pairpair = struct {a : mm22::pair; b : mm22::pair}; -node mm22::mm22(a:int; b:int) returns (y:mm22::pair); +type _mm22::pair = struct {a : int; b : int}; +type _mm22::pairpair = struct {a : _mm22::pair; b : _mm22::pair}; +node mm22::mm22(a:int; b:int) returns (y:_mm22::pair); let y.a = if ((a > b)) then (b) else (a); y.b = if ((a > b)) then (a) else (b); @@ -1796,9 +1807,9 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mm3.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/mm3.lus -type mm3::pair = struct {a : int; b : int}; -type mm3::pairpair = struct {a : mm3::pair; b : mm3::pair}; -node mm3::mm3(a:mm3::pair) returns (y:mm3::pair); +type _mm3::pair = struct {a : int; b : int}; +type _mm3::pairpair = struct {a : _mm3::pair; b : _mm3::pair}; +node mm3::mm3(a:_mm3::pair) returns (y:_mm3::pair); let (y.a, y.b) = if ((a.a > a.b)) then ((a.b, a.a)) else ((a.a, a.b)); tel @@ -2639,18 +2650,18 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/simple.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/simple.lus -type simple::S; -type simple::T = int; -type simple::H = struct {x : simple::S; y : int}; -type simple::U = struct {a : int; b : simple::H}; -type simple::V = simple::U^4; +type _simple::S; +type _simple::T = int; +type _simple::H = struct {x : _simple::S; y : int}; +type _simple::U = struct {a : int; b : _simple::H}; +type _simple::V = _simple::U^4; const simple::size = 16; -type simple::W = int^18; +type _simple::W = int^18; const simple::pi = 3.141600; const simple::right = 1.570800; const simple::u = false; const simple::c = true; -node simple::simple(e:bool; a:simple::U) returns (b:int); +node simple::simple(e:bool; a:_simple::U) returns (b:int); var x:int; let @@ -2803,72 +2814,82 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/consensus.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/consensus.lus -node consensus::consensus_1(T:bool^1) returns (a:bool); +node consensus::consensus_1(T:A_bool_1) returns (a:bool); let a = T[0]; tel -- end of node consensus::consensus_1 -node consensus::consensus_2(T:bool^2) returns (a:bool); +node consensus::consensus_2(T:A_bool_2) returns (a:bool); let a = (T[0] and consensus::consensus_1(T[1..1])); tel -- end of node consensus::consensus_2 -node consensus::consensus_3(T:bool^3) returns (a:bool); +node consensus::consensus_3(T:A_bool_3) returns (a:bool); let a = (T[0] and consensus::consensus_2(T[1..2])); tel -- end of node consensus::consensus_3 -node consensus::consensus_4(T:bool^4) returns (a:bool); +node consensus::consensus_4(T:A_bool_4) returns (a:bool); let a = (T[0] and consensus::consensus_3(T[1..3])); tel -- end of node consensus::consensus_4 -node consensus::main(T:bool^4) returns (c:bool); +node consensus::main(T:A_bool_4) returns (c:bool); let c = consensus::consensus_4(T); tel -- end of node consensus::main -node consensus::consensus_5(T:bool^5) returns (a:bool); +node consensus::consensus_5(T:A_bool_5) returns (a:bool); let a = (T[0] and consensus::consensus_4(T[1..4])); tel -- end of node consensus::consensus_5 -node consensus::consensus_6(T:bool^6) returns (a:bool); +node consensus::consensus_6(T:A_bool_6) returns (a:bool); let a = (T[0] and consensus::consensus_5(T[1..5])); tel -- end of node consensus::consensus_6 -node consensus::consensus_7(T:bool^7) returns (a:bool); +node consensus::consensus_7(T:A_bool_7) returns (a:bool); let a = (T[0] and consensus::consensus_6(T[1..6])); tel -- end of node consensus::consensus_7 -node consensus::consensus_8(T:bool^8) returns (a:bool); +node consensus::consensus_8(T:A_bool_8) returns (a:bool); let a = (T[0] and consensus::consensus_7(T[1..7])); tel -- end of node consensus::consensus_8 -node consensus::consensus_9(T:bool^9) returns (a:bool); +node consensus::consensus_9(T:A_bool_9) returns (a:bool); let a = (T[0] and consensus::consensus_8(T[1..8])); tel -- end of node consensus::consensus_9 -node consensus::consensus_10(T:bool^10) returns (a:bool); +node consensus::consensus_10(T:A_bool_10) returns (a:bool); let a = (T[0] and consensus::consensus_9(T[1..9])); tel -- end of node consensus::consensus_10 -node consensus::main2(T:bool^10) returns (a:bool); +node consensus::main2(T:A_bool_10) returns (a:bool); let a = consensus::consensus_10(T); tel -- end of node consensus::main2 -node consensus::c8(T:bool^8) returns (a:bool); +node consensus::c8(T:A_bool_8) returns (a:bool); let a = consensus::consensus_8(T); tel -- end of node consensus::c8 - +-- automatically defined aliases: +type A_bool_7 = bool^7; +type A_bool_4 = bool^4; +type A_bool_8 = bool^8; +type A_bool_1 = bool^1; +type A_bool_5 = bool^5; +type A_bool_9 = bool^9; +type A_bool_2 = bool^2; +type A_bool_6 = bool^6; +type A_bool_10 = bool^10; +type A_bool_3 = bool^3; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/fby.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/fby.lus @@ -3019,8 +3040,8 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/left.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/left.lus -type left::truc = struct {a : bool^100; b : int}; -node left::toto(x:bool) returns (t:left::truc^3); +type _left::truc = struct {a : A_bool_100; b : int}; +node left::toto(x:bool) returns (t:A__left::truc_3); let t[0].a[0..98 step 2][48..0 step -2] = true^25; t[0].a[0..98 step 2][1..49 step 2] = false^25; @@ -3031,35 +3052,37 @@ let t[1..2] = truc{a=true^100;b=0}^2; tel -- end of node left::toto - +-- automatically defined aliases: +type A__left::truc_3 = _left::truc^3; +type A_bool_100 = bool^100; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/newpacks.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/newpacks.lus -type preal::t = real; +type _preal::t = real; node preal::fby1(init:real; fb:real) returns (next:real); let next = init -> pre(fb); tel -- end of node preal::fby1 -type pbool::t = bool; +type _pbool::t = bool; node pbool::fby1(init:bool; fb:bool) returns (next:bool); let next = init -> pre(fb); tel -- end of node pbool::fby1 -type pint::t = int; +type _pint::t = int; node pint::fby1(init:int; fb:int) returns (next:int); let next = init -> pre(fb); tel -- end of node pint::fby1 -type inter::selType = struct {i : int; b : bool; r : real}; +type _inter::selType = struct {i : int; b : bool; r : real}; node inter::preced( - in:inter::selType) + in:_inter::selType) returns ( - out:inter::selType; - out2:inter::selType); + out:_inter::selType; + out2:_inter::selType); let out2 = selType{i=0;b=true;r=.0}; out.i = pint::fby1(out2.i, in.i); @@ -3067,9 +3090,9 @@ let out.r = preal::fby1(out2.r, in.r); tel -- end of node inter::preced -node mainPack::preced(in:inter::selType) returns (out:inter::selType); +node mainPack::preced(in:_inter::selType) returns (out:_inter::selType); var - out2:inter::selType; + out2:_inter::selType; let (out, out2) = inter::preced(in); tel @@ -3564,31 +3587,31 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/p.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/p.lus -type preal::t = real; +type _preal::t = real; node preal::fby1(init:real; fb:real) returns (next:real); let next = init -> pre(fb); tel -- end of node preal::fby1 -type pbool::t = bool; +type _pbool::t = bool; node pbool::fby1(init:bool; fb:bool) returns (next:bool); let next = init -> pre(fb); tel -- end of node pbool::fby1 -type pint::t = int; +type _pint::t = int; node pint::fby1(init:int; fb:int) returns (next:int); let next = init -> pre(fb); tel -- end of node pint::fby1 -type inter::selType = struct {i : int; b : bool; r : real}; +type _inter::selType = struct {i : int; b : bool; r : real}; node inter::preced( - in:inter::selType) + in:_inter::selType) returns ( - out:inter::selType; - out2:inter::selType); + out:_inter::selType; + out2:_inter::selType); let out2 = selType{i=0;b=true;r=.0}; out.i = pint::fby1(out2.i, in.i); @@ -3596,9 +3619,9 @@ let out.r = preal::fby1(out2.r, in.r); tel -- end of node inter::preced -node mainPack::preced(in:inter::selType) returns (out:inter::selType); +node mainPack::preced(in:_inter::selType) returns (out:_inter::selType); var - out2:inter::selType; + out2:_inter::selType; let (out, out2) = inter::preced(in); tel @@ -3608,19 +3631,19 @@ const inter::n = -4; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/packs.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/packs.lus -type preal::t = real; +type _preal::t = real; node preal::fby1(init:real; fb:real) returns (next:real); let next = init -> pre(fb); tel -- end of node preal::fby1 -type pbool::t = bool; +type _pbool::t = bool; node pbool::fby1(init:bool; fb:bool) returns (next:bool); let next = init -> pre(fb); tel -- end of node pbool::fby1 -type pint::t = int; +type _pint::t = int; node pint::fby1(init:int; fb:int) returns (next:int); let next = init -> pre(fb); @@ -3628,19 +3651,19 @@ tel -- end of node pint::fby1 const inter::n = -4; const mainPack::N = 8; -type mainPack::T = int^8; -type mainPack::couleurs = enum {mainPack::bleu, mainPack::rose, mainPack::jaune}; +type _mainPack::T = int^8; +type _mainPack::couleurs = enum {mainPack::bleu, mainPack::rose, mainPack::jaune}; const mainPack::bleu; const mainPack::jaune; const mainPack::rose; const mainPack::X = 8; -type inter::selType = struct {i : int; b : bool; r : real}; +type _inter::selType = struct {i : int; b : bool; r : real}; node inter::preced( - in:inter::selType) + in:_inter::selType) returns ( - out:inter::selType; - out2:inter::selType); + out:_inter::selType; + out2:_inter::selType); let out2 = selType{i=0;b=true;r=0.0}; out.i = pint::fby1(out2.i, in.i); @@ -3648,14 +3671,14 @@ let out.r = preal::fby1(out2.r, in.r); tel -- end of node inter::preced -node mainPack::preced(in:inter::selType) returns (out:inter::selType); +node mainPack::preced(in:_inter::selType) returns (out:_inter::selType); var - out2:inter::selType; + out2:_inter::selType; let (out, out2) = inter::preced(in); tel -- end of node mainPack::preced -type inter::toto = enum {inter::X, inter::Y}; +type _inter::toto = enum {inter::X, inter::Y}; const inter::X; const inter::Y; @@ -3669,8 +3692,8 @@ Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/pfs.lus ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/struct0.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/struct0.lus -type struct0::Toto = struct {x : int (1); y : int (2)}; -node struct0::bibi(dummy:int) returns (z:struct0::Toto); +type _struct0::Toto = struct {x : int (1); y : int (2)}; +node struct0::bibi(dummy:int) returns (z:_struct0::Toto); let z = Toto{x=3}; tel @@ -3681,17 +3704,19 @@ tel Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/t.lus const t::A = [[1, 1], [1, 1], [1, 1]]; const t::B = [2, 2]; -node t::toto(x:bool) returns (a:int^2^3; b:int^2); +node t::toto(x:bool) returns (a:A_A_int_2_3; b:A_int_2); let a = A; b = B; tel -- end of node t::toto - +-- automatically defined aliases: +type A_A_int_2_3 = A_int_2^3; +type A_int_2 = int^2; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/t0.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/t0.lus -node t0::min_n_1(T:int^1) returns (mn:int); +node t0::min_n_1(T:A_int_1) returns (mn:int); let mn = T[0]; tel @@ -3701,33 +3726,37 @@ let mn = if ((x <= y)) then (x) else (y); tel -- end of node t0::min -node t0::min_n_2(T:int^2) returns (mn:int); +node t0::min_n_2(T:A_int_2) returns (mn:int); let mn = t0::min(T[0], t0::min_n_1(T[1..1])); tel -- end of node t0::min_n_2 -node t0::min_n_3(T:int^3) returns (mn:int); +node t0::min_n_3(T:A_int_3) returns (mn:int); let mn = t0::min(T[0], t0::min_n_2(T[1..2])); tel -- end of node t0::min_n_3 -node t0::min_n_4(T:int^4) returns (mn:int); +node t0::min_n_4(T:A_int_4) returns (mn:int); let mn = t0::min(T[0], t0::min_n_3(T[1..3])); tel -- end of node t0::min_n_4 -node t0::min_4(T:int^4) returns (mn:int); +node t0::min_4(T:A_int_4) returns (mn:int); let mn = t0::min_n_4(T); tel -- end of node t0::min_4 -node t0::t0(T:int^4) returns (mn:int); +node t0::t0(T:A_int_4) returns (mn:int); let mn = t0::min_4(T); tel -- end of node t0::t0 extern function t0::max(x:int; y:int) returns (mx:int); - +-- automatically defined aliases: +type A_int_2 = int^2; +type A_int_3 = int^3; +type A_int_4 = int^4; +type A_int_1 = int^1; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/t1.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/t1.lus @@ -3743,7 +3772,7 @@ Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/t2.lus ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/test.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/test.lus const P1::y = 3; -type P1::titi = int^5; +type _P1::titi = int^5; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/trivial.lus @@ -3766,31 +3795,34 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/call/bad_call03.lus Opening file /home/jahier/lus2lic/src/test/should_work/call/bad_call03.lus -function bad_call03::toto(i1:o^3; i2:o^3) returns (o:o^3); +function bad_call03::toto(i1:A_o_3; i2:A_o_3) returns (o:A_o_3); let o = Lustre::map<<node Lustre::+, const 3>>(i1, i2); tel -- end of node bad_call03::toto -node bad_call03::titi(c:real^3; d:real^3) returns (y:real^3); +node bad_call03::titi(c:A_real_3; d:A_real_3) returns (y:A_real_3); let y = bad_call03::toto(c, d); tel -- end of node bad_call03::titi node bad_call03::bad_call03( - a:int^3; - b:int^3; - c:real^3; - d:real^3) + a:A_int_3; + b:A_int_3; + c:A_real_3; + d:A_real_3) returns ( - x:int^3; - y:real^3); + x:A_int_3; + y:A_real_3); let x = bad_call03::toto(a, b); y = bad_call03::toto(c, d); tel -- end of node bad_call03::bad_call03 - +-- automatically defined aliases: +type A_int_3 = int^3; +type A_o_3 = o^3; +type A_real_3 = real^3; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/call/call01.lus Opening file /home/jahier/lus2lic/src/test/should_work/call/call01.lus @@ -3828,18 +3860,19 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/call/call03.lus Opening file /home/jahier/lus2lic/src/test/should_work/call/call03.lus -function call03::tutu(i1:bool^2; i2:bool^2) returns (o:bool^2); +function call03::tutu(i1:A_bool_2; i2:A_bool_2) returns (o:A_bool_2); let o = Lustre::map<<node Lustre::or, const 2>>(i1, i2); tel -- end of node call03::tutu -node call03::call03(x:bool^2; y:bool^2) returns (z:bool^2); +node call03::call03(x:A_bool_2; y:A_bool_2) returns (z:A_bool_2); let z = call03::tutu(x, y); tel -- end of node call03::call03 extern function call03::momo(x:bool; y:bool) returns (z:bool); - +-- automatically defined aliases: +type A_bool_2 = bool^2; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/call/call04.lus Opening file /home/jahier/lus2lic/src/test/should_work/call/call04.lus @@ -3853,17 +3886,18 @@ let o = call04::toto(i1, i2); tel -- end of node call04::titi -function call04::tutu(i1:bool^2; i2:bool^2) returns (o:bool^2); +function call04::tutu(i1:A_bool_2; i2:A_bool_2) returns (o:A_bool_2); let o = Lustre::map<<node call04::titi, const 2>>(i1, i2); tel -- end of node call04::tutu -node call04::call04(x:bool^2; y:bool^2) returns (z:bool^2); +node call04::call04(x:A_bool_2; y:A_bool_2) returns (z:A_bool_2); let z = call04::tutu(x, y); tel -- end of node call04::call04 - +-- automatically defined aliases: +type A_bool_2 = bool^2; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/call/call05.lus Opening file /home/jahier/lus2lic/src/test/should_work/call/call05.lus @@ -3897,7 +3931,7 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/clock/clock.lus Opening file /home/jahier/lus2lic/src/test/should_work/clock/clock.lus -type clock::s = struct {x : bool^10; y : bool}; +type _clock::s = struct {x : A_bool_10; y : bool}; extern node clock::clock3( clock3_u:bool) @@ -3937,11 +3971,12 @@ extern node clock::clock2( clock2_v:bool when clock2_u) returns ( clock2_y:bool); - +-- automatically defined aliases: +type A_bool_10 = bool^10; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/clock/when_enum.lus Opening file /home/jahier/lus2lic/src/test/should_work/clock/when_enum.lus -type when_enum::t = enum {when_enum::A, when_enum::B, when_enum::C}; +type _when_enum::t = enum {when_enum::A, when_enum::B, when_enum::C}; const when_enum::A; const when_enum::B; const when_enum::C; @@ -3983,11 +4018,11 @@ extern node when_tuple::toto(u:bool; v:bool) returns (x:bool; y:bool); ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/Gyroscope2.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/Gyroscope2.lus -type Gyroscope2::Valid_ChannelT = struct {local_failure : bool; local_value : real}; -type Gyroscope2::CFF_Eltstruct = struct {indx : int; indx_toChange : int; value : Gyroscope2::Valid_ChannelT}; -type Gyroscope2::Faulty_ChannelT = struct {valuea : real; valueb : real}; -type Gyroscope2::Faulty_Array = Gyroscope2::Faulty_ChannelT^4^3; -type Gyroscope2::CFF_struct = struct {indx : int; indx_toChange : int; tabToFill : Gyroscope2::Valid_ChannelT^3}; +type _Gyroscope2::Valid_ChannelT = struct {local_failure : bool; local_value : real}; +type _Gyroscope2::CFF_Eltstruct = struct {indx : int; indx_toChange : int; value : _Gyroscope2::Valid_ChannelT}; +type _Gyroscope2::Faulty_ChannelT = struct {valuea : real; valueb : real}; +type _Gyroscope2::Faulty_Array = A__Gyroscope2::Faulty_ChannelT_4^3; +type _Gyroscope2::CFF_struct = struct {indx : int; indx_toChange : int; tabToFill : A__Gyroscope2::Valid_ChannelT_3}; const Gyroscope2::DELTA_PITCH = 2.000000; const Gyroscope2::DELTA_YAW = 2.000000; const Gyroscope2::DELTA_TO_GOD_YAW = 2.000000; @@ -4019,7 +4054,7 @@ tel node Gyroscope2::countFalse( accu_in:real; - elt_in:Gyroscope2::Valid_ChannelT) + elt_in:_Gyroscope2::Valid_ChannelT) returns ( accu_out:real); let @@ -4030,7 +4065,7 @@ tel node Gyroscope2::TooFar( nbToFarIn:int; - channel:Gyroscope2::Faulty_ChannelT; + channel:_Gyroscope2::Faulty_ChannelT; god:real; delta_to_god:real) returns ( @@ -4042,7 +4077,7 @@ tel -- end of node Gyroscope2::TooFar node Gyroscope2::assumeEvaluateAxis( - channels:Gyroscope2::Faulty_ChannelT^4; + channels:A__Gyroscope2::Faulty_ChannelT_4; delta:real; god:real; delta_to_god:real) @@ -4058,9 +4093,9 @@ tel -- end of node Gyroscope2::assumeEvaluateAxis node Gyroscope2::assumeChannel( - previousOutChannel:Gyroscope2::Valid_ChannelT^4; + previousOutChannel:A__Gyroscope2::Valid_ChannelT_4; nbInChannel:int; - inChannel:Gyroscope2::Faulty_ChannelT; + inChannel:_Gyroscope2::Faulty_ChannelT; delta:real; god:real; delta_to_god:real) @@ -4072,7 +4107,7 @@ tel -- end of node Gyroscope2::assumeChannel node Gyroscope2::countValidChannels( - channels:Gyroscope2::Valid_ChannelT^4) + channels:A__Gyroscope2::Valid_ChannelT_4) returns ( nb:real); let @@ -4086,7 +4121,7 @@ tel -- end of node Gyroscope2::sum node Gyroscope2::masking( - channel:Gyroscope2::Valid_ChannelT) + channel:_Gyroscope2::Valid_ChannelT) returns ( out:real); let @@ -4095,7 +4130,7 @@ tel -- end of node Gyroscope2::masking node Gyroscope2::Voter( - channels:Gyroscope2::Valid_ChannelT^4; + channels:A__Gyroscope2::Valid_ChannelT_4; god:real; delta_to_god:real) returns ( @@ -4103,7 +4138,7 @@ returns ( var globalSum:real; nbValid:real; - mask:real^4; + mask:A_real_4; let nbValid = Gyroscope2::countValidChannels(channels); globalSum = red<<node Gyroscope2::sum, const 4>>(0.0, mask); @@ -4113,7 +4148,7 @@ tel -- end of node Gyroscope2::Voter node Gyroscope2::selectFailure( - from:Gyroscope2::Valid_ChannelT) + from:_Gyroscope2::Valid_ChannelT) returns ( failure:bool); let @@ -4122,11 +4157,11 @@ tel -- end of node Gyroscope2::selectFailure node Gyroscope2::addOneChannelIter( - acc_in:Gyroscope2::CFF_Eltstruct; - elt_in:Gyroscope2::Valid_ChannelT) + acc_in:_Gyroscope2::CFF_Eltstruct; + elt_in:_Gyroscope2::Valid_ChannelT) returns ( - acc_out:Gyroscope2::CFF_Eltstruct; - elt_out:Gyroscope2::Valid_ChannelT); + acc_out:_Gyroscope2::CFF_Eltstruct; + elt_out:_Gyroscope2::Valid_ChannelT); let acc_out = CFF_Eltstruct{indx=(acc_in.indx + 1);indx_toChange=acc_in.indx_toChange;value=acc_in.value}; @@ -4137,12 +4172,12 @@ tel node Gyroscope2::addOneChannel( indx_toChange:int; - channeltToAdd:Gyroscope2::Valid_ChannelT; - tabToFill:Gyroscope2::Valid_ChannelT^3) + channeltToAdd:_Gyroscope2::Valid_ChannelT; + tabToFill:A__Gyroscope2::Valid_ChannelT_3) returns ( - tabToFillAfter:Gyroscope2::Valid_ChannelT^3); + tabToFillAfter:A__Gyroscope2::Valid_ChannelT_3); var - acc_out:Gyroscope2::CFF_Eltstruct; + acc_out:_Gyroscope2::CFF_Eltstruct; let (acc_out, tabToFillAfter) = fillred<<node Gyroscope2::addOneChannelIter, const @@ -4152,10 +4187,10 @@ tel -- end of node Gyroscope2::addOneChannel node Gyroscope2::CFC_iter( - structIn:Gyroscope2::CFF_struct; - currentChannel:Gyroscope2::Valid_ChannelT) + structIn:_Gyroscope2::CFF_struct; + currentChannel:_Gyroscope2::Valid_ChannelT) returns ( - structOut:Gyroscope2::CFF_struct); + structOut:_Gyroscope2::CFF_struct); let structOut = CFF_struct{indx=(structIn.indx + 1);indx_toChange=structIn.indx_toChange;tabToFill= if @@ -4167,12 +4202,12 @@ tel node Gyroscope2::ComputeForeignChannels( currentChannelIndx:int; - allChannels:Gyroscope2::Valid_ChannelT^4) + allChannels:A__Gyroscope2::Valid_ChannelT_4) returns ( - foreignChannels:Gyroscope2::Valid_ChannelT^3); + foreignChannels:A__Gyroscope2::Valid_ChannelT_3); var - acc_out:Gyroscope2::CFF_struct; - localtabToFill:Gyroscope2::Valid_ChannelT; + acc_out:_Gyroscope2::CFF_struct; + localtabToFill:_Gyroscope2::Valid_ChannelT; let localtabToFill = Valid_ChannelT{local_failure=false;local_value=0.0}; acc_out = red<<node Gyroscope2::CFC_iter, const @@ -4183,10 +4218,10 @@ tel -- end of node Gyroscope2::ComputeForeignChannels node Gyroscope2::compare_rolls( - acc_in:Gyroscope2::Valid_ChannelT; - channel:Gyroscope2::Valid_ChannelT) + acc_in:_Gyroscope2::Valid_ChannelT; + channel:_Gyroscope2::Valid_ChannelT) returns ( - acc_out:Gyroscope2::Valid_ChannelT; + acc_out:_Gyroscope2::Valid_ChannelT; diff:bool); let acc_out = acc_in; @@ -4196,13 +4231,13 @@ tel -- end of node Gyroscope2::compare_rolls node Gyroscope2::values_nok( - localChannel:Gyroscope2::Valid_ChannelT; - foreign_Channels:Gyroscope2::Valid_ChannelT^3) + localChannel:_Gyroscope2::Valid_ChannelT; + foreign_Channels:A__Gyroscope2::Valid_ChannelT_3) returns ( cross_failure:bool); var - diff:bool^3; - lc:Gyroscope2::Valid_ChannelT; + diff:A_bool_3; + lc:_Gyroscope2::Valid_ChannelT; let (lc, diff) = fillred<<node Gyroscope2::compare_rolls, const 3>>(localChannel, foreign_Channels); @@ -4221,12 +4256,12 @@ tel node Gyroscope2::CrossFailDetect( currentChannel:int; - localChannel:Gyroscope2::Valid_ChannelT; - previousOutChannel:Gyroscope2::Valid_ChannelT^4) + localChannel:_Gyroscope2::Valid_ChannelT; + previousOutChannel:A__Gyroscope2::Valid_ChannelT_4) returns ( crossFailure:bool); var - foreign_Channels:Gyroscope2::Valid_ChannelT^3; + foreign_Channels:A__Gyroscope2::Valid_ChannelT_3; let foreign_Channels = Gyroscope2::ComputeForeignChannels(currentChannel, previousOutChannel); @@ -4235,17 +4270,17 @@ tel -- end of node Gyroscope2::CrossFailDetect node Gyroscope2::Channel( - previousOutChannel:Gyroscope2::Valid_ChannelT^4; + previousOutChannel:A__Gyroscope2::Valid_ChannelT_4; nbInChannel:int; - inChannel:Gyroscope2::Faulty_ChannelT; + inChannel:_Gyroscope2::Faulty_ChannelT; delta:real; god:real; delta_to_god:real) returns ( - nextOutChannel:Gyroscope2::Valid_ChannelT^4; - outChannel:Gyroscope2::Valid_ChannelT); + nextOutChannel:A__Gyroscope2::Valid_ChannelT_4; + outChannel:_Gyroscope2::Valid_ChannelT); var - localChannel:Gyroscope2::Valid_ChannelT; + localChannel:_Gyroscope2::Valid_ChannelT; let localChannel = Valid_ChannelT{local_failure=(Gyroscope2::abs((inChannel.valuea - @@ -4260,14 +4295,14 @@ tel -- end of node Gyroscope2::Channel node Gyroscope2::guaranteeChannel( - previousOutChannel:Gyroscope2::Valid_ChannelT^4; + previousOutChannel:A__Gyroscope2::Valid_ChannelT_4; nbInChannel:int; - inChannel:Gyroscope2::Faulty_ChannelT; + inChannel:_Gyroscope2::Faulty_ChannelT; delta:real; god:real; delta_to_god:real; - nextOutChannel:Gyroscope2::Faulty_ChannelT^4; - outChannel:Gyroscope2::Valid_ChannelT) + nextOutChannel:A__Gyroscope2::Faulty_ChannelT_4; + outChannel:_Gyroscope2::Valid_ChannelT) returns ( guaranteeOK:bool); let @@ -4279,7 +4314,7 @@ tel node Gyroscope2::iteratedVoter( acc_in:bool; - channel:Gyroscope2::Valid_ChannelT; + channel:_Gyroscope2::Valid_ChannelT; god:real; delta_to_god:real; vote:real) @@ -4292,7 +4327,7 @@ tel -- end of node Gyroscope2::iteratedVoter node Gyroscope2::assumeVoter( - channels:Gyroscope2::Valid_ChannelT^4; + channels:A__Gyroscope2::Valid_ChannelT_4; god:real; delta_to_god:real) returns ( @@ -4303,7 +4338,7 @@ tel -- end of node Gyroscope2::assumeVoter node Gyroscope2::guaranteeEvaluateAxis( - channels:Gyroscope2::Faulty_ChannelT^4; + channels:A__Gyroscope2::Faulty_ChannelT_4; delta:real; god:real; delta_to_god:real; @@ -4328,17 +4363,17 @@ tel -- end of node Gyroscope2::ValueIsSecure node Gyroscope2::EvaluateAxis( - channels:Gyroscope2::Faulty_ChannelT^4; + channels:A__Gyroscope2::Faulty_ChannelT_4; delta:real; god:real; delta_to_god:real) returns ( AxisValue:real); var - resChannels:Gyroscope2::Valid_ChannelT^4; - dumbChannel:Gyroscope2::Valid_ChannelT^4; - initChannels:Gyroscope2::Valid_ChannelT^4; - fillredInit:Gyroscope2::Valid_ChannelT^4; + resChannels:A__Gyroscope2::Valid_ChannelT_4; + dumbChannel:A__Gyroscope2::Valid_ChannelT_4; + initChannels:A__Gyroscope2::Valid_ChannelT_4; + fillredInit:A__Gyroscope2::Valid_ChannelT_4; let initChannels = Valid_ChannelT{local_failure=false;local_value=0.0}^4; (dumbChannel, resChannels) = fillred<<node Gyroscope2::Channel, const @@ -4349,11 +4384,11 @@ tel -- end of node Gyroscope2::EvaluateAxis node Gyroscope2::Gyroscope2( - axis:Gyroscope2::Faulty_ChannelT^4^3) + axis:A_A__Gyroscope2::Faulty_ChannelT_4_3) returns ( valid:bool); var - secure_values:real^3; + secure_values:A_real_3; let secure_values = map<<node Gyroscope2::EvaluateAxis, const 3>>(axis, [DELTA_ROLL, DELTA_PITCH, DELTA_YAW], [GOD_ROLL, GOD_PITCH, GOD_YAW], @@ -4365,7 +4400,7 @@ tel -- end of node Gyroscope2::Gyroscope2 node Gyroscope2::guaranteeVoter( - channels:Gyroscope2::Valid_ChannelT^4; + channels:A__Gyroscope2::Valid_ChannelT_4; god:real; delta_to_god:real; vote:real) @@ -4376,22 +4411,29 @@ let channels, god^4, delta_to_god^4, vote^4); tel -- end of node Gyroscope2::guaranteeVoter - +-- automatically defined aliases: +type A__Gyroscope2::Valid_ChannelT_4 = _Gyroscope2::Valid_ChannelT^4; +type A_real_3 = real^3; +type A__Gyroscope2::Valid_ChannelT_3 = _Gyroscope2::Valid_ChannelT^3; +type A_real_4 = real^4; +type A__Gyroscope2::Faulty_ChannelT_4 = _Gyroscope2::Faulty_ChannelT^4; +type A_A__Gyroscope2::Faulty_ChannelT_4_3 = A__Gyroscope2::Faulty_ChannelT_4^3; +type A_bool_3 = bool^3; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/alias.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/alias.lus const alias::SIZE = 3; -function alias::aliasIterOp(i1:int; i2:int^3) returns (o:int); +function alias::aliasIterOp(i1:int; i2:A_int_3) returns (o:int); let o = Lustre::red<<node Lustre::+, const 3>>(i1, i2); tel -- end of node alias::aliasIterOp -function alias::aliasBoolRed(i:bool^2) returns (o:bool); +function alias::aliasBoolRed(i:A_bool_2) returns (o:bool); let o = Lustre::boolred<<const 0, const 1, const 2>>(i); tel -- end of node alias::aliasBoolRed -node alias::unNoeud(a:int; b:int^3) returns (c:int); +node alias::unNoeud(a:int; b:A_int_3) returns (c:int); var x:bool; let @@ -4399,7 +4441,7 @@ let x = alias::aliasBoolRed([true, false]); tel -- end of node alias::unNoeud -node alias::aliasGivenNode(a:int; b:int^3) returns (c:int); +node alias::aliasGivenNode(a:int; b:A_int_3) returns (c:int); let c = alias::unNoeud(a, b); tel @@ -4415,26 +4457,30 @@ let c = alias::aliasGivenNode(0, map<<node Lustre::+, const 3>>(0^3, SIZE^3)); tel -- end of node alias::alias - +-- automatically defined aliases: +type A_bool_2 = bool^2; +type A_int_3 = int^3; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/bred.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/bred.lus -node bred::bred(a:bool^2) returns (x:bool); +node bred::bred(a:A_bool_2) returns (x:bool); let x = boolred<<const 0, const 1, const 2>>(a); tel -- end of node bred::bred - +-- automatically defined aliases: +type A_bool_2 = bool^2; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/bred_lv4.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/bred_lv4.lus -type bred_lv4::T1_ARRAY = bool^2; -node bred_lv4::bred(i_a:bool^2) returns (o_x:bool); +type _bred_lv4::T1_ARRAY = bool^2; +node bred_lv4::bred(i_a:A_bool_2) returns (o_x:bool); let o_x = boolred<<const 0, const 1, const 2>>(i_a); tel -- end of node bred_lv4::bred - +-- automatically defined aliases: +type A_bool_2 = bool^2; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/clock.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/clock.lus @@ -4487,17 +4533,17 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/decl.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/decl.lus -type decl::t1; -type decl::t2; -type decl::t3; +type _decl::t1; +type _decl::t2; +type _decl::t3; const decl::g = 4; -type decl::t4 = decl::t1^8; +type _decl::t4 = _decl::t1^8; const decl::d = true; const decl::h = 2; -type decl::t5 = decl::t1^8^5; -type decl::coord = struct {x : real; y : real}; -type decl::coord_tab = decl::coord^1; -type decl::couleur = enum {decl::bleu, decl::blanc, decl::rouge}; +type _decl::t5 = A__decl::t1_8^5; +type _decl::coord = struct {x : real; y : real}; +type _decl::coord_tab = _decl::coord^1; +type _decl::couleur = enum {decl::bleu, decl::blanc, decl::rouge}; const decl::e = 8.500000; const decl::blanc; const decl::f; @@ -4508,41 +4554,44 @@ const decl::b:int; const decl::c:int; extern node decl::decl( - a1:decl::t1; - b1:decl::t1; - c1:decl::t1) + a1:_decl::t1; + b1:_decl::t1; + c1:_decl::t1) returns ( d1:bool); extern function decl::f1( - a1:decl::couleur; - b1:decl::couleur; - c1:decl::couleur) + a1:_decl::couleur; + b1:_decl::couleur; + c1:_decl::couleur) returns ( - d1:bool^2); + d1:A_bool_2); extern node decl::n2( - a1:decl::t1^8; - b1:decl::t1^8; - c1:decl::t1^8; + a1:A__decl::t1_8; + b1:A__decl::t1_8; + c1:A__decl::t1_8; d1:bool) returns ( - e1:decl::t1^8^5); - + e1:A_A__decl::t1_8_5); +-- automatically defined aliases: +type A_A__decl::t1_8_5 = A__decl::t1_8^5; +type A__decl::t1_8 = _decl::t1^8; +type A_bool_2 = bool^2; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/declaration.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/declaration.lus -type declaration::t1; -type declaration::t2; -type declaration::t3; +type _declaration::t1; +type _declaration::t2; +type _declaration::t3; const declaration::g = 4; -type declaration::t4 = declaration::t1^8; +type _declaration::t4 = _declaration::t1^8; const declaration::d = true; const declaration::h = 2; -type declaration::t5 = declaration::t1^8^5; -type declaration::coord = struct {x : real; y : real}; -type declaration::coord_tab = declaration::coord^1; -type declaration::couleur = enum {declaration::bleu, declaration::blanc, declaration::rouge}; +type _declaration::t5 = A__declaration::t1_8^5; +type _declaration::coord = struct {x : real; y : real}; +type _declaration::coord_tab = _declaration::coord^1; +type _declaration::couleur = enum {declaration::bleu, declaration::blanc, declaration::rouge}; const declaration::e = 8.500000; const declaration::blanc; const declaration::f; @@ -4558,26 +4607,26 @@ tel -- end of node declaration::declaration extern function declaration::f1( - a1:declaration::couleur; - b1:declaration::couleur; - c1:declaration::couleur) + a1:_declaration::couleur; + b1:_declaration::couleur; + c1:_declaration::couleur) returns ( - d1:bool^2); + d1:A_bool_2); extern node declaration::n1( - a1:declaration::t1; - b1:declaration::t1; - c1:declaration::t1) + a1:_declaration::t1; + b1:_declaration::t1; + c1:_declaration::t1) returns ( d1:bool); extern node declaration::n2( - a1:declaration::t1^8; - b1:declaration::t1^8; - c1:declaration::t1^8; + a1:A__declaration::t1_8; + b1:A__declaration::t1_8; + c1:A__declaration::t1_8; d1:bool) returns ( - e1:declaration::t1^8^5); + e1:A_A__declaration::t1_8_5); node declaration::n4(a1:bool) returns (b1:bool); var c1:bool; @@ -4594,36 +4643,39 @@ let c1 = 1.0; tel -- end of node declaration::n5 - +-- automatically defined aliases: +type A_A__declaration::t1_8_5 = A__declaration::t1_8^5; +type A__declaration::t1_8 = _declaration::t1^8; +type A_bool_2 = bool^2; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/def.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/def.lus -type def::t1; +type _def::t1; const def::a = 4; -type def::string = int^4; -type def::string2d = int^4^4; -type def::structT = struct {x : int; y : real; z : int^4^4^4}; -type def::t2; -type def::t3; -type def::tabStruct = def::structT^2; +type _def::string = int^4; +type _def::string2d = A_int_4^4; +type _def::structT = struct {x : int; y : real; z : A_A_A_int_4_4_4}; +type _def::t2; +type _def::t3; +type _def::tabStruct = _def::structT^2; const def::id_int = 5; const def::b = true; const def::c = 3.140000; node def::def( a1:bool; - b1:int^4^4 when a1; - c1:def::structT^2 when a1; - d1:int^23) + b1:A_A_int_4_4 when a1; + c1:A__def::structT_2 when a1; + d1:A_int_23) returns ( res:bool when a1); var - h1:int^4; - h2:def::structT^2; + h1:A_int_4; + h2:A__def::structT_2; h3:int when a1; h4:real when a1; - h5:int^4^4^4 when a1; - h6:int^4^4; + h5:A_A_A_int_4_4_4 when a1; + h6:A_A_int_4_4; let res = (pre(h1[0]) > 0) when a1; h1[0] = current ( if (res) then (b1[0][0]) else (b1[1][0])); @@ -4655,11 +4707,16 @@ let h6[3] = current (c1[1].z[2][1]); tel -- end of node def::def - +-- automatically defined aliases: +type A_int_23 = int^23; +type A_A_A_int_4_4_4 = A_A_int_4_4^4; +type A_A_int_4_4 = A_int_4^4; +type A__def::structT_2 = _def::structT^2; +type A_int_4 = int^4; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/filliter.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/filliter.lus -type filliter::t = int^5; +type _filliter::t = int^5; const filliter::NBC = 3; node filliter::copie(acc_in:int) returns (acc_out:int; elt:int); let @@ -4679,10 +4736,10 @@ node filliter::filliter( i1:int when c; i2:int when c) returns ( - s1:int^3 when c; - s2:int^3 when c); + s1:A_int_3 when c; + s2:A_int_3 when c); var - x:int^4 when c; + x:A_int_4 when c; bid1:int when c; bid2:int when c; let @@ -4691,16 +4748,18 @@ let (bid2, s2) = fill<<node filliter::incr_acc, const 3>>(i2); tel -- end of node filliter::filliter - +-- automatically defined aliases: +type A_int_3 = int^3; +type A_int_4 = int^4; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/filter.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/filter.lus -type filter::complexe = struct {x : real; y : real}; -type filter::cdouble = struct {x : filter::complexe; y : filter::complexe}; +type _filter::complexe = struct {x : real; y : real}; +type _filter::cdouble = struct {x : _filter::complexe; y : _filter::complexe}; node filter::filter(a:real; b:real) returns (ok:bool); var i:real; - z:filter::cdouble; + z:_filter::cdouble; let z.x.x = 0. -> i; z.x.y = z.x.x; @@ -4782,16 +4841,16 @@ tel ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/map_red_iter.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/map_red_iter.lus const map_red_iter::NBC = 20; -type map_red_iter::INTNBC = int^20; +type _map_red_iter::INTNBC = int^20; const map_red_iter::NBG = 4; -type map_red_iter::INTNBG = int^4; -type map_red_iter::T_EntreeGlob = struct {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}; -type map_red_iter::T_ComChg = int; -type map_red_iter::T_InfoGenIndiv = struct {mesure_gen : int}; -type map_red_iter::T_EtatCharge = int; -type map_red_iter::T_InfoChgGlob = struct {chg2gen : int^20}; -type map_red_iter::T_InfoChgIndiv = struct {mesure_chg : int}; -type map_red_iter::T_InfoGenGlob = struct {elt_bidon : int; chg2gen : int^20}; +type _map_red_iter::INTNBG = int^4; +type _map_red_iter::T_EntreeGlob = struct {chg2gen : A_int_20; mesure_chgs : A_int_20; mesure_gens : A_int_4}; +type _map_red_iter::T_ComChg = int; +type _map_red_iter::T_InfoGenIndiv = struct {mesure_gen : int}; +type _map_red_iter::T_EtatCharge = int; +type _map_red_iter::T_InfoChgGlob = struct {chg2gen : A_int_20}; +type _map_red_iter::T_InfoChgIndiv = struct {mesure_chg : int}; +type _map_red_iter::T_InfoGenGlob = struct {elt_bidon : int; chg2gen : A_int_20}; node map_red_iter::traite_genCore_itere( acc_in:int; @@ -4808,12 +4867,12 @@ tel node map_red_iter::map_red_iter( indice_gen:int; - InfoGenIndiv:map_red_iter::T_InfoGenIndiv; - InfoGenGlob:map_red_iter::T_InfoGenGlob; - TabEtatCharge:int^20; - TabComVal:bool^20) + InfoGenIndiv:_map_red_iter::T_InfoGenIndiv; + InfoGenGlob:_map_red_iter::T_InfoGenGlob; + TabEtatCharge:A_int_20; + TabComVal:A_bool_20) returns ( - TabComChg:int^20); + TabComChg:A_int_20); var bidon:int; let @@ -4821,7 +4880,10 @@ let const 20>>(indice_gen, TabComVal, InfoGenGlob.chg2gen); tel -- end of node map_red_iter::map_red_iter - +-- automatically defined aliases: +type A_int_20 = int^20; +type A_bool_20 = bool^20; +type A_int_4 = int^4; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/mapdeRed.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/mapdeRed.lus @@ -4836,11 +4898,11 @@ tel -- end of node mapdeRed::incr node mapdeRed::mapdeRed( - init:int^2; + init:A_int_2; init2:int) returns ( - r:int^2; - T:int^2^3; + r:A_int_2; + T:A_A_int_2_3; bid:int); let (bid, T) = fill<<node Lustre::fill<<node mapdeRed::incr, const 2>>, const @@ -4848,7 +4910,9 @@ let r = red<<node Lustre::map<<node Lustre::+, const 2>>, const 3>>(init, T); tel -- end of node mapdeRed::mapdeRed - +-- automatically defined aliases: +type A_A_int_2_3 = A_int_2^3; +type A_int_2 = int^2; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/mapiter.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/mapiter.lus @@ -4857,27 +4921,29 @@ let b = (a + 1); tel -- end of node mapiter::incr_tab -node mapiter::mapiter(i1:int^7^3) returns (s1:int^7^3); +node mapiter::mapiter(i1:A_A_int_7_3) returns (s1:A_A_int_7_3); let s1 = map<<node Lustre::map<<node mapiter::incr_tab, const 7>>, const 3>>(i1); tel -- end of node mapiter::mapiter - +-- automatically defined aliases: +type A_A_int_7_3 = A_int_7^3; +type A_int_7 = int^7; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/mappredef.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/mappredef.lus const mappredef::N = 3; -type mappredef::tab_int = int^3; -type mappredef::tab_bool = bool^3; +type _mappredef::tab_int = int^3; +type _mappredef::tab_bool = bool^3; node mappredef::mappredef( - x:bool^3; - a:int^3; - b:int^3) + x:A_bool_3; + a:A_int_3; + b:A_int_3) returns ( - c:int^3; - d:int^3); + c:A_int_3; + d:A_int_3); var z:int; let @@ -4886,7 +4952,9 @@ let d = map<<node Lustre::-, const 3>>(b); tel -- end of node mappredef::mappredef - +-- automatically defined aliases: +type A_bool_3 = bool^3; +type A_int_3 = int^3; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/plus.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/plus.lus @@ -4917,12 +4985,14 @@ let b = if ((init > a)) then (init) else (a); tel -- end of node rediter::max -node rediter::rediter(a:int^5^3) returns (b:int); +node rediter::rediter(a:A_A_int_5_3) returns (b:int); let b = red<<node Lustre::red<<node rediter::max, const 5>>, const 3>>(0, a); tel -- end of node rediter::rediter - +-- automatically defined aliases: +type A_A_int_5_3 = A_int_5^3; +type A_int_5 = int^5; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/redoptest.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/redoptest.lus @@ -4931,12 +5001,14 @@ let b = if ((init > a)) then (init) else (a); tel -- end of node redoptest::max -node redoptest::redoptest(a:int^5^3) returns (b:int); +node redoptest::redoptest(a:A_A_int_5_3) returns (b:int); let b = red<<node Lustre::red<<node Lustre::+, const 5>>, const 3>>(0, a); tel -- end of node redoptest::redoptest - +-- automatically defined aliases: +type A_A_int_5_3 = A_int_5^3; +type A_int_5 = int^5; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/sample_time_change.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/sample_time_change.lus @@ -5094,12 +5166,12 @@ tel node iter::iter( init:int) returns ( - Tab_out:int^5; + Tab_out:A_int_5; Red_plus:int; - zorroTab:int^5; + zorroTab:A_int_5; zorroAcc:int); var - T_inter:int^5; + T_inter:A_int_5; bidon:int; let (bidon, T_inter) = fill<<node iter::filled, const 5>>(init); @@ -5114,7 +5186,8 @@ let accu_out = (accu_in + elt_in); tel -- end of node iter::plus - +-- automatically defined aliases: +type A_int_5 = int^5; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/iterate.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/iterate.lus @@ -5173,18 +5246,18 @@ tel -- end of node iterate::fill_redduced node iterate::iterate( - IN1:int^10; - IN2:int^10) + IN1:A_int_10; + IN2:A_int_10) returns ( - OUT:int^10; - out_map1:int^10; - out_map2:int^10; + OUT:A_int_10; + out_map1:A_int_10; + out_map2:A_int_10; out_red1:int; - out_fill1:int^10; - out_fill2:int^10; + out_fill1:A_int_10; + out_fill2:A_int_10; out_fillred1:int; - out_fillred2:int^10; - out_fillred3:int^10); + out_fillred2:A_int_10; + out_fillred3:A_int_10); var bidon:int; let @@ -5195,7 +5268,8 @@ let iterate::fill_redduced, const 10>>(0, IN1, IN2); tel -- end of node iterate::iterate - +-- automatically defined aliases: +type A_int_10 = int^10; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/lecteur.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/lecteur.lus @@ -5296,9 +5370,9 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/morel.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/morel.lus -type morel::arrayb = bool^3; -type morel::arrayi = int^2^3; -node morel::mcmorel(i:int) returns (t:int^2); +type _morel::arrayb = bool^3; +type _morel::arrayi = A_int_2^3; +node morel::mcmorel(i:int) returns (t:A_int_2); let t = [i, i] -> [(pre(t[0]) + 1), (pre(t[1]) + 2)]; tel @@ -5315,8 +5389,8 @@ returns ( i2:int; i3:int); var - tabb:bool^3; - tabi:int^2^3; + tabb:A_bool_3; + tabi:A_A_int_2_3; let (b1, b2, b3) = (tabb[0], tabb[1], tabb[2]); (i1, i2, i3) = ((tabi[0][0] + tabi[0][1]), (tabi[1][0] + tabi[1][1]), @@ -5342,15 +5416,18 @@ let (b1, b2, b3, i1, i2, i3) = morel::tab(b, i); tel -- end of node morel::morel - +-- automatically defined aliases: +type A_bool_3 = bool^3; +type A_int_2 = int^2; +type A_A_int_2_3 = A_int_2^3; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/morel2.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/morel2.lus -type morel2::a2 = int^2; -type morel2::a32 = int^2^3; -type morel2::arrayb = bool^3; -type morel2::arrayi = int^2^3; -node morel2::mcmorel(i:int) returns (t:int^2); +type _morel2::a2 = int^2; +type _morel2::a32 = A_int_2^3; +type _morel2::arrayb = bool^3; +type _morel2::arrayi = A_int_2^3; +node morel2::mcmorel(i:int) returns (t:A_int_2); let t = [i, i] -> [(pre(t[0]) + 1), (pre(t[1]) + 2)]; tel @@ -5367,9 +5444,9 @@ returns ( i2:int; i3:int); var - tabb:bool^3; - tabi:int^2^3; - toto:int^2^3; + tabb:A_bool_3; + tabi:A_A_int_2_3; + toto:A_A_int_2_3; let (b1, b2, b3) = (tabb[0], tabb[1], tabb[2]); (i1, i2, i3) = ((tabi[0][0] + tabi[0][1]), (tabi[1][0] + tabi[1][1]), @@ -5381,13 +5458,16 @@ let tabi = toto; tel -- end of node morel2::morel2 - +-- automatically defined aliases: +type A_bool_3 = bool^3; +type A_int_2 = int^2; +type A_A_int_2_3 = A_int_2^3; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/morel3.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/morel3.lus -type morel3::arrayb = bool^3; -type morel3::arrayi = int^2^3; -node morel3::mcmorel(i:int) returns (t:int^2); +type _morel3::arrayb = bool^3; +type _morel3::arrayi = A_int_2^3; +node morel3::mcmorel(i:int) returns (t:A_int_2); let t = [i, i] -> [1, (pre(t[1]) + 2)]; tel @@ -5404,8 +5484,8 @@ returns ( i2:int; i3:int); var - tabb:bool^3; - tabi:int^2^3; + tabb:A_bool_3; + tabi:A_A_int_2_3; let (b1, b2, b3) = (tabb[0], tabb[1], tabb[2]); (i1, i2, i3) = ((tabi[0][0] + tabi[0][1]), (tabi[1][0] + tabi[1][1]), @@ -5431,17 +5511,20 @@ let (b1, b2, b3, i1, i2, i3) = morel3::tab(b, i); tel -- end of node morel3::morel3 - +-- automatically defined aliases: +type A_bool_3 = bool^3; +type A_int_2 = int^2; +type A_A_int_2_3 = A_int_2^3; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/morel4.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/morel4.lus -type morel4::tube = struct {in : int; out : int}; -type morel4::toto = struct {titi : morel4::tube; tutu : bool}; -type morel4::arrayb = bool^3; -type morel4::arrayi = int^2^3; -node morel4::mcmorel(i:int) returns (t:int^2); +type _morel4::tube = struct {in : int; out : int}; +type _morel4::toto = struct {titi : _morel4::tube; tutu : bool}; +type _morel4::arrayb = bool^3; +type _morel4::arrayi = A_int_2^3; +node morel4::mcmorel(i:int) returns (t:A_int_2); var - yo:morel4::toto; + yo:_morel4::toto; let yo.titi = tube{in=i;out=(i + 1)}; yo.tutu = true; @@ -5460,8 +5543,8 @@ returns ( i2:int; i3:int); var - tabb:bool^3; - tabi:int^2^3; + tabb:A_bool_3; + tabi:A_A_int_2_3; let (b1, b2, b3) = (tabb[0], tabb[1], tabb[2]); (i1, i2, i3) = ((tabi[0][0] + tabi[0][1]), (tabi[1][0] + tabi[1][1]), @@ -5487,19 +5570,22 @@ let (b1, b2, b3, i1, i2, i3) = morel4::tab(b, i); tel -- end of node morel4::morel4 - +-- automatically defined aliases: +type A_bool_3 = bool^3; +type A_int_2 = int^2; +type A_A_int_2_3 = A_int_2^3; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/morel5.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/morel5.lus -type morel5::tube = struct {in : int; out : int}; -type morel5::toto = struct {titi : morel5::tube; tutu : bool}; -type morel5::arrayb = bool^3; -type morel5::arrayi = int^2^3; +type _morel5::tube = struct {in : int; out : int}; +type _morel5::toto = struct {titi : _morel5::tube; tutu : bool}; +type _morel5::arrayb = bool^3; +type _morel5::arrayi = A_int_2^3; node morel5::tab( - yo:morel5::toto; - tabb:bool^3; - tabi:int^2^3) + yo:_morel5::toto; + tabb:A_bool_3; + tabi:A_A_int_2_3) returns ( b1:bool; b2:bool; @@ -5515,9 +5601,9 @@ tel -- end of node morel5::tab node morel5::morel5( - t:morel5::toto; - b:bool^3; - i:int^2^3) + t:_morel5::toto; + b:A_bool_3; + i:A_A_int_2_3) returns ( b1:bool; b2:bool; @@ -5529,9 +5615,9 @@ let (b1, b2, b3, i1, i2, i3) = morel5::tab(t, b, i); tel -- end of node morel5::morel5 -node morel5::mcmorel(i:int) returns (t:int^2; u:int^2^2); +node morel5::mcmorel(i:int) returns (t:A_int_2; u:A_A_int_2_2); var - yo:morel5::toto; + yo:_morel5::toto; let yo.titi = tube{in=i;out=(i + 1)}; yo.tutu = true; @@ -5539,7 +5625,11 @@ let u = [[10, 100], [1000, 10000]]; tel -- end of node morel5::mcmorel - +-- automatically defined aliases: +type A_A_int_2_2 = A_int_2^2; +type A_bool_3 = bool^3; +type A_int_2 = int^2; +type A_A_int_2_3 = A_int_2^3; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/noAlarm.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/noAlarm.lus @@ -6579,15 +6669,15 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/toolate.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/toolate.lus -type toolate::tab1 = int^2; -type toolate::tab2 = int^3^4; -type toolate::tab3 = int^5^6^7; +type _toolate::tab1 = int^2; +type _toolate::tab2 = A_int_3^4; +type _toolate::tab3 = A_A_int_5_6^7; const toolate::ze_const_int = 5; -type toolate::bool4 = bool^5; -type toolate::really = real; +type _toolate::bool4 = bool^5; +type _toolate::really = real; node toolate::bidon(in:bool) returns (out1:bool; out2:bool); var - toto:int^2; + toto:A_int_2; let toto[0] = 10; toto[1] = 5; @@ -6639,7 +6729,11 @@ let alarm = not(toolate::once_from_to(action, begin, en)); tel -- end of node toolate::toolate - +-- automatically defined aliases: +type A_int_2 = int^2; +type A_int_5 = int^5; +type A_int_3 = int^3; +type A_A_int_5_6 = A_int_5^6; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/toto.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/toto.lus @@ -6682,7 +6776,7 @@ node FillFollowedByRed::FillFollowedByRed( returns ( ok:bool); var - TabOutFill:real^10; + TabOutFill:A_real_10; bidon:real; let (bidon, TabOutFill) = fill<<node FillFollowedByRed::filled, const @@ -6690,13 +6784,14 @@ let ok = red<<node FillFollowedByRed::reduced, const 10>>(true, TabOutFill); tel -- end of node FillFollowedByRed::FillFollowedByRed - +-- automatically defined aliases: +type A_real_10 = real^10; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/Gyroscope.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/Gyroscope.lus -type Gyroscope::Faulty_ChannelT = struct {valuea : real; valueb : real}; -type Gyroscope::Faulty_Array = Gyroscope::Faulty_ChannelT^4^3; -type Gyroscope::Valid_ChannelT = struct {local_failure : bool; local_value : real}; +type _Gyroscope::Faulty_ChannelT = struct {valuea : real; valueb : real}; +type _Gyroscope::Faulty_Array = A__Gyroscope::Faulty_ChannelT_4^3; +type _Gyroscope::Valid_ChannelT = struct {local_failure : bool; local_value : real}; const Gyroscope::DELTA_PITCH = 2.000000; const Gyroscope::DELTA_YAW = 2.000000; const Gyroscope::DELTA_TO_GOD_YAW = 2.000000; @@ -6728,7 +6823,7 @@ tel node Gyroscope::countFalse( accu_in:real; - elt_in:Gyroscope::Valid_ChannelT) + elt_in:_Gyroscope::Valid_ChannelT) returns ( accu_out:real); let @@ -6739,7 +6834,7 @@ tel node Gyroscope::TooFar( nbToFarIn:int; - channel:Gyroscope::Faulty_ChannelT; + channel:_Gyroscope::Faulty_ChannelT; god:real; delta_to_god:real) returns ( @@ -6751,7 +6846,7 @@ tel -- end of node Gyroscope::TooFar node Gyroscope::assumeEvaluateAxis( - channels:Gyroscope::Faulty_ChannelT^4; + channels:A__Gyroscope::Faulty_ChannelT_4; delta:real; god:real; delta_to_god:real) @@ -6780,7 +6875,7 @@ tel -- end of node Gyroscope::assumeSum node Gyroscope::assumeChannel( - inChannel:Gyroscope::Faulty_ChannelT; + inChannel:_Gyroscope::Faulty_ChannelT; delta:real; god:real; delta_to_god:real) @@ -6806,12 +6901,12 @@ tel -- end of node Gyroscope::Maintain node Gyroscope::Channel( - inChannel:Gyroscope::Faulty_ChannelT; + inChannel:_Gyroscope::Faulty_ChannelT; delta:real; god:real; delta_to_god:real) returns ( - outChannel:Gyroscope::Valid_ChannelT); + outChannel:_Gyroscope::Valid_ChannelT); var maintain:bool; let @@ -6824,7 +6919,7 @@ tel -- end of node Gyroscope::Channel node Gyroscope::countValidChannels( - channels:Gyroscope::Valid_ChannelT^4) + channels:A__Gyroscope::Valid_ChannelT_4) returns ( nb:real); let @@ -6838,7 +6933,7 @@ tel -- end of node Gyroscope::sum node Gyroscope::masking( - channel:Gyroscope::Valid_ChannelT) + channel:_Gyroscope::Valid_ChannelT) returns ( out:real); let @@ -6847,7 +6942,7 @@ tel -- end of node Gyroscope::masking node Gyroscope::Voter( - channels:Gyroscope::Valid_ChannelT^4; + channels:A__Gyroscope::Valid_ChannelT_4; god:real; delta_to_god:real) returns ( @@ -6855,7 +6950,7 @@ returns ( var globalSum:real; nbValid:real; - mask:real^4; + mask:A_real_4; let nbValid = Gyroscope::countValidChannels(channels); globalSum = red<<node Gyroscope::sum, const 4>>(0.0, mask); @@ -6865,7 +6960,7 @@ tel -- end of node Gyroscope::Voter node Gyroscope::Voter2( - channels:Gyroscope::Valid_ChannelT^4; + channels:A__Gyroscope::Valid_ChannelT_4; god:real; delta_to_god:real) returns ( @@ -6873,7 +6968,7 @@ returns ( var globalSum:real; nbValid:real; - mask:real^4; + mask:A_real_4; let nbValid = 0.0; globalSum = 0.0; @@ -6883,14 +6978,14 @@ tel -- end of node Gyroscope::Voter2 node Gyroscope::EvaluateAxis( - channels:Gyroscope::Faulty_ChannelT^4; + channels:A__Gyroscope::Faulty_ChannelT_4; delta:real; god:real; delta_to_god:real) returns ( AxisValue:real); var - resChannels:Gyroscope::Valid_ChannelT^4; + resChannels:A__Gyroscope::Valid_ChannelT_4; AxisValue2:real; let resChannels = map<<node Gyroscope::Channel, const 4>>(channels, delta^4, @@ -6901,11 +6996,11 @@ tel -- end of node Gyroscope::EvaluateAxis node Gyroscope::Gyroscope( - axis:Gyroscope::Faulty_ChannelT^4^3) + axis:A_A__Gyroscope::Faulty_ChannelT_4_3) returns ( valid:bool); var - secure_values:real^3; + secure_values:A_real_3; let secure_values = map<<node Gyroscope::EvaluateAxis, const 3>>(axis, [DELTA_ROLL, DELTA_PITCH, DELTA_YAW], [GOD_ROLL, GOD_PITCH, GOD_YAW], @@ -6917,11 +7012,11 @@ tel -- end of node Gyroscope::Gyroscope node Gyroscope::guaranteeChannel( - inChannel:Gyroscope::Faulty_ChannelT; + inChannel:_Gyroscope::Faulty_ChannelT; delta:real; god:real; delta_to_god:real; - outChannel:Gyroscope::Valid_ChannelT) + outChannel:_Gyroscope::Valid_ChannelT) returns ( guaranteeOK:bool); let @@ -6933,7 +7028,7 @@ tel node Gyroscope::iteratedVoter( acc_in:bool; - channel:Gyroscope::Valid_ChannelT; + channel:_Gyroscope::Valid_ChannelT; god:real; delta_to_god:real; vote:real) @@ -6946,7 +7041,7 @@ tel -- end of node Gyroscope::iteratedVoter node Gyroscope::assumeVoter( - channels:Gyroscope::Valid_ChannelT^4; + channels:A__Gyroscope::Valid_ChannelT_4; god:real; delta_to_god:real) returns ( @@ -6957,7 +7052,7 @@ tel -- end of node Gyroscope::assumeVoter node Gyroscope::guaranteeEvaluateAxis( - channels:Gyroscope::Faulty_ChannelT^4; + channels:A__Gyroscope::Faulty_ChannelT_4; delta:real; god:real; delta_to_god:real; @@ -6996,7 +7091,7 @@ tel -- end of node Gyroscope::guaranteeSum node Gyroscope::guaranteeVoter( - channels:Gyroscope::Valid_ChannelT^4; + channels:A__Gyroscope::Valid_ChannelT_4; god:real; delta_to_god:real; vote:real) @@ -7007,22 +7102,27 @@ let channels, god^4, delta_to_god^4, vote^4); tel -- end of node Gyroscope::guaranteeVoter - +-- automatically defined aliases: +type A_real_4 = real^4; +type A_A__Gyroscope::Faulty_ChannelT_4_3 = A__Gyroscope::Faulty_ChannelT_4^3; +type A__Gyroscope::Faulty_ChannelT_4 = _Gyroscope::Faulty_ChannelT^4; +type A_real_3 = real^3; +type A__Gyroscope::Valid_ChannelT_4 = _Gyroscope::Valid_ChannelT^4; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/ProduitBool/produitBool.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/ProduitBool/produitBool.lus const produitBool::size = 10; -type produitBool::Tacc_in = struct {multiplieur : bool^10; rank : int}; -type produitBool::T_isElementOf_ = struct {eltToSearch : bool; iselementof : bool}; -type produitBool::iteratedStruct = struct {currentRank : int; rankToSelect : int; elementSelected : bool}; -type produitBool::Tacc_inShift2 = struct {multiplieur : bool^10; rank : int; actual_rank : int}; -type produitBool::Tacc_inShift = struct {acc_in_PLC : produitBool::Tacc_in; actual_rank : int}; +type _produitBool::Tacc_in = struct {multiplieur : A_bool_10; rank : int}; +type _produitBool::T_isElementOf_ = struct {eltToSearch : bool; iselementof : bool}; +type _produitBool::iteratedStruct = struct {currentRank : int; rankToSelect : int; elementSelected : bool}; +type _produitBool::Tacc_inShift2 = struct {multiplieur : A_bool_10; rank : int; actual_rank : int}; +type _produitBool::Tacc_inShift = struct {acc_in_PLC : _produitBool::Tacc_in; actual_rank : int}; node produitBool::iterated_isElementOf_( - acc_in:produitBool::T_isElementOf_; + acc_in:_produitBool::T_isElementOf_; elt_in:bool) returns ( - acc_out:produitBool::T_isElementOf_); + acc_out:_produitBool::T_isElementOf_); let acc_out = T_isElementOf_{eltToSearch=acc_in.eltToSearch;iselementof=(acc_in.iselementof @@ -7032,11 +7132,11 @@ tel node produitBool::_isElementOf_( e:bool; - t:bool^10) + t:A_bool_10) returns ( iselementof:bool); var - acc_out:produitBool::T_isElementOf_; + acc_out:_produitBool::T_isElementOf_; let acc_out = red<<node produitBool::iterated_isElementOf_, const 10>>(T_isElementOf_{eltToSearch=e;iselementof=false}, t); @@ -7045,10 +7145,10 @@ tel -- end of node produitBool::_isElementOf_ node produitBool::selectOneStage( - acc_in:produitBool::iteratedStruct; + acc_in:_produitBool::iteratedStruct; currentElt:bool) returns ( - acc_out:produitBool::iteratedStruct); + acc_out:_produitBool::iteratedStruct); let acc_out = iteratedStruct{currentRank=(acc_in.currentRank + 1);rankToSelect=acc_in.rankToSelect;elementSelected= if @@ -7059,11 +7159,11 @@ tel node produitBool::selectElementOfRank_inArray_( rankToSelect:int; - array:bool^10) + array:A_bool_10) returns ( elementSelected:bool); var - iterationResult:produitBool::iteratedStruct; + iterationResult:_produitBool::iteratedStruct; let iterationResult = red<<node produitBool::selectOneStage, const 10>>(iteratedStruct{currentRank=0;rankToSelect=rankToSelect;elementSelected=array[0]}, @@ -7073,9 +7173,9 @@ tel -- end of node produitBool::selectElementOfRank_inArray_ node produitBool::shiftFill( - acc_in:produitBool::Tacc_inShift2) + acc_in:_produitBool::Tacc_inShift2) returns ( - acc_out:produitBool::Tacc_inShift2; + acc_out:_produitBool::Tacc_inShift2; elt_out:bool); let acc_out = @@ -7089,11 +7189,11 @@ tel -- end of node produitBool::shiftFill node produitBool::shift( - acc_in:produitBool::Tacc_in) + acc_in:_produitBool::Tacc_in) returns ( - ligne:bool^20); + ligne:A_bool_20); var - bidon:produitBool::Tacc_inShift2; + bidon:_produitBool::Tacc_inShift2; let (bidon, ligne) = fill<<node produitBool::shiftFill, const 20>>(Tacc_inShift2{multiplieur=acc_in.multiplieur;rank=acc_in.rank;actual_rank=0}); @@ -7101,49 +7201,52 @@ tel -- end of node produitBool::shift node produitBool::produitBool( - multiplicande:bool^10; - multiplieur:bool^10) + multiplicande:A_bool_10; + multiplieur:A_bool_10) returns ( - matrice:bool^20^10); + matrice:A_A_bool_20_10); let matrice = true^20^10; tel -- end of node produitBool::produitBool node produitBool::PLC( - acc_in:produitBool::Tacc_in; + acc_in:_produitBool::Tacc_in; multiplicande:bool) returns ( - acc_out:produitBool::Tacc_in; - ligne:bool^20); + acc_out:_produitBool::Tacc_in; + ligne:A_bool_20); let ligne = if ((multiplicande = false)) then (multiplicande^20) else (produitBool::shift(acc_in)); acc_out = acc_in; tel -- end of node produitBool::PLC - +-- automatically defined aliases: +type A_A_bool_20_10 = A_bool_20^10; +type A_bool_10 = bool^10; +type A_bool_20 = bool^20; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/ProduitBool/shiftFill_ludic.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/ProduitBool/shiftFill_ludic.lus -type shiftFill_ludic::T1_ARRAY = bool^10; -type shiftFill_ludic::T4_STRUCT = struct {multiplieur : bool^10; rank : int}; -type shiftFill_ludic::T6_STRUCT = struct {eltToSearch : bool; iselementof : bool}; -type shiftFill_ludic::T5_STRUCT = struct {acc_in_PLC : shiftFill_ludic::T4_STRUCT; actual_rank : int}; -type shiftFill_ludic::t_Tacc_inShift = struct {acc_in_PLC : shiftFill_ludic::T4_STRUCT; actual_rank : int}; -type shiftFill_ludic::t_T_isElementOf_ = struct {eltToSearch : bool; iselementof : bool}; -type shiftFill_ludic::T2_STRUCT = struct {multiplieur : bool^10; rank : int; actual_rank : int}; -type shiftFill_ludic::t_Tacc_in = struct {multiplieur : bool^10; rank : int}; -type shiftFill_ludic::t_Tacc_inShift2 = struct {multiplieur : bool^10; rank : int; actual_rank : int}; -type shiftFill_ludic::T3_STRUCT = struct {currentRank : int; rankToSelect : int; elementSelected : bool}; -type shiftFill_ludic::t_iteratedStruct = struct {currentRank : int; rankToSelect : int; elementSelected : bool}; +type _shiftFill_ludic::T1_ARRAY = bool^10; +type _shiftFill_ludic::T4_STRUCT = struct {multiplieur : A_bool_10; rank : int}; +type _shiftFill_ludic::T6_STRUCT = struct {eltToSearch : bool; iselementof : bool}; +type _shiftFill_ludic::T5_STRUCT = struct {acc_in_PLC : _shiftFill_ludic::T4_STRUCT; actual_rank : int}; +type _shiftFill_ludic::t_Tacc_inShift = struct {acc_in_PLC : _shiftFill_ludic::T4_STRUCT; actual_rank : int}; +type _shiftFill_ludic::t_T_isElementOf_ = struct {eltToSearch : bool; iselementof : bool}; +type _shiftFill_ludic::T2_STRUCT = struct {multiplieur : A_bool_10; rank : int; actual_rank : int}; +type _shiftFill_ludic::t_Tacc_in = struct {multiplieur : A_bool_10; rank : int}; +type _shiftFill_ludic::t_Tacc_inShift2 = struct {multiplieur : A_bool_10; rank : int; actual_rank : int}; +type _shiftFill_ludic::T3_STRUCT = struct {currentRank : int; rankToSelect : int; elementSelected : bool}; +type _shiftFill_ludic::t_iteratedStruct = struct {currentRank : int; rankToSelect : int; elementSelected : bool}; const shiftFill_ludic::c_size = 10; node shiftFill_ludic::n_selectOneStage( - i_acc_in:shiftFill_ludic::T3_STRUCT; + i_acc_in:_shiftFill_ludic::T3_STRUCT; i_currentElt:bool) returns ( - o_acc_out:shiftFill_ludic::T3_STRUCT); + o_acc_out:_shiftFill_ludic::T3_STRUCT); let o_acc_out = T3_STRUCT{currentRank=(i_acc_in.currentRank + 1);rankToSelect=i_acc_in.rankToSelect;elementSelected= if @@ -7154,11 +7257,11 @@ tel node shiftFill_ludic::n_selectElementOfRank_inArray_( i_rankToSelect:int; - i_array:bool^10) + i_array:A_bool_10) returns ( o_elementSelected:bool); var - v_iterationResult:shiftFill_ludic::T3_STRUCT; + v_iterationResult:_shiftFill_ludic::T3_STRUCT; let v_iterationResult = red<<node shiftFill_ludic::n_selectOneStage, const 10>>(T3_STRUCT{currentRank=0;rankToSelect=i_rankToSelect;elementSelected=i_array[0]}, @@ -7168,9 +7271,9 @@ tel -- end of node shiftFill_ludic::n_selectElementOfRank_inArray_ node shiftFill_ludic::n_shiftFill( - i_acc_in:shiftFill_ludic::T2_STRUCT) + i_acc_in:_shiftFill_ludic::T2_STRUCT) returns ( - o_acc_out:shiftFill_ludic::T2_STRUCT; + o_acc_out:_shiftFill_ludic::T2_STRUCT; o_elt_out:bool); let o_acc_out = @@ -7182,29 +7285,30 @@ let i_acc_in.multiplieur)) else (false); tel -- end of node shiftFill_ludic::n_shiftFill - +-- automatically defined aliases: +type A_bool_10 = bool^10; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/ProduitBool/shift_ludic.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/ProduitBool/shift_ludic.lus -type shift_ludic::T1_ARRAY = bool^10; -type shift_ludic::T4_STRUCT = struct {currentRank : int; rankToSelect : int; elementSelected : bool}; -type shift_ludic::T5_STRUCT = struct {multiplieur : bool^10; rank : int}; -type shift_ludic::T6_STRUCT = struct {acc_in_PLC : shift_ludic::T5_STRUCT; actual_rank : int}; -type shift_ludic::T3_ARRAY = bool^20; -type shift_ludic::t_Tacc_inShift = struct {acc_in_PLC : shift_ludic::T5_STRUCT; actual_rank : int}; -type shift_ludic::T7_STRUCT = struct {eltToSearch : bool; iselementof : bool}; -type shift_ludic::t_T_isElementOf_ = struct {eltToSearch : bool; iselementof : bool}; -type shift_ludic::T2_STRUCT = struct {multiplieur : bool^10; rank : int; actual_rank : int}; -type shift_ludic::t_Tacc_in = struct {multiplieur : bool^10; rank : int}; -type shift_ludic::t_Tacc_inShift2 = struct {multiplieur : bool^10; rank : int; actual_rank : int}; -type shift_ludic::t_iteratedStruct = struct {currentRank : int; rankToSelect : int; elementSelected : bool}; +type _shift_ludic::T1_ARRAY = bool^10; +type _shift_ludic::T4_STRUCT = struct {currentRank : int; rankToSelect : int; elementSelected : bool}; +type _shift_ludic::T5_STRUCT = struct {multiplieur : A_bool_10; rank : int}; +type _shift_ludic::T6_STRUCT = struct {acc_in_PLC : _shift_ludic::T5_STRUCT; actual_rank : int}; +type _shift_ludic::T3_ARRAY = bool^20; +type _shift_ludic::t_Tacc_inShift = struct {acc_in_PLC : _shift_ludic::T5_STRUCT; actual_rank : int}; +type _shift_ludic::T7_STRUCT = struct {eltToSearch : bool; iselementof : bool}; +type _shift_ludic::t_T_isElementOf_ = struct {eltToSearch : bool; iselementof : bool}; +type _shift_ludic::T2_STRUCT = struct {multiplieur : A_bool_10; rank : int; actual_rank : int}; +type _shift_ludic::t_Tacc_in = struct {multiplieur : A_bool_10; rank : int}; +type _shift_ludic::t_Tacc_inShift2 = struct {multiplieur : A_bool_10; rank : int; actual_rank : int}; +type _shift_ludic::t_iteratedStruct = struct {currentRank : int; rankToSelect : int; elementSelected : bool}; const shift_ludic::c_size = 10; node shift_ludic::n_selectOneStage( - i_acc_in:shift_ludic::T4_STRUCT; + i_acc_in:_shift_ludic::T4_STRUCT; i_currentElt:bool) returns ( - o_acc_out:shift_ludic::T4_STRUCT); + o_acc_out:_shift_ludic::T4_STRUCT); let o_acc_out = T4_STRUCT{currentRank=(i_acc_in.currentRank + 1);rankToSelect=i_acc_in.rankToSelect;elementSelected= if @@ -7215,11 +7319,11 @@ tel node shift_ludic::n_selectElementOfRank_inArray_( i_rankToSelect:int; - i_array:bool^10) + i_array:A_bool_10) returns ( o_elementSelected:bool); var - v_iterationResult:shift_ludic::T4_STRUCT; + v_iterationResult:_shift_ludic::T4_STRUCT; let v_iterationResult = red<<node shift_ludic::n_selectOneStage, const 10>>(T4_STRUCT{currentRank=0;rankToSelect=i_rankToSelect;elementSelected=i_array[0]}, @@ -7229,9 +7333,9 @@ tel -- end of node shift_ludic::n_selectElementOfRank_inArray_ node shift_ludic::n_shiftFill( - i_acc_in:shift_ludic::T2_STRUCT) + i_acc_in:_shift_ludic::T2_STRUCT) returns ( - o_acc_out:shift_ludic::T2_STRUCT; + o_acc_out:_shift_ludic::T2_STRUCT; o_elt_out:bool); let o_acc_out = @@ -7245,46 +7349,48 @@ tel -- end of node shift_ludic::n_shiftFill node shift_ludic::n_shift( - i_acc_in:shift_ludic::T5_STRUCT) + i_acc_in:_shift_ludic::T5_STRUCT) returns ( - o_ligne:bool^20); + o_ligne:A_bool_20); var - v_bidon:shift_ludic::T2_STRUCT; + v_bidon:_shift_ludic::T2_STRUCT; let (v_bidon, o_ligne) = fill<<node shift_ludic::n_shiftFill, const 20>>(T2_STRUCT{multiplieur=i_acc_in.multiplieur;rank=i_acc_in.rank;actual_rank=0}); tel -- end of node shift_ludic::n_shift - +-- automatically defined aliases: +type A_bool_20 = bool^20; +type A_bool_10 = bool^10; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/arrays.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/arrays.lus const arrays::n = 4; const arrays::m = 3; const arrays::p = 2; -type arrays::tab3d = int^4^3^2; -type arrays::byte = bool^4; -type arrays::word = bool^4^3; -type arrays::long = bool^4^3^2; +type _arrays::tab3d = A_A_int_4_3^2; +type _arrays::byte = bool^4; +type _arrays::word = A_bool_4^3; +type _arrays::long = A_A_bool_4_3^2; node arrays::incr(accin:int) returns (accout:int; val:int); let accout = (accin + 1); val = accin; tel -- end of node arrays::incr -node arrays::big_sum(x:int^4^3^2) returns (s:int); +node arrays::big_sum(x:A_A_A_int_4_3_2) returns (s:int); let s = red<<node Lustre::red<<node Lustre::red<<node Lustre::+, const 4>>, const 3>>, const 2>>(0, x); tel -- end of node arrays::big_sum -node arrays::big_or(x:bool^4^3^2) returns (s:bool); +node arrays::big_or(x:A_A_A_bool_4_3_2) returns (s:bool); let s = red<<node Lustre::red<<node Lustre::red<<node Lustre::or, const 4>>, const 3>>, const 2>>(false, x); tel -- end of node arrays::big_or -node arrays::big_incr(init:int) returns (x:int^4^3^2); +node arrays::big_incr(init:int) returns (x:A_A_A_int_4_3_2); var accout:int; let @@ -7305,7 +7411,12 @@ let co = if (ci) then ((x or y)) else ((x and y)); tel -- end of node arrays::full_adder -node arrays::add_long(x:bool^4^3^2; y:bool^4^3^2) returns (s:bool^4^3^2); + +node arrays::add_long( + x:A_A_A_bool_4_3_2; + y:A_A_A_bool_4_3_2) +returns ( + s:A_A_A_bool_4_3_2); var co:bool; let @@ -7313,7 +7424,7 @@ let arrays::full_adder, const 4>>, const 3>>, const 2>>(false, x, y); tel -- end of node arrays::add_long -node arrays::big_xor(x:bool^4^3^2) returns (s:bool); +node arrays::big_xor(x:A_A_A_bool_4_3_2) returns (s:bool); let s = red<<node Lustre::red<<node Lustre::red<<node Lustre::xor, const 4>>, const 3>>, const 2>>(false, x); @@ -7322,13 +7433,13 @@ tel node arrays::arrays( init_incr:int; - init_long:bool^4^3^2) + init_long:A_A_A_bool_4_3_2) returns ( ok:bool; red_res:int; - fillred_res:bool^4^3^2); + fillred_res:A_A_A_bool_4_3_2); var - fill_res:int^4^3^2; + fill_res:A_A_A_int_4_3_2; let red_res = arrays::big_sum(fill_res); fill_res = arrays::big_incr(init_incr); @@ -7336,28 +7447,34 @@ let ok = false -> arrays::big_xor(fillred_res); tel -- end of node arrays::arrays -node arrays::add_byte(x:bool^4; y:bool^4) returns (s:bool^4); +node arrays::add_byte(x:A_bool_4; y:A_bool_4) returns (s:A_bool_4); var co:bool; let (co, s) = fillred<<node arrays::full_adder, const 4>>(false, x, y); tel -- end of node arrays::add_byte - +-- automatically defined aliases: +type A_A_A_int_4_3_2 = A_A_int_4_3^2; +type A_A_bool_4_3 = A_bool_4^3; +type A_bool_4 = bool^4; +type A_A_int_4_3 = A_int_4^3; +type A_A_A_bool_4_3_2 = A_A_bool_4_3^2; +type A_int_4 = int^4; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/calculs_max.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/calculs_max.lus const calculs_max::taille = 10; -type calculs_max::bool_arrays = bool^10; -type calculs_max::int_arrays = int^10; -type calculs_max::struct_fill_bool = struct {imax1 : int; imax2 : int; icourant : int}; -type calculs_max::struct_max = struct {max1 : int; max2 : int; imax1 : int; imax2 : int; icourant : int}; +type _calculs_max::bool_arrays = bool^10; +type _calculs_max::int_arrays = int^10; +type _calculs_max::struct_fill_bool = struct {imax1 : int; imax2 : int; icourant : int}; +type _calculs_max::struct_max = struct {max1 : int; max2 : int; imax1 : int; imax2 : int; icourant : int}; node calculs_max::max( - strin:calculs_max::struct_max; + strin:_calculs_max::struct_max; ecourant:int) returns ( - strout:calculs_max::struct_max); + strout:_calculs_max::struct_max); let strout = if ((ecourant <= strin.max2)) then (struct_max{max1=strin.max1;max2=strin.max2;imax1=strin.imax1;imax2=strin.imax2;icourant=(strin.icourant @@ -7371,9 +7488,9 @@ tel -- end of node calculs_max::max node calculs_max::fill_bool( - s_in:calculs_max::struct_fill_bool) + s_in:_calculs_max::struct_fill_bool) returns ( - s_out:calculs_max::struct_fill_bool; + s_out:_calculs_max::struct_fill_bool; elt:bool); let s_out = @@ -7382,10 +7499,10 @@ let elt = ((s_in.icourant = s_in.imax1) or (s_in.icourant = s_in.imax2)); tel -- end of node calculs_max::fill_bool -node calculs_max::calculs_max(A:int^10) returns (res:bool^10); +node calculs_max::calculs_max(A:A_int_10) returns (res:A_bool_10); var - local_struct:calculs_max::struct_max; - tmp:calculs_max::struct_fill_bool; + local_struct:_calculs_max::struct_max; + tmp:_calculs_max::struct_fill_bool; let local_struct = red<<node calculs_max::max, const 10>>(struct_max{max1=0;max2=0;imax1=-(1);imax2=-(1);icourant=0}, A); @@ -7393,19 +7510,21 @@ let 10>>(struct_fill_bool{imax1=local_struct.imax1;imax2=local_struct.imax2;icourant=0}); tel -- end of node calculs_max::calculs_max - +-- automatically defined aliases: +type A_int_10 = int^10; +type A_bool_10 = bool^10; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/deSimone.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/deSimone.lus const deSimone::size = 10; -type deSimone::tabType = bool^10; -type deSimone::cell_accu = struct {token : bool; grant : bool}; +type _deSimone::tabType = bool^10; +type _deSimone::cell_accu = struct {token : bool; grant : bool}; node deSimone::oneCell( - accu_in:deSimone::cell_accu; + accu_in:_deSimone::cell_accu; req:bool) returns ( - accu_out:deSimone::cell_accu; + accu_out:_deSimone::cell_accu; ackout:bool); let ackout = (((req and accu_in.token) and accu_in.grant) and not(false -> @@ -7427,19 +7546,19 @@ tel node deSimone::deSimone( new_token:bool; - request:bool^10) + request:A_bool_10) returns ( - acknowledge:bool^10); + acknowledge:A_bool_10); var - accu_out:deSimone::cell_accu; + accu_out:_deSimone::cell_accu; let (accu_out, acknowledge) = fillred<<node deSimone::oneCell, const 10>>(cell_accu{token=new_token;grant=true}, request); tel -- end of node deSimone::deSimone -node deSimone::prop1(request:bool^10) returns (ok:bool); +node deSimone::prop1(request:A_bool_10) returns (ok:bool); var - acknowledge:bool^10; + acknowledge:A_bool_10; nb_acknowledge:int; let acknowledge = deSimone::deSimone(true, request); @@ -7448,38 +7567,41 @@ let ok = (nb_acknowledge <= 1); tel -- end of node deSimone::prop1 - +-- automatically defined aliases: +type A_bool_10 = bool^10; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/iterFibo.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/iterFibo.lus -type iterFibo::T_fibo = int^2; -node iterFibo::fibo(accu_in:int^2) returns (accu_out:int^2; elt:int); +type _iterFibo::T_fibo = int^2; +node iterFibo::fibo(accu_in:A_int_2) returns (accu_out:A_int_2; elt:int); let accu_out = [(accu_in[0] + accu_in[1]), accu_in[0]]; elt = (accu_in[0] + accu_in[1]); tel -- end of node iterFibo::fibo -node iterFibo::iterFibo(x:int; y:int) returns (T:int^10); +node iterFibo::iterFibo(x:int; y:int) returns (T:A_int_10); var - bidon:int^2; + bidon:A_int_2; let (bidon, T) = fill<<node iterFibo::fibo, const 10>>([x, y]); tel -- end of node iterFibo::iterFibo - +-- automatically defined aliases: +type A_int_10 = int^10; +type A_int_2 = int^2; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/mapiter.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/mapiter.lus const mapiter::L = 2; -type mapiter::Reg_L = bool^2; +type _mapiter::Reg_L = bool^2; const mapiter::H = 3; -type mapiter::T_Reg_H = bool^2^3; +type _mapiter::T_Reg_H = A_bool_2^3; node mapiter::incr(init:int; b:bool) returns (res:int); let res = if ((b = true)) then ((init + 1)) else (init); tel -- end of node mapiter::incr -function mapiter::map_egal(i1:a^2; i2:a^2) returns (o:bool^2); +function mapiter::map_egal(i1:A_a_2; i2:A_a_2) returns (o:A_bool_2); let o = Lustre::map<<node Lustre::=, const 2>>(i1, i2); tel @@ -7490,27 +7612,32 @@ let out = in; tel -- end of node mapiter::bitalt -function mapiter::fill_bitalt(in:bool) returns (sacc:bool; out:bool^2); +function mapiter::fill_bitalt(in:bool) returns (sacc:bool; out:A_bool_2); let (sacc, out) = Lustre::fill<<node mapiter::bitalt, const 2>>(in); tel -- end of node mapiter::fill_bitalt -node mapiter::initmat(iacc:bool) returns (sacc:bool; R:bool^2^3); +node mapiter::initmat(iacc:bool) returns (sacc:bool; R:A_A_bool_2_3); let (sacc, R) = fill<<node mapiter::fill_bitalt, const 3>>(iacc); tel -- end of node mapiter::initmat -function mapiter::red_incr(init:int; b:bool^2) returns (res:int); +function mapiter::red_incr(init:int; b:A_bool_2) returns (res:int); let res = Lustre::red<<node mapiter::incr, const 2>>(init, b); tel -- end of node mapiter::red_incr -node mapiter::reducemat(iacc:int; I:bool^2^3) returns (res:int); +node mapiter::reducemat(iacc:int; I:A_A_bool_2_3) returns (res:int); let res = red<<node mapiter::red_incr, const 3>>(iacc, I); tel -- end of node mapiter::reducemat -node mapiter::composemat(i1:bool^2^3; i2:bool^2^3) returns (s1:bool^2^3); + +node mapiter::composemat( + i1:A_A_bool_2_3; + i2:A_A_bool_2_3) +returns ( + s1:A_A_bool_2_3); let s1 = map<<node mapiter::map_egal, const 3>>(i1, i2); tel @@ -7519,9 +7646,9 @@ node mapiter::mapiter(a:bool) returns (nbTrue:int); var bid1:bool; bid2:bool; - init1:bool^2^3; - init2:bool^2^3; - XORMAT:bool^2^3; + init1:A_A_bool_2_3; + init2:A_A_bool_2_3; + XORMAT:A_A_bool_2_3; let (bid1, init1) = mapiter::initmat(a); (bid2, init2) = mapiter::initmat(not(a)); @@ -7529,27 +7656,39 @@ let nbTrue = mapiter::reducemat(0, XORMAT); tel -- end of node mapiter::mapiter - +-- automatically defined aliases: +type A_A_bool_2_3 = A_bool_2^3; +type A_a_2 = a^2; +type A_bool_2 = bool^2; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/matrice.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/matrice.lus -type matrice::T_fibo = int^2; +type _matrice::T_fibo = int^2; const matrice::m = 3; const matrice::n = 2; -node matrice::fibo(accu_in:int^2) returns (accu_out:int^2; elt:int); +node matrice::fibo(accu_in:A_int_2) returns (accu_out:A_int_2; elt:int); let accu_out = [(accu_in[0] + accu_in[1]), accu_in[0]]; elt = (accu_in[0] + accu_in[1]); tel -- end of node matrice::fibo -node matrice::matrice(a:int) returns (sum:int; bid:int^2; T:int^3^2); + +node matrice::matrice( + a:int) +returns ( + sum:int; + bid:A_int_2; + T:A_A_int_3_2); let (bid, T) = fill<<node Lustre::fill<<node matrice::fibo, const 3>>, const 2>>([a, a]); sum = red<<node Lustre::red<<node Lustre::+, const 3>>, const 2>>(0, T); tel -- end of node matrice::matrice - +-- automatically defined aliases: +type A_int_2 = int^2; +type A_A_int_3_2 = A_int_3^2; +type A_int_3 = int^3; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/matrice2.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/matrice2.lus @@ -7575,13 +7714,13 @@ tel -- end of node minus::bitalt node minus::minus( - a:bool^3^2; - b:bool^3^2; - c:bool^3^2) + a:A_A_bool_3_2; + b:A_A_bool_3_2; + c:A_A_bool_3_2) returns ( r:bool; - T1:bool^3^2; - T2:bool^3^2); + T1:A_A_bool_3_2; + T2:A_A_bool_3_2); var bid:bool; let @@ -7593,47 +7732,50 @@ let T1); tel -- end of node minus::minus - +-- automatically defined aliases: +type A_A_bool_3_2 = A_bool_3^2; +type A_bool_3 = bool^3; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/moyenne.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/moyenne.lus -type moyenne::moyenne_accu = struct {sum : real; moyenne : real; rank : real}; +type _moyenne::moyenne_accu = struct {sum : real; moyenne : real; rank : real}; const moyenne::size = 10; node moyenne::moyenne_step( - accu_in:moyenne::moyenne_accu; + accu_in:_moyenne::moyenne_accu; elt_in:real) returns ( - accu_out:moyenne::moyenne_accu); + accu_out:_moyenne::moyenne_accu); let accu_out = moyenne_accu{sum=(accu_in.sum + elt_in);moyenne=((accu_in.sum + elt_in) / (accu_in.rank + 1.0));rank=(accu_in.rank + 1.0)}; tel -- end of node moyenne::moyenne_step -node moyenne::moyenne(Tab:real^10) returns (moy:real); +node moyenne::moyenne(Tab:A_real_10) returns (moy:real); var - accu_out:moyenne::moyenne_accu; + accu_out:_moyenne::moyenne_accu; let accu_out = red<<node moyenne::moyenne_step, const 10>>(moyenne_accu{sum=0.0;moyenne=0.0;rank=0.0}, Tab); moy = accu_out.moyenne; tel -- end of node moyenne::moyenne - +-- automatically defined aliases: +type A_real_10 = real^10; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/normal.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/normal.lus const normal::NBC = 20; -type normal::INTNBC = int^20; +type _normal::INTNBC = int^20; const normal::NBG = 4; -type normal::INTNBG = int^4; -type normal::T_EntreeGlob = struct {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}; -type normal::T_ComChg = int; -type normal::T_InfoGenIndiv = struct {mesure_gen : int}; -type normal::T_EtatCharge = int; -type normal::T_InfoChgGlob = struct {chg2gen : int^20}; -type normal::T_InfoChgIndiv = struct {mesure_chg : int}; -type normal::T_InfoGenGlob = struct {elt_bidon : int; chg2gen : int^20}; +type _normal::INTNBG = int^4; +type _normal::T_EntreeGlob = struct {chg2gen : A_int_20; mesure_chgs : A_int_20; mesure_gens : A_int_4}; +type _normal::T_ComChg = int; +type _normal::T_InfoGenIndiv = struct {mesure_gen : int}; +type _normal::T_EtatCharge = int; +type _normal::T_InfoChgGlob = struct {chg2gen : A_int_20}; +type _normal::T_InfoChgIndiv = struct {mesure_chg : int}; +type _normal::T_InfoGenGlob = struct {elt_bidon : int; chg2gen : A_int_20}; const normal::EC_LESTAGE = 3; const normal::COM_ON = 1; const normal::EC_OFF = 1; @@ -7646,16 +7788,16 @@ const normal::COM_ERR = 0; node normal::int2InfoChgIndiv( m:int) returns ( - InfoChgIndiv:normal::T_InfoChgIndiv); + InfoChgIndiv:_normal::T_InfoChgIndiv); let InfoChgIndiv = T_InfoChgIndiv{mesure_chg=m}; tel -- end of node normal::int2InfoChgIndiv node normal::extract_tab_info_chg_indiv( - EntreeGlob:normal::T_EntreeGlob) + EntreeGlob:_normal::T_EntreeGlob) returns ( - TabInfoChgIndiv:normal::T_InfoChgIndiv^20); + TabInfoChgIndiv:A__normal::T_InfoChgIndiv_20); let TabInfoChgIndiv = map<<node normal::int2InfoChgIndiv, const 20>>(EntreeGlob.mesure_chgs); @@ -7665,16 +7807,16 @@ tel node normal::int2InfoGenIndiv( m:int) returns ( - InfoGenIndiv:normal::T_InfoGenIndiv); + InfoGenIndiv:_normal::T_InfoGenIndiv); let InfoGenIndiv = T_InfoGenIndiv{mesure_gen=m}; tel -- end of node normal::int2InfoGenIndiv node normal::extract_tab_info_gen_indiv( - EntreeGlob:normal::T_EntreeGlob) + EntreeGlob:_normal::T_EntreeGlob) returns ( - TabInfoGenIndiv:normal::T_InfoGenIndiv^4); + TabInfoGenIndiv:A__normal::T_InfoGenIndiv_4); let TabInfoGenIndiv = map<<node normal::int2InfoGenIndiv, const 4>>(EntreeGlob.mesure_gens); @@ -7694,11 +7836,11 @@ tel node normal::essai_traite_gen( indice_gen:int; - infoGenGlob:normal::T_InfoGenGlob) + infoGenGlob:_normal::T_InfoGenGlob) returns ( - TabComVal:bool^20); + TabComVal:A_bool_20); var - Tab_indiceGen:int^20; + Tab_indiceGen:A_int_20; bid:int; let (bid, Tab_indiceGen) = fill<<node normal::copie, const 20>>(indice_gen); @@ -7719,11 +7861,11 @@ tel -- end of node normal::fusion_une_com node normal::fusion_tab_com( - acc_in:int^20; - TabCom:int^20; - TabVal:bool^20) + acc_in:A_int_20; + TabCom:A_int_20; + TabVal:A_bool_20) returns ( - acc_out:int^20); + acc_out:A_int_20); let acc_out = map<<node normal::fusion_une_com, const 20>>(acc_in, TabCom, TabVal); @@ -7731,12 +7873,12 @@ tel -- end of node normal::fusion_tab_com node normal::fusion_com( - AllTabComChg:int^20^4; - AllTabComVal:bool^20^4) + AllTabComChg:A_A_int_20_4; + AllTabComVal:A_A_bool_20_4) returns ( - TabComChg:int^20); + TabComChg:A_int_20); var - Vide:int^20; + Vide:A_int_20; let Vide = COM_ERR^20; TabComChg = red<<node normal::fusion_tab_com, const 4>>(Vide, @@ -7758,10 +7900,10 @@ tel -- end of node normal::traite_genCore_itere node normal::essai2( - a:int^20; - d:normal::T_InfoGenGlob) + a:A_int_20; + d:_normal::T_InfoGenGlob) returns ( - c:bool^20); + c:A_bool_20); let c = map<<node normal::egal_indice, const 20>>(a, d.chg2gen); tel @@ -7773,9 +7915,9 @@ tel -- end of node normal::id node normal::extract_info_chg_glob( - EntreeGlob:normal::T_EntreeGlob) + EntreeGlob:_normal::T_EntreeGlob) returns ( - InfoChgGlob:normal::T_InfoChgGlob); + InfoChgGlob:_normal::T_InfoChgGlob); let InfoChgGlob = T_InfoChgGlob{chg2gen=map<<node normal::id, const 20>>(EntreeGlob.chg2gen)}; @@ -7783,10 +7925,10 @@ tel -- end of node normal::extract_info_chg_glob node normal::extrCharge( - EntreeGlob:normal::T_EntreeGlob) + EntreeGlob:_normal::T_EntreeGlob) returns ( - TabInfoChgIndiv:normal::T_InfoChgIndiv^20; - TabInfoChgGlob:normal::T_InfoChgGlob^20); + TabInfoChgIndiv:A__normal::T_InfoChgIndiv_20; + TabInfoChgGlob:A__normal::T_InfoChgGlob_20); let TabInfoChgIndiv = normal::extract_tab_info_chg_indiv(EntreeGlob); TabInfoChgGlob = normal::extract_info_chg_glob(EntreeGlob)^20; @@ -7799,10 +7941,10 @@ tel -- end of node normal::trChItere node normal::essai3( - indice:int^20; - info:normal::T_InfoGenGlob) + indice:A_int_20; + info:_normal::T_InfoGenGlob) returns ( - Connerie:bool^20); + Connerie:A_bool_20); let Connerie = map<<node normal::egal_indice, const 20>>(indice, info.chg2gen); @@ -7811,12 +7953,12 @@ tel node normal::traite_gen_core( indice_gen:int; - InfoGenIndiv:normal::T_InfoGenIndiv; - InfoGenGlob:normal::T_InfoGenGlob; - TabEtatCharge:int^20; - TabComVal:bool^20) + InfoGenIndiv:_normal::T_InfoGenIndiv; + InfoGenGlob:_normal::T_InfoGenGlob; + TabEtatCharge:A_int_20; + TabComVal:A_bool_20) returns ( - TabComChg:int^20); + TabComChg:A_int_20); var bidon:int; let @@ -7827,15 +7969,15 @@ tel node normal::traite_gen( indice_gen:int; - InfoGenIndiv:normal::T_InfoGenIndiv; - InfoGenGlob:normal::T_InfoGenGlob; - TabEtatCharge:int^20) + InfoGenIndiv:_normal::T_InfoGenIndiv; + InfoGenGlob:_normal::T_InfoGenGlob; + TabEtatCharge:A_int_20) returns ( - TabComChg:int^20; - TabComVal:bool^20); + TabComChg:A_int_20; + TabComVal:A_bool_20); var - TabComVal_bis:bool^20; - TabIndiceGen:int^20; + TabComVal_bis:A_bool_20; + TabIndiceGen:A_int_20; bid:int; let TabComVal_bis = map<<node normal::egal_indice, const 20>>(TabIndiceGen, @@ -7849,9 +7991,9 @@ tel -- end of node normal::traite_gen node normal::extract_info_gen_glob( - EntreeGlob:normal::T_EntreeGlob) + EntreeGlob:_normal::T_EntreeGlob) returns ( - InfoGenGlob:normal::T_InfoGenGlob); + InfoGenGlob:_normal::T_InfoGenGlob); let InfoGenGlob = T_InfoGenGlob{elt_bidon=0;chg2gen=map<<node normal::id, const 20>>(EntreeGlob.chg2gen)}; @@ -7859,8 +8001,8 @@ tel -- end of node normal::extract_info_gen_glob node normal::traite_charge( - InfoChgIndiv:normal::T_InfoChgIndiv; - InfoChgGlob:normal::T_InfoChgGlob) + InfoChgIndiv:_normal::T_InfoChgIndiv; + InfoChgGlob:_normal::T_InfoChgGlob) returns ( EtatCharge:int); let @@ -7876,11 +8018,11 @@ tel -- end of node normal::incr_acc node normal::extrGen( - EntreeGlob:normal::T_EntreeGlob) + EntreeGlob:_normal::T_EntreeGlob) returns ( - TabInfoGenIndiv:normal::T_InfoGenIndiv^4; - TabInfoGenGlob:normal::T_InfoGenGlob^4; - TabIndiceGen:int^4); + TabInfoGenIndiv:A__normal::T_InfoGenIndiv_4; + TabInfoGenGlob:A__normal::T_InfoGenGlob_4; + TabIndiceGen:A_int_4); var bid:int; let @@ -7891,13 +8033,13 @@ tel -- end of node normal::extrGen node normal::traiteGen( - TabIndiceGen:int^4; - TabInfoGenIndiv:normal::T_InfoGenIndiv^4; - TabInfoGenGlob:normal::T_InfoGenGlob^4; - TabEtatCharge:int^20) + TabIndiceGen:A_int_4; + TabInfoGenIndiv:A__normal::T_InfoGenIndiv_4; + TabInfoGenGlob:A__normal::T_InfoGenGlob_4; + TabEtatCharge:A_int_20) returns ( - AllTabComChg:int^20^4; - AllTabComVal:bool^20^4); + AllTabComChg:A_A_int_20_4; + AllTabComVal:A_A_bool_20_4); let (AllTabComChg, AllTabComVal) = map<<node normal::traite_gen, const 4>>(TabIndiceGen, TabInfoGenIndiv, TabInfoGenGlob, TabEtatCharge^4); @@ -7905,10 +8047,10 @@ tel -- end of node normal::traiteGen node normal::traiteChg( - TabInfoChgIndiv:normal::T_InfoChgIndiv^20; - TabInfoChgGlob:normal::T_InfoChgGlob^20) + TabInfoChgIndiv:A__normal::T_InfoChgIndiv_20; + TabInfoChgGlob:A__normal::T_InfoChgGlob_20) returns ( - TabEtatCharge:int^20); + TabEtatCharge:A_int_20); let TabEtatCharge = map<<node normal::traite_charge, const 20>>(TabInfoChgIndiv, TabInfoChgGlob); @@ -7916,18 +8058,18 @@ tel -- end of node normal::traiteChg node normal::normal( - EntreeGlob:normal::T_EntreeGlob) + EntreeGlob:_normal::T_EntreeGlob) returns ( - TabComChg:int^20); + TabComChg:A_int_20); var - TabInfoChgIndiv:normal::T_InfoChgIndiv^20; - TabInfoChgGlob:normal::T_InfoChgGlob^20; - TabEtatCharge:int^20; - TabInfoGenIndiv:normal::T_InfoGenIndiv^4; - TabInfoGenGlob:normal::T_InfoGenGlob^4; - TabIndiceGen:int^4; - AllTabComChg:int^20^4; - AllTabComVal:bool^20^4; + TabInfoChgIndiv:A__normal::T_InfoChgIndiv_20; + TabInfoChgGlob:A__normal::T_InfoChgGlob_20; + TabEtatCharge:A_int_20; + TabInfoGenIndiv:A__normal::T_InfoGenIndiv_4; + TabInfoGenGlob:A__normal::T_InfoGenGlob_4; + TabIndiceGen:A_int_4; + AllTabComChg:A_A_int_20_4; + AllTabComVal:A_A_bool_20_4; let (TabInfoChgIndiv, TabInfoChgGlob) = normal::extrCharge(EntreeGlob); TabEtatCharge = normal::traiteChg(TabInfoChgIndiv, TabInfoChgGlob); @@ -7941,18 +8083,27 @@ tel node normal::traite_gen_bis( a:int; - c:normal::T_InfoGenGlob) + c:_normal::T_InfoGenGlob) returns ( - e:bool^20); + e:A_bool_20); var - loc_a:int^20; + loc_a:A_int_20; bid:int; let (bid, loc_a) = fill<<node normal::copie, const 20>>(a); e = map<<node normal::egal_indice, const 20>>(loc_a, c.chg2gen); tel -- end of node normal::traite_gen_bis - +-- automatically defined aliases: +type A__normal::T_InfoChgIndiv_20 = _normal::T_InfoChgIndiv^20; +type A_int_4 = int^4; +type A__normal::T_InfoGenGlob_4 = _normal::T_InfoGenGlob^4; +type A__normal::T_InfoChgGlob_20 = _normal::T_InfoChgGlob^20; +type A__normal::T_InfoGenIndiv_4 = _normal::T_InfoGenIndiv^4; +type A_bool_20 = bool^20; +type A_A_bool_20_4 = A_bool_20^4; +type A_A_int_20_4 = A_int_20^4; +type A_int_20 = int^20; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/pipeline.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/pipeline.lus @@ -7969,7 +8120,7 @@ let accu_out = elt_in; tel -- end of node pipeline::oneStep_pipe -node pipeline::pipeline(in:bool^10) returns (out:bool^10); +node pipeline::pipeline(in:A_bool_10) returns (out:A_bool_10); var accu_out:bool; let @@ -7977,16 +8128,17 @@ let pre(accu_out), in); tel -- end of node pipeline::pipeline - +-- automatically defined aliases: +type A_bool_10 = bool^10; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/predefOp.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/predefOp.lus const predefOp::L = 2; -type predefOp::Reg_L = bool^2; +type _predefOp::Reg_L = bool^2; const predefOp::H = 3; -type predefOp::T_Reg_H = bool^2^3; -type predefOp::Tab_L = int^2; -type predefOp::T_Tab_H = int^2^3; +type _predefOp::T_Reg_H = A_bool_2^3; +type _predefOp::Tab_L = int^2; +type _predefOp::T_Tab_H = A_int_2^3; node predefOp::incr(init:int; b:bool) returns (res:int); let res = if ((b = true)) then ((init + 1)) else (init); @@ -7998,7 +8150,12 @@ let oacc = not(res); tel -- end of node predefOp::bitalt -node predefOp::initmatbool(iacc:bool) returns (sacc:bool; R:bool^2^3); + +node predefOp::initmatbool( + iacc:bool) +returns ( + sacc:bool; + R:A_A_bool_2_3); let (sacc, R) = fill<<node Lustre::fill<<node predefOp::bitalt, const 2>>, const 3>>(iacc); @@ -8006,15 +8163,15 @@ tel -- end of node predefOp::initmatbool node predefOp::composematbool( - i1:bool^2^3; - i2:bool^2^3) + i1:A_A_bool_2_3; + i2:A_A_bool_2_3) returns ( - s1:bool^2^3); + s1:A_A_bool_2_3); let s1 = map<<node Lustre::map<<node Lustre::=>, const 2>>, const 3>>(i1, i2); tel -- end of node predefOp::composematbool -node predefOp::reducematbool(iacc:int; I:bool^2^3) returns (res:int); +node predefOp::reducematbool(iacc:int; I:A_A_bool_2_3) returns (res:int); let res = red<<node Lustre::red<<node predefOp::incr, const 2>>, const 3>>(iacc, I); @@ -8025,9 +8182,9 @@ node predefOp::predefOp2( a:bool) returns ( nbTrue:int; - init1:bool^2^3; - init2:bool^2^3; - XORMAT:bool^2^3); + init1:A_A_bool_2_3; + init2:A_A_bool_2_3; + XORMAT:A_A_bool_2_3); var bid1:bool; bid2:bool; @@ -8040,11 +8197,11 @@ tel -- end of node predefOp::predefOp2 node predefOp::composematint( - i1:int^2^3; - i2:int^2^3) + i1:A_A_int_2_3; + i2:A_A_int_2_3) returns ( - s1:int^2^3; - s2:bool^2^3); + s1:A_A_int_2_3; + s2:A_A_bool_2_3); let s1 = map<<node Lustre::map<<node Lustre::/, const 2>>, const 3>>(i1, i2); s2 = map<<node Lustre::map<<node Lustre::>=, const 2>>, const 3>>(i1, i2); @@ -8056,13 +8213,13 @@ let oacc = (res + 1); tel -- end of node predefOp::incremental -node predefOp::reducematint(iacc:int; I:int^2^3) returns (res:int); +node predefOp::reducematint(iacc:int; I:A_A_int_2_3) returns (res:int); let res = red<<node Lustre::red<<node Lustre::+, const 2>>, const 3>>(iacc, I); tel -- end of node predefOp::reducematint -node predefOp::initmatint(iacc:int) returns (sacc:int; R:int^2^3); +node predefOp::initmatint(iacc:int) returns (sacc:int; R:A_A_int_2_3); let (sacc, R) = fill<<node Lustre::fill<<node predefOp::incremental, const 2>>, const 3>>(iacc); @@ -8073,10 +8230,10 @@ node predefOp::predefOp( a:int) returns ( res:int; - init1:int^2^3; - init2:int^2^3; - matres1:int^2^3; - matres2:bool^2^3); + init1:A_A_int_2_3; + init2:A_A_int_2_3; + matres1:A_A_int_2_3; + matres2:A_A_bool_2_3); var bid1:int; bid2:int; @@ -8087,7 +8244,11 @@ let res = predefOp::reducematint(0, matres1); tel -- end of node predefOp::predefOp - +-- automatically defined aliases: +type A_int_2 = int^2; +type A_A_bool_2_3 = A_bool_2^3; +type A_A_int_2_3 = A_int_2^3; +type A_bool_2 = bool^2; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/redIf.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/redIf.lus @@ -8096,12 +8257,13 @@ let r = if (a) then (b) else (c); tel -- end of node redIf::monIf -node redIf::redIf(a:bool; b:bool^3; c:bool^3) returns (r:bool); +node redIf::redIf(a:bool; b:A_bool_3; c:A_bool_3) returns (r:bool); let r = red<<node Lustre::if, const 3>>(a, b, c); tel -- end of node redIf::redIf - +-- automatically defined aliases: +type A_bool_3 = bool^3; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/simpleRed.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/simpleRed.lus @@ -8117,18 +8279,18 @@ tel ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/testSilus.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/testSilus.lus const testSilus::NBC = 20; -type testSilus::INTNBC = int^20; +type _testSilus::INTNBC = int^20; const testSilus::NBG = 4; -type testSilus::INTNBG = int^4; -type testSilus::T_EntreeGlob = struct {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}; -type testSilus::T_ComChg = int; -type testSilus::T_InfoGenIndiv = struct {mesure_gen : int}; -type testSilus::BOOLNBC = bool^20; -type testSilus::T_EtatCharge = int; -type testSilus::T_InfoChgGlob = struct {chg2gen : int^20}; -type testSilus::T_InfoChgIndiv = struct {mesure_chg : int}; -type testSilus::T_ComChgNBC = int^20; -type testSilus::T_InfoGenGlob = struct {elt_bidon : int; chg2gen : int^20}; +type _testSilus::INTNBG = int^4; +type _testSilus::T_EntreeGlob = struct {chg2gen : A_int_20; mesure_chgs : A_int_20; mesure_gens : A_int_4}; +type _testSilus::T_ComChg = int; +type _testSilus::T_InfoGenIndiv = struct {mesure_gen : int}; +type _testSilus::BOOLNBC = bool^20; +type _testSilus::T_EtatCharge = int; +type _testSilus::T_InfoChgGlob = struct {chg2gen : A_int_20}; +type _testSilus::T_InfoChgIndiv = struct {mesure_chg : int}; +type _testSilus::T_ComChgNBC = int^20; +type _testSilus::T_InfoGenGlob = struct {elt_bidon : int; chg2gen : A_int_20}; const testSilus::EC_LESTAGE = 3; const testSilus::COM_ON = 1; const testSilus::EC_OFF = 1; @@ -8141,16 +8303,16 @@ const testSilus::COM_ERR = 0; node testSilus::int2InfoChgIndiv( m:int) returns ( - InfoChgIndiv:testSilus::T_InfoChgIndiv); + InfoChgIndiv:_testSilus::T_InfoChgIndiv); let InfoChgIndiv = T_InfoChgIndiv{mesure_chg=m}; tel -- end of node testSilus::int2InfoChgIndiv node testSilus::extract_tab_info_chg_indiv( - EntreeGlob:testSilus::T_EntreeGlob) + EntreeGlob:_testSilus::T_EntreeGlob) returns ( - TabInfoChgIndiv:testSilus::T_InfoChgIndiv^20); + TabInfoChgIndiv:A__testSilus::T_InfoChgIndiv_20); let TabInfoChgIndiv = map<<node testSilus::int2InfoChgIndiv, const 20>>(EntreeGlob.mesure_chgs); @@ -8160,16 +8322,16 @@ tel node testSilus::int2InfoGenIndiv( m:int) returns ( - InfoGenIndiv:testSilus::T_InfoGenIndiv); + InfoGenIndiv:_testSilus::T_InfoGenIndiv); let InfoGenIndiv = T_InfoGenIndiv{mesure_gen=m}; tel -- end of node testSilus::int2InfoGenIndiv node testSilus::extract_tab_info_gen_indiv( - EntreeGlob:testSilus::T_EntreeGlob) + EntreeGlob:_testSilus::T_EntreeGlob) returns ( - TabInfoGenIndiv:testSilus::T_InfoGenIndiv^4); + TabInfoGenIndiv:A__testSilus::T_InfoGenIndiv_4); let TabInfoGenIndiv = map<<node testSilus::int2InfoGenIndiv, const 4>>(EntreeGlob.mesure_gens); @@ -8199,11 +8361,11 @@ tel -- end of node testSilus::fusion_une_com node testSilus::fusion_tab_com( - acc_in:int^20; - TabCom:int^20; - TabVal:bool^20) + acc_in:A_int_20; + TabCom:A_int_20; + TabVal:A_bool_20) returns ( - acc_out:int^20); + acc_out:A_int_20); let acc_out = map<<node testSilus::fusion_une_com, const 20>>(acc_in, TabCom, TabVal); @@ -8211,12 +8373,12 @@ tel -- end of node testSilus::fusion_tab_com node testSilus::fusion_com( - AllTabComChg:int^20^4; - AllTabComVal:bool^20^4) + AllTabComChg:A_A_int_20_4; + AllTabComVal:A_A_bool_20_4) returns ( - TabComChg:int^20); + TabComChg:A_int_20); var - Vide:int^20; + Vide:A_int_20; let Vide = COM_ERR^20; TabComChg = red<<node testSilus::fusion_tab_com, const 4>>(Vide, @@ -8243,9 +8405,9 @@ tel -- end of node testSilus::id node testSilus::extract_info_chg_glob( - EntreeGlob:testSilus::T_EntreeGlob) + EntreeGlob:_testSilus::T_EntreeGlob) returns ( - InfoChgGlob:testSilus::T_InfoChgGlob); + InfoChgGlob:_testSilus::T_InfoChgGlob); let InfoChgGlob = T_InfoChgGlob{chg2gen=map<<node testSilus::id, const 20>>(EntreeGlob.chg2gen)}; @@ -8253,10 +8415,10 @@ tel -- end of node testSilus::extract_info_chg_glob node testSilus::extrCharge( - EntreeGlob:testSilus::T_EntreeGlob) + EntreeGlob:_testSilus::T_EntreeGlob) returns ( - TabInfoChgIndiv:testSilus::T_InfoChgIndiv^20; - TabInfoChgGlob:testSilus::T_InfoChgGlob^20); + TabInfoChgIndiv:A__testSilus::T_InfoChgIndiv_20; + TabInfoChgGlob:A__testSilus::T_InfoChgGlob_20); let TabInfoChgIndiv = testSilus::extract_tab_info_chg_indiv(EntreeGlob); TabInfoChgGlob = testSilus::extract_info_chg_glob(EntreeGlob)^20; @@ -8270,12 +8432,12 @@ tel node testSilus::traite_gen_core( indice_gen:int; - InfoGenIndiv:testSilus::T_InfoGenIndiv; - InfoGenGlob:testSilus::T_InfoGenGlob; - TabEtatCharge:int^20; - TabComVal:bool^20) + InfoGenIndiv:_testSilus::T_InfoGenIndiv; + InfoGenGlob:_testSilus::T_InfoGenGlob; + TabEtatCharge:A_int_20; + TabComVal:A_bool_20) returns ( - TabComChg:int^20); + TabComChg:A_int_20); var bidon:int; let @@ -8286,14 +8448,14 @@ tel node testSilus::traite_gen( indice_gen:int; - InfoGenIndiv:testSilus::T_InfoGenIndiv; - InfoGenGlob:testSilus::T_InfoGenGlob; - TabEtatCharge:int^20) + InfoGenIndiv:_testSilus::T_InfoGenIndiv; + InfoGenGlob:_testSilus::T_InfoGenGlob; + TabEtatCharge:A_int_20) returns ( - TabComChg:int^20; - TabComVal:bool^20); + TabComChg:A_int_20; + TabComVal:A_bool_20); var - TabIndiceGen:int^20; + TabIndiceGen:A_int_20; bidon:int; let TabComChg = testSilus::traite_gen_core(indice_gen, InfoGenIndiv, @@ -8306,9 +8468,9 @@ tel -- end of node testSilus::traite_gen node testSilus::extract_info_gen_glob( - EntreeGlob:testSilus::T_EntreeGlob) + EntreeGlob:_testSilus::T_EntreeGlob) returns ( - InfoGenGlob:testSilus::T_InfoGenGlob); + InfoGenGlob:_testSilus::T_InfoGenGlob); let InfoGenGlob = T_InfoGenGlob{elt_bidon=0;chg2gen=map<<node testSilus::id, const 20>>(EntreeGlob.chg2gen)}; @@ -8316,8 +8478,8 @@ tel -- end of node testSilus::extract_info_gen_glob node testSilus::traite_charge( - InfoChgIndiv:testSilus::T_InfoChgIndiv; - InfoChgGlob:testSilus::T_InfoChgGlob) + InfoChgIndiv:_testSilus::T_InfoChgIndiv; + InfoChgGlob:_testSilus::T_InfoChgGlob) returns ( EtatCharge:int); let @@ -8327,10 +8489,10 @@ tel -- end of node testSilus::traite_charge node testSilus::traiteChg( - TabInfoChgIndiv:testSilus::T_InfoChgIndiv^20; - TabInfoChgGlob:testSilus::T_InfoChgGlob^20) + TabInfoChgIndiv:A__testSilus::T_InfoChgIndiv_20; + TabInfoChgGlob:A__testSilus::T_InfoChgGlob_20) returns ( - TabEtatCharge:int^20); + TabEtatCharge:A_int_20); let TabEtatCharge = map<<node testSilus::traite_charge, const 20>>(TabInfoChgIndiv, TabInfoChgGlob); @@ -8344,11 +8506,11 @@ tel -- end of node testSilus::incr_acc node testSilus::extrGen( - EntreeGlob:testSilus::T_EntreeGlob) + EntreeGlob:_testSilus::T_EntreeGlob) returns ( - TabInfoGenIndiv:testSilus::T_InfoGenIndiv^4; - TabInfoGenGlob:testSilus::T_InfoGenGlob^4; - TabIndiceGen:int^4); + TabInfoGenIndiv:A__testSilus::T_InfoGenIndiv_4; + TabInfoGenGlob:A__testSilus::T_InfoGenGlob_4; + TabIndiceGen:A_int_4); var bidon:int; let @@ -8359,13 +8521,13 @@ tel -- end of node testSilus::extrGen node testSilus::traiteGen( - TabIndiceGen:int^4; - TabInfoGenIndiv:testSilus::T_InfoGenIndiv^4; - TabInfoGenGlob:testSilus::T_InfoGenGlob^4; - TabEtatCharge:int^20) + TabIndiceGen:A_int_4; + TabInfoGenIndiv:A__testSilus::T_InfoGenIndiv_4; + TabInfoGenGlob:A__testSilus::T_InfoGenGlob_4; + TabEtatCharge:A_int_20) returns ( - AllTabComChg:int^20^4; - AllTabComVal:bool^20^4); + AllTabComChg:A_A_int_20_4; + AllTabComVal:A_A_bool_20_4); let (AllTabComChg, AllTabComVal) = map<<node testSilus::traite_gen, const 4>>(TabIndiceGen, TabInfoGenIndiv, TabInfoGenGlob, TabEtatCharge^4); @@ -8373,18 +8535,18 @@ tel -- end of node testSilus::traiteGen node testSilus::testSilus( - EntreeGlob:testSilus::T_EntreeGlob) + EntreeGlob:_testSilus::T_EntreeGlob) returns ( - TabComChg:int^20); + TabComChg:A_int_20); var - TabInfoChgIndiv:testSilus::T_InfoChgIndiv^20; - TabInfoChgGlob:testSilus::T_InfoChgGlob^20; - TabEtatCharge:int^20; - TabInfoGenIndiv:testSilus::T_InfoGenIndiv^4; - TabInfoGenGlob:testSilus::T_InfoGenGlob^4; - TabIndiceGen:int^4; - AllTabComChg:int^20^4; - AllTabComVal:bool^20^4; + TabInfoChgIndiv:A__testSilus::T_InfoChgIndiv_20; + TabInfoChgGlob:A__testSilus::T_InfoChgGlob_20; + TabEtatCharge:A_int_20; + TabInfoGenIndiv:A__testSilus::T_InfoGenIndiv_4; + TabInfoGenGlob:A__testSilus::T_InfoGenGlob_4; + TabIndiceGen:A_int_4; + AllTabComChg:A_A_int_20_4; + AllTabComVal:A_A_bool_20_4; let (TabInfoChgIndiv, TabInfoChgGlob) = testSilus::extrCharge(EntreeGlob); TabEtatCharge = testSilus::traiteChg(TabInfoChgIndiv, TabInfoChgGlob); @@ -8395,23 +8557,32 @@ let TabComChg = testSilus::fusion_com(AllTabComChg, AllTabComVal); tel -- end of node testSilus::testSilus - +-- automatically defined aliases: +type A__testSilus::T_InfoChgIndiv_20 = _testSilus::T_InfoChgIndiv^20; +type A_int_4 = int^4; +type A__testSilus::T_InfoGenGlob_4 = _testSilus::T_InfoGenGlob^4; +type A__testSilus::T_InfoChgGlob_20 = _testSilus::T_InfoChgGlob^20; +type A__testSilus::T_InfoGenIndiv_4 = _testSilus::T_InfoGenIndiv^4; +type A_bool_20 = bool^20; +type A_A_bool_20_4 = A_bool_20^4; +type A_A_int_20_4 = A_int_20^4; +type A_int_20 = int^20; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/triSel.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/triSel.lus const triSel::size = 50; -type triSel::tabSize = int^50; -type triSel::Sort_accu = struct {CurrentRank : int; Tab : int^50}; -type triSel::Select_accu = struct {RankToFind : int; CurrentRank : int; Val : int}; -type triSel::MinFR_accu = struct {MinVal : int; MinRank : int; RankFrom : int; Rank : int}; -type triSel::sorted_iter_accu = struct {prev_elt : int; prop_is_tt : bool}; -type triSel::Exchange_accu = struct {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; +type _triSel::tabSize = int^50; +type _triSel::Sort_accu = struct {CurrentRank : int; Tab : A_int_50}; +type _triSel::Select_accu = struct {RankToFind : int; CurrentRank : int; Val : int}; +type _triSel::MinFR_accu = struct {MinVal : int; MinRank : int; RankFrom : int; Rank : int}; +type _triSel::sorted_iter_accu = struct {prev_elt : int; prop_is_tt : bool}; +type _triSel::Exchange_accu = struct {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; node triSel::minFromRank( - accu_in:triSel::MinFR_accu; + accu_in:_triSel::MinFR_accu; TabEltIn:int) returns ( - accu_out:triSel::MinFR_accu); + accu_out:_triSel::MinFR_accu); let accu_out = MinFR_accu{MinVal= if (((accu_in.Rank = 0) or (accu_in.Rank = accu_in.RankFrom))) then (TabEltIn) else ( if ((accu_in.Rank >= @@ -8425,10 +8596,10 @@ tel -- end of node triSel::minFromRank node triSel::select( - accu_in:triSel::Select_accu; + accu_in:_triSel::Select_accu; elt:int) returns ( - accu_out:triSel::Select_accu); + accu_out:_triSel::Select_accu); let accu_out = Select_accu{RankToFind=accu_in.RankToFind;CurrentRank=(accu_in.CurrentRank @@ -8438,10 +8609,10 @@ tel -- end of node triSel::select node triSel::Exchange_i_j( - accu_in:triSel::Exchange_accu; + accu_in:_triSel::Exchange_accu; eltIn:int) returns ( - accu_out:triSel::Exchange_accu; + accu_out:_triSel::Exchange_accu; eltOut:int); let accu_out = @@ -8454,15 +8625,15 @@ tel -- end of node triSel::Exchange_i_j node triSel::UnarySort( - accu_in:triSel::Sort_accu; + accu_in:_triSel::Sort_accu; eltIn:int) returns ( - accu_out:triSel::Sort_accu); + accu_out:_triSel::Sort_accu); var - accu_out_select:triSel::Select_accu; - accu_out_min:triSel::MinFR_accu; - accu_out_exchange:triSel::Exchange_accu; - localTab:int^50; + accu_out_select:_triSel::Select_accu; + accu_out_min:_triSel::MinFR_accu; + accu_out_exchange:_triSel::Exchange_accu; + localTab:A_int_50; let accu_out_min = red<<node triSel::minFromRank, const 50>>(MinFR_accu{MinVal=0;MinRank=0;RankFrom=accu_in.CurrentRank;Rank=0}, @@ -8476,9 +8647,9 @@ let accu_out = Sort_accu{CurrentRank=(accu_in.CurrentRank + 1);Tab=localTab}; tel -- end of node triSel::UnarySort -node triSel::triSel(TIn:int^50) returns (TSorted:int^50); +node triSel::triSel(TIn:A_int_50) returns (TSorted:A_int_50); var - UnarySort_accu_out:triSel::Sort_accu; + UnarySort_accu_out:_triSel::Sort_accu; let UnarySort_accu_out = red<<node triSel::UnarySort, const 50>>(Sort_accu{CurrentRank=0;Tab=TIn}, TIn); @@ -8487,19 +8658,19 @@ tel -- end of node triSel::triSel node triSel::sorted_iter( - accu_in:triSel::sorted_iter_accu; + accu_in:_triSel::sorted_iter_accu; elt:int) returns ( - accu_out:triSel::sorted_iter_accu); + accu_out:_triSel::sorted_iter_accu); let accu_out = sorted_iter_accu{prev_elt=elt;prop_is_tt=((accu_in.prev_elt <= elt) and accu_in.prop_is_tt)}; tel -- end of node triSel::sorted_iter -node triSel::Sorted(TIn:int^50) returns (ok:bool); +node triSel::Sorted(TIn:A_int_50) returns (ok:bool); var - accu_out:triSel::sorted_iter_accu; - TSorted:int^50; + accu_out:_triSel::sorted_iter_accu; + TSorted:A_int_50; let TSorted = triSel::triSel(TIn); accu_out = red<<node triSel::sorted_iter, const @@ -8507,7 +8678,8 @@ let ok = accu_out.prop_is_tt; tel -- end of node triSel::Sorted - +-- automatically defined aliases: +type A_int_50 = int^50; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/Condact.lus Opening file /home/jahier/lus2lic/src/test/should_work/packEnvTest/Condact.lus @@ -8516,8 +8688,8 @@ let s = (e * e); tel -- end of node Util::carre -type TestCondact::t1 = int; -type TestCondact::t2 = int; +type _TestCondact::t1 = int; +type _TestCondact::t2 = int; node TestCondact::n(e:int) returns (s:int); let s = Util::carre(e); @@ -8537,15 +8709,15 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/contractForElementSelectionInArray/contractForElementSelectionInArray.lus Opening file /home/jahier/lus2lic/src/test/should_work/packEnvTest/contractForElementSelectionInArray/contractForElementSelectionInArray.lus -type contractForElementSelectionInArray::elementType = int; -type contractForElementSelectionInArray::iteratedStruct = struct {currentRank : int; rankToSelect : int; elementSelected : int}; +type _contractForElementSelectionInArray::elementType = int; +type _contractForElementSelectionInArray::iteratedStruct = struct {currentRank : int; rankToSelect : int; elementSelected : int}; const contractForElementSelectionInArray::size = 10; node contractForElementSelectionInArray::selectOneStage( - acc_in:contractForElementSelectionInArray::iteratedStruct; + acc_in:_contractForElementSelectionInArray::iteratedStruct; currentElt:int) returns ( - acc_out:contractForElementSelectionInArray::iteratedStruct); + acc_out:_contractForElementSelectionInArray::iteratedStruct); let acc_out = iteratedStruct{currentRank=(acc_in.currentRank + 1);rankToSelect=acc_in.rankToSelect;elementSelected= if @@ -8555,12 +8727,12 @@ tel -- end of node contractForElementSelectionInArray::selectOneStage node contractForElementSelectionInArray::selectEltInArray( - array:int^10; + array:A_int_10; rankToSelect:int) returns ( elementSelected:int); var - iterationResult:contractForElementSelectionInArray::iteratedStruct; + iterationResult:_contractForElementSelectionInArray::iteratedStruct; let iterationResult = red<<node contractForElementSelectionInArray::selectOneStage, const @@ -8569,14 +8741,15 @@ let elementSelected = iterationResult.elementSelected; tel -- end of node contractForElementSelectionInArray::selectEltInArray - +-- automatically defined aliases: +type A_int_10 = int^10; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/contractForElementSelectionInArray/main.lus Opening file /home/jahier/lus2lic/src/test/should_work/packEnvTest/contractForElementSelectionInArray/main.lus Opening file /home/jahier/lus2lic/src/test/should_work/packEnvTest/contractForElementSelectionInArray/packageTableau.lus -type intArray::elementType = int; +type _intArray::elementType = int; const intArray::size = 10; -type intArray::arrayType = int^10; +type _intArray::arrayType = int^10; node util::igt(i:int; j:int) returns (res:bool); let res = (i > j); @@ -8592,29 +8765,34 @@ let o = Lustre::=(i1, i2); tel -- end of node intArray::_isEqualTo_ -type intArray::T_isElementOf_ = struct {eltToSearch : int; iselementof : bool}; +type _intArray::T_isElementOf_ = struct {eltToSearch : int; iselementof : bool}; node intArray::iterated_isElementOf_( - acc_in:intArray::T_isElementOf_; + acc_in:_intArray::T_isElementOf_; elt_in:int) returns ( - acc_out:intArray::T_isElementOf_); + acc_out:_intArray::T_isElementOf_); let acc_out = T_isElementOf_{eltToSearch=acc_in.eltToSearch;iselementof=(acc_in or intArray::_isEqualTo_(acc_in.eltToSearch, elt_in))}; tel -- end of node intArray::iterated_isElementOf_ -node intArray::_isElementOf_(e:int; t:int^10) returns (iselementof:bool); + +node intArray::_isElementOf_( + e:int; + t:A_int_10) +returns ( + iselementof:bool); var - acc_out:intArray::T_isElementOf_; + acc_out:_intArray::T_isElementOf_; let acc_out = red<<node intArray::iterated_isElementOf_, const 10>>(T_isElementOf_{eltToSearch=e;iselementof=false}, t); iselementof = acc_out.iselementof; tel -- end of node intArray::_isElementOf_ -type intArray::forSortingAlgo = struct {previousElement : int; sortedUpToHere : bool}; +type _intArray::forSortingAlgo = struct {previousElement : int; sortedUpToHere : bool}; node intArray::_isGreaterOrEqualTo_(e1:int; e2:int) returns (ge:bool); let ge = (intArray::_isGreaterThan_(e1, e2) or intArray::_isEqualTo_(e1, e2)); @@ -8622,10 +8800,10 @@ tel -- end of node intArray::_isGreaterOrEqualTo_ node intArray::isLocallyLoselySorted( - acc_in:intArray::forSortingAlgo; + acc_in:_intArray::forSortingAlgo; elt:int) returns ( - acc_out:intArray::forSortingAlgo); + acc_out:_intArray::forSortingAlgo); let acc_out = forSortingAlgo{previousElement=elt;sortedUpToHere=(intArray::_isGreaterOrEqualTo_(elt, @@ -8634,27 +8812,27 @@ tel -- end of node intArray::isLocallyLoselySorted node intArray::_isLoselySorted( - array:int^10) + array:A_int_10) returns ( array_isLoselySorted:bool); var - result:intArray::forSortingAlgo; + result:_intArray::forSortingAlgo; let result = red<<node intArray::isLocallyLoselySorted, const 10>>(forSortingAlgo{previousElement=array[0];sortedUpToHere=true}, array); array_isLoselySorted = result.sortedUpToHere; tel -- end of node intArray::_isLoselySorted -type intArray::Sort_accu = struct {CurrentRank : int; Tab : int^10}; -type intArray::Select_accu = struct {RankToFind : int; CurrentRank : int; Val : int}; -type intArray::MinFR_accu = struct {MinVal : int; MinRank : int; RankFrom : int; Rank : int}; -type intArray::Exchange_accu = struct {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; +type _intArray::Sort_accu = struct {CurrentRank : int; Tab : A_int_10}; +type _intArray::Select_accu = struct {RankToFind : int; CurrentRank : int; Val : int}; +type _intArray::MinFR_accu = struct {MinVal : int; MinRank : int; RankFrom : int; Rank : int}; +type _intArray::Exchange_accu = struct {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; node intArray::minFromRank( - accu_in:intArray::MinFR_accu; + accu_in:_intArray::MinFR_accu; TabEltIn:int) returns ( - accu_out:intArray::MinFR_accu); + accu_out:_intArray::MinFR_accu); let accu_out = MinFR_accu{MinVal= if ((accu_in.Rank <= accu_in.RankFrom)) then (TabEltIn) else ( if ((accu_in.Rank >= accu_in.RankFrom)) then ( if @@ -8666,10 +8844,10 @@ tel -- end of node intArray::minFromRank node intArray::select( - accu_in:intArray::Select_accu; + accu_in:_intArray::Select_accu; elt:int) returns ( - accu_out:intArray::Select_accu); + accu_out:_intArray::Select_accu); let accu_out = Select_accu{RankToFind=accu_in.RankToFind;CurrentRank=(accu_in.CurrentRank @@ -8679,10 +8857,10 @@ tel -- end of node intArray::select node intArray::Exchange_i_j( - accu_in:intArray::Exchange_accu; + accu_in:_intArray::Exchange_accu; eltIn:int) returns ( - accu_out:intArray::Exchange_accu; + accu_out:_intArray::Exchange_accu; eltOut:int); let accu_out = @@ -8695,15 +8873,15 @@ tel -- end of node intArray::Exchange_i_j node intArray::UnarySort( - accu_in:intArray::Sort_accu; + accu_in:_intArray::Sort_accu; eltIn:int) returns ( - accu_out:intArray::Sort_accu); + accu_out:_intArray::Sort_accu); var - accu_out_select:intArray::Select_accu; - accu_out_min:intArray::MinFR_accu; - accu_out_exchange:intArray::Exchange_accu; - localTab:int^10; + accu_out_select:_intArray::Select_accu; + accu_out_min:_intArray::MinFR_accu; + accu_out_exchange:_intArray::Exchange_accu; + localTab:A_int_10; let accu_out_min = red<<node intArray::minFromRank, const 10>>(MinFR_accu{MinVal=0;MinRank=accu_in.CurrentRank;RankFrom=accu_in.CurrentRank;Rank=0}, @@ -8718,9 +8896,9 @@ let accu_out = Sort_accu{CurrentRank=(accu_in.CurrentRank + 1);Tab=localTab}; tel -- end of node intArray::UnarySort -node intArray::sort_(array:int^10) returns (arraySorted:int^10); +node intArray::sort_(array:A_int_10) returns (arraySorted:A_int_10); var - UnarySort_accu_out:intArray::Sort_accu; + UnarySort_accu_out:_intArray::Sort_accu; let UnarySort_accu_out = red<<node intArray::UnarySort, const 10>>(Sort_accu{CurrentRank=0;Tab=array}, array); @@ -8732,19 +8910,23 @@ let e = if (intArray::_isGreaterThan_(e1, e2)) then (e1) else (e2); tel -- end of node intArray::selectMax -node intArray::getMaximumIn_(array:int^10) returns (maximumElement:int); + +node intArray::getMaximumIn_( + array:A_int_10) +returns ( + maximumElement:int); let maximumElement = red<<node intArray::selectMax, const 10>>(array[0], array); tel -- end of node intArray::getMaximumIn_ -type intArray::iteratedStruct = struct {currentRank : int; rankToSelect : int; elementSelected : int}; +type _intArray::iteratedStruct = struct {currentRank : int; rankToSelect : int; elementSelected : int}; node intArray::selectOneStage( - acc_in:intArray::iteratedStruct; + acc_in:_intArray::iteratedStruct; currentElt:int) returns ( - acc_out:intArray::iteratedStruct); + acc_out:_intArray::iteratedStruct); let acc_out = iteratedStruct{currentRank=(acc_in.currentRank + 1);rankToSelect=acc_in.rankToSelect;elementSelected= if @@ -8755,11 +8937,11 @@ tel node intArray::selectElementOfRank_inArray_( rankToSelect:int; - array:int^10) + array:A_int_10) returns ( elementSelected:int); var - iterationResult:intArray::iteratedStruct; + iterationResult:_intArray::iteratedStruct; let iterationResult = red<<node intArray::selectOneStage, const 10>>(iteratedStruct{currentRank=0;rankToSelect=rankToSelect;elementSelected=array[0]}, @@ -8772,7 +8954,11 @@ let e = if (intArray::_isGreaterThan_(e1, e2)) then (e2) else (e1); tel -- end of node intArray::selectMin -node intArray::getMinimumIn_(array:int^10) returns (minimumElement:int); + +node intArray::getMinimumIn_( + array:A_int_10) +returns ( + minimumElement:int); var maximum:int; let @@ -8781,13 +8967,13 @@ let array); tel -- end of node intArray::getMinimumIn_ -type intArray::currentRank_withMemorizedRank = struct {currentRank : int; rankOfMemorizedVal : int; memorizedVal : int}; +type _intArray::currentRank_withMemorizedRank = struct {currentRank : int; rankOfMemorizedVal : int; memorizedVal : int}; node intArray::selectMaxRank( - acc_in:intArray::currentRank_withMemorizedRank; + acc_in:_intArray::currentRank_withMemorizedRank; e1:int) returns ( - acc_out:intArray::currentRank_withMemorizedRank); + acc_out:_intArray::currentRank_withMemorizedRank); let acc_out = currentRank_withMemorizedRank{currentRank=(acc_in.currentRank + 1);rankOfMemorizedVal= if (intArray::_isGreaterThan_(e1, @@ -8798,11 +8984,11 @@ tel -- end of node intArray::selectMaxRank node intArray::getRank_ofMaximumIn_( - array:int^10) + array:A_int_10) returns ( rankOfMaximumElement:int); var - local:intArray::currentRank_withMemorizedRank; + local:_intArray::currentRank_withMemorizedRank; let local = red<<node intArray::selectMaxRank, const 10>>(currentRank_withMemorizedRank{currentRank=0;rankOfMemorizedVal=0;memorizedVal=array[0]}, @@ -8812,10 +8998,10 @@ tel -- end of node intArray::getRank_ofMaximumIn_ node intArray::selectMinRank( - acc_in:intArray::currentRank_withMemorizedRank; + acc_in:_intArray::currentRank_withMemorizedRank; elt:int) returns ( - acc_out:intArray::currentRank_withMemorizedRank); + acc_out:_intArray::currentRank_withMemorizedRank); let acc_out = currentRank_withMemorizedRank{currentRank=(acc_in.currentRank + 1);rankOfMemorizedVal= if (intArray::_isEqualTo_(acc_in.memorizedVal, elt)) @@ -8825,7 +9011,7 @@ tel -- end of node intArray::selectMinRank node intArray::getRank_ofMinimumIn_( - array:int^10) + array:A_int_10) returns ( rankOfMinimumElement:int); var @@ -8839,9 +9025,9 @@ tel -- end of node intArray::getRank_ofMinimumIn_ node main::main( - a:int^10) + a:A_int_10) returns ( - tri:int^10; + tri:A_int_10; pos_min:int; min:int; pos_max:int; @@ -8854,7 +9040,8 @@ let tri = intArray::sort_(a); tel -- end of node main::main - +-- automatically defined aliases: +type A_int_10 = int^10; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/contractForElementSelectionInArray/noeudsIndependants.lus Opening file /home/jahier/lus2lic/src/test/should_work/packEnvTest/contractForElementSelectionInArray/noeudsIndependants.lus @@ -8878,18 +9065,18 @@ Error. No package has been provided ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/contractForElementSelectionInArray/tri.lus Opening file /home/jahier/lus2lic/src/test/should_work/packEnvTest/contractForElementSelectionInArray/tri.lus const tri::size = 10; -type tri::INTSIZE = int^10; -type tri::Sort_accu = struct {CurrentRank : int; Tab : int^10}; -type tri::Select_accu = struct {RankToFind : int; CurrentRank : int; Val : int}; -type tri::MinFR_accu = struct {MinVal : int; MinRank : int; RankFrom : int; Rank : int}; -type tri::sorted_iter_accu = struct {prev_elt : int; prop_is_tt : bool}; -type tri::Exchange_accu = struct {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; +type _tri::INTSIZE = int^10; +type _tri::Sort_accu = struct {CurrentRank : int; Tab : A_int_10}; +type _tri::Select_accu = struct {RankToFind : int; CurrentRank : int; Val : int}; +type _tri::MinFR_accu = struct {MinVal : int; MinRank : int; RankFrom : int; Rank : int}; +type _tri::sorted_iter_accu = struct {prev_elt : int; prop_is_tt : bool}; +type _tri::Exchange_accu = struct {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; node tri::minFromRank( - accu_in:tri::MinFR_accu; + accu_in:_tri::MinFR_accu; TabEltIn:int) returns ( - accu_out:tri::MinFR_accu); + accu_out:_tri::MinFR_accu); let accu_out = MinFR_accu{MinVal= if ((accu_in.Rank <= accu_in.RankFrom)) then (TabEltIn) else ( if ((accu_in.Rank >= accu_in.RankFrom)) then ( if @@ -8901,10 +9088,10 @@ tel -- end of node tri::minFromRank node tri::select( - accu_in:tri::Select_accu; + accu_in:_tri::Select_accu; elt:int) returns ( - accu_out:tri::Select_accu); + accu_out:_tri::Select_accu); let accu_out = Select_accu{RankToFind=accu_in.RankToFind;CurrentRank=(accu_in.CurrentRank @@ -8914,10 +9101,10 @@ tel -- end of node tri::select node tri::Exchange_i_j( - accu_in:tri::Exchange_accu; + accu_in:_tri::Exchange_accu; eltIn:int) returns ( - accu_out:tri::Exchange_accu; + accu_out:_tri::Exchange_accu; eltOut:int); let accu_out = @@ -8930,15 +9117,15 @@ tel -- end of node tri::Exchange_i_j node tri::UnarySort( - accu_in:tri::Sort_accu; + accu_in:_tri::Sort_accu; eltIn:int) returns ( - accu_out:tri::Sort_accu); + accu_out:_tri::Sort_accu); var - accu_out_select:tri::Select_accu; - accu_out_min:tri::MinFR_accu; - accu_out_exchange:tri::Exchange_accu; - localTab:int^10; + accu_out_select:_tri::Select_accu; + accu_out_min:_tri::MinFR_accu; + accu_out_exchange:_tri::Exchange_accu; + localTab:A_int_10; let accu_out_min = red<<node tri::minFromRank, const 10>>(MinFR_accu{MinVal=0;MinRank=accu_in.CurrentRank;RankFrom=accu_in.CurrentRank;Rank=0}, @@ -8952,9 +9139,9 @@ let accu_out = Sort_accu{CurrentRank=(accu_in.CurrentRank + 1);Tab=localTab}; tel -- end of node tri::UnarySort -node tri::main(TIn:int^10) returns (TSorted:int^10); +node tri::main(TIn:A_int_10) returns (TSorted:A_int_10); var - UnarySort_accu_out:tri::Sort_accu; + UnarySort_accu_out:_tri::Sort_accu; let UnarySort_accu_out = red<<node tri::UnarySort, const 10>>(Sort_accu{CurrentRank=0;Tab=[7, 8, 4, 3, 2, 9, 1, 10, 2, 7]}, [7, 8, @@ -8964,19 +9151,19 @@ tel -- end of node tri::main node tri::sorted_iter( - accu_in:tri::sorted_iter_accu; + accu_in:_tri::sorted_iter_accu; elt:int) returns ( - accu_out:tri::sorted_iter_accu); + accu_out:_tri::sorted_iter_accu); let accu_out = sorted_iter_accu{prev_elt=elt;prop_is_tt=((accu_in.prev_elt <= elt) and accu_in.prop_is_tt)}; tel -- end of node tri::sorted_iter -node tri::Sorted(TIn:int^10) returns (res:bool); +node tri::Sorted(TIn:A_int_10) returns (res:bool); var - accu_out:tri::sorted_iter_accu; - TSorted:int^10; + accu_out:_tri::sorted_iter_accu; + TSorted:A_int_10; let TSorted = tri::main(TIn); accu_out = red<<node tri::sorted_iter, const @@ -8984,23 +9171,24 @@ let res = accu_out.prop_is_tt; tel -- end of node tri::Sorted - +-- automatically defined aliases: +type A_int_10 = int^10; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/modelInst.lus Opening file /home/jahier/lus2lic/src/test/should_work/packEnvTest/modelInst.lus -type Pint::t = int; +type _Pint::t = int; node Pint::n(init:int; in:int) returns (ok:int); let ok = init -> pre(in); tel -- end of node Pint::n -type Preal::t = real; +type _Preal::t = real; node Preal::n(init:real; in:real) returns (ok:real); let ok = init -> pre(in); tel -- end of node Preal::n -type Pbool::t = bool; +type _Pbool::t = bool; node Pbool::n(init:bool; in:bool) returns (ok:bool); let ok = init -> pre(in); @@ -9025,31 +9213,31 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/packages.lus Opening file /home/jahier/lus2lic/src/test/should_work/packEnvTest/packages.lus -type preal::t = real; +type _preal::t = real; node preal::fby1(init:real; fb:real) returns (next:real); let next = init -> pre(fb); tel -- end of node preal::fby1 -type pbool::t = bool; +type _pbool::t = bool; node pbool::fby1(init:bool; fb:bool) returns (next:bool); let next = init -> pre(fb); tel -- end of node pbool::fby1 -type pint::t = int; +type _pint::t = int; node pint::fby1(init:int; fb:int) returns (next:int); let next = init -> pre(fb); tel -- end of node pint::fby1 -type inter::selType = struct {i : int; b : bool; r : real}; +type _inter::selType = struct {i : int; b : bool; r : real}; node inter::preced( - in:inter::selType) + in:_inter::selType) returns ( - out:inter::selType; - out2:inter::selType); + out:_inter::selType; + out2:_inter::selType); let out2 = selType{i=0;b=true;r=0.}; out.i = pint::fby1(out2.i, in.i); @@ -9057,9 +9245,9 @@ let out.r = preal::fby1(out2.r, in.r); tel -- end of node inter::preced -node mainPack::preced(in:inter::selType) returns (out:inter::selType); +node mainPack::preced(in:_inter::selType) returns (out:_inter::selType); var - out2:inter::selType; + out2:_inter::selType; let (out, out2) = inter::preced(in); tel @@ -9069,32 +9257,32 @@ const inter::n = -4; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/packages2.lus Opening file /home/jahier/lus2lic/src/test/should_work/packEnvTest/packages2.lus -type preal::t = real; +type _preal::t = real; node preal::fby1(init:real; fb:real) returns (next:real); let next = init -> pre(fb); tel -- end of node preal::fby1 -type pbool::t = bool; +type _pbool::t = bool; node pbool::fby1(init:bool; fb:bool) returns (next:bool); let next = init -> pre(fb); tel -- end of node pbool::fby1 -type pint::t = int; +type _pint::t = int; node pint::fby1(init:int; fb:int) returns (next:int); let next = init -> pre(fb); tel -- end of node pint::fby1 -type inter::selType = struct {i : int; b : bool; r : real}; +type _inter::selType = struct {i : int; b : bool; r : real}; const inter::n = -4; node inter::preced( - in:inter::selType) + in:_inter::selType) returns ( - out:inter::selType; - out2:inter::selType); + out:_inter::selType; + out2:_inter::selType); let out2 = selType{i=0;b=true;r=0.}; out.i = pint::fby1(out2.i, in.i); @@ -9111,7 +9299,7 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/to_sort_out/asservi.lus Opening file /home/jahier/lus2lic/src/test/should_work/to_sort_out/asservi.lus -type asservi::pendule; +type _asservi::pendule; const asservi::G = 10.000000; const asservi::L = 2.000000; const asservi::T = 0.100000; @@ -9148,8 +9336,8 @@ extern function asservi::make_pend( x:real; y:real) returns ( - p:asservi::pendule); -node asservi::jeu(x0:real; y0:real) returns (p:asservi::pendule); + p:_asservi::pendule); +node asservi::jeu(x0:real; y0:real) returns (p:_asservi::pendule); var d2x0:real; d2y0:real; @@ -9166,7 +9354,7 @@ let tel -- end of node asservi::jeu extern function asservi::sqrt(x:real) returns (y:real); -node asservi::asservi(delta:real) returns (p:asservi::pendule); +node asservi::asservi(delta:real) returns (p:_asservi::pendule); var d2x0:real; d2y0:real; @@ -9287,15 +9475,15 @@ Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/bad_call01.lus ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/bug.lus Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/bug.lus -type bug::tab1 = int^2; -type bug::tab2 = int^3^4; -type bug::tab3 = int^5^6^7; +type _bug::tab1 = int^2; +type _bug::tab2 = A_int_3^4; +type _bug::tab3 = A_A_int_5_6^7; const bug::ze_const_int = 5; -type bug::bool4 = bool^5; -type bug::really = real; +type _bug::bool4 = bool^5; +type _bug::really = real; node bug::bidon(in:bool) returns (out1:bool; out2:bool); var - toto:int^2; + toto:A_int_2; let toto[0] = 10; toto[1] = 5; @@ -9362,7 +9550,11 @@ let y = 1 -> if (active) then ((pre(y) + 1)) else (x); tel -- end of node bug::bug - +-- automatically defined aliases: +type A_int_2 = int^2; +type A_int_5 = int^5; +type A_int_3 = int^3; +type A_A_int_5_6 = A_int_5^6; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/const.lus Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/const.lus @@ -9373,19 +9565,19 @@ Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/const.lus ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/const2.lus Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/const2.lus -type const2::t1 = int; +type _const2::t1 = int; const const2::M = 3; -type const2::t2 = int^3; +type _const2::t2 = int^3; const const2::P = 2; const const2::N = 6; -type const2::t3 = int^3^6; +type _const2::t3 = A_int_3^6; const const2::O = 3; -type const2::t4 = int^3^6^3; -type const2::t5 = int^3^6^3^2; +type _const2::t4 = A_A_int_3_6^3; +type _const2::t5 = A_A_A_int_3_6_3^2; const const2::c10 = 12; -type const2::t6 = int^3^6^3^2^12; -type const2::t7 = int^3^6^3^2^12^3; -type const2::t8 = int^3^6^3^2^12^3^3; +type _const2::t6 = A_A_A_A_int_3_6_3_2^12; +type _const2::t7 = A_A_A_A_A_int_3_6_3_2_12^3; +type _const2::t8 = A_A_A_A_A_A_int_3_6_3_2_12_3^3; *** Error in file "should_fail/semantics/const2.lus", line 4, col 24 to 25, token '->': *** *** can't eval constant: The construct -> is not allowed in static expression @@ -9409,11 +9601,11 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/def.lus Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/def.lus -type def::int4 = int^4; -type def::st = struct {x : int^4}; -node def::def(a:bool) returns (b:def::st); +type _def::int4 = int^4; +type _def::st = struct {x : A_int_4}; +node def::def(a:bool) returns (b:_def::st); var - c:def::st; + c:_def::st; let b.x[0] = c.x[0]; b.x[1] = c.x[0]; @@ -9425,7 +9617,8 @@ let c.x[3] = b.x[3]; tel -- end of node def::def - +-- automatically defined aliases: +type A_int_4 = int^4; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/import2.lus Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/import2.lus @@ -9470,14 +9663,14 @@ tel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/tranche.lus Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/tranche.lus -type tranche::t2 = bool^7^8^9^10; -type tranche::t = bool^3^4; +type _tranche::t2 = A_A_A_bool_7_8_9^10; +type _tranche::t = A_bool_3^4; *** Error in file "should_fail/semantics/tranche.lus", line 7, col 6 to 6, token 'n': *** *** can't eval constant: *** cannot access this abstract constant value -const tranche::n:bool^3^4; +const tranche::n:A_A_bool_3_4; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/x.lus @@ -9507,22 +9700,22 @@ Opening file /home/jahier/lus2lic/src/test/should_fail/type/Gyro.lus ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/type/const2.lus Opening file /home/jahier/lus2lic/src/test/should_fail/type/const2.lus -type const2::t1 = int; +type _const2::t1 = int; const const2::c1 = 2; const const2::M = 3; -type const2::t2 = int^3; +type _const2::t2 = int^3; const const2::N = 7; -type const2::t3 = int^3^7; +type _const2::t3 = A_int_3^7; const const2::c2 = true; const const2::c7 = true; const const2::O = 8; -type const2::t4 = int^3^7^8; +type _const2::t4 = A_A_int_3_7^8; const const2::P = 9; -type const2::t5 = int^3^7^8^9; +type _const2::t5 = A_A_A_int_3_7_8^9; const const2::c10 = 3; -type const2::t6 = int^3^7^8^9^3; -type const2::t7 = int^3^7^8^9^3^8; -type const2::t8 = int^3^7^8^9^3^8^8; +type _const2::t6 = A_A_A_A_int_3_7_8_9^3; +type _const2::t7 = A_A_A_A_A_int_3_7_8_9_3^8; +type _const2::t8 = A_A_A_A_A_A_int_3_7_8_9_3_8^8; *** Error in file "should_fail/type/const2.lus", line 16, col 12 to 13, token '<>': *** type error: *** type 'int*real' was provided whereas