diff --git a/src/compiledDataDump.ml b/src/compiledDataDump.ml index b0b20a0974d3829cf7d313fe0912ed2a530d5da5..54215489f21a11abfb9534eb333da0798351564b 100644 --- a/src/compiledDataDump.ml +++ b/src/compiledDataDump.ml @@ -55,7 +55,7 @@ and string_def_of_type_eff = function None -> "" | Some ce -> " (" ^ (string_of_const_eff ce) ^ ")" in - (Ident.string_of_long name)^ + "struct " ^ (List.fold_left (f "; ") (f "" " {" (List.hd fl)) (List.tl fl)) ^ "}" | Any -> "a" diff --git a/src/test/test.res.exp b/src/test/test.res.exp index d623a9ef5c7aa53bea767b37b65d326cdc0da890..be882d541cad2078e1f2becca7200769d2dc5b0e 100644 --- a/src/test/test.res.exp +++ b/src/test/test.res.exp @@ -1283,7 +1283,7 @@ 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 = dependeur_struct::time {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) @@ -1380,9 +1380,9 @@ tel 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 = ex::t2 {a : int; b : bool^11^22}; -type ex::s1 = ex::s1 {x : int; y : int^1^2^3^4}; -type ex::s = ex::s {x : int^1^2^3^4; y : ex::s1}; +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); let b = (a.x[0][0][0][0] + a.y.y[0][0][0][0]); @@ -1453,7 +1453,7 @@ type hanane::t1; const hanane::a = 4; type hanane::string = int^4; type hanane::string2d = int^4^4; -type hanane::structT = hanane::structT {x : int; y : real; z : int^4^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; @@ -1762,8 +1762,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 = mm::pair {a : int; b : int}; -type mm::pairpair = mm::pairpair {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,8 +1773,8 @@ 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 = mm1::pair {a : int; b : int}; -type mm1::pairpair = mm1::pairpair {a : mm1::pair; b : 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)); @@ -1784,8 +1784,8 @@ 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 = mm22::pair {a : int; b : int}; -type mm22::pairpair = mm22::pairpair {a : mm22::pair; b : 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); @@ -1796,8 +1796,8 @@ 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 = mm3::pair {a : int; b : int}; -type mm3::pairpair = mm3::pairpair {a : mm3::pair; b : 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)); @@ -2641,8 +2641,8 @@ tel Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/simple.lus type simple::S; type simple::T = int; -type simple::H = simple::H {x : simple::S; y : int}; -type simple::U = simple::U {a : int; b : simple::H}; +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; @@ -3019,7 +3019,7 @@ 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 = left::truc {a : bool^100; b : int}; +type left::truc = struct {a : bool^100; b : int}; node left::toto(x:bool) returns (t:left::truc^3); let t[0].a[0..98 step 2][48..0 step -2] = true^25; @@ -3053,7 +3053,7 @@ let next = init -> pre(fb); tel -- end of node pint::fby1 -type inter::selType = inter::selType {i : int; b : bool; r : real}; +type inter::selType = struct {i : int; b : bool; r : real}; node inter::preced( in:inter::selType) @@ -3582,7 +3582,7 @@ let next = init -> pre(fb); tel -- end of node pint::fby1 -type inter::selType = inter::selType {i : int; b : bool; r : real}; +type inter::selType = struct {i : int; b : bool; r : real}; node inter::preced( in:inter::selType) @@ -3634,7 +3634,7 @@ const mainPack::bleu; const mainPack::jaune; const mainPack::rose; const mainPack::X = 8; -type inter::selType = inter::selType {i : int; b : bool; r : real}; +type inter::selType = struct {i : int; b : bool; r : real}; node inter::preced( in:inter::selType) @@ -3669,7 +3669,7 @@ 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 = struct0::Toto {x : int (1); y : int (2)}; +type struct0::Toto = struct {x : int (1); y : int (2)}; node struct0::bibi(dummy:int) returns (z:struct0::Toto); let z = Toto{x=3}; @@ -3897,7 +3897,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 = clock::s {x : bool^10; y : bool}; +type clock::s = struct {x : bool^10; y : bool}; extern node clock::clock3( clock3_u:bool) @@ -3983,11 +3983,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 = Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}; -type Gyroscope2::CFF_Eltstruct = Gyroscope2::CFF_Eltstruct {indx : int; indx_toChange : int; value : Gyroscope2::Valid_ChannelT}; -type Gyroscope2::Faulty_ChannelT = Gyroscope2::Faulty_ChannelT {valuea : real; valueb : real}; +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 = Gyroscope2::CFF_struct {indx : int; indx_toChange : int; tabToFill : Gyroscope2::Valid_ChannelT^3}; +type Gyroscope2::CFF_struct = struct {indx : int; indx_toChange : int; tabToFill : Gyroscope2::Valid_ChannelT^3}; const Gyroscope2::DELTA_PITCH = 2.000000; const Gyroscope2::DELTA_YAW = 2.000000; const Gyroscope2::DELTA_TO_GOD_YAW = 2.000000; @@ -4495,7 +4495,7 @@ type decl::t4 = decl::t1^8; const decl::d = true; const decl::h = 2; type decl::t5 = decl::t1^8^5; -type decl::coord = decl::coord {x : real; y : real}; +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; @@ -4540,7 +4540,7 @@ type declaration::t4 = declaration::t1^8; const declaration::d = true; const declaration::h = 2; type declaration::t5 = declaration::t1^8^5; -type declaration::coord = declaration::coord {x : real; y : real}; +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; @@ -4602,7 +4602,7 @@ type def::t1; const def::a = 4; type def::string = int^4; type def::string2d = int^4^4; -type def::structT = def::structT {x : int; y : real; z : int^4^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; @@ -4695,8 +4695,8 @@ tel ---------------------------------------------------------------------- ====> ../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 = filter::complexe {x : real; y : real}; -type filter::cdouble = filter::cdouble {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; @@ -4785,13 +4785,13 @@ const map_red_iter::NBC = 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 = map_red_iter::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : 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 = map_red_iter::T_InfoGenIndiv {mesure_gen : int}; +type map_red_iter::T_InfoGenIndiv = struct {mesure_gen : int}; type map_red_iter::T_EtatCharge = int; -type map_red_iter::T_InfoChgGlob = map_red_iter::T_InfoChgGlob {chg2gen : int^20}; -type map_red_iter::T_InfoChgIndiv = map_red_iter::T_InfoChgIndiv {mesure_chg : int}; -type map_red_iter::T_InfoGenGlob = map_red_iter::T_InfoGenGlob {elt_bidon : int; chg2gen : int^20}; +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}; node map_red_iter::traite_genCore_itere( acc_in:int; @@ -5435,8 +5435,8 @@ tel ---------------------------------------------------------------------- ====> ../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 = morel4::tube {in : int; out : int}; -type morel4::toto = morel4::toto {titi : morel4::tube; tutu : bool}; +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); @@ -5491,8 +5491,8 @@ tel ---------------------------------------------------------------------- ====> ../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 = morel5::tube {in : int; out : int}; -type morel5::toto = morel5::toto {titi : morel5::tube; tutu : bool}; +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; @@ -6694,9 +6694,9 @@ tel ---------------------------------------------------------------------- ====> ../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 = Gyroscope::Faulty_ChannelT {valuea : real; valueb : real}; +type Gyroscope::Faulty_ChannelT = struct {valuea : real; valueb : real}; type Gyroscope::Faulty_Array = Gyroscope::Faulty_ChannelT^4^3; -type Gyroscope::Valid_ChannelT = Gyroscope::Valid_ChannelT {local_failure : bool; local_value : real}; +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; @@ -7012,11 +7012,11 @@ tel ====> ../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 = produitBool::Tacc_in {multiplieur : bool^10; rank : int}; -type produitBool::T_isElementOf_ = produitBool::T_isElementOf_ {eltToSearch : bool; iselementof : bool}; -type produitBool::iteratedStruct = produitBool::iteratedStruct {currentRank : int; rankToSelect : int; elementSelected : bool}; -type produitBool::Tacc_inShift2 = produitBool::Tacc_inShift2 {multiplieur : bool^10; rank : int; actual_rank : int}; -type produitBool::Tacc_inShift = produitBool::Tacc_inShift {acc_in_PLC : produitBool::Tacc_in; actual_rank : int}; +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}; node produitBool::iterated_isElementOf_( acc_in:produitBool::T_isElementOf_; @@ -7127,16 +7127,16 @@ tel ====> ../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 = shiftFill_ludic::T4_STRUCT {multiplieur : bool^10; rank : int}; -type shiftFill_ludic::T6_STRUCT = shiftFill_ludic::T6_STRUCT {eltToSearch : bool; iselementof : bool}; -type shiftFill_ludic::T5_STRUCT = shiftFill_ludic::T5_STRUCT {acc_in_PLC : shiftFill_ludic::T4_STRUCT; actual_rank : int}; -type shiftFill_ludic::t_Tacc_inShift = shiftFill_ludic::T5_STRUCT {acc_in_PLC : shiftFill_ludic::T4_STRUCT; actual_rank : int}; -type shiftFill_ludic::t_T_isElementOf_ = shiftFill_ludic::T6_STRUCT {eltToSearch : bool; iselementof : bool}; -type shiftFill_ludic::T2_STRUCT = shiftFill_ludic::T2_STRUCT {multiplieur : bool^10; rank : int; actual_rank : int}; -type shiftFill_ludic::t_Tacc_in = shiftFill_ludic::T4_STRUCT {multiplieur : bool^10; rank : int}; -type shiftFill_ludic::t_Tacc_inShift2 = shiftFill_ludic::T2_STRUCT {multiplieur : bool^10; rank : int; actual_rank : int}; -type shiftFill_ludic::T3_STRUCT = shiftFill_ludic::T3_STRUCT {currentRank : int; rankToSelect : int; elementSelected : bool}; -type shiftFill_ludic::t_iteratedStruct = shiftFill_ludic::T3_STRUCT {currentRank : int; rankToSelect : int; elementSelected : bool}; +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}; const shiftFill_ludic::c_size = 10; node shiftFill_ludic::n_selectOneStage( @@ -7187,17 +7187,17 @@ tel ====> ../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 = shift_ludic::T4_STRUCT {currentRank : int; rankToSelect : int; elementSelected : bool}; -type shift_ludic::T5_STRUCT = shift_ludic::T5_STRUCT {multiplieur : bool^10; rank : int}; -type shift_ludic::T6_STRUCT = shift_ludic::T6_STRUCT {acc_in_PLC : shift_ludic::T5_STRUCT; actual_rank : int}; +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 = shift_ludic::T6_STRUCT {acc_in_PLC : shift_ludic::T5_STRUCT; actual_rank : int}; -type shift_ludic::T7_STRUCT = shift_ludic::T7_STRUCT {eltToSearch : bool; iselementof : bool}; -type shift_ludic::t_T_isElementOf_ = shift_ludic::T7_STRUCT {eltToSearch : bool; iselementof : bool}; -type shift_ludic::T2_STRUCT = shift_ludic::T2_STRUCT {multiplieur : bool^10; rank : int; actual_rank : int}; -type shift_ludic::t_Tacc_in = shift_ludic::T5_STRUCT {multiplieur : bool^10; rank : int}; -type shift_ludic::t_Tacc_inShift2 = shift_ludic::T2_STRUCT {multiplieur : bool^10; rank : int; actual_rank : int}; -type shift_ludic::t_iteratedStruct = shift_ludic::T4_STRUCT {currentRank : int; rankToSelect : int; elementSelected : bool}; +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}; const shift_ludic::c_size = 10; node shift_ludic::n_selectOneStage( @@ -7350,8 +7350,8 @@ 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 = calculs_max::struct_fill_bool {imax1 : int; imax2 : int; icourant : int}; -type calculs_max::struct_max = calculs_max::struct_max {max1 : int; max2 : int; imax1 : int; imax2 : int; icourant : int}; +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; @@ -7399,7 +7399,7 @@ tel 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 = deSimone::cell_accu {token : bool; grant : bool}; +type deSimone::cell_accu = struct {token : bool; grant : bool}; node deSimone::oneCell( accu_in:deSimone::cell_accu; @@ -7597,7 +7597,7 @@ tel ---------------------------------------------------------------------- ====> ../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 = moyenne::moyenne_accu {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( @@ -7627,13 +7627,13 @@ const normal::NBC = 20; type normal::INTNBC = int^20; const normal::NBG = 4; type normal::INTNBG = int^4; -type normal::T_EntreeGlob = normal::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : 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 = normal::T_InfoGenIndiv {mesure_gen : int}; +type normal::T_InfoGenIndiv = struct {mesure_gen : int}; type normal::T_EtatCharge = int; -type normal::T_InfoChgGlob = normal::T_InfoChgGlob {chg2gen : int^20}; -type normal::T_InfoChgIndiv = normal::T_InfoChgIndiv {mesure_chg : int}; -type normal::T_InfoGenGlob = normal::T_InfoGenGlob {elt_bidon : int; chg2gen : int^20}; +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}; const normal::EC_LESTAGE = 3; const normal::COM_ON = 1; const normal::EC_OFF = 1; @@ -8120,15 +8120,15 @@ const testSilus::NBC = 20; type testSilus::INTNBC = int^20; const testSilus::NBG = 4; type testSilus::INTNBG = int^4; -type testSilus::T_EntreeGlob = testSilus::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : 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 = testSilus::T_InfoGenIndiv {mesure_gen : int}; +type testSilus::T_InfoGenIndiv = struct {mesure_gen : int}; type testSilus::BOOLNBC = bool^20; type testSilus::T_EtatCharge = int; -type testSilus::T_InfoChgGlob = testSilus::T_InfoChgGlob {chg2gen : int^20}; -type testSilus::T_InfoChgIndiv = testSilus::T_InfoChgIndiv {mesure_chg : 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 = testSilus::T_InfoGenGlob {elt_bidon : int; chg2gen : int^20}; +type testSilus::T_InfoGenGlob = struct {elt_bidon : int; chg2gen : int^20}; const testSilus::EC_LESTAGE = 3; const testSilus::COM_ON = 1; const testSilus::EC_OFF = 1; @@ -8401,11 +8401,11 @@ tel 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 = triSel::Sort_accu {CurrentRank : int; Tab : int^50}; -type triSel::Select_accu = triSel::Select_accu {RankToFind : int; CurrentRank : int; Val : int}; -type triSel::MinFR_accu = triSel::MinFR_accu {MinVal : int; MinRank : int; RankFrom : int; Rank : int}; -type triSel::sorted_iter_accu = triSel::sorted_iter_accu {prev_elt : int; prop_is_tt : bool}; -type triSel::Exchange_accu = triSel::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; +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}; node triSel::minFromRank( accu_in:triSel::MinFR_accu; @@ -8538,7 +8538,7 @@ 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 = contractForElementSelectionInArray::iteratedStruct {currentRank : int; rankToSelect : int; elementSelected : int}; +type contractForElementSelectionInArray::iteratedStruct = struct {currentRank : int; rankToSelect : int; elementSelected : int}; const contractForElementSelectionInArray::size = 10; node contractForElementSelectionInArray::selectOneStage( @@ -8592,7 +8592,7 @@ let o = Lustre::=(i1, i2); tel -- end of node intArray::_isEqualTo_ -type intArray::T_isElementOf_ = intArray::T_isElementOf_ {eltToSearch : int; iselementof : bool}; +type intArray::T_isElementOf_ = struct {eltToSearch : int; iselementof : bool}; node intArray::iterated_isElementOf_( acc_in:intArray::T_isElementOf_; @@ -8614,7 +8614,7 @@ let iselementof = acc_out.iselementof; tel -- end of node intArray::_isElementOf_ -type intArray::forSortingAlgo = intArray::forSortingAlgo {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)); @@ -8645,10 +8645,10 @@ let array_isLoselySorted = result.sortedUpToHere; tel -- end of node intArray::_isLoselySorted -type intArray::Sort_accu = intArray::Sort_accu {CurrentRank : int; Tab : int^10}; -type intArray::Select_accu = intArray::Select_accu {RankToFind : int; CurrentRank : int; Val : int}; -type intArray::MinFR_accu = intArray::MinFR_accu {MinVal : int; MinRank : int; RankFrom : int; Rank : int}; -type intArray::Exchange_accu = intArray::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; +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}; node intArray::minFromRank( accu_in:intArray::MinFR_accu; @@ -8738,7 +8738,7 @@ let array); tel -- end of node intArray::getMaximumIn_ -type intArray::iteratedStruct = intArray::iteratedStruct {currentRank : int; rankToSelect : int; elementSelected : int}; +type intArray::iteratedStruct = struct {currentRank : int; rankToSelect : int; elementSelected : int}; node intArray::selectOneStage( acc_in:intArray::iteratedStruct; @@ -8781,7 +8781,7 @@ let array); tel -- end of node intArray::getMinimumIn_ -type intArray::currentRank_withMemorizedRank = intArray::currentRank_withMemorizedRank {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; @@ -8879,11 +8879,11 @@ Error. No package has been provided 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 = tri::Sort_accu {CurrentRank : int; Tab : int^10}; -type tri::Select_accu = tri::Select_accu {RankToFind : int; CurrentRank : int; Val : int}; -type tri::MinFR_accu = tri::MinFR_accu {MinVal : int; MinRank : int; RankFrom : int; Rank : int}; -type tri::sorted_iter_accu = tri::sorted_iter_accu {prev_elt : int; prop_is_tt : bool}; -type tri::Exchange_accu = tri::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; +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}; node tri::minFromRank( accu_in:tri::MinFR_accu; @@ -9043,7 +9043,7 @@ let next = init -> pre(fb); tel -- end of node pint::fby1 -type inter::selType = inter::selType {i : int; b : bool; r : real}; +type inter::selType = struct {i : int; b : bool; r : real}; node inter::preced( in:inter::selType) @@ -9087,7 +9087,7 @@ let next = init -> pre(fb); tel -- end of node pint::fby1 -type inter::selType = inter::selType {i : int; b : bool; r : real}; +type inter::selType = struct {i : int; b : bool; r : real}; const inter::n = -4; node inter::preced( @@ -9410,7 +9410,7 @@ 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 = def::st {x : int^4}; +type def::st = struct {x : int^4}; node def::def(a:bool) returns (b:def::st); var c:def::st;