diff --git a/src/compiledDataDump.ml b/src/compiledDataDump.ml index e6afbf8217c03fe398c2b7785caaa3329dfe1e43..74aba0d190a7baaf5fda1b6cb604a36a3f76c6e3 100644 --- a/src/compiledDataDump.ml +++ b/src/compiledDataDump.ml @@ -36,7 +36,7 @@ and string_of_const_eff_opt = function | None -> "" | Some val_exp_eff -> string_of_const_eff val_exp_eff -and string_of_type_eff = function +and string_def_of_type_eff = function | Bool_type_eff -> "bool" | Int_type_eff -> "int" | Real_type_eff -> "real" @@ -61,6 +61,16 @@ and string_of_type_eff = function | Any -> "a" | Overload -> "o" +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 + | Any -> "a" + | Overload -> "o" and (type_eff_list_to_string :type_eff list -> string) = @@ -280,7 +290,7 @@ and (type_decl: Ident.long -> type_eff -> string) = "type " ^ (long tname) ^ (match teff with | External_type_eff _ -> ";\n" - | _ -> " = " ^ (string_of_type_eff teff) ^ ";\n" + | _ -> " = " ^ (string_def_of_type_eff teff) ^ ";\n" ) and (const_decl: Ident.long -> const_eff -> string) = diff --git a/src/test/test.res.exp b/src/test/test.res.exp index 8166be1c9a553336bf045f76c341bbe0df9632e8..53fb89e644f80c85229c208b2321344c39bca253 100644 --- a/src/test/test.res.exp +++ b/src/test/test.res.exp @@ -1288,10 +1288,7 @@ type dependeur_struct::time = dependeur_struct::time {h : int; m : int; s : int; node dependeur_struct::dependeur_struct( time_in_ms:int) returns ( - theTime:dependeur_struct::time {h : int; - m : int; - s : int; - ms : int}); + theTime:dependeur_struct::time); var time_in_min:int; time_in_second:int; @@ -1345,12 +1342,7 @@ const enum::redd; const enum::rouge; const enum::blue; const enum::white; - -node enum::boo( - e:int) -returns ( - c:enum {enum::bleu, enum::blanc, enum::rouge}; - c2:enum {enum::blue, enum::white, enum::redd}); +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)); @@ -1390,14 +1382,8 @@ 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 {x : int; y : int^1^2^3^4}}; - -node ex::ex( - a:ex::s {x : int^1^2^3^4; - y : ex::s1 {x : int; - y : int^1^2^3^4}}) -returns ( - b:int); +type ex::s = ex::s {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]); tel @@ -1470,21 +1456,19 @@ type hanane::string2d = int^4^4; type hanane::structT = hanane::structT {x : int; y : real; z : int^4^4^4}; type hanane::t2; type hanane::t3; -type hanane::tabStruct = hanane::structT {x : int; y : real; z : int^4^4^4}^2; +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 {x : int; - y : real; - z : int^4^4^4}^2 when a1) + c1:hanane::structT^2 when a1) returns ( res:bool when a1); var h1:int^4; - h2:hanane::structT {x : int; y : real; z : int^4^4^4}^2; + h2:hanane::structT^2; h3:int when a1; h4:real when a1; h5:int^4^4^4 when a1; @@ -1779,7 +1763,7 @@ 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 {a : int; b : int}; b : mm::pair {a : int; b : int}}; +type mm::pairpair = mm::pairpair {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)); @@ -1790,8 +1774,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 {a : int; b : int}; b : mm1::pair {a : int; b : int}}; -node mm1::mm1(a:int; b:int) returns (y:mm1::pair {a : int; b : int}); +type mm1::pairpair = mm1::pairpair {a : mm1::pair; b : mm1::pair}; +node mm1::mm1(a:int; b:int) returns (y:mm1::pair); let (y., y.) = if ((a > b)) then ((b, a)) else ((a, b)); tel @@ -1801,8 +1785,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 {a : int; b : int}; b : mm22::pair {a : int; b : int}}; -node mm22::mm22(a:int; b:int) returns (y:mm22::pair {a : int; b : int}); +type mm22::pairpair = mm22::pairpair {a : mm22::pair; b : mm22::pair}; +node mm22::mm22(a:int; b:int) returns (y:mm22::pair); let y. = if ((a > b)) then (b) else (a); y. = if ((a > b)) then (a) else (b); @@ -1813,14 +1797,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 {a : int; b : int}; b : mm3::pair {a : int; b : int}}; - -node mm3::mm3( - a:mm3::pair {a : int; - b : int}) -returns ( - y:mm3::pair {a : int; - b : int}); +type mm3::pairpair = mm3::pairpair {a : mm3::pair; b : mm3::pair}; +node mm3::mm3(a:mm3::pair) returns (y:mm3::pair); let (y., y.) = if ((a.a > a.b)) then ((a.b, a.a)) else ((a.a, a.b)); tel @@ -2664,22 +2642,15 @@ 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 {x : simple::S; y : int}}; -type simple::V = simple::U {a : int; b : simple::H {x : simple::S; y : int}}^4; +type simple::U = simple::U {a : int; b : simple::H}; +type simple::V = simple::U^4; const simple::size = 16; 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 {a : int; - b : simple::H {x : simple::S; - y : int}}) -returns ( - b:int); +node simple::simple(e:bool; a:simple::U) returns (b:int); var x:int; let @@ -2987,7 +2958,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}; -node left::toto(x:bool) returns (t:left::truc {a : bool^100; b : int}^3); +node left::toto(x:bool) returns (t:left::truc^3); let t[0].[0..98 step 2][48..0 step -2] = true^25; t[0].[0..98 step 2][1..49 step 2] = false^25; @@ -3023,16 +2994,10 @@ tel type inter::selType = inter::selType {i : int; b : bool; r : real}; node inter::preced( - in:inter::selType {i : int; - b : bool; - r : real}) + in:inter::selType) returns ( - out:inter::selType {i : int; - b : bool; - r : real}; - out2:inter::selType {i : int; - b : bool; - r : real}); + out:inter::selType; + out2:inter::selType); let out2 = selType{i=0;b=true;r=.0}; out. = pint::fby1(out2.i, in.i); @@ -3558,16 +3523,10 @@ tel type inter::selType = inter::selType {i : int; b : bool; r : real}; node inter::preced( - in:inter::selType {i : int; - b : bool; - r : real}) + in:inter::selType) returns ( - out:inter::selType {i : int; - b : bool; - r : real}; - out2:inter::selType {i : int; - b : bool; - r : real}); + out:inter::selType; + out2:inter::selType); let out2 = selType{i=0;b=true;r=.0}; out. = pint::fby1(out2.i, in.i); @@ -3616,16 +3575,10 @@ const mainPack::X = 8; type inter::selType = inter::selType {i : int; b : bool; r : real}; node inter::preced( - in:inter::selType {i : int; - b : bool; - r : real}) + in:inter::selType) returns ( - out:inter::selType {i : int; - b : bool; - r : real}; - out2:inter::selType {i : int; - b : bool; - r : real}); + out:inter::selType; + out2:inter::selType); let out2 = selType{i=0;b=true;r=0.0}; out. = pint::fby1(out2.i, in.i); @@ -3654,14 +3607,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)}; - -node struct0::bibi( - dummy:int) -returns ( - z:struct0::Toto {x : int ( - 1); - y : int ( - 2)}); +node struct0::bibi(dummy:int) returns (z:struct0::Toto); let z = Toto{x=3}; tel @@ -3859,10 +3805,10 @@ extern node clock::clock2(u:bool; v:bool when u) returns (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 {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::Faulty_Array = Gyroscope2::Faulty_ChannelT {valuea : real; valueb : real}^4^3; -type Gyroscope2::CFF_struct = Gyroscope2::CFF_struct {indx : int; indx_toChange : int; tabToFill : Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}^3}; +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}; const Gyroscope2::DELTA_PITCH = 2.000000; const Gyroscope2::DELTA_YAW = 2.000000; const Gyroscope2::DELTA_TO_GOD_YAW = 2.000000; @@ -3894,8 +3840,7 @@ tel node Gyroscope2::countFalse( accu_in:real; - elt_in:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}) + elt_in:Gyroscope2::Valid_ChannelT) returns ( accu_out:real); let @@ -3906,8 +3851,7 @@ tel node Gyroscope2::TooFar( nbToFarIn:int; - channel:Gyroscope2::Faulty_ChannelT {valuea : real; - valueb : real}; + channel:Gyroscope2::Faulty_ChannelT; god:real; delta_to_god:real) returns ( @@ -3919,8 +3863,7 @@ tel -- end of node Gyroscope2::TooFar node Gyroscope2::assumeEvaluateAxis( - channels:Gyroscope2::Faulty_ChannelT {valuea : real; - valueb : real}^4; + channels:Gyroscope2::Faulty_ChannelT^4; delta:real; god:real; delta_to_god:real) @@ -3936,11 +3879,9 @@ tel -- end of node Gyroscope2::assumeEvaluateAxis node Gyroscope2::assumeChannel( - previousOutChannel:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}^4; + previousOutChannel:Gyroscope2::Valid_ChannelT^4; nbInChannel:int; - inChannel:Gyroscope2::Faulty_ChannelT {valuea : real; - valueb : real}; + inChannel:Gyroscope2::Faulty_ChannelT; delta:real; god:real; delta_to_god:real) @@ -3952,8 +3893,7 @@ tel -- end of node Gyroscope2::assumeChannel node Gyroscope2::countValidChannels( - channels:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}^4) + channels:Gyroscope2::Valid_ChannelT^4) returns ( nb:real); let @@ -3967,8 +3907,7 @@ tel -- end of node Gyroscope2::sum node Gyroscope2::masking( - channel:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}) + channel:Gyroscope2::Valid_ChannelT) returns ( out:real); let @@ -3977,8 +3916,7 @@ tel -- end of node Gyroscope2::masking node Gyroscope2::Voter( - channels:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}^4; + channels:Gyroscope2::Valid_ChannelT^4; god:real; delta_to_god:real) returns ( @@ -3996,8 +3934,7 @@ tel -- end of node Gyroscope2::Voter node Gyroscope2::selectFailure( - from:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}) + from:Gyroscope2::Valid_ChannelT) returns ( failure:bool); let @@ -4006,19 +3943,11 @@ tel -- end of node Gyroscope2::selectFailure node Gyroscope2::addOneChannelIter( - acc_in:Gyroscope2::CFF_Eltstruct {indx : int; - indx_toChange : int; - value : Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}}; - elt_in:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}) -returns ( - acc_out:Gyroscope2::CFF_Eltstruct {indx : int; - indx_toChange : int; - value : Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}}; - elt_out:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}); + acc_in:Gyroscope2::CFF_Eltstruct; + elt_in:Gyroscope2::Valid_ChannelT) +returns ( + 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}; @@ -4029,15 +3958,12 @@ tel node Gyroscope2::addOneChannel( indx_toChange:int; - channeltToAdd:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}; - tabToFill:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}^3) + channeltToAdd:Gyroscope2::Valid_ChannelT; + tabToFill:Gyroscope2::Valid_ChannelT^3) returns ( - tabToFillAfter:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}^3); + tabToFillAfter:Gyroscope2::Valid_ChannelT^3); var - acc_out:Gyroscope2::CFF_Eltstruct {indx : int; indx_toChange : int; value : Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}}; + acc_out:Gyroscope2::CFF_Eltstruct; let (acc_out, tabToFillAfter) = fillred<<node Gyroscope2::addOneChannelIter, const @@ -4047,17 +3973,10 @@ tel -- end of node Gyroscope2::addOneChannel node Gyroscope2::CFC_iter( - structIn:Gyroscope2::CFF_struct {indx : int; - indx_toChange : int; - tabToFill : Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}^3}; - currentChannel:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}) -returns ( - structOut:Gyroscope2::CFF_struct {indx : int; - indx_toChange : int; - tabToFill : Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}^3}); + structIn:Gyroscope2::CFF_struct; + currentChannel:Gyroscope2::Valid_ChannelT) +returns ( + structOut:Gyroscope2::CFF_struct); let structOut = CFF_struct{indx=(structIn.indx + 1);indx_toChange=structIn.indx_toChange;tabToFill= if @@ -4069,14 +3988,12 @@ tel node Gyroscope2::ComputeForeignChannels( currentChannelIndx:int; - allChannels:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}^4) + allChannels:Gyroscope2::Valid_ChannelT^4) returns ( - foreignChannels:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}^3); + foreignChannels:Gyroscope2::Valid_ChannelT^3); var - acc_out:Gyroscope2::CFF_struct {indx : int; indx_toChange : int; tabToFill : Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}^3}; - localtabToFill:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}; + 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 @@ -4087,13 +4004,10 @@ tel -- end of node Gyroscope2::ComputeForeignChannels node Gyroscope2::compare_rolls( - acc_in:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}; - channel:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}) + acc_in:Gyroscope2::Valid_ChannelT; + channel:Gyroscope2::Valid_ChannelT) returns ( - acc_out:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}; + acc_out:Gyroscope2::Valid_ChannelT; diff:bool); let acc_out = acc_in; @@ -4103,15 +4017,13 @@ tel -- end of node Gyroscope2::compare_rolls node Gyroscope2::values_nok( - localChannel:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}; - foreign_Channels:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}^3) + localChannel:Gyroscope2::Valid_ChannelT; + foreign_Channels:Gyroscope2::Valid_ChannelT^3) returns ( cross_failure:bool); var diff:bool^3; - lc:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}; + lc:Gyroscope2::Valid_ChannelT; let (lc, diff) = fillred<<node Gyroscope2::compare_rolls, const 3>>(localChannel, foreign_Channels); @@ -4130,14 +4042,12 @@ tel node Gyroscope2::CrossFailDetect( currentChannel:int; - localChannel:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}; - previousOutChannel:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}^4) + localChannel:Gyroscope2::Valid_ChannelT; + previousOutChannel:Gyroscope2::Valid_ChannelT^4) returns ( crossFailure:bool); var - foreign_Channels:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}^3; + foreign_Channels:Gyroscope2::Valid_ChannelT^3; let foreign_Channels = Gyroscope2::ComputeForeignChannels(currentChannel, previousOutChannel); @@ -4146,21 +4056,17 @@ tel -- end of node Gyroscope2::CrossFailDetect node Gyroscope2::Channel( - previousOutChannel:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}^4; + previousOutChannel:Gyroscope2::Valid_ChannelT^4; nbInChannel:int; - inChannel:Gyroscope2::Faulty_ChannelT {valuea : real; - valueb : real}; + inChannel:Gyroscope2::Faulty_ChannelT; delta:real; god:real; delta_to_god:real) returns ( - nextOutChannel:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}^4; - outChannel:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}); + nextOutChannel:Gyroscope2::Valid_ChannelT^4; + outChannel:Gyroscope2::Valid_ChannelT); var - localChannel:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}; + localChannel:Gyroscope2::Valid_ChannelT; let localChannel = Valid_ChannelT{local_failure=(Gyroscope2::abs((inChannel.valuea - @@ -4175,18 +4081,14 @@ tel -- end of node Gyroscope2::Channel node Gyroscope2::guaranteeChannel( - previousOutChannel:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}^4; + previousOutChannel:Gyroscope2::Valid_ChannelT^4; nbInChannel:int; - inChannel:Gyroscope2::Faulty_ChannelT {valuea : real; - valueb : real}; + inChannel:Gyroscope2::Faulty_ChannelT; delta:real; god:real; delta_to_god:real; - nextOutChannel:Gyroscope2::Faulty_ChannelT {valuea : real; - valueb : real}^4; - outChannel:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}) + nextOutChannel:Gyroscope2::Faulty_ChannelT^4; + outChannel:Gyroscope2::Valid_ChannelT) returns ( guaranteeOK:bool); let @@ -4198,8 +4100,7 @@ tel node Gyroscope2::iteratedVoter( acc_in:bool; - channel:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}; + channel:Gyroscope2::Valid_ChannelT; god:real; delta_to_god:real; vote:real) @@ -4212,8 +4113,7 @@ tel -- end of node Gyroscope2::iteratedVoter node Gyroscope2::assumeVoter( - channels:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}^4; + channels:Gyroscope2::Valid_ChannelT^4; god:real; delta_to_god:real) returns ( @@ -4224,8 +4124,7 @@ tel -- end of node Gyroscope2::assumeVoter node Gyroscope2::guaranteeEvaluateAxis( - channels:Gyroscope2::Faulty_ChannelT {valuea : real; - valueb : real}^4; + channels:Gyroscope2::Faulty_ChannelT^4; delta:real; god:real; delta_to_god:real; @@ -4250,18 +4149,17 @@ tel -- end of node Gyroscope2::ValueIsSecure node Gyroscope2::EvaluateAxis( - channels:Gyroscope2::Faulty_ChannelT {valuea : real; - valueb : real}^4; + channels:Gyroscope2::Faulty_ChannelT^4; delta:real; god:real; delta_to_god:real) returns ( AxisValue:real); var - resChannels:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}^4; - dumbChannel:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}^4; - initChannels:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}^4; - fillredInit:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}^4; + resChannels:Gyroscope2::Valid_ChannelT^4; + dumbChannel:Gyroscope2::Valid_ChannelT^4; + initChannels:Gyroscope2::Valid_ChannelT^4; + fillredInit:Gyroscope2::Valid_ChannelT^4; let initChannels = Valid_ChannelT{local_failure=false;local_value=0.0}^4; (dumbChannel, resChannels) = fillred<<node Gyroscope2::Channel, const @@ -4272,8 +4170,7 @@ tel -- end of node Gyroscope2::EvaluateAxis node Gyroscope2::Gyroscope2( - axis:Gyroscope2::Faulty_ChannelT {valuea : real; - valueb : real}^4^3) + axis:Gyroscope2::Faulty_ChannelT^4^3) returns ( valid:bool); var @@ -4289,8 +4186,7 @@ tel -- end of node Gyroscope2::Gyroscope2 node Gyroscope2::guaranteeVoter( - channels:Gyroscope2::Valid_ChannelT {local_failure : bool; - local_value : real}^4; + channels:Gyroscope2::Valid_ChannelT^4; god:real; delta_to_god:real; vote:real) @@ -4421,7 +4317,7 @@ 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_tab = decl::coord {x : real; y : real}^1; +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; @@ -4440,9 +4336,9 @@ returns ( d1:bool); extern function decl::f1( - a1:enum {decl::bleu, decl::blanc, decl::rouge}; - b1:enum {decl::bleu, decl::blanc, decl::rouge}; - c1:enum {decl::bleu, decl::blanc, decl::rouge}) + a1:decl::couleur; + b1:decl::couleur; + c1:decl::couleur) returns ( d1:bool^2); @@ -4466,7 +4362,7 @@ 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_tab = declaration::coord {x : real; y : real}^1; +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; @@ -4483,9 +4379,9 @@ tel -- end of node declaration::declaration extern function declaration::f1( - a1:enum {declaration::bleu, declaration::blanc, declaration::rouge}; - b1:enum {declaration::bleu, declaration::blanc, declaration::rouge}; - c1:enum {declaration::bleu, declaration::blanc, declaration::rouge}) + a1:declaration::couleur; + b1:declaration::couleur; + c1:declaration::couleur) returns ( d1:bool^2); @@ -4529,7 +4425,7 @@ type def::string2d = int^4^4; type def::structT = def::structT {x : int; y : real; z : int^4^4^4}; type def::t2; type def::t3; -type def::tabStruct = def::structT {x : int; y : real; z : int^4^4^4}^2; +type def::tabStruct = def::structT^2; const def::id_int = 5; const def::b = true; const def::c = 3.140000; @@ -4537,15 +4433,13 @@ const def::c = 3.140000; node def::def( a1:bool; b1:int^4^4 when a1; - c1:def::structT {x : int; - y : real; - z : int^4^4^4}^2 when a1; + c1:def::structT^2 when a1; d1:int^23) returns ( res:bool when a1); var h1:int^4; - h2:def::structT {x : int; y : real; z : int^4^4^4}^2; + h2:def::structT^2; h3:int when a1; h4:real when a1; h5:int^4^4^4 when a1; @@ -4622,11 +4516,11 @@ 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 {x : real; y : real}; y : filter::complexe {x : real; y : real}}; +type filter::cdouble = filter::cdouble {x : filter::complexe; y : filter::complexe}; node filter::filter(a:real; b:real) returns (ok:bool); var i:real; - z:filter::cdouble {x : filter::complexe {x : real; y : real}; y : filter::complexe {x : real; y : real}}; + z:filter::cdouble; let z.. = 0. -> i; z.. = z.x.x; @@ -4734,9 +4628,8 @@ tel node map_red_iter::map_red_iter( indice_gen:int; - InfoGenIndiv:map_red_iter::T_InfoGenIndiv {mesure_gen : int}; - InfoGenGlob:map_red_iter::T_InfoGenGlob {elt_bidon : int; - chg2gen : int^20}; + InfoGenIndiv:map_red_iter::T_InfoGenIndiv; + InfoGenGlob:map_red_iter::T_InfoGenGlob; TabEtatCharge:int^20; TabComVal:bool^20) returns ( @@ -5362,12 +5255,12 @@ 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 {in : int; out : int}; tutu : bool}; +type morel4::toto = morel4::toto {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); var - yo:morel4::toto {titi : morel4::tube {in : int; out : int}; tutu : bool}; + yo:morel4::toto; let yo. = tube{in=i;out=(i + 1)}; yo. = true; @@ -5418,14 +5311,12 @@ 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 {in : int; out : int}; tutu : bool}; +type morel5::toto = morel5::toto {titi : morel5::tube; tutu : bool}; type morel5::arrayb = bool^3; type morel5::arrayi = int^2^3; node morel5::tab( - yo:morel5::toto {titi : morel5::tube {in : int; - out : int}; - tutu : bool}; + yo:morel5::toto; tabb:bool^3; tabi:int^2^3) returns ( @@ -5443,9 +5334,7 @@ tel -- end of node morel5::tab node morel5::morel5( - t:morel5::toto {titi : morel5::tube {in : int; - out : int}; - tutu : bool}; + t:morel5::toto; b:bool^3; i:int^2^3) returns ( @@ -5461,7 +5350,7 @@ tel -- end of node morel5::morel5 node morel5::mcmorel(i:int) returns (t:int^2; u:int^2^2); var - yo:morel5::toto {titi : morel5::tube {in : int; out : int}; tutu : bool}; + yo:morel5::toto; let yo. = tube{in=i;out=(i + 1)}; yo. = true; @@ -6625,7 +6514,7 @@ 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_Array = Gyroscope::Faulty_ChannelT {valuea : real; valueb : real}^4^3; +type Gyroscope::Faulty_Array = Gyroscope::Faulty_ChannelT^4^3; type Gyroscope::Valid_ChannelT = Gyroscope::Valid_ChannelT {local_failure : bool; local_value : real}; const Gyroscope::DELTA_PITCH = 2.000000; const Gyroscope::DELTA_YAW = 2.000000; @@ -6658,8 +6547,7 @@ tel node Gyroscope::countFalse( accu_in:real; - elt_in:Gyroscope::Valid_ChannelT {local_failure : bool; - local_value : real}) + elt_in:Gyroscope::Valid_ChannelT) returns ( accu_out:real); let @@ -6670,8 +6558,7 @@ tel node Gyroscope::TooFar( nbToFarIn:int; - channel:Gyroscope::Faulty_ChannelT {valuea : real; - valueb : real}; + channel:Gyroscope::Faulty_ChannelT; god:real; delta_to_god:real) returns ( @@ -6683,8 +6570,7 @@ tel -- end of node Gyroscope::TooFar node Gyroscope::assumeEvaluateAxis( - channels:Gyroscope::Faulty_ChannelT {valuea : real; - valueb : real}^4; + channels:Gyroscope::Faulty_ChannelT^4; delta:real; god:real; delta_to_god:real) @@ -6712,8 +6598,7 @@ tel -- end of node Gyroscope::assumeSum node Gyroscope::assumeChannel( - inChannel:Gyroscope::Faulty_ChannelT {valuea : real; - valueb : real}; + inChannel:Gyroscope::Faulty_ChannelT; delta:real; god:real; delta_to_god:real) @@ -6739,14 +6624,12 @@ tel -- end of node Gyroscope::Maintain node Gyroscope::Channel( - inChannel:Gyroscope::Faulty_ChannelT {valuea : real; - valueb : real}; + inChannel:Gyroscope::Faulty_ChannelT; delta:real; god:real; delta_to_god:real) returns ( - outChannel:Gyroscope::Valid_ChannelT {local_failure : bool; - local_value : real}); + outChannel:Gyroscope::Valid_ChannelT); var maintain:bool; let @@ -6759,8 +6642,7 @@ tel -- end of node Gyroscope::Channel node Gyroscope::countValidChannels( - channels:Gyroscope::Valid_ChannelT {local_failure : bool; - local_value : real}^4) + channels:Gyroscope::Valid_ChannelT^4) returns ( nb:real); let @@ -6774,8 +6656,7 @@ tel -- end of node Gyroscope::sum node Gyroscope::masking( - channel:Gyroscope::Valid_ChannelT {local_failure : bool; - local_value : real}) + channel:Gyroscope::Valid_ChannelT) returns ( out:real); let @@ -6784,8 +6665,7 @@ tel -- end of node Gyroscope::masking node Gyroscope::Voter( - channels:Gyroscope::Valid_ChannelT {local_failure : bool; - local_value : real}^4; + channels:Gyroscope::Valid_ChannelT^4; god:real; delta_to_god:real) returns ( @@ -6803,8 +6683,7 @@ tel -- end of node Gyroscope::Voter node Gyroscope::Voter2( - channels:Gyroscope::Valid_ChannelT {local_failure : bool; - local_value : real}^4; + channels:Gyroscope::Valid_ChannelT^4; god:real; delta_to_god:real) returns ( @@ -6822,15 +6701,14 @@ tel -- end of node Gyroscope::Voter2 node Gyroscope::EvaluateAxis( - channels:Gyroscope::Faulty_ChannelT {valuea : real; - valueb : real}^4; + channels:Gyroscope::Faulty_ChannelT^4; delta:real; god:real; delta_to_god:real) returns ( AxisValue:real); var - resChannels:Gyroscope::Valid_ChannelT {local_failure : bool; local_value : real}^4; + resChannels:Gyroscope::Valid_ChannelT^4; AxisValue2:real; let resChannels = map<<node Gyroscope::Channel, const 4>>(channels, delta^4, @@ -6841,8 +6719,7 @@ tel -- end of node Gyroscope::EvaluateAxis node Gyroscope::Gyroscope( - axis:Gyroscope::Faulty_ChannelT {valuea : real; - valueb : real}^4^3) + axis:Gyroscope::Faulty_ChannelT^4^3) returns ( valid:bool); var @@ -6858,13 +6735,11 @@ tel -- end of node Gyroscope::Gyroscope node Gyroscope::guaranteeChannel( - inChannel:Gyroscope::Faulty_ChannelT {valuea : real; - valueb : real}; + inChannel:Gyroscope::Faulty_ChannelT; delta:real; god:real; delta_to_god:real; - outChannel:Gyroscope::Valid_ChannelT {local_failure : bool; - local_value : real}) + outChannel:Gyroscope::Valid_ChannelT) returns ( guaranteeOK:bool); let @@ -6876,8 +6751,7 @@ tel node Gyroscope::iteratedVoter( acc_in:bool; - channel:Gyroscope::Valid_ChannelT {local_failure : bool; - local_value : real}; + channel:Gyroscope::Valid_ChannelT; god:real; delta_to_god:real; vote:real) @@ -6890,8 +6764,7 @@ tel -- end of node Gyroscope::iteratedVoter node Gyroscope::assumeVoter( - channels:Gyroscope::Valid_ChannelT {local_failure : bool; - local_value : real}^4; + channels:Gyroscope::Valid_ChannelT^4; god:real; delta_to_god:real) returns ( @@ -6902,8 +6775,7 @@ tel -- end of node Gyroscope::assumeVoter node Gyroscope::guaranteeEvaluateAxis( - channels:Gyroscope::Faulty_ChannelT {valuea : real; - valueb : real}^4; + channels:Gyroscope::Faulty_ChannelT^4; delta:real; god:real; delta_to_god:real; @@ -6941,8 +6813,7 @@ tel -- end of node Gyroscope::guaranteeSum node Gyroscope::guaranteeVoter( - channels:Gyroscope::Valid_ChannelT {local_failure : bool; - local_value : real}^4; + channels:Gyroscope::Valid_ChannelT^4; god:real; delta_to_god:real; vote:real) @@ -6962,15 +6833,13 @@ type produitBool::Tacc_in = produitBool::Tacc_in {multiplieur : bool^10; rank : 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 {multiplieur : bool^10; rank : int}; actual_rank : int}; +type produitBool::Tacc_inShift = produitBool::Tacc_inShift {acc_in_PLC : produitBool::Tacc_in; actual_rank : int}; node produitBool::iterated_isElementOf_( - acc_in:produitBool::T_isElementOf_ {eltToSearch : bool; - iselementof : bool}; + acc_in:produitBool::T_isElementOf_; elt_in:bool) returns ( - acc_out:produitBool::T_isElementOf_ {eltToSearch : bool; - iselementof : bool}); + acc_out:produitBool::T_isElementOf_); let acc_out = T_isElementOf_{eltToSearch=acc_in.eltToSearch;iselementof=(acc_in.iselementof @@ -6984,7 +6853,7 @@ node produitBool::_isElementOf_( returns ( iselementof:bool); var - acc_out:produitBool::T_isElementOf_ {eltToSearch : bool; iselementof : bool}; + acc_out:produitBool::T_isElementOf_; let acc_out = red<<node produitBool::iterated_isElementOf_, const 10>>(T_isElementOf_{eltToSearch=e;iselementof=false}, t); @@ -6993,14 +6862,10 @@ tel -- end of node produitBool::_isElementOf_ node produitBool::selectOneStage( - acc_in:produitBool::iteratedStruct {currentRank : int; - rankToSelect : int; - elementSelected : bool}; + acc_in:produitBool::iteratedStruct; currentElt:bool) returns ( - acc_out:produitBool::iteratedStruct {currentRank : int; - rankToSelect : int; - elementSelected : bool}); + acc_out:produitBool::iteratedStruct); let acc_out = iteratedStruct{currentRank=(acc_in.currentRank + 1);rankToSelect=acc_in.rankToSelect;elementSelected= if @@ -7015,7 +6880,7 @@ node produitBool::selectElementOfRank_inArray_( returns ( elementSelected:bool); var - iterationResult:produitBool::iteratedStruct {currentRank : int; rankToSelect : int; elementSelected : bool}; + iterationResult:produitBool::iteratedStruct; let iterationResult = red<<node produitBool::selectOneStage, const 10>>(iteratedStruct{currentRank=0;rankToSelect=rankToSelect;elementSelected=array[0]}, @@ -7025,13 +6890,9 @@ tel -- end of node produitBool::selectElementOfRank_inArray_ node produitBool::shiftFill( - acc_in:produitBool::Tacc_inShift2 {multiplieur : bool^10; - rank : int; - actual_rank : int}) + acc_in:produitBool::Tacc_inShift2) returns ( - acc_out:produitBool::Tacc_inShift2 {multiplieur : bool^10; - rank : int; - actual_rank : int}; + acc_out:produitBool::Tacc_inShift2; elt_out:bool); let acc_out = @@ -7045,12 +6906,11 @@ tel -- end of node produitBool::shiftFill node produitBool::shift( - acc_in:produitBool::Tacc_in {multiplieur : bool^10; - rank : int}) + acc_in:produitBool::Tacc_in) returns ( ligne:bool^20); var - bidon:produitBool::Tacc_inShift2 {multiplieur : bool^10; rank : int; actual_rank : int}; + 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}); @@ -7068,12 +6928,10 @@ tel -- end of node produitBool::produitBool node produitBool::PLC( - acc_in:produitBool::Tacc_in {multiplieur : bool^10; - rank : int}; + acc_in:produitBool::Tacc_in; multiplicande:bool) returns ( - acc_out:produitBool::Tacc_in {multiplieur : bool^10; - rank : int}; + acc_out:produitBool::Tacc_in; ligne:bool^20); let ligne = if ((multiplicande = false)) then (multiplicande^20) else @@ -7087,8 +6945,8 @@ Opening file /home/jahier/lus2lic/src/test/should_work/lionel/ProduitBool/shiftF 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 {multiplieur : bool^10; rank : int}; actual_rank : int}; -type shiftFill_ludic::t_Tacc_inShift = shiftFill_ludic::T5_STRUCT {acc_in_PLC : shiftFill_ludic::T4_STRUCT {multiplieur : bool^10; rank : int}; actual_rank : int}; +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}; @@ -7098,14 +6956,10 @@ type shiftFill_ludic::t_iteratedStruct = shiftFill_ludic::T3_STRUCT {currentRank const shiftFill_ludic::c_size = 10; node shiftFill_ludic::n_selectOneStage( - i_acc_in:shiftFill_ludic::T3_STRUCT {currentRank : int; - rankToSelect : int; - elementSelected : bool}; + i_acc_in:shiftFill_ludic::T3_STRUCT; i_currentElt:bool) returns ( - o_acc_out:shiftFill_ludic::T3_STRUCT {currentRank : int; - rankToSelect : int; - elementSelected : bool}); + 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 @@ -7120,7 +6974,7 @@ node shiftFill_ludic::n_selectElementOfRank_inArray_( returns ( o_elementSelected:bool); var - v_iterationResult:shiftFill_ludic::T3_STRUCT {currentRank : int; rankToSelect : int; elementSelected : bool}; + 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]}, @@ -7130,13 +6984,9 @@ tel -- end of node shiftFill_ludic::n_selectElementOfRank_inArray_ node shiftFill_ludic::n_shiftFill( - i_acc_in:shiftFill_ludic::T2_STRUCT {multiplieur : bool^10; - rank : int; - actual_rank : int}) + i_acc_in:shiftFill_ludic::T2_STRUCT) returns ( - o_acc_out:shiftFill_ludic::T2_STRUCT {multiplieur : bool^10; - rank : int; - actual_rank : int}; + o_acc_out:shiftFill_ludic::T2_STRUCT; o_elt_out:bool); let o_acc_out = @@ -7155,9 +7005,9 @@ Opening file /home/jahier/lus2lic/src/test/should_work/lionel/ProduitBool/shift_ 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 {multiplieur : bool^10; rank : int}; actual_rank : int}; +type shift_ludic::T6_STRUCT = shift_ludic::T6_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 {multiplieur : bool^10; rank : int}; actual_rank : int}; +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}; @@ -7167,14 +7017,10 @@ type shift_ludic::t_iteratedStruct = shift_ludic::T4_STRUCT {currentRank : int; const shift_ludic::c_size = 10; node shift_ludic::n_selectOneStage( - i_acc_in:shift_ludic::T4_STRUCT {currentRank : int; - rankToSelect : int; - elementSelected : bool}; + i_acc_in:shift_ludic::T4_STRUCT; i_currentElt:bool) returns ( - o_acc_out:shift_ludic::T4_STRUCT {currentRank : int; - rankToSelect : int; - elementSelected : bool}); + 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 @@ -7189,7 +7035,7 @@ node shift_ludic::n_selectElementOfRank_inArray_( returns ( o_elementSelected:bool); var - v_iterationResult:shift_ludic::T4_STRUCT {currentRank : int; rankToSelect : int; elementSelected : bool}; + 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]}, @@ -7199,13 +7045,9 @@ tel -- end of node shift_ludic::n_selectElementOfRank_inArray_ node shift_ludic::n_shiftFill( - i_acc_in:shift_ludic::T2_STRUCT {multiplieur : bool^10; - rank : int; - actual_rank : int}) + i_acc_in:shift_ludic::T2_STRUCT) returns ( - o_acc_out:shift_ludic::T2_STRUCT {multiplieur : bool^10; - rank : int; - actual_rank : int}; + o_acc_out:shift_ludic::T2_STRUCT; o_elt_out:bool); let o_acc_out = @@ -7219,12 +7061,11 @@ tel -- end of node shift_ludic::n_shiftFill node shift_ludic::n_shift( - i_acc_in:shift_ludic::T5_STRUCT {multiplieur : bool^10; - rank : int}) + i_acc_in:shift_ludic::T5_STRUCT) returns ( o_ligne:bool^20); var - v_bidon:shift_ludic::T2_STRUCT {multiplieur : bool^10; rank : int; actual_rank : int}; + 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}); @@ -7329,18 +7170,10 @@ type calculs_max::struct_fill_bool = calculs_max::struct_fill_bool {imax1 : int; type calculs_max::struct_max = calculs_max::struct_max {max1 : int; max2 : int; imax1 : int; imax2 : int; icourant : int}; node calculs_max::max( - strin:calculs_max::struct_max {max1 : int; - max2 : int; - imax1 : int; - imax2 : int; - icourant : int}; + strin:calculs_max::struct_max; ecourant:int) returns ( - strout:calculs_max::struct_max {max1 : int; - max2 : int; - imax1 : int; - imax2 : int; - icourant : int}); + 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 @@ -7354,13 +7187,9 @@ tel -- end of node calculs_max::max node calculs_max::fill_bool( - s_in:calculs_max::struct_fill_bool {imax1 : int; - imax2 : int; - icourant : int}) + s_in:calculs_max::struct_fill_bool) returns ( - s_out:calculs_max::struct_fill_bool {imax1 : int; - imax2 : int; - icourant : int}; + s_out:calculs_max::struct_fill_bool; elt:bool); let s_out = @@ -7371,8 +7200,8 @@ tel -- end of node calculs_max::fill_bool node calculs_max::calculs_max(A:int^10) returns (res:bool^10); var - local_struct:calculs_max::struct_max {max1 : int; max2 : int; imax1 : int; imax2 : int; icourant : int}; - tmp:calculs_max::struct_fill_bool {imax1 : int; imax2 : int; icourant : int}; + 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); @@ -7392,12 +7221,10 @@ type deSimone::cell_accu = deSimone::cell_accu {token : bool; grant : bool}; node deSimone::oneCell( - accu_in:deSimone::cell_accu {token : bool; - grant : bool}; + accu_in:deSimone::cell_accu; req:bool) returns ( - accu_out:deSimone::cell_accu {token : bool; - grant : bool}; + accu_out:deSimone::cell_accu; ackout:bool); let ackout = (((req and accu_in.token) and accu_in.grant) and not(false -> @@ -7423,7 +7250,7 @@ node deSimone::deSimone( returns ( acknowledge:bool^10); var - accu_out:deSimone::cell_accu {token : bool; grant : bool}; + accu_out:deSimone::cell_accu; let (accu_out, acknowledge) = fillred<<node deSimone::oneCell, const 10>>(cell_accu{token=new_token;grant=true}, request); @@ -7582,14 +7409,10 @@ type moyenne::moyenne_accu = moyenne::moyenne_accu {sum : real; moyenne : real; const moyenne::size = 10; node moyenne::moyenne_step( - accu_in:moyenne::moyenne_accu {sum : real; - moyenne : real; - rank : real}; + accu_in:moyenne::moyenne_accu; elt_in:real) returns ( - accu_out:moyenne::moyenne_accu {sum : real; - moyenne : real; - rank : real}); + 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)}; @@ -7597,7 +7420,7 @@ tel -- end of node moyenne::moyenne_step node moyenne::moyenne(Tab:real^10) returns (moy:real); var - accu_out:moyenne::moyenne_accu {sum : real; moyenne : real; rank : real}; + 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); @@ -7631,18 +7454,16 @@ const normal::COM_ERR = 0; node normal::int2InfoChgIndiv( m:int) returns ( - InfoChgIndiv:normal::T_InfoChgIndiv {mesure_chg : int}); + 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 {chg2gen : int^20; - mesure_chgs : int^20; - mesure_gens : int^4}) + EntreeGlob:normal::T_EntreeGlob) returns ( - TabInfoChgIndiv:normal::T_InfoChgIndiv {mesure_chg : int}^20); + TabInfoChgIndiv:normal::T_InfoChgIndiv^20); let TabInfoChgIndiv = map<<node normal::int2InfoChgIndiv, const 20>>(EntreeGlob.mesure_chgs); @@ -7652,18 +7473,16 @@ tel node normal::int2InfoGenIndiv( m:int) returns ( - InfoGenIndiv:normal::T_InfoGenIndiv {mesure_gen : int}); + 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 {chg2gen : int^20; - mesure_chgs : int^20; - mesure_gens : int^4}) + EntreeGlob:normal::T_EntreeGlob) returns ( - TabInfoGenIndiv:normal::T_InfoGenIndiv {mesure_gen : int}^4); + TabInfoGenIndiv:normal::T_InfoGenIndiv^4); let TabInfoGenIndiv = map<<node normal::int2InfoGenIndiv, const 4>>(EntreeGlob.mesure_gens); @@ -7683,8 +7502,7 @@ tel node normal::essai_traite_gen( indice_gen:int; - infoGenGlob:normal::T_InfoGenGlob {elt_bidon : int; - chg2gen : int^20}) + infoGenGlob:normal::T_InfoGenGlob) returns ( TabComVal:bool^20); var @@ -7749,8 +7567,7 @@ tel node normal::essai2( a:int^20; - d:normal::T_InfoGenGlob {elt_bidon : int; - chg2gen : int^20}) + d:normal::T_InfoGenGlob) returns ( c:bool^20); let @@ -7764,11 +7581,9 @@ tel -- end of node normal::id node normal::extract_info_chg_glob( - EntreeGlob:normal::T_EntreeGlob {chg2gen : int^20; - mesure_chgs : int^20; - mesure_gens : int^4}) + EntreeGlob:normal::T_EntreeGlob) returns ( - InfoChgGlob:normal::T_InfoChgGlob {chg2gen : int^20}); + InfoChgGlob:normal::T_InfoChgGlob); let InfoChgGlob = T_InfoChgGlob{chg2gen=map<<node normal::id, const 20>>(EntreeGlob.chg2gen)}; @@ -7776,12 +7591,10 @@ tel -- end of node normal::extract_info_chg_glob node normal::extrCharge( - EntreeGlob:normal::T_EntreeGlob {chg2gen : int^20; - mesure_chgs : int^20; - mesure_gens : int^4}) + EntreeGlob:normal::T_EntreeGlob) returns ( - TabInfoChgIndiv:normal::T_InfoChgIndiv {mesure_chg : int}^20; - TabInfoChgGlob:normal::T_InfoChgGlob {chg2gen : int^20}^20); + TabInfoChgIndiv:normal::T_InfoChgIndiv^20; + TabInfoChgGlob:normal::T_InfoChgGlob^20); let TabInfoChgIndiv = normal::extract_tab_info_chg_indiv(EntreeGlob); TabInfoChgGlob = normal::extract_info_chg_glob(EntreeGlob)^20; @@ -7795,8 +7608,7 @@ tel node normal::essai3( indice:int^20; - info:normal::T_InfoGenGlob {elt_bidon : int; - chg2gen : int^20}) + info:normal::T_InfoGenGlob) returns ( Connerie:bool^20); let @@ -7807,9 +7619,8 @@ tel node normal::traite_gen_core( indice_gen:int; - InfoGenIndiv:normal::T_InfoGenIndiv {mesure_gen : int}; - InfoGenGlob:normal::T_InfoGenGlob {elt_bidon : int; - chg2gen : int^20}; + InfoGenIndiv:normal::T_InfoGenIndiv; + InfoGenGlob:normal::T_InfoGenGlob; TabEtatCharge:int^20; TabComVal:bool^20) returns ( @@ -7824,9 +7635,8 @@ tel node normal::traite_gen( indice_gen:int; - InfoGenIndiv:normal::T_InfoGenIndiv {mesure_gen : int}; - InfoGenGlob:normal::T_InfoGenGlob {elt_bidon : int; - chg2gen : int^20}; + InfoGenIndiv:normal::T_InfoGenIndiv; + InfoGenGlob:normal::T_InfoGenGlob; TabEtatCharge:int^20) returns ( TabComChg:int^20; @@ -7847,12 +7657,9 @@ tel -- end of node normal::traite_gen node normal::extract_info_gen_glob( - EntreeGlob:normal::T_EntreeGlob {chg2gen : int^20; - mesure_chgs : int^20; - mesure_gens : int^4}) + EntreeGlob:normal::T_EntreeGlob) returns ( - InfoGenGlob:normal::T_InfoGenGlob {elt_bidon : int; - chg2gen : int^20}); + InfoGenGlob:normal::T_InfoGenGlob); let InfoGenGlob = T_InfoGenGlob{elt_bidon=0;chg2gen=map<<node normal::id, const 20>>(EntreeGlob.chg2gen)}; @@ -7860,8 +7667,8 @@ tel -- end of node normal::extract_info_gen_glob node normal::traite_charge( - InfoChgIndiv:normal::T_InfoChgIndiv {mesure_chg : int}; - InfoChgGlob:normal::T_InfoChgGlob {chg2gen : int^20}) + InfoChgIndiv:normal::T_InfoChgIndiv; + InfoChgGlob:normal::T_InfoChgGlob) returns ( EtatCharge:int); let @@ -7877,13 +7684,10 @@ tel -- end of node normal::incr_acc node normal::extrGen( - EntreeGlob:normal::T_EntreeGlob {chg2gen : int^20; - mesure_chgs : int^20; - mesure_gens : int^4}) + EntreeGlob:normal::T_EntreeGlob) returns ( - TabInfoGenIndiv:normal::T_InfoGenIndiv {mesure_gen : int}^4; - TabInfoGenGlob:normal::T_InfoGenGlob {elt_bidon : int; - chg2gen : int^20}^4; + TabInfoGenIndiv:normal::T_InfoGenIndiv^4; + TabInfoGenGlob:normal::T_InfoGenGlob^4; TabIndiceGen:int^4); var bid:int; @@ -7896,9 +7700,8 @@ tel node normal::traiteGen( TabIndiceGen:int^4; - TabInfoGenIndiv:normal::T_InfoGenIndiv {mesure_gen : int}^4; - TabInfoGenGlob:normal::T_InfoGenGlob {elt_bidon : int; - chg2gen : int^20}^4; + TabInfoGenIndiv:normal::T_InfoGenIndiv^4; + TabInfoGenGlob:normal::T_InfoGenGlob^4; TabEtatCharge:int^20) returns ( AllTabComChg:int^20^4; @@ -7910,8 +7713,8 @@ tel -- end of node normal::traiteGen node normal::traiteChg( - TabInfoChgIndiv:normal::T_InfoChgIndiv {mesure_chg : int}^20; - TabInfoChgGlob:normal::T_InfoChgGlob {chg2gen : int^20}^20) + TabInfoChgIndiv:normal::T_InfoChgIndiv^20; + TabInfoChgGlob:normal::T_InfoChgGlob^20) returns ( TabEtatCharge:int^20); let @@ -7921,17 +7724,15 @@ tel -- end of node normal::traiteChg node normal::normal( - EntreeGlob:normal::T_EntreeGlob {chg2gen : int^20; - mesure_chgs : int^20; - mesure_gens : int^4}) + EntreeGlob:normal::T_EntreeGlob) returns ( TabComChg:int^20); var - TabInfoChgIndiv:normal::T_InfoChgIndiv {mesure_chg : int}^20; - TabInfoChgGlob:normal::T_InfoChgGlob {chg2gen : int^20}^20; + TabInfoChgIndiv:normal::T_InfoChgIndiv^20; + TabInfoChgGlob:normal::T_InfoChgGlob^20; TabEtatCharge:int^20; - TabInfoGenIndiv:normal::T_InfoGenIndiv {mesure_gen : int}^4; - TabInfoGenGlob:normal::T_InfoGenGlob {elt_bidon : int; chg2gen : int^20}^4; + TabInfoGenIndiv:normal::T_InfoGenIndiv^4; + TabInfoGenGlob:normal::T_InfoGenGlob^4; TabIndiceGen:int^4; AllTabComChg:int^20^4; AllTabComVal:bool^20^4; @@ -7948,8 +7749,7 @@ tel node normal::traite_gen_bis( a:int; - c:normal::T_InfoGenGlob {elt_bidon : int; - chg2gen : int^20}) + c:normal::T_InfoGenGlob) returns ( e:bool^20); var @@ -8149,18 +7949,16 @@ const testSilus::COM_ERR = 0; node testSilus::int2InfoChgIndiv( m:int) returns ( - InfoChgIndiv:testSilus::T_InfoChgIndiv {mesure_chg : int}); + 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 {chg2gen : int^20; - mesure_chgs : int^20; - mesure_gens : int^4}) + EntreeGlob:testSilus::T_EntreeGlob) returns ( - TabInfoChgIndiv:testSilus::T_InfoChgIndiv {mesure_chg : int}^20); + TabInfoChgIndiv:testSilus::T_InfoChgIndiv^20); let TabInfoChgIndiv = map<<node testSilus::int2InfoChgIndiv, const 20>>(EntreeGlob.mesure_chgs); @@ -8170,18 +7968,16 @@ tel node testSilus::int2InfoGenIndiv( m:int) returns ( - InfoGenIndiv:testSilus::T_InfoGenIndiv {mesure_gen : int}); + 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 {chg2gen : int^20; - mesure_chgs : int^20; - mesure_gens : int^4}) + EntreeGlob:testSilus::T_EntreeGlob) returns ( - TabInfoGenIndiv:testSilus::T_InfoGenIndiv {mesure_gen : int}^4); + TabInfoGenIndiv:testSilus::T_InfoGenIndiv^4); let TabInfoGenIndiv = map<<node testSilus::int2InfoGenIndiv, const 4>>(EntreeGlob.mesure_gens); @@ -8255,11 +8051,9 @@ tel -- end of node testSilus::id node testSilus::extract_info_chg_glob( - EntreeGlob:testSilus::T_EntreeGlob {chg2gen : int^20; - mesure_chgs : int^20; - mesure_gens : int^4}) + EntreeGlob:testSilus::T_EntreeGlob) returns ( - InfoChgGlob:testSilus::T_InfoChgGlob {chg2gen : int^20}); + InfoChgGlob:testSilus::T_InfoChgGlob); let InfoChgGlob = T_InfoChgGlob{chg2gen=map<<node testSilus::id, const 20>>(EntreeGlob.chg2gen)}; @@ -8267,12 +8061,10 @@ tel -- end of node testSilus::extract_info_chg_glob node testSilus::extrCharge( - EntreeGlob:testSilus::T_EntreeGlob {chg2gen : int^20; - mesure_chgs : int^20; - mesure_gens : int^4}) + EntreeGlob:testSilus::T_EntreeGlob) returns ( - TabInfoChgIndiv:testSilus::T_InfoChgIndiv {mesure_chg : int}^20; - TabInfoChgGlob:testSilus::T_InfoChgGlob {chg2gen : int^20}^20); + TabInfoChgIndiv:testSilus::T_InfoChgIndiv^20; + TabInfoChgGlob:testSilus::T_InfoChgGlob^20); let TabInfoChgIndiv = testSilus::extract_tab_info_chg_indiv(EntreeGlob); TabInfoChgGlob = testSilus::extract_info_chg_glob(EntreeGlob)^20; @@ -8286,9 +8078,8 @@ tel node testSilus::traite_gen_core( indice_gen:int; - InfoGenIndiv:testSilus::T_InfoGenIndiv {mesure_gen : int}; - InfoGenGlob:testSilus::T_InfoGenGlob {elt_bidon : int; - chg2gen : int^20}; + InfoGenIndiv:testSilus::T_InfoGenIndiv; + InfoGenGlob:testSilus::T_InfoGenGlob; TabEtatCharge:int^20; TabComVal:bool^20) returns ( @@ -8303,9 +8094,8 @@ tel node testSilus::traite_gen( indice_gen:int; - InfoGenIndiv:testSilus::T_InfoGenIndiv {mesure_gen : int}; - InfoGenGlob:testSilus::T_InfoGenGlob {elt_bidon : int; - chg2gen : int^20}; + InfoGenIndiv:testSilus::T_InfoGenIndiv; + InfoGenGlob:testSilus::T_InfoGenGlob; TabEtatCharge:int^20) returns ( TabComChg:int^20; @@ -8324,12 +8114,9 @@ tel -- end of node testSilus::traite_gen node testSilus::extract_info_gen_glob( - EntreeGlob:testSilus::T_EntreeGlob {chg2gen : int^20; - mesure_chgs : int^20; - mesure_gens : int^4}) + EntreeGlob:testSilus::T_EntreeGlob) returns ( - InfoGenGlob:testSilus::T_InfoGenGlob {elt_bidon : int; - chg2gen : int^20}); + InfoGenGlob:testSilus::T_InfoGenGlob); let InfoGenGlob = T_InfoGenGlob{elt_bidon=0;chg2gen=map<<node testSilus::id, const 20>>(EntreeGlob.chg2gen)}; @@ -8337,8 +8124,8 @@ tel -- end of node testSilus::extract_info_gen_glob node testSilus::traite_charge( - InfoChgIndiv:testSilus::T_InfoChgIndiv {mesure_chg : int}; - InfoChgGlob:testSilus::T_InfoChgGlob {chg2gen : int^20}) + InfoChgIndiv:testSilus::T_InfoChgIndiv; + InfoChgGlob:testSilus::T_InfoChgGlob) returns ( EtatCharge:int); let @@ -8348,8 +8135,8 @@ tel -- end of node testSilus::traite_charge node testSilus::traiteChg( - TabInfoChgIndiv:testSilus::T_InfoChgIndiv {mesure_chg : int}^20; - TabInfoChgGlob:testSilus::T_InfoChgGlob {chg2gen : int^20}^20) + TabInfoChgIndiv:testSilus::T_InfoChgIndiv^20; + TabInfoChgGlob:testSilus::T_InfoChgGlob^20) returns ( TabEtatCharge:int^20); let @@ -8365,13 +8152,10 @@ tel -- end of node testSilus::incr_acc node testSilus::extrGen( - EntreeGlob:testSilus::T_EntreeGlob {chg2gen : int^20; - mesure_chgs : int^20; - mesure_gens : int^4}) + EntreeGlob:testSilus::T_EntreeGlob) returns ( - TabInfoGenIndiv:testSilus::T_InfoGenIndiv {mesure_gen : int}^4; - TabInfoGenGlob:testSilus::T_InfoGenGlob {elt_bidon : int; - chg2gen : int^20}^4; + TabInfoGenIndiv:testSilus::T_InfoGenIndiv^4; + TabInfoGenGlob:testSilus::T_InfoGenGlob^4; TabIndiceGen:int^4); var bidon:int; @@ -8384,9 +8168,8 @@ tel node testSilus::traiteGen( TabIndiceGen:int^4; - TabInfoGenIndiv:testSilus::T_InfoGenIndiv {mesure_gen : int}^4; - TabInfoGenGlob:testSilus::T_InfoGenGlob {elt_bidon : int; - chg2gen : int^20}^4; + TabInfoGenIndiv:testSilus::T_InfoGenIndiv^4; + TabInfoGenGlob:testSilus::T_InfoGenGlob^4; TabEtatCharge:int^20) returns ( AllTabComChg:int^20^4; @@ -8398,17 +8181,15 @@ tel -- end of node testSilus::traiteGen node testSilus::testSilus( - EntreeGlob:testSilus::T_EntreeGlob {chg2gen : int^20; - mesure_chgs : int^20; - mesure_gens : int^4}) + EntreeGlob:testSilus::T_EntreeGlob) returns ( TabComChg:int^20); var - TabInfoChgIndiv:testSilus::T_InfoChgIndiv {mesure_chg : int}^20; - TabInfoChgGlob:testSilus::T_InfoChgGlob {chg2gen : int^20}^20; + TabInfoChgIndiv:testSilus::T_InfoChgIndiv^20; + TabInfoChgGlob:testSilus::T_InfoChgGlob^20; TabEtatCharge:int^20; - TabInfoGenIndiv:testSilus::T_InfoGenIndiv {mesure_gen : int}^4; - TabInfoGenGlob:testSilus::T_InfoGenGlob {elt_bidon : int; chg2gen : int^20}^4; + TabInfoGenIndiv:testSilus::T_InfoGenIndiv^4; + TabInfoGenGlob:testSilus::T_InfoGenGlob^4; TabIndiceGen:int^4; AllTabComChg:int^20^4; AllTabComVal:bool^20^4; @@ -8435,16 +8216,10 @@ type triSel::sorted_iter_accu = triSel::sorted_iter_accu {prev_elt : int; prop_i type triSel::Exchange_accu = triSel::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; node triSel::minFromRank( - accu_in:triSel::MinFR_accu {MinVal : int; - MinRank : int; - RankFrom : int; - Rank : int}; + accu_in:triSel::MinFR_accu; TabEltIn:int) returns ( - accu_out:triSel::MinFR_accu {MinVal : int; - MinRank : int; - RankFrom : int; - Rank : int}); + 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 >= @@ -8458,14 +8233,10 @@ tel -- end of node triSel::minFromRank node triSel::select( - accu_in:triSel::Select_accu {RankToFind : int; - CurrentRank : int; - Val : int}; + accu_in:triSel::Select_accu; elt:int) returns ( - accu_out:triSel::Select_accu {RankToFind : int; - CurrentRank : int; - Val : int}); + accu_out:triSel::Select_accu); let accu_out = Select_accu{RankToFind=accu_in.RankToFind;CurrentRank=(accu_in.CurrentRank @@ -8475,18 +8246,10 @@ tel -- end of node triSel::select node triSel::Exchange_i_j( - accu_in:triSel::Exchange_accu {MinVal : int; - MinRank : int; - RankFrom : int; - CurrentVal : int; - Rank : int}; + accu_in:triSel::Exchange_accu; eltIn:int) returns ( - accu_out:triSel::Exchange_accu {MinVal : int; - MinRank : int; - RankFrom : int; - CurrentVal : int; - Rank : int}; + accu_out:triSel::Exchange_accu; eltOut:int); let accu_out = @@ -8499,16 +8262,14 @@ tel -- end of node triSel::Exchange_i_j node triSel::UnarySort( - accu_in:triSel::Sort_accu {CurrentRank : int; - Tab : int^50}; + accu_in:triSel::Sort_accu; eltIn:int) returns ( - accu_out:triSel::Sort_accu {CurrentRank : int; - Tab : int^50}); + accu_out:triSel::Sort_accu); var - accu_out_select:triSel::Select_accu {RankToFind : int; CurrentRank : int; Val : int}; - accu_out_min:triSel::MinFR_accu {MinVal : int; MinRank : int; RankFrom : int; Rank : int}; - accu_out_exchange:triSel::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; + accu_out_select:triSel::Select_accu; + accu_out_min:triSel::MinFR_accu; + accu_out_exchange:triSel::Exchange_accu; localTab:int^50; let accu_out_min = red<<node triSel::minFromRank, const @@ -8525,7 +8286,7 @@ tel -- end of node triSel::UnarySort node triSel::triSel(TIn:int^50) returns (TSorted:int^50); var - UnarySort_accu_out:triSel::Sort_accu {CurrentRank : int; Tab : int^50}; + UnarySort_accu_out:triSel::Sort_accu; let UnarySort_accu_out = red<<node triSel::UnarySort, const 50>>(Sort_accu{CurrentRank=0;Tab=TIn}, TIn); @@ -8534,12 +8295,10 @@ tel -- end of node triSel::triSel node triSel::sorted_iter( - accu_in:triSel::sorted_iter_accu {prev_elt : int; - prop_is_tt : bool}; + accu_in:triSel::sorted_iter_accu; elt:int) returns ( - accu_out:triSel::sorted_iter_accu {prev_elt : int; - prop_is_tt : bool}); + 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)}; @@ -8547,7 +8306,7 @@ tel -- end of node triSel::sorted_iter node triSel::Sorted(TIn:int^50) returns (ok:bool); var - accu_out:triSel::sorted_iter_accu {prev_elt : int; prop_is_tt : bool}; + accu_out:triSel::sorted_iter_accu; TSorted:int^50; let TSorted = triSel::triSel(TIn); @@ -8591,14 +8350,10 @@ type contractForElementSelectionInArray::iteratedStruct = contractForElementSele const contractForElementSelectionInArray::size = 10; node contractForElementSelectionInArray::selectOneStage( - acc_in:contractForElementSelectionInArray::iteratedStruct {currentRank : int; - rankToSelect : int; - elementSelected : int}; + acc_in:contractForElementSelectionInArray::iteratedStruct; currentElt:int) returns ( - acc_out:contractForElementSelectionInArray::iteratedStruct {currentRank : int; - rankToSelect : int; - elementSelected : int}); + acc_out:contractForElementSelectionInArray::iteratedStruct); let acc_out = iteratedStruct{currentRank=(acc_in.currentRank + 1);rankToSelect=acc_in.rankToSelect;elementSelected= if @@ -8613,7 +8368,7 @@ node contractForElementSelectionInArray::selectEltInArray( returns ( elementSelected:int); var - iterationResult:contractForElementSelectionInArray::iteratedStruct {currentRank : int; rankToSelect : int; elementSelected : int}; + iterationResult:contractForElementSelectionInArray::iteratedStruct; let iterationResult = red<<node contractForElementSelectionInArray::selectOneStage, const @@ -8648,12 +8403,10 @@ tel type intArray::T_isElementOf_ = intArray::T_isElementOf_ {eltToSearch : int; iselementof : bool}; node intArray::iterated_isElementOf_( - acc_in:intArray::T_isElementOf_ {eltToSearch : int; - iselementof : bool}; + acc_in:intArray::T_isElementOf_; elt_in:int) returns ( - acc_out:intArray::T_isElementOf_ {eltToSearch : int; - iselementof : bool}); + acc_out:intArray::T_isElementOf_); let acc_out = T_isElementOf_{eltToSearch=acc_in.eltToSearch;iselementof=(acc_in or @@ -8662,7 +8415,7 @@ tel -- end of node intArray::iterated_isElementOf_ node intArray::_isElementOf_(e:int; t:int^10) returns (iselementof:bool); var - acc_out:intArray::T_isElementOf_ {eltToSearch : int; iselementof : bool}; + acc_out:intArray::T_isElementOf_; let acc_out = red<<node intArray::iterated_isElementOf_, const 10>>(T_isElementOf_{eltToSearch=e;iselementof=false}, t); @@ -8676,12 +8429,10 @@ tel -- end of node intArray::_isGreaterOrEqualTo_ node intArray::isLocallyLoselySorted( - acc_in:intArray::forSortingAlgo {previousElement : int; - sortedUpToHere : bool}; + acc_in:intArray::forSortingAlgo; elt:int) returns ( - acc_out:intArray::forSortingAlgo {previousElement : int; - sortedUpToHere : bool}); + acc_out:intArray::forSortingAlgo); let acc_out = forSortingAlgo{previousElement=elt;sortedUpToHere=(intArray::_isGreaterOrEqualTo_(elt, @@ -8694,7 +8445,7 @@ node intArray::_isLoselySorted( returns ( array_isLoselySorted:bool); var - result:intArray::forSortingAlgo {previousElement : int; sortedUpToHere : bool}; + result:intArray::forSortingAlgo; let result = red<<node intArray::isLocallyLoselySorted, const 10>>(forSortingAlgo{previousElement=array[0];sortedUpToHere=true}, array); @@ -8707,16 +8458,10 @@ type intArray::MinFR_accu = intArray::MinFR_accu {MinVal : int; MinRank : int; R type intArray::Exchange_accu = intArray::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; node intArray::minFromRank( - accu_in:intArray::MinFR_accu {MinVal : int; - MinRank : int; - RankFrom : int; - Rank : int}; + accu_in:intArray::MinFR_accu; TabEltIn:int) returns ( - accu_out:intArray::MinFR_accu {MinVal : int; - MinRank : int; - RankFrom : int; - Rank : int}); + 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 @@ -8728,14 +8473,10 @@ tel -- end of node intArray::minFromRank node intArray::select( - accu_in:intArray::Select_accu {RankToFind : int; - CurrentRank : int; - Val : int}; + accu_in:intArray::Select_accu; elt:int) returns ( - accu_out:intArray::Select_accu {RankToFind : int; - CurrentRank : int; - Val : int}); + accu_out:intArray::Select_accu); let accu_out = Select_accu{RankToFind=accu_in.RankToFind;CurrentRank=(accu_in.CurrentRank @@ -8745,18 +8486,10 @@ tel -- end of node intArray::select node intArray::Exchange_i_j( - accu_in:intArray::Exchange_accu {MinVal : int; - MinRank : int; - RankFrom : int; - CurrentVal : int; - Rank : int}; + accu_in:intArray::Exchange_accu; eltIn:int) returns ( - accu_out:intArray::Exchange_accu {MinVal : int; - MinRank : int; - RankFrom : int; - CurrentVal : int; - Rank : int}; + accu_out:intArray::Exchange_accu; eltOut:int); let accu_out = @@ -8769,16 +8502,14 @@ tel -- end of node intArray::Exchange_i_j node intArray::UnarySort( - accu_in:intArray::Sort_accu {CurrentRank : int; - Tab : int^10}; + accu_in:intArray::Sort_accu; eltIn:int) returns ( - accu_out:intArray::Sort_accu {CurrentRank : int; - Tab : int^10}); + accu_out:intArray::Sort_accu); var - accu_out_select:intArray::Select_accu {RankToFind : int; CurrentRank : int; Val : int}; - accu_out_min:intArray::MinFR_accu {MinVal : int; MinRank : int; RankFrom : int; Rank : int}; - accu_out_exchange:intArray::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; + accu_out_select:intArray::Select_accu; + accu_out_min:intArray::MinFR_accu; + accu_out_exchange:intArray::Exchange_accu; localTab:int^10; let accu_out_min = red<<node intArray::minFromRank, const @@ -8796,7 +8527,7 @@ tel -- end of node intArray::UnarySort node intArray::sort_(array:int^10) returns (arraySorted:int^10); var - UnarySort_accu_out:intArray::Sort_accu {CurrentRank : int; Tab : int^10}; + UnarySort_accu_out:intArray::Sort_accu; let UnarySort_accu_out = red<<node intArray::UnarySort, const 10>>(Sort_accu{CurrentRank=0;Tab=array}, array); @@ -8817,14 +8548,10 @@ tel type intArray::iteratedStruct = intArray::iteratedStruct {currentRank : int; rankToSelect : int; elementSelected : int}; node intArray::selectOneStage( - acc_in:intArray::iteratedStruct {currentRank : int; - rankToSelect : int; - elementSelected : int}; + acc_in:intArray::iteratedStruct; currentElt:int) returns ( - acc_out:intArray::iteratedStruct {currentRank : int; - rankToSelect : int; - elementSelected : int}); + acc_out:intArray::iteratedStruct); let acc_out = iteratedStruct{currentRank=(acc_in.currentRank + 1);rankToSelect=acc_in.rankToSelect;elementSelected= if @@ -8839,7 +8566,7 @@ node intArray::selectElementOfRank_inArray_( returns ( elementSelected:int); var - iterationResult:intArray::iteratedStruct {currentRank : int; rankToSelect : int; elementSelected : int}; + iterationResult:intArray::iteratedStruct; let iterationResult = red<<node intArray::selectOneStage, const 10>>(iteratedStruct{currentRank=0;rankToSelect=rankToSelect;elementSelected=array[0]}, @@ -8864,14 +8591,10 @@ tel type intArray::currentRank_withMemorizedRank = intArray::currentRank_withMemorizedRank {currentRank : int; rankOfMemorizedVal : int; memorizedVal : int}; node intArray::selectMaxRank( - acc_in:intArray::currentRank_withMemorizedRank {currentRank : int; - rankOfMemorizedVal : int; - memorizedVal : int}; + acc_in:intArray::currentRank_withMemorizedRank; e1:int) returns ( - acc_out:intArray::currentRank_withMemorizedRank {currentRank : int; - rankOfMemorizedVal : int; - memorizedVal : int}); + acc_out:intArray::currentRank_withMemorizedRank); let acc_out = currentRank_withMemorizedRank{currentRank=(acc_in.currentRank + 1);rankOfMemorizedVal= if (intArray::_isGreaterThan_(e1, @@ -8886,7 +8609,7 @@ node intArray::getRank_ofMaximumIn_( returns ( rankOfMaximumElement:int); var - local:intArray::currentRank_withMemorizedRank {currentRank : int; rankOfMemorizedVal : int; memorizedVal : int}; + local:intArray::currentRank_withMemorizedRank; let local = red<<node intArray::selectMaxRank, const 10>>(currentRank_withMemorizedRank{currentRank=0;rankOfMemorizedVal=0;memorizedVal=array[0]}, @@ -8896,14 +8619,10 @@ tel -- end of node intArray::getRank_ofMaximumIn_ node intArray::selectMinRank( - acc_in:intArray::currentRank_withMemorizedRank {currentRank : int; - rankOfMemorizedVal : int; - memorizedVal : int}; + acc_in:intArray::currentRank_withMemorizedRank; elt:int) returns ( - acc_out:intArray::currentRank_withMemorizedRank {currentRank : int; - rankOfMemorizedVal : int; - memorizedVal : int}); + acc_out:intArray::currentRank_withMemorizedRank); let acc_out = currentRank_withMemorizedRank{currentRank=(acc_in.currentRank + 1);rankOfMemorizedVal= if (intArray::_isEqualTo_(acc_in.memorizedVal, elt)) @@ -8974,16 +8693,10 @@ type tri::sorted_iter_accu = tri::sorted_iter_accu {prev_elt : int; prop_is_tt : type tri::Exchange_accu = tri::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; node tri::minFromRank( - accu_in:tri::MinFR_accu {MinVal : int; - MinRank : int; - RankFrom : int; - Rank : int}; + accu_in:tri::MinFR_accu; TabEltIn:int) returns ( - accu_out:tri::MinFR_accu {MinVal : int; - MinRank : int; - RankFrom : int; - Rank : int}); + 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 @@ -8995,14 +8708,10 @@ tel -- end of node tri::minFromRank node tri::select( - accu_in:tri::Select_accu {RankToFind : int; - CurrentRank : int; - Val : int}; + accu_in:tri::Select_accu; elt:int) returns ( - accu_out:tri::Select_accu {RankToFind : int; - CurrentRank : int; - Val : int}); + accu_out:tri::Select_accu); let accu_out = Select_accu{RankToFind=accu_in.RankToFind;CurrentRank=(accu_in.CurrentRank @@ -9012,18 +8721,10 @@ tel -- end of node tri::select node tri::Exchange_i_j( - accu_in:tri::Exchange_accu {MinVal : int; - MinRank : int; - RankFrom : int; - CurrentVal : int; - Rank : int}; + accu_in:tri::Exchange_accu; eltIn:int) returns ( - accu_out:tri::Exchange_accu {MinVal : int; - MinRank : int; - RankFrom : int; - CurrentVal : int; - Rank : int}; + accu_out:tri::Exchange_accu; eltOut:int); let accu_out = @@ -9036,16 +8737,14 @@ tel -- end of node tri::Exchange_i_j node tri::UnarySort( - accu_in:tri::Sort_accu {CurrentRank : int; - Tab : int^10}; + accu_in:tri::Sort_accu; eltIn:int) returns ( - accu_out:tri::Sort_accu {CurrentRank : int; - Tab : int^10}); + accu_out:tri::Sort_accu); var - accu_out_select:tri::Select_accu {RankToFind : int; CurrentRank : int; Val : int}; - accu_out_min:tri::MinFR_accu {MinVal : int; MinRank : int; RankFrom : int; Rank : int}; - accu_out_exchange:tri::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; + accu_out_select:tri::Select_accu; + accu_out_min:tri::MinFR_accu; + accu_out_exchange:tri::Exchange_accu; localTab:int^10; let accu_out_min = red<<node tri::minFromRank, const @@ -9062,7 +8761,7 @@ tel -- end of node tri::UnarySort node tri::main(TIn:int^10) returns (TSorted:int^10); var - UnarySort_accu_out:tri::Sort_accu {CurrentRank : int; Tab : int^10}; + 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, @@ -9072,12 +8771,10 @@ tel -- end of node tri::main node tri::sorted_iter( - accu_in:tri::sorted_iter_accu {prev_elt : int; - prop_is_tt : bool}; + accu_in:tri::sorted_iter_accu; elt:int) returns ( - accu_out:tri::sorted_iter_accu {prev_elt : int; - prop_is_tt : bool}); + 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)}; @@ -9085,7 +8782,7 @@ tel -- end of node tri::sorted_iter node tri::Sorted(TIn:int^10) returns (res:bool); var - accu_out:tri::sorted_iter_accu {prev_elt : int; prop_is_tt : bool}; + accu_out:tri::sorted_iter_accu; TSorted:int^10; let TSorted = tri::main(TIn); @@ -9156,16 +8853,10 @@ tel type inter::selType = inter::selType {i : int; b : bool; r : real}; node inter::preced( - in:inter::selType {i : int; - b : bool; - r : real}) + in:inter::selType) returns ( - out:inter::selType {i : int; - b : bool; - r : real}; - out2:inter::selType {i : int; - b : bool; - r : real}); + out:inter::selType; + out2:inter::selType); let out2 = selType{i=0;b=true;r=0.}; out. = pint::fby1(out2.i, in.i); @@ -9207,16 +8898,10 @@ type inter::selType = inter::selType {i : int; b : bool; r : real}; const inter::n = -4; node inter::preced( - in:inter::selType {i : int; - b : bool; - r : real}) + in:inter::selType) returns ( - out:inter::selType {i : int; - b : bool; - r : real}; - out2:inter::selType {i : int; - b : bool; - r : real}); + out:inter::selType; + out2:inter::selType); let out2 = selType{i=0;b=true;r=0.}; out. = pint::fby1(out2.i, in.i); @@ -9552,9 +9237,9 @@ tel 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}; -node def::def(a:bool) returns (b:def::st {x : int^4}); +node def::def(a:bool) returns (b:def::st); var - c:def::st {x : int^4}; + c:def::st; let b.[0] = c.x[0]; b.[1] = c.x[0];