diff --git a/src/compiledDataDump.ml b/src/compiledDataDump.ml index 26ddc77e0904008a00b26d820665968e50c7dc93..c9e846699feb68d0a31b21da2e085c569bbf432a 100644 --- a/src/compiledDataDump.ml +++ b/src/compiledDataDump.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 08/07/2008 (at 10:16) by Erwan Jahier> *) +(** Time-stamp: <modified the 08/07/2008 (at 10:37) by Erwan Jahier> *) (* Call it LicDump? *) @@ -211,6 +211,7 @@ and (string_of_leff_list : left_eff list -> string) = and (string_of_by_pos_op_eff : by_pos_op_eff -> val_exp_eff list -> string) = fun posop vel -> let tuple vel = (String.concat ", " (List.map string_of_val_exp_eff vel)) in + let tuple_par vel = "(" ^ (tuple vel) ^ ")" in let tuple_square vel = "[" ^ (String.concat ", " (List.map string_of_val_exp_eff vel)) ^ "]" in @@ -237,10 +238,10 @@ and (string_of_by_pos_op_eff : by_pos_op_eff -> val_exp_eff list -> string) = | CALL_eff nee, _ -> ( if nee.it.def_eff = ExternEff then - ((string_of_node_key_iter nee.it.node_key_eff) ^ (tuple vel)) + ((string_of_node_key_iter nee.it.node_key_eff) ^ (tuple_par vel)) else (* recursive node cannot be extern *) - ((string_of_node_key_rec nee.it.node_key_eff) ^ (tuple vel)) + ((string_of_node_key_rec nee.it.node_key_eff) ^ (tuple_par vel)) ) | IDENT_eff idref, _ -> Ident.string_of_idref idref | PRE_eff, _ -> "pre " ^ (tuple vel) diff --git a/src/test/test.res.exp b/src/test/test.res.exp index 25b789d94602380cfbdea17b7f108a85db489e85..0f2ae0695d642acccabe134ce41fd34b5592cb94 100644 --- a/src/test/test.res.exp +++ b/src/test/test.res.exp @@ -45,7 +45,7 @@ tel node mainPack::Nat(evt:bool; reset:bool) returns (nat:_Int8::Int); let nat = ( if (true -> reset) then Int8::zero else ( if evt then - (Int8::incr(pre nat)) else (pre nat))); + (Int8::incr((pre nat))) else (pre nat))); tel -- end of node mainPack::Nat -- automatically defined aliases: @@ -281,16 +281,17 @@ var mini_display:_Watch::MINI_DISPLAY_TYPE; alpha_display:_Watch::string; let - display = (Watch::MAKE_DISPLAYmain_display, mini_display, alpha_display, - status, position_enhanced, labels); + display = (Watch::MAKE_DISPLAY(main_display, mini_display, alpha_display, + status, position_enhanced, labels)); (main_display, mini_display, alpha_display) = ( if mode_is_watch then - ((Watch::WATCH_TIME_TO_MAIN_DISPLAYwatch_time), - (Watch::WATCH_DATE_TO_MINI_DISPLAYwatch_time), - (Watch::WATCH_DAY_TO_ALPHA_DISPLAYwatch_time)) else ( if mode_is_stopwatch - then ((Watch::STOPWATCH_TIME_TO_MAIN_DISPLAYstopwatch_time), - (Watch::WATCH_TIME_TO_MINI_DISPLAYwatch_time), stringST) else - ((Watch::ALARM_TIME_TO_MAIN_DISPLAYalarm_time), - (Watch::WATCH_TIME_TO_MINI_DISPLAYwatch_time), stringAL))); + ((Watch::WATCH_TIME_TO_MAIN_DISPLAY(watch_time)), + (Watch::WATCH_DATE_TO_MINI_DISPLAY(watch_time)), + (Watch::WATCH_DAY_TO_ALPHA_DISPLAY(watch_time))) else ( if + mode_is_stopwatch then + ((Watch::STOPWATCH_TIME_TO_MAIN_DISPLAY(stopwatch_time)), + (Watch::WATCH_TIME_TO_MINI_DISPLAY(watch_time)), stringST) else + ((Watch::ALARM_TIME_TO_MAIN_DISPLAY(alarm_time)), + (Watch::WATCH_TIME_TO_MINI_DISPLAY(watch_time)), stringAL))); tel -- end of node Watch::DISPLAY extern function Watch::SOMME(i1:int; i2:int; i3:int) returns (somme:int); @@ -343,24 +344,24 @@ var count:int; internal_status:int; let - start_beeping = ((Watch::COMPARE_WATCH_ALARM_TIMEwatch_time, time) and + start_beeping = ((Watch::COMPARE_WATCH_ALARM_TIME(watch_time, time)) and status); status = (internal_status = 1); internal_status = (0 -> ( if toggle_alarm then ( if ((pre internal_status) - = 0) then 1 else 0) else ( if ((Watch::EDGE(not in_set)) and ((pre + = 0) then 1 else 0) else ( if ((Watch::EDGE((not in_set))) and ((pre internal_status) = 0)) then 1 else (pre internal_status)))); count = (0 -> ( if start_beeping then ALARM_DURATION else ( if (((pre count) <> 0) and second) then ((pre count) - 1) else (0 -> (pre count))))); time_out = (false -> (((pre count) <> 0) and (count = 0))); - beep = ( if ((Watch::TWO_STATESfalse, start_beeping, (stop_beep or - time_out)) and second) then 4 else 0); + beep = ( if ((Watch::TWO_STATES(false, start_beeping, (stop_beep or + time_out))) and second) then 4 else 0); time = (INITIAL_ALARM_TIME -> ( if toggle_24h then - (Watch::TOGGLE_24H_IN_ALARM_MODE(pre time)) else ( if set then - (Watch::SET_ALARM_TIME(pre time), position_set) else (pre time)))); + (Watch::TOGGLE_24H_IN_ALARM_MODE((pre time))) else ( if set then + (Watch::SET_ALARM_TIME((pre time), position_set)) else (pre time)))); enhance = position_set; - position_set = ( if (true -> (Watch::EDGEin_set)) then + position_set = ( if (true -> (Watch::EDGE(in_set))) then INITIAL_ALARM_POSITION else ( if next_position then - (Watch::NEXT_ALARM_TIME_POSITION(pre position_set)) else (pre + (Watch::NEXT_ALARM_TIME_POSITION((pre position_set))) else (pre position_set))); tel -- end of node Watch::ALARM @@ -444,19 +445,19 @@ let internal_chime_is_set) = 0) then 1 else 0) else (pre internal_chime_is_set))); chime_is_set = (internal_chime_is_set = 1); - beep = ( if second then ( if ((Watch::IS_O_CLOCKtime) and chime_is_set) + beep = ( if second then ( if ((Watch::IS_O_CLOCK(time)) and chime_is_set) then 2 else 0) else 0); time = (INITIAL_WATCH_TIME -> ( if (not in_set) then ( if second then - (Watch::INCREMENT_WATCH_TIME(pre time)) else ( if toggle_24h then - (Watch::TOGGLE_24H_IN_WATCH_MODE(pre time)) else ( if (Watch::EDGE(not - in_set)) then (Watch::CONFIRM_TIME(pre time)) else (pre time)))) else ( if - second then (Watch::INCREMENT_WATCH_TIME_IN_SET_MODE(pre time), - position_set) else ( if set then (Watch::SET_WATCH_TIME(pre time), - position_set) else (pre time))))); + (Watch::INCREMENT_WATCH_TIME((pre time))) else ( if toggle_24h then + (Watch::TOGGLE_24H_IN_WATCH_MODE((pre time))) else ( if (Watch::EDGE((not + in_set))) then (Watch::CONFIRM_TIME((pre time))) else (pre time)))) else ( + if second then (Watch::INCREMENT_WATCH_TIME_IN_SET_MODE((pre time), + position_set)) else ( if set then (Watch::SET_WATCH_TIME((pre time), + position_set)) else (pre time))))); enhance = position_set; - position_set = ( if (true -> (Watch::EDGEin_set)) then + position_set = ( if (true -> (Watch::EDGE(in_set))) then INITIAL_WATCH_POSITION else ( if next_position then - (Watch::NEXT_WATCH_TIME_POSITION(pre position_set)) else (pre + (Watch::NEXT_WATCH_TIME_POSITION((pre position_set))) else (pre position_set))); tel -- end of node Watch::WATCH @@ -481,14 +482,14 @@ var internal_time:_Watch::STOPWATCH_TIME_TYPE; let reset = (false -> (lap and (pre ((not run_state) and (not lap_state))))); - run_state = (Watch::TWO_STATESfalse, start_stop, start_stop); - lap_state = (Watch::TWO_STATESfalse, (lap and run_state), lap); + run_state = (Watch::TWO_STATES(false, start_stop, start_stop)); + lap_state = (Watch::TWO_STATES(false, (lap and run_state), lap)); time = (current (internal_time when lap_state)); internal_time = ( if (true -> reset) then INITIAL_STOPWATCH_TIME else ( if - (run_state and hs) then (Watch::INCREMENT_STOPWATCH_TIME(pre - internal_time)) else (pre internal_time))); + (run_state and hs) then (Watch::INCREMENT_STOPWATCH_TIME((pre + internal_time))) else (pre internal_time))); must_beep = ( if start_stop then true else ( if (hs and run_state) then - (Watch::IS_ZERO_MOD_10_MNinternal_time) else false)); + (Watch::IS_ZERO_MOD_10_MN(internal_time)) else false)); beep = ( if must_beep then 1 else 0); tel -- end of node Watch::STOPWATCH @@ -589,31 +590,34 @@ var chime_beep:int; stopwatch_beep:int; let - display = (Watch::DISPLAYmode_is_watch, mode_is_stopwatch, mode_is_alarm, - watch_time, stopwatch_time, alarm_time, position_enhanced, status, labels); - beep = (Watch::SOMMEalarm_beep, chime_beep, stopwatch_beep); + display = (Watch::DISPLAY(mode_is_watch, mode_is_stopwatch, mode_is_alarm, + watch_time, stopwatch_time, alarm_time, position_enhanced, status, + labels)); + beep = (Watch::SOMME(alarm_beep, chime_beep, stopwatch_beep)); (alarm_time, alarm_is_set, alarm_position_enhanced, alarm_beep) = - (Watch::ALARMtoggle_24h, toggle_alarm, mode_is_set_alarm, set_alarm, - alarm_next_position, stop_alarm_beep, second, watch_time); - labels = (Watch::LABELSmode_is_watch, mode_is_stopwatch, mode_is_alarm, - mode_is_set_watch, mode_is_set_alarm); + (Watch::ALARM(toggle_24h, toggle_alarm, mode_is_set_alarm, set_alarm, + alarm_next_position, stop_alarm_beep, second, watch_time)); + labels = (Watch::LABELS(mode_is_watch, mode_is_stopwatch, mode_is_alarm, + mode_is_set_watch, mode_is_set_alarm)); position_enhanced = ( if mode_is_set_watch then - (Watch::WATCH_TO_DISPLAY_POSwatch_position_enhanced) else ( if - mode_is_set_alarm then (Watch::ALARM_TO_DISPLAY_POSalarm_position_enhanced) - else NULL_POSITION)); - status = (Watch::STATUSalarm_is_set, chime_is_set, stopwatch_running, - stopwatch_lapping); + (Watch::WATCH_TO_DISPLAY_POS(watch_position_enhanced)) else ( if + mode_is_set_alarm then + (Watch::ALARM_TO_DISPLAY_POS(alarm_position_enhanced)) else + NULL_POSITION)); + status = (Watch::STATUS(alarm_is_set, chime_is_set, stopwatch_running, + stopwatch_lapping)); (watch_time, watch_position_enhanced, chime_is_set, chime_beep) = - (Watch::WATCHsecond, toggle_24h, toggle_chime, mode_is_set_watch, - watch_next_position, set_watch); + (Watch::WATCH(second, toggle_24h, toggle_chime, mode_is_set_watch, + watch_next_position, set_watch)); (stopwatch_time, stopwatch_running, stopwatch_lapping, stopwatch_beep) = - (Watch::STOPWATCHtime_unit, start_stop, lap); + (Watch::STOPWATCH(time_unit, start_stop, lap)); (mode_is_watch, mode_is_stopwatch, mode_is_alarm, mode_is_set_watch, mode_is_set_alarm, toggle_24h, toggle_chime, toggle_alarm, watch_next_position, alarm_next_position, set_watch, set_alarm, start_stop, - lap, stop_alarm_beep) = (Watch::BUTTONSUPLEFT, LOWLEFT, UPRIGHT, LOWRIGHT); - second = (time_unit and (current (Watch::DIVIDE((Watch::TIME_SCALE0) when - time_unit)))); + lap, stop_alarm_beep) = (Watch::BUTTONS(UPLEFT, LOWLEFT, UPRIGHT, + LOWRIGHT)); + second = (time_unit and (current (Watch::DIVIDE(((Watch::TIME_SCALE(0)) + when time_unit))))); tel -- end of node Watch::Watch node Watch::MORE_RECENT(evt:bool; delay:int) returns (more_recent:bool); @@ -820,22 +824,23 @@ var tps_alarme:int; let assert((#MA, code)); - en_marche = (alarme::basculefalse, MA, (MA and (pre demande_entree))); - demande_entree = (alarme::basculefalse, code, ((pre tps_vigilence) = 0)); - vigilence_partielle = (alarme::basculefalse, ((alarme::edgeen_marche) or - (alarme::edgedemande_entree)), ((pre tps_vigilence) = 0)); - tps_vigilence = (alarme::decompte((alarme::edgeen_marche) or - (alarme::edgedemande_entree)), delai_vigilence, (en_marche and ((pre - tps_vigilence) > 0))); - tps_alarme = (alarme::decompte(alarme::edgealarme), delai_alarme, ((pre - alarme) and ((pre tps_alarme) > 0))); - reprise = (alarme::basculefalse, ((pre alarme) and ((pre tps_alarme) = - 0)), ((pre tps_reprise) = 0)); - tps_reprise = (alarme::decompte(alarme::edgereprise), delai_reprise, ((pre - reprise) and (pre (tps_reprise > 0)))); + en_marche = (alarme::bascule(false, MA, (MA and (pre demande_entree)))); + demande_entree = (alarme::bascule(false, code, ((pre tps_vigilence) = + 0))); + vigilence_partielle = (alarme::bascule(false, ((alarme::edge(en_marche)) + or (alarme::edge(demande_entree))), ((pre tps_vigilence) = 0))); + tps_vigilence = (alarme::decompte(((alarme::edge(en_marche)) or + (alarme::edge(demande_entree))), delai_vigilence, (en_marche and ((pre + tps_vigilence) > 0)))); + tps_alarme = (alarme::decompte((alarme::edge(alarme)), delai_alarme, ((pre + alarme) and ((pre tps_alarme) > 0)))); + reprise = (alarme::bascule(false, ((pre alarme) and ((pre tps_alarme) = + 0)), ((pre tps_reprise) = 0))); + tps_reprise = (alarme::decompte((alarme::edge(reprise)), delai_reprise, + ((pre reprise) and (pre (tps_reprise > 0))))); alarme = (false -> ( if ((en_marche and (not reprise)) and (pb_hab or (pb_tmp and (not vigilence_partielle)))) then true else ( if ((pre alarme) - and (((pre tps_alarme) = 0) or (alarme::edge(not en_marche)))) then false + and (((pre tps_alarme) = 0) or (alarme::edge((not en_marche))))) then false else (pre alarme)))); tel -- end of node alarme::alarme @@ -864,10 +869,10 @@ returns ( grant:bool; new_token:bool); let - grant = (arbitre::my_switch(token and request), (not request), (token and - request)); + grant = (arbitre::my_switch((token and request), (not request), (token and + request))); new_token = (false -> (((pre token) and (not request)) or - (arbitre::xedge(not grant)))); + (arbitre::xedge((not grant))))); tel -- end of node arbitre::process @@ -891,10 +896,10 @@ var new_token2:bool; new_token3:bool; let - (grant0, new_token0) = (arbitre::processreq0, token0); - (grant1, new_token1) = (arbitre::processreq1, token1); - (grant2, new_token2) = (arbitre::processreq2, token2); - (grant3, new_token3) = (arbitre::processreq3, token3); + (grant0, new_token0) = (arbitre::process(req0, token0)); + (grant1, new_token1) = (arbitre::process(req1, token1)); + (grant2, new_token2) = (arbitre::process(req2, token2)); + (grant3, new_token3) = (arbitre::process(req3, token3)); token0 = (true -> (pre new_token3)); token1 = (false -> (pre new_token0)); token2 = (false -> (pre new_token1)); @@ -915,7 +920,7 @@ var gr2:bool; gr3:bool; let - (gr0, gr1, gr2, gr3) = (arbitre::mutexreq0, req1, req2, req3); + (gr0, gr1, gr2, gr3) = (arbitre::mutex(req0, req1, req2, req3)); ok = (#gr0, gr1, gr2, gr3); tel -- end of node arbitre::arbitre @@ -995,7 +1000,7 @@ Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/call.lus extern function call::f(a:int) returns (b:int); node call::n(a:int; b:bool) returns (x:int; y:int); let - (x, y) = ( if b then ((call::fa), 0) else (0, a)); + (x, y) = ( if b then ((call::f(a)), 0) else (0, a)); tel -- end of node call::n extern function call::p(a:int) returns (x:int; y:int); @@ -1004,8 +1009,8 @@ var u:int; v:int; let - (u, v) = (call::pa); - (x, y) = (call::na, b); + (u, v) = (call::p(a)); + (x, y) = (call::n(a, b)); tel -- end of node call::call @@ -1046,7 +1051,7 @@ tel -- end of node ck5::edge node ck5::ck5(b:bool; c:bool) returns (e:bool); let - e = (current (ck5::edge(b when c))); + e = (current (ck5::edge((b when c)))); tel -- end of node ck5::ck5 @@ -1068,8 +1073,8 @@ var cc:bool when b; x:int when cc; let - (u, v) = (ck6::p(n when b)); - (w, x) = (ck6::Ncc, u, v); + (u, v) = (ck6::p((n when b))); + (w, x) = (ck6::N(cc, u, v)); cc = (c when b); k = (current w); l = (current (current x)); @@ -1115,11 +1120,11 @@ var v6:bool when v5; v7:bool when v6; let - v1 = (clock::inOnInin, (true when in)); + v1 = (clock::inOnIn(in, (true when in))); v2 = (in when v4); - v3 = (clock::outOnInin, v1); - (v4, v5) = (clock::outOnOut(pre v4), (pre v4)); - (v6, v7) = (clock::allv4, v5); + v3 = (clock::outOnIn(in, v1)); + (v4, v5) = (clock::outOnOut((pre v4), (pre v4))); + (v6, v7) = (clock::all(v4, v5)); ok = (boolred<<3, 3, 7>>([v1, (current v2), (current v3), v4, (current v5), (current (current v6)), (current (current (current v7)))])); tel @@ -1165,8 +1170,8 @@ var s2:bool; let assert(((not (e1 and e2)) -> true)); - s1 = (cminus::TWO_STATESe1, e2, init); - s2 = (cminus::TWO_BUTTONSe1, e2, init); + s1 = (cminus::TWO_STATES(e1, e2, init)); + s2 = (cminus::TWO_BUTTONS(e1, e2, init)); ok = (s1 = s2); tel -- end of node cminus::cminus @@ -1235,9 +1240,9 @@ let teta = 3.14; x0 = 0.; y0 = 0.; - x = (x0 + (L * (deconne::sinteta))); - y = (y0 + (L * (deconne::costeta))); - p = (deconne::make_pendx0, y0, x, y); + x = (x0 + (L * (deconne::sin(teta)))); + y = (y0 + (L * (deconne::cos(teta)))); + p = (deconne::make_pend(x0, y0, x, y)); tel -- end of node deconne::deconne @@ -1443,7 +1448,7 @@ node flo::flo( returns ( flo:bool); let - flo = ((flo::SWITCHi1, on1, off1) and (flo::SWITCHi2, on2, off2)); + flo = ((flo::SWITCH(i1, on1, off1)) and (flo::SWITCH(i2, on2, off2))); tel -- end of node flo::flo @@ -1495,7 +1500,7 @@ Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/import1.lus extern node import1::imp(x:int) returns (y:int); node import1::import1(a:int; b:int) returns (c:int); let - c = ((import1::impa) + (import1::impb)); + c = ((import1::imp(a)) + (import1::imp(b))); tel -- end of node import1::import1 @@ -1542,7 +1547,7 @@ tel -- end of node minmax2::minmax node minmax2::minmax2(a:int; b:int) returns (min:int; max:int); let - (min, max) = (minmax2::minmaxa, b); + (min, max) = (minmax2::minmax(a, b)); tel -- end of node minmax2::minmax2 @@ -1568,9 +1573,9 @@ var MAX_ab:int; MAX_minab_c:int; let - (min_ab, MAX_ab) = (minmax3::minmaxa, b); - (min, MAX_minab_c) = (minmax3::minmaxmin_ab, c); - (midle, MAX) = (minmax3::minmaxMAX_ab, MAX_minab_c); + (min_ab, MAX_ab) = (minmax3::minmax(a, b)); + (min, MAX_minab_c) = (minmax3::minmax(min_ab, c)); + (midle, MAX) = (minmax3::minmax(MAX_ab, MAX_minab_c)); tel -- end of node minmax3::minmax3 @@ -1601,11 +1606,11 @@ var MAX__minab_mincd:int; min__MAXab_MAXcd:int; let - (min_ab, MAX_ab) = (minmax4::minmaxa, b); - (min_cd, MAX_cd) = (minmax4::minmaxc, d); - (n1, MAX__minab_mincd) = (minmax4::minmaxmin_ab, min_cd); - (min__MAXab_MAXcd, n4) = (minmax4::minmaxMAX_ab, MAX_cd); - (n2, n3) = (minmax4::minmaxMAX__minab_mincd, min__MAXab_MAXcd); + (min_ab, MAX_ab) = (minmax4::minmax(a, b)); + (min_cd, MAX_cd) = (minmax4::minmax(c, d)); + (n1, MAX__minab_mincd) = (minmax4::minmax(min_ab, min_cd)); + (min__MAXab_MAXcd, n4) = (minmax4::minmax(MAX_ab, MAX_cd)); + (n2, n3) = (minmax4::minmax(MAX__minab_mincd, min__MAXab_MAXcd)); tel -- end of node minmax4::minmax4 @@ -1636,11 +1641,11 @@ var MAX__minab_mincd:int; min__MAXab_MAXcd:int; let - (min_ab, MAX_ab) = (minmax4_bis::minmaxa, b); - (n2, n3) = (minmax4_bis::minmaxMAX__minab_mincd, min__MAXab_MAXcd); - (n1, MAX__minab_mincd) = (minmax4_bis::minmaxmin_ab, min_cd); - (min__MAXab_MAXcd, n4) = (minmax4_bis::minmaxMAX_ab, MAX_cd); - (min_cd, MAX_cd) = (minmax4_bis::minmaxc, d); + (min_ab, MAX_ab) = (minmax4_bis::minmax(a, b)); + (n2, n3) = (minmax4_bis::minmax(MAX__minab_mincd, min__MAXab_MAXcd)); + (n1, MAX__minab_mincd) = (minmax4_bis::minmax(min_ab, min_cd)); + (min__MAXab_MAXcd, n4) = (minmax4_bis::minmax(MAX_ab, MAX_cd)); + (min_cd, MAX_cd) = (minmax4_bis::minmax(c, d)); tel -- end of node minmax4_bis::minmax4_bis @@ -1667,11 +1672,11 @@ var MAX__minab_mincd:int; min__MAXab_MAXcd:int; let - (min_ab, MAX_ab) = (minmax5::minmaxa, b); - (min_cd, MAX_cd) = (minmax5::minmaxc, d); - (n1, MAX__minab_mincd) = (minmax5::minmaxmin_ab, min_cd); - (min__MAXab_MAXcd, n4) = (minmax5::minmaxMAX_ab, MAX_cd); - (n2, n3) = (minmax5::minmaxMAX__minab_mincd, min__MAXab_MAXcd); + (min_ab, MAX_ab) = (minmax5::minmax(a, b)); + (min_cd, MAX_cd) = (minmax5::minmax(c, d)); + (n1, MAX__minab_mincd) = (minmax5::minmax(min_ab, min_cd)); + (min__MAXab_MAXcd, n4) = (minmax5::minmax(MAX_ab, MAX_cd)); + (n2, n3) = (minmax5::minmax(MAX__minab_mincd, min__MAXab_MAXcd)); tel -- end of node minmax5::minmax5 @@ -1704,11 +1709,11 @@ var MAX__minab_mincd:int; min__MAXab_MAXcd:int; let - (min__MAXab_MAXcd, n4) = (minmax5_random::minmaxMAX_ab, MAX_cd); - (min_cd, MAX_cd) = (minmax5_random::minmaxc, d); - (n1, MAX__minab_mincd) = (minmax5_random::minmaxmin_ab, min_cd); - (n2, n3) = (minmax5_random::minmaxMAX__minab_mincd, min__MAXab_MAXcd); - (min_ab, MAX_ab) = (minmax5_random::minmaxa, b); + (min__MAXab_MAXcd, n4) = (minmax5_random::minmax(MAX_ab, MAX_cd)); + (min_cd, MAX_cd) = (minmax5_random::minmax(c, d)); + (n1, MAX__minab_mincd) = (minmax5_random::minmax(min_ab, min_cd)); + (n2, n3) = (minmax5_random::minmax(MAX__minab_mincd, min__MAXab_MAXcd)); + (min_ab, MAX_ab) = (minmax5_random::minmax(a, b)); tel -- end of node minmax5_random::minmax5_random @@ -1751,16 +1756,16 @@ var M3:int; M5:int; let - (min_ab, MAX_ab) = (minmax6::minmaxa, b); - (min_cd, MAX_cd) = (minmax6::minmaxc, d); - (min_ef, MAX_ef) = (minmax6::minmaxe, f); - (m1, M1) = (minmax6::minmaxmin_cd, min_ef); - (m2, M2) = (minmax6::minmaxMAX_ab, MAX_cd); - (n1, M3) = (minmax6::minmaxmin_ab, m1); - (m4, n6) = (minmax6::minmaxM2, MAX_ef); - (m5, M5) = (minmax6::minmaxM1, m2); - (n2, n3) = (minmax6::minmaxM3, m5); - (n4, n5) = (minmax6::minmaxM5, m4); + (min_ab, MAX_ab) = (minmax6::minmax(a, b)); + (min_cd, MAX_cd) = (minmax6::minmax(c, d)); + (min_ef, MAX_ef) = (minmax6::minmax(e, f)); + (m1, M1) = (minmax6::minmax(min_cd, min_ef)); + (m2, M2) = (minmax6::minmax(MAX_ab, MAX_cd)); + (n1, M3) = (minmax6::minmax(min_ab, m1)); + (m4, n6) = (minmax6::minmax(M2, MAX_ef)); + (m5, M5) = (minmax6::minmax(M1, m2)); + (n2, n3) = (minmax6::minmax(M3, m5)); + (n4, n5) = (minmax6::minmax(M5, m4)); tel -- end of node minmax6::minmax6 @@ -1830,9 +1835,9 @@ var counting:bool; more_than_one_click:bool; let - single_click = ((mouse::edge(not counting)) and (not (false -> (pre + single_click = ((mouse::edge((not counting))) and (not (false -> (pre more_than_one_click)))); - double_click = ((mouse::edge(not counting)) and (false -> (pre + double_click = ((mouse::edge((not counting))) and (false -> (pre more_than_one_click))); more_than_one_click = (click and (false -> (pre counting))); counting = (clock_decount > 0); @@ -1892,9 +1897,9 @@ var counting:bool; more_than_one_click:bool; let - single = ((mouse2::edge(not counting)) and (not (false -> (pre + single = ((mouse2::edge((not counting))) and (not (false -> (pre more_than_one_click)))); - double = ((mouse2::edge(not counting)) and (false -> (pre + double = ((mouse2::edge((not counting))) and (false -> (pre more_than_one_click))); more_than_one_click = (click and (false -> (pre counting))); counting = (clock_decount > 0); @@ -1950,7 +1955,7 @@ var u:int when h; let h = ((true when c) -> (((x + y) when c) < z)); - u = ((z when h) -> (multiclock::moyenne(z when h), (pre u))); + u = ((z when h) -> (multiclock::moyenne((z when h), (pre u)))); s = (current u); tel -- end of node multiclock::multiclock @@ -1972,7 +1977,7 @@ node nc1::nc1(nc1e1:bool; nc1e2:bool) returns (nc1s:bool); var nc1b1:bool; let - nc1b1 = (nc1::n1nc1e1, nc1e2); + nc1b1 = (nc1::n1(nc1e1, nc1e2)); nc1s = (nc1b1 or nc1e1); tel -- end of node nc1::nc1 @@ -1999,25 +2004,25 @@ var n3i1:int; n3i2:int; let - (n3i1, n3i2) = (nc10::n4n3e1, n3e1, n3e2, n3e2); + (n3i1, n3i2) = (nc10::n4(n3e1, n3e1, n3e2, n3e2)); n3s = (n3i1 + n3i2); tel -- end of node nc10::n3 node nc10::n2(n2e1:int; n2e2:int) returns (n2s:int); let - n2s = ((nc10::n3n2e1, n2e1) + (nc10::n3n2e2, n2e2)); + n2s = ((nc10::n3(n2e1, n2e1)) + (nc10::n3(n2e2, n2e2))); tel -- end of node nc10::n2 node nc10::n1(n1e1:int) returns (n1s:int); let - n1s = ((nc10::n2n1e1, n1e1) + (nc10::n2(2 * n1e1), (2 * n1e1))); + n1s = ((nc10::n2(n1e1, n1e1)) + (nc10::n2((2 * n1e1), (2 * n1e1)))); tel -- end of node nc10::n1 node nc10::nc10(nc10e1:int) returns (ok:bool); var nc10b1:int; let - nc10b1 = (nc10::n1nc10e1); + nc10b1 = (nc10::n1(nc10e1)); ok = (nc10b1 = (nc10e1 * 24)); tel -- end of node nc10::nc10 @@ -2039,7 +2044,7 @@ node nc2::nc2(nc2e1:bool; nc2e2:bool) returns (nc2s:bool); var nc2b1:bool; let - nc2b1 = (nc2::n1(nc2e1 or nc2e2), (nc2e1 and nc2e2)); + nc2b1 = (nc2::n1((nc2e1 or nc2e2), (nc2e1 and nc2e2))); nc2s = (nc2b1 and (not nc2b1)); tel -- end of node nc2::nc2 @@ -2062,9 +2067,9 @@ var nc3b1:bool; nc3b2:bool; let - nc3b1 = (nc3::n1(nc3e1 or nc3e2), (nc3e1 and nc3e2)); + nc3b1 = (nc3::n1((nc3e1 or nc3e2), (nc3e1 and nc3e2))); nc3s = (nc3b1 and (not nc3b2)); - nc3b2 = (nc3::n1(nc3e1 and nc3e2), (nc3e1 or nc3e2)); + nc3b2 = (nc3::n1((nc3e1 and nc3e2), (nc3e1 or nc3e2))); tel -- end of node nc3::nc3 @@ -2096,9 +2101,9 @@ var nc4b1:bool; nc4b2:bool; let - nc4b1 = (nc4::n1(nc4e1 or nc4e2), (nc4e1 and nc4e2)); + nc4b1 = (nc4::n1((nc4e1 or nc4e2), (nc4e1 and nc4e2))); nc4s = (nc4b1 and (not nc4b2)); - nc4b2 = (nc4::n2(nc4e1 and nc4e2), (nc4e1 or nc4e2)); + nc4b2 = (nc4::n2((nc4e1 and nc4e2), (nc4e1 or nc4e2))); tel -- end of node nc4::nc4 @@ -2112,24 +2117,24 @@ tel -- end of node nc5::n4 node nc5::n3(n3e1:int) returns (n3s:int); let - n3s = (nc5::n4n3e1); + n3s = (nc5::n4(n3e1)); tel -- end of node nc5::n3 node nc5::n2(n2e1:int) returns (n2s:int); let - n2s = (nc5::n3n2e1); + n2s = (nc5::n3(n2e1)); tel -- end of node nc5::n2 node nc5::n1(n1e1:int) returns (n1s:int); let - n1s = (nc5::n2n1e1); + n1s = (nc5::n2(n1e1)); tel -- end of node nc5::n1 node nc5::nc5(nc5e1:int) returns (ok:bool); var nc5b1:int; let - nc5b1 = (nc5::n1nc5e1); + nc5b1 = (nc5::n1(nc5e1)); ok = (nc5b1 = (nc5e1 + 1)); tel -- end of node nc5::nc5 @@ -2144,24 +2149,24 @@ tel -- end of node nc6::n4 node nc6::n3(n3e1:int) returns (n3s:int); let - n3s = (nc6::n4(n3e1 + 1)); + n3s = (nc6::n4((n3e1 + 1))); tel -- end of node nc6::n3 node nc6::n2(n2e1:int) returns (n2s:int); let - n2s = (nc6::n3(n2e1 + 1)); + n2s = (nc6::n3((n2e1 + 1))); tel -- end of node nc6::n2 node nc6::n1(n1e1:int) returns (n1s:int); let - n1s = (nc6::n2(n1e1 + 1)); + n1s = (nc6::n2((n1e1 + 1))); tel -- end of node nc6::n1 node nc6::nc6(nc6e1:int) returns (ok:bool); var nc6b1:int; let - nc6b1 = (nc6::n1nc6e1); + nc6b1 = (nc6::n1(nc6e1)); ok = (nc6b1 = (nc6e1 + 4)); tel -- end of node nc6::nc6 @@ -2184,24 +2189,24 @@ tel -- end of node nc7::n4 node nc7::n3(n3e1:int) returns (n3s:int); let - n3s = (nc7::n4n3e1, n3e1, n3e1, n3e1, n3e1); + n3s = (nc7::n4(n3e1, n3e1, n3e1, n3e1, n3e1)); tel -- end of node nc7::n3 node nc7::n2(n2e1:int) returns (n2s:int); let - n2s = (nc7::n3n2e1); + n2s = (nc7::n3(n2e1)); tel -- end of node nc7::n2 node nc7::n1(n1e1:int) returns (n1s:int); let - n1s = (nc7::n2n1e1); + n1s = (nc7::n2(n1e1)); tel -- end of node nc7::n1 node nc7::nc7(nc7e1:int) returns (ok:bool); var nc7b1:int; let - nc7b1 = (nc7::n1nc7e1); + nc7b1 = (nc7::n1(nc7e1)); ok = (nc7b1 = (nc7e1 * 5)); tel -- end of node nc7::nc7 @@ -2216,24 +2221,25 @@ tel -- end of node nc8::n4 node nc8::n3(n3e1:int; n3e2:int) returns (n3s:int); let - n3s = ((nc8::n4n3e1, n3e1, n3e1, n3e1) + (nc8::n4n3e2, n3e2, n3e2, n3e2)); + n3s = ((nc8::n4(n3e1, n3e1, n3e1, n3e1)) + (nc8::n4(n3e2, n3e2, n3e2, + n3e2))); tel -- end of node nc8::n3 node nc8::n2(n2e1:int; n2e2:int) returns (n2s:int); let - n2s = ((nc8::n3n2e1, n2e1) + (nc8::n3n2e2, n2e2)); + n2s = ((nc8::n3(n2e1, n2e1)) + (nc8::n3(n2e2, n2e2))); tel -- end of node nc8::n2 node nc8::n1(n1e1:int) returns (n1s:int); let - n1s = ((nc8::n2n1e1, n1e1) + (nc8::n2n1e1, n1e1)); + n1s = ((nc8::n2(n1e1, n1e1)) + (nc8::n2(n1e1, n1e1))); tel -- end of node nc8::n1 node nc8::nc8(nc8e1:int) returns (ok:bool); var nc8b1:int; let - nc8b1 = (nc8::n1nc8e1); + nc8b1 = (nc8::n1(nc8e1)); ok = (nc8b1 = (nc8e1 * 32)); tel -- end of node nc8::nc8 @@ -2260,25 +2266,25 @@ var n3i1:int; n3i2:int; let - (n3i1, n3i2) = (nc9::n4n3e1, n3e1, n3e2, n3e2); + (n3i1, n3i2) = (nc9::n4(n3e1, n3e1, n3e2, n3e2)); n3s = (n3i1 + n3i2); tel -- end of node nc9::n3 node nc9::n2(n2e1:int; n2e2:int) returns (n2s:int); let - n2s = ((nc9::n3n2e1, n2e1) + (nc9::n3n2e2, n2e2)); + n2s = ((nc9::n3(n2e1, n2e1)) + (nc9::n3(n2e2, n2e2))); tel -- end of node nc9::n2 node nc9::n1(n1e1:int) returns (n1s:int); let - n1s = ((nc9::n2n1e1, n1e1) + (nc9::n2n1e1, n1e1)); + n1s = ((nc9::n2(n1e1, n1e1)) + (nc9::n2(n1e1, n1e1))); tel -- end of node nc9::n1 node nc9::nc9(nc9e1:int) returns (ok:bool); var nc9b1:int; let - nc9b1 = (nc9::n1nc9e1); + nc9b1 = (nc9::n1(nc9e1)); ok = (nc9b1 = (nc9e1 * 16)); tel -- end of node nc9::nc9 @@ -2293,27 +2299,27 @@ tel -- end of node node_caller1::ex5 node node_caller1::ex4(a:int) returns (b:int); let - b = ((node_caller1::ex5a) + 4); + b = ((node_caller1::ex5(a)) + 4); tel -- end of node node_caller1::ex4 node node_caller1::ex3(a:int) returns (b:int); let - b = ((node_caller1::ex4a) + 3); + b = ((node_caller1::ex4(a)) + 3); tel -- end of node node_caller1::ex3 node node_caller1::ex2(a:int) returns (b:int); let - b = ((node_caller1::ex3a) + 2); + b = ((node_caller1::ex3(a)) + 2); tel -- end of node node_caller1::ex2 node node_caller1::ex1(a:int) returns (b:int); let - b = ((node_caller1::ex2a) + 1); + b = ((node_caller1::ex2(a)) + 1); tel -- end of node node_caller1::ex1 node node_caller1::node_caller1(a:int) returns (b:int); let - b = (node_caller1::ex1a); + b = (node_caller1::ex1(a)); tel -- end of node node_caller1::node_caller1 @@ -2617,8 +2623,8 @@ tel -- end of node poussoir::ONE_BUTTON node poussoir::poussoir(e3:bool; init:bool) returns (s3:bool; s4:bool); let - s3 = (poussoir::TWO_STATESe3, e3, init); - s4 = (poussoir::ONE_BUTTONe3, init); + s3 = (poussoir::TWO_STATES(e3, e3, init)); + s4 = (poussoir::ONE_BUTTON(e3, init)); tel -- end of node poussoir::poussoir @@ -2703,8 +2709,8 @@ var lap:bool; internal_time:int; let - (internal_time, running) = (stopwatch::simple_stopwatchtime_unit, reset, - start_stop); + (internal_time, running) = (stopwatch::simple_stopwatch(time_unit, reset, + start_stop)); frozen = (false -> ( if lap then (not (pre frozen)) else (pre frozen))); start_stop = b1; reset = (b2 and (true -> (not (pre (running or frozen))))); @@ -2747,7 +2753,7 @@ tel -- end of node trivial::edge node trivial::trivial(x:bool) returns (y:bool); let - y = (trivial::edgex); + y = (trivial::edge(x)); tel -- end of node trivial::trivial @@ -2761,7 +2767,7 @@ tel -- end of node trivial2::edge node trivial2::trivial2(x:bool) returns (y:bool); let - y = (trivial2::edge(trivial2::edgex)); + y = (trivial2::edge((trivial2::edge(x)))); tel -- end of node trivial2::trivial2 @@ -2818,62 +2824,62 @@ tel -- end of node consensus::consensus_1 node consensus::consensus_2(T:A_bool_2) returns (a:bool); let - a = ((T[0] and (consensus::consensus_1(T[1..1])))); + a = ((T[0] and (consensus::consensus_1((T[1..1]))))); tel -- end of node consensus::consensus_2 node consensus::consensus_3(T:A_bool_3) returns (a:bool); let - a = ((T[0] and (consensus::consensus_2(T[1..2])))); + a = ((T[0] and (consensus::consensus_2((T[1..2]))))); tel -- end of node consensus::consensus_3 node consensus::consensus_4(T:A_bool_4) returns (a:bool); let - a = ((T[0] and (consensus::consensus_3(T[1..3])))); + a = ((T[0] and (consensus::consensus_3((T[1..3]))))); tel -- end of node consensus::consensus_4 node consensus::main(T:A_bool_4) returns (c:bool); let - c = (consensus::consensus_4T); + c = (consensus::consensus_4(T)); tel -- end of node consensus::main node consensus::consensus_5(T:A_bool_5) returns (a:bool); let - a = ((T[0] and (consensus::consensus_4(T[1..4])))); + a = ((T[0] and (consensus::consensus_4((T[1..4]))))); tel -- end of node consensus::consensus_5 node consensus::consensus_6(T:A_bool_6) returns (a:bool); let - a = ((T[0] and (consensus::consensus_5(T[1..5])))); + a = ((T[0] and (consensus::consensus_5((T[1..5]))))); tel -- end of node consensus::consensus_6 node consensus::consensus_7(T:A_bool_7) returns (a:bool); let - a = ((T[0] and (consensus::consensus_6(T[1..6])))); + a = ((T[0] and (consensus::consensus_6((T[1..6]))))); tel -- end of node consensus::consensus_7 node consensus::consensus_8(T:A_bool_8) returns (a:bool); let - a = ((T[0] and (consensus::consensus_7(T[1..7])))); + a = ((T[0] and (consensus::consensus_7((T[1..7]))))); tel -- end of node consensus::consensus_8 node consensus::consensus_9(T:A_bool_9) returns (a:bool); let - a = ((T[0] and (consensus::consensus_8(T[1..8])))); + a = ((T[0] and (consensus::consensus_8((T[1..8]))))); tel -- end of node consensus::consensus_9 node consensus::consensus_10(T:A_bool_10) returns (a:bool); let - a = ((T[0] and (consensus::consensus_9(T[1..9])))); + a = ((T[0] and (consensus::consensus_9((T[1..9]))))); tel -- end of node consensus::consensus_10 node consensus::main2(T:A_bool_10) returns (a:bool); let - a = (consensus::consensus_10T); + a = (consensus::consensus_10(T)); tel -- end of node consensus::main2 node consensus::c8(T:A_bool_8) returns (a:bool); let - a = (consensus::consensus_8T); + a = (consensus::consensus_8(T)); tel -- end of node consensus::c8 -- automatically defined aliases: @@ -2943,8 +2949,8 @@ tel -- end of node heater_control::max2 node heater_control::Median(a:real; b:real; c:real) returns (z:real); let - z = ((((a + b) + c) - (heater_control::min2a, (heater_control::min2b, c))) - - (heater_control::max2a, (heater_control::max2b, c))); + z = ((((a + b) + c) - (heater_control::min2(a, (heater_control::min2(b, + c))))) - (heater_control::max2(a, (heater_control::max2(b, c))))); tel -- end of node heater_control::Median node heater_control::abs(v:real) returns (a:real); @@ -3005,15 +3011,16 @@ var V23:bool; Tguess:real; let - V12 = ((heater_control::abs(T1 - T2)) < DELTA); - V13 = ((heater_control::abs(T1 - T3)) < DELTA); - V23 = ((heater_control::abs(T2 - T3)) < DELTA); - Tguess = ( if (heater_control::noneoftreeV12, V13, V23) then FAILURE else - ( if (heater_control::oneoftreeV12, V13, V23) then - (heater_control::MedianT1, T2, T3) else ( if (heater_control::alloftreeV12, - V13, V23) then (heater_control::MedianT1, T2, T3) else ( if V12 then - (heater_control::AverageT1, T2) else ( if V13 then - (heater_control::AverageT1, T3) else (heater_control::AverageT2, T3)))))); + V12 = ((heater_control::abs((T1 - T2))) < DELTA); + V13 = ((heater_control::abs((T1 - T3))) < DELTA); + V23 = ((heater_control::abs((T2 - T3))) < DELTA); + Tguess = ( if (heater_control::noneoftree(V12, V13, V23)) then FAILURE + else ( if (heater_control::oneoftree(V12, V13, V23)) then + (heater_control::Median(T1, T2, T3)) else ( if + (heater_control::alloftree(V12, V13, V23)) then (heater_control::Median(T1, + T2, T3)) else ( if V12 then (heater_control::Average(T1, T2)) else ( if V13 + then (heater_control::Average(T1, T3)) else (heater_control::Average(T2, + T3))))))); Heat_on = (true -> ( if (Tguess = FAILURE) then false else ( if (Tguess < TMIN) then true else ( if (Tguess > TMAX) then false else (pre Heat_on))))); @@ -3081,16 +3088,16 @@ returns ( out2:_inter::selType); let out2 = selType{i=0;b=true;r=.0}; - out.i = (pint::fby1out2.i, in.i); - out.b = (pbool::fby1out2.b, in.b); - out.r = (preal::fby1out2.r, in.r); + out.i = (pint::fby1(out2.i, in.i)); + out.b = (pbool::fby1(out2.b, in.b)); + out.r = (preal::fby1(out2.r, in.r)); tel -- end of node inter::preced node mainPack::preced(in:_inter::selType) returns (out:_inter::selType); var out2:_inter::selType; let - (out, out2) = (inter::precedin); + (out, out2) = (inter::preced(in)); tel -- end of node mainPack::preced const inter::n = -4; @@ -3180,7 +3187,7 @@ node onlyroll::threeoffour( returns ( r:bool); let - r = (onlyroll::oneoffour(not f1), (not f2), (not f3), (not f4)); + r = (onlyroll::oneoffour((not f1), (not f2), (not f3), (not f4))); tel -- end of node onlyroll::threeoffour node onlyroll::max2(one:real; two:real) returns (m:real); @@ -3197,7 +3204,8 @@ node onlyroll::max4( returns ( m:real); let - m = (onlyroll::max2(onlyroll::max2one, two), (onlyroll::max2three, four)); + m = (onlyroll::max2((onlyroll::max2(one, two)), (onlyroll::max2(three, + four)))); tel -- end of node onlyroll::max4 node onlyroll::min2(one:real; two:real) returns (m:real); @@ -3214,7 +3222,8 @@ node onlyroll::min4( returns ( m:real); let - m = (onlyroll::min2(onlyroll::min2one, two), (onlyroll::min2three, four)); + m = (onlyroll::min2((onlyroll::min2(one, two)), (onlyroll::min2(three, + four)))); tel -- end of node onlyroll::min4 @@ -3226,14 +3235,14 @@ node onlyroll::OlympicAverage( returns ( m:real); let - m = ((((((one + two) + three) + four) - (onlyroll::max4one, two, three, - four)) - (onlyroll::min4one, two, three, four)) / 2.0); + m = ((((((one + two) + three) + four) - (onlyroll::max4(one, two, three, + four))) - (onlyroll::min4(one, two, three, four))) / 2.0); tel -- end of node onlyroll::OlympicAverage node onlyroll::MedianValue3(a:real; b:real; c:real) returns (z:real); let - z = ((((a + b) + c) - (onlyroll::min2a, (onlyroll::min2b, c))) - - (onlyroll::max2a, (onlyroll::max2b, c))); + z = ((((a + b) + c) - (onlyroll::min2(a, (onlyroll::min2(b, c))))) - + (onlyroll::max2(a, (onlyroll::max2(b, c))))); tel -- end of node onlyroll::MedianValue3 @@ -3249,10 +3258,10 @@ node onlyroll::Median( returns ( r:real); let - r = ( if f1 then (onlyroll::MedianValue3x2, x3, x4) else ( if f2 then - (onlyroll::MedianValue3x1, x3, x4) else ( if f3 then - (onlyroll::MedianValue3x1, x2, x4) else (onlyroll::MedianValue3x1, x2, - x3)))); + r = ( if f1 then (onlyroll::MedianValue3(x2, x3, x4)) else ( if f2 then + (onlyroll::MedianValue3(x1, x3, x4)) else ( if f3 then + (onlyroll::MedianValue3(x1, x2, x4)) else (onlyroll::MedianValue3(x1, x2, + x3))))); tel -- end of node onlyroll::Median node onlyroll::Average2(a:real; b:real) returns (z:real); @@ -3273,14 +3282,14 @@ node onlyroll::Average( returns ( r:real); let - r = ( if f1 then ( if f2 then (onlyroll::Average2x3, x4) else ( if f3 then - (onlyroll::Average2x2, x4) else (onlyroll::Average2x3, x2))) else ( if f2 - then ( if f1 then (onlyroll::Average2x3, x4) else ( if f3 then - (onlyroll::Average2x1, x4) else (onlyroll::Average2x3, x1))) else ( if f3 - then ( if f2 then (onlyroll::Average2x1, x4) else ( if f4 then - (onlyroll::Average2x2, x1) else (onlyroll::Average2x4, x2))) else ( if f2 - then (onlyroll::Average2x3, x1) else ( if f3 then (onlyroll::Average2x2, - x1) else (onlyroll::Average2x3, x2)))))); + r = ( if f1 then ( if f2 then (onlyroll::Average2(x3, x4)) else ( if f3 + then (onlyroll::Average2(x2, x4)) else (onlyroll::Average2(x3, x2)))) else + ( if f2 then ( if f1 then (onlyroll::Average2(x3, x4)) else ( if f3 then + (onlyroll::Average2(x1, x4)) else (onlyroll::Average2(x3, x1)))) else ( if + f3 then ( if f2 then (onlyroll::Average2(x1, x4)) else ( if f4 then + (onlyroll::Average2(x2, x1)) else (onlyroll::Average2(x4, x2)))) else ( if + f2 then (onlyroll::Average2(x3, x1)) else ( if f3 then + (onlyroll::Average2(x2, x1)) else (onlyroll::Average2(x3, x2))))))); tel -- end of node onlyroll::Average @@ -3304,15 +3313,15 @@ var let cpt_roll = (0 -> ( if three_roll then SAFE_COUNTER_TIME else ( if ((pre cpt_roll) > 0) then ((pre cpt_roll) - 1) else 0))); - zero_roll = (onlyroll::noneoff1, f2, f3, f4); - one_roll = (onlyroll::oneoffourf1, f2, f3, f4); - two_roll = (onlyroll::twooffourf1, f2, f3, f4); - three_roll = (onlyroll::threeoffourf1, f2, f3, f4); - x = ( if (zero_roll and (cpt_roll = 0)) then (onlyroll::OlympicAveragex1, - x2, x3, x4) else ( if (one_roll and (cpt_roll = 0)) then - (onlyroll::Medianx1, x2, x3, x4, f1, f2, f3, f4) else ( if (two_roll and - (cpt_roll = 0)) then (onlyroll::Averagex1, x2, x3, x4, f1, f2, f3, f4) else - FAIL_SAFE_ROLL_VALUE))); + zero_roll = (onlyroll::noneof(f1, f2, f3, f4)); + one_roll = (onlyroll::oneoffour(f1, f2, f3, f4)); + two_roll = (onlyroll::twooffour(f1, f2, f3, f4)); + three_roll = (onlyroll::threeoffour(f1, f2, f3, f4)); + x = ( if (zero_roll and (cpt_roll = 0)) then (onlyroll::OlympicAverage(x1, + x2, x3, x4)) else ( if (one_roll and (cpt_roll = 0)) then + (onlyroll::Median(x1, x2, x3, x4, f1, f2, f3, f4)) else ( if (two_roll and + (cpt_roll = 0)) then (onlyroll::Average(x1, x2, x3, x4, f1, f2, f3, f4)) + else FAIL_SAFE_ROLL_VALUE))); tel -- end of node onlyroll::Calculate node onlyroll::abs(v:real) returns (a:real); @@ -3337,8 +3346,8 @@ returns ( local_value:real; inline_monitor_failed:bool); let - inline_monitor_failed = ((onlyroll::maintainTIME_ROLL, ((onlyroll::abs(xa - - xb)) > DELTA_ROLL)) or disc); + inline_monitor_failed = ((onlyroll::maintain(TIME_ROLL, + ((onlyroll::abs((xa - xb))) > DELTA_ROLL))) or disc); local_value = xa; tel -- end of node onlyroll::Monitor @@ -3363,14 +3372,14 @@ var two:bool; three:bool; let - one = ((onlyroll::abs(xi - pxother1)) > CROSS_CH_TOL_ROLL); - two = ((onlyroll::abs(xi - pxother2)) > CROSS_CH_TOL_ROLL); - three = ((onlyroll::abs(xi - pxother3)) > CROSS_CH_TOL_ROLL); - r = (onlyroll::maintainTIME_CROSS_ROLL, ( if pfother1 then ( if pfother2 + one = ((onlyroll::abs((xi - pxother1))) > CROSS_CH_TOL_ROLL); + two = ((onlyroll::abs((xi - pxother2))) > CROSS_CH_TOL_ROLL); + three = ((onlyroll::abs((xi - pxother3))) > CROSS_CH_TOL_ROLL); + r = (onlyroll::maintain(TIME_CROSS_ROLL, ( if pfother1 then ( if pfother2 then ( if pfother3 then false else three) else ( if pfother3 then two else (two and three))) else ( if pfother2 then ( if pfother3 then one else (one and three)) else ( if pfother3 then (one and two) else ((one and two) and - three))))); + three)))))); tel -- end of node onlyroll::values_nok @@ -3416,18 +3425,18 @@ let reset = (ongroundreset or (inairreset and (not cross_failure))); foreign_failure = ((pfother1 or pfother2) or pfother3); NLfaults = (choffi or local_failure); - from1to2 = (will_latch and (not (onlyroll::InNominalRangexi))); + from1to2 = (will_latch and (not (onlyroll::InNominalRange(xi)))); will_latch = cross_failure; - from1to3 = ((a and will_latch) and (onlyroll::InNominalRangexi)); + from1to3 = ((a and will_latch) and (onlyroll::InNominalRange(xi))); from2to3 = (a and (((pre will_latch) and foreign_failure) or local_failure)); from3to1 = ongroundreset; from2to1 = reset; r = (false -> (((((pre state) = 1) and cross_failure) and - (onlyroll::InNominalRangexi)) or ((((pre state) = 2) and ((pre + (onlyroll::InNominalRange(xi))) or ((((pre state) = 2) and ((pre cross_failure) and foreign_failure)) or local_failure))); - cross_failure = (onlyroll::values_nokpfother1, pfother2, pfother3, xi, - pxother1, pxother2, pxother3); + cross_failure = (onlyroll::values_nok(pfother1, pfother2, pfother3, xi, + pxother1, pxother2, pxother3)); debug_cross_failure = cross_failure; tel -- end of node onlyroll::FailDetect @@ -3456,10 +3465,10 @@ returns ( var local_failure:bool; let - (xi, local_failure) = (onlyroll::Monitorxai, xbi, disci); + (xi, local_failure) = (onlyroll::Monitor(xai, xbi, disci)); (fi, debug_cross_failure, debug_st, aski) = - (onlyroll::FailDetectlocal_failure, xi, ongroundreset, inairreset, choffi, - pxother1, pxother2, pxother3, pfother1, pfother2, pfother3, allowedi); + (onlyroll::FailDetect(local_failure, xi, ongroundreset, inairreset, choffi, + pxother1, pxother2, pxother3, pfother1, pfother2, pfother3, allowedi)); debug_localfailure = local_failure; tel -- end of node onlyroll::Channel @@ -3552,24 +3561,24 @@ let debug_ch_failed3 = f3; debug_ch_failed4 = f4; (x1, f1, ask1, debug_localfailure1, debug_cross_failure1, debug_st1) = - (onlyroll::Channelongroundreset, inairreset, choff1, xa1, xb1, disc1, (0.0 + (onlyroll::Channel(ongroundreset, inairreset, choff1, xa1, xb1, disc1, (0.0 -> (pre x2)), (0.0 -> (pre x3)), (0.0 -> (pre x4)), (false -> (pre f2)), - (false -> (pre f3)), (false -> (pre f4)), allowed1); + (false -> (pre f3)), (false -> (pre f4)), allowed1)); (x2, f2, ask2, debug_localfailure2, debug_cross_failure2, debug_st2) = - (onlyroll::Channelongroundreset, inairreset, choff2, xa2, xb2, disc2, (0.0 + (onlyroll::Channel(ongroundreset, inairreset, choff2, xa2, xb2, disc2, (0.0 -> (pre x1)), (0.0 -> (pre x3)), (0.0 -> (pre x4)), (false -> (pre f1)), - (false -> (pre f3)), (false -> (pre f4)), allowed2); + (false -> (pre f3)), (false -> (pre f4)), allowed2)); (x3, f3, ask3, debug_localfailure3, debug_cross_failure3, debug_st3) = - (onlyroll::Channelongroundreset, inairreset, choff3, xa3, xb3, disc3, (0.0 + (onlyroll::Channel(ongroundreset, inairreset, choff3, xa3, xb3, disc3, (0.0 -> (pre x1)), (0.0 -> (pre x2)), (0.0 -> (pre x4)), (false -> (pre f1)), - (false -> (pre f2)), (false -> (pre f4)), allowed3); + (false -> (pre f2)), (false -> (pre f4)), allowed3)); (x4, f4, ask4, debug_localfailure4, debug_cross_failure4, debug_st4) = - (onlyroll::Channelongroundreset, inairreset, choff4, xa4, xb4, disc4, (0.0 + (onlyroll::Channel(ongroundreset, inairreset, choff4, xa4, xb4, disc4, (0.0 -> (pre x1)), (0.0 -> (pre x2)), (0.0 -> (pre x3)), (false -> (pre f1)), - (false -> (pre f2)), (false -> (pre f3)), allowed4); - (allowed1, allowed2, allowed3, allowed4) = (onlyroll::Allocatorask1, ask2, - ask3, ask4, ongroundreset); - x = (onlyroll::Calculatex1, x2, x3, x4, f1, f2, f3, f4); + (false -> (pre f2)), (false -> (pre f3)), allowed4)); + (allowed1, allowed2, allowed3, allowed4) = (onlyroll::Allocator(ask1, + ask2, ask3, ask4, ongroundreset)); + x = (onlyroll::Calculate(x1, x2, x3, x4, f1, f2, f3, f4)); tel -- end of node onlyroll::onlyroll node onlyroll::InHardoverRange(r:real) returns (i:bool); @@ -3608,16 +3617,16 @@ returns ( out2:_inter::selType); let out2 = selType{i=0;b=true;r=.0}; - out.i = (pint::fby1out2.i, in.i); - out.b = (pbool::fby1out2.b, in.b); - out.r = (preal::fby1out2.r, in.r); + out.i = (pint::fby1(out2.i, in.i)); + out.b = (pbool::fby1(out2.b, in.b)); + out.r = (preal::fby1(out2.r, in.r)); tel -- end of node inter::preced node mainPack::preced(in:_inter::selType) returns (out:_inter::selType); var out2:_inter::selType; let - (out, out2) = (inter::precedin); + (out, out2) = (inter::preced(in)); tel -- end of node mainPack::preced const inter::n = -4; @@ -3660,16 +3669,16 @@ returns ( out2:_inter::selType); let out2 = selType{i=0;b=true;r=0.0}; - out.i = (pint::fby1out2.i, in.i); - out.b = (pbool::fby1out2.b, in.b); - out.r = (preal::fby1out2.r, in.r); + out.i = (pint::fby1(out2.i, in.i)); + out.b = (pbool::fby1(out2.b, in.b)); + out.r = (preal::fby1(out2.r, in.r)); tel -- end of node inter::preced node mainPack::preced(in:_inter::selType) returns (out:_inter::selType); var out2:_inter::selType; let - (out, out2) = (inter::precedin); + (out, out2) = (inter::preced(in)); tel -- end of node mainPack::preced type _inter::toto = enum {inter::X, inter::Y}; @@ -3722,27 +3731,27 @@ tel -- end of node t0::min node t0::min_n_2(T:A_int_2) returns (mn:int); let - mn = ((t0::minT[0], (t0::min_n_1(T[1..1])))); + mn = ((t0::min(T[0], (t0::min_n_1((T[1..1])))))); tel -- end of node t0::min_n_2 node t0::min_n_3(T:A_int_3) returns (mn:int); let - mn = ((t0::minT[0], (t0::min_n_2(T[1..2])))); + mn = ((t0::min(T[0], (t0::min_n_2((T[1..2])))))); tel -- end of node t0::min_n_3 node t0::min_n_4(T:A_int_4) returns (mn:int); let - mn = ((t0::minT[0], (t0::min_n_3(T[1..3])))); + mn = ((t0::min(T[0], (t0::min_n_3((T[1..3])))))); tel -- end of node t0::min_n_4 node t0::min_4(T:A_int_4) returns (mn:int); let - mn = (t0::min_n_4T); + mn = (t0::min_n_4(T)); tel -- end of node t0::min_4 node t0::t0(T:A_int_4) returns (mn:int); let - mn = (t0::min_4T); + mn = (t0::min_4(T)); tel -- end of node t0::t0 extern function t0::max(x:int; y:int) returns (mx:int); @@ -3791,12 +3800,12 @@ tel Opening file /home/jahier/lus2lic/src/test/should_work/call/bad_call03.lus function bad_call03::toto(i1:A_o_3; i2:A_o_3) returns (o:A_o_3); let - o = (Lustre::map<<Lustre::+, 3>>i1, i2); + o = (Lustre::map<<Lustre::+, 3>>(i1, i2)); tel -- end of node bad_call03::toto node bad_call03::titi(c:A_real_3; d:A_real_3) returns (y:A_real_3); let - y = (bad_call03::totoc, d); + y = (bad_call03::toto(c, d)); tel -- end of node bad_call03::titi @@ -3809,8 +3818,8 @@ returns ( x:A_int_3; y:A_real_3); let - x = (bad_call03::totoa, b); - y = (bad_call03::totoc, d); + x = (bad_call03::toto(a, b)); + y = (bad_call03::toto(c, d)); tel -- end of node bad_call03::bad_call03 -- automatically defined aliases: @@ -3822,12 +3831,12 @@ type A_real_3 = real^3; Opening file /home/jahier/lus2lic/src/test/should_work/call/call01.lus function call01::toto(i1:bool; i2:bool) returns (o:bool); let - o = (Lustre::andi1, i2); + o = (Lustre::and(i1, i2)); tel -- end of node call01::toto node call01::call01(x:bool; y:bool) returns (z:bool); let - z = (call01::totox, y); + z = (call01::toto(x, y)); tel -- end of node call01::call01 extern function call01::momo(x:bool; y:bool) returns (z:bool); @@ -3837,17 +3846,17 @@ extern function call01::momo(x:bool; y:bool) returns (z:bool); Opening file /home/jahier/lus2lic/src/test/should_work/call/call02.lus function call02::toto(i1:bool; i2:bool) returns (o:bool); let - o = (Lustre::andi1, i2); + o = (Lustre::and(i1, i2)); tel -- end of node call02::toto function call02::titi(i1:bool; i2:bool) returns (o:bool); let - o = (call02::totoi1, i2); + o = (call02::toto(i1, i2)); tel -- end of node call02::titi node call02::call02(x:bool; y:bool) returns (z:bool); let - z = (call02::titix, y); + z = (call02::titi(x, y)); tel -- end of node call02::call02 @@ -3856,12 +3865,12 @@ tel Opening file /home/jahier/lus2lic/src/test/should_work/call/call03.lus function call03::tutu(i1:A_bool_2; i2:A_bool_2) returns (o:A_bool_2); let - o = (Lustre::map<<Lustre::or, 2>>i1, i2); + o = (Lustre::map<<Lustre::or, 2>>(i1, i2)); tel -- end of node call03::tutu node call03::call03(x:A_bool_2; y:A_bool_2) returns (z:A_bool_2); let - z = (call03::tutux, y); + z = (call03::tutu(x, y)); tel -- end of node call03::call03 extern function call03::momo(x:bool; y:bool) returns (z:bool); @@ -3872,22 +3881,22 @@ type A_bool_2 = bool^2; Opening file /home/jahier/lus2lic/src/test/should_work/call/call04.lus function call04::toto(i1:bool; i2:bool) returns (o:bool); let - o = (Lustre::andi1, i2); + o = (Lustre::and(i1, i2)); tel -- end of node call04::toto function call04::titi(i1:bool; i2:bool) returns (o:bool); let - o = (call04::totoi1, i2); + o = (call04::toto(i1, i2)); tel -- end of node call04::titi function call04::tutu(i1:A_bool_2; i2:A_bool_2) returns (o:A_bool_2); let - o = (Lustre::map<<call04::titi, 2>>i1, i2); + o = (Lustre::map<<call04::titi, 2>>(i1, i2)); tel -- end of node call04::tutu node call04::call04(x:A_bool_2; y:A_bool_2) returns (z:A_bool_2); let - z = (call04::tutux, y); + z = (call04::tutu(x, y)); tel -- end of node call04::call04 -- automatically defined aliases: @@ -3898,7 +3907,7 @@ Opening file /home/jahier/lus2lic/src/test/should_work/call/call05.lus extern function call05::momo(x:bool; y:bool) returns (z:bool); node call05::call05(x:bool; y:bool) returns (z:bool); let - z = (call05::momox, y); + z = (call05::momo(x, y)); tel -- end of node call05::call05 @@ -3909,7 +3918,7 @@ extern function call06::bip(x:bool; y:bool) returns (z:bool; t:bool); node call06::call06(x:bool; y:bool) returns (z:bool; t:bool); let assert((x => z)); - (z, t) = (call06::bipx, y); + (z, t) = (call06::bip(x, y)); tel -- end of node call06::call06 @@ -3953,10 +3962,10 @@ var x:bool when z; e:bool when a; let - (z, x) = (clock::clock3z); + (z, x) = (clock::clock3(z)); e = (b when a); - (c, d) = (clock::clock4a, (b when a)); - z2 = (clock::clock5a, (b when a), (c when e)); + (c, d) = (clock::clock4(a, (b when a))); + z2 = (clock::clock5(a, (b when a), (c when e))); tel -- end of node clock::clock @@ -4041,7 +4050,7 @@ node Gyroscope2::ValueIsSecureII( returns ( is_valid:bool); let - is_valid = (((Gyroscope2::abs(secure_value - god_value)) < 2.0) and + is_valid = (((Gyroscope2::abs((secure_value - god_value))) < 2.0) and accu_in); tel -- end of node Gyroscope2::ValueIsSecureII @@ -4064,8 +4073,8 @@ node Gyroscope2::TooFar( returns ( nbToFarOut:int); let - nbToFarOut = ( if ((Gyroscope2::abs(channel.valuea - god)) < delta_to_god) - then (nbToFarIn + 1) else nbToFarIn); + nbToFarOut = ( if ((Gyroscope2::abs((channel.valuea - god))) < + delta_to_god) then (nbToFarIn + 1) else nbToFarIn); tel -- end of node Gyroscope2::TooFar @@ -4133,7 +4142,7 @@ var nbValid:real; mask:A_real_4; let - nbValid = (Gyroscope2::countValidChannelschannels); + nbValid = (Gyroscope2::countValidChannels(channels)); globalSum = (red<<Gyroscope2::sum, 4>>0.0, mask); vote = (globalSum / nbValid); mask = (map<<Gyroscope2::masking, 4>>channels); @@ -4187,8 +4196,8 @@ let structOut = CFF_struct{indx=(structIn.indx + 1);indx_toChange=structIn.indx_toChange;tabToFill=( if (structIn.indx_toChange = structIn.indx) then structIn.tabToFill else - (Gyroscope2::addOneChannelstructIn.indx, currentChannel, - structIn.tabToFill))}; + (Gyroscope2::addOneChannel(structIn.indx, currentChannel, + structIn.tabToFill)))}; tel -- end of node Gyroscope2::CFC_iter @@ -4217,7 +4226,7 @@ returns ( diff:bool); let acc_out = acc_in; - diff = ((Gyroscope2::abs(acc_in.local_value - channel.local_value)) > + diff = ((Gyroscope2::abs((acc_in.local_value - channel.local_value))) > CROSS_CHANNEL_TOLERANCE); tel -- end of node Gyroscope2::compare_rolls @@ -4233,15 +4242,15 @@ var let (lc, diff) = (fillred<<Gyroscope2::compare_rolls, 3>>localChannel, foreign_Channels); - cross_failure = ( if (Gyroscope2::selectFailureforeign_Channels[0]) then ( - if (Gyroscope2::selectFailureforeign_Channels[1]) then ( if - (Gyroscope2::selectFailureforeign_Channels[2]) then false else diff[2]) - else ( if (Gyroscope2::selectFailureforeign_Channels[2]) then diff[1] else - (diff[1] and diff[2]))) else ( if - (Gyroscope2::selectFailureforeign_Channels[1]) then ( if - (Gyroscope2::selectFailureforeign_Channels[2]) then diff[0] else (diff[0] - and diff[2])) else ( if (Gyroscope2::selectFailureforeign_Channels[2]) then - (diff[0] and diff[1]) else ((diff[0] and diff[1]) and diff[2])))); + cross_failure = ( if (Gyroscope2::selectFailure(foreign_Channels[0])) then + ( if (Gyroscope2::selectFailure(foreign_Channels[1])) then ( if + (Gyroscope2::selectFailure(foreign_Channels[2])) then false else diff[2]) + else ( if (Gyroscope2::selectFailure(foreign_Channels[2])) then diff[1] + else (diff[1] and diff[2]))) else ( if + (Gyroscope2::selectFailure(foreign_Channels[1])) then ( if + (Gyroscope2::selectFailure(foreign_Channels[2])) then diff[0] else (diff[0] + and diff[2])) else ( if (Gyroscope2::selectFailure(foreign_Channels[2])) + then (diff[0] and diff[1]) else ((diff[0] and diff[1]) and diff[2])))); tel -- end of node Gyroscope2::values_nok @@ -4254,9 +4263,9 @@ returns ( var foreign_Channels:A__Gyroscope2::Valid_ChannelT_3; let - foreign_Channels = (Gyroscope2::ComputeForeignChannelscurrentChannel, - previousOutChannel); - crossFailure = (Gyroscope2::values_noklocalChannel, foreign_Channels); + foreign_Channels = (Gyroscope2::ComputeForeignChannels(currentChannel, + previousOutChannel)); + crossFailure = (Gyroscope2::values_nok(localChannel, foreign_Channels)); tel -- end of node Gyroscope2::CrossFailDetect @@ -4274,13 +4283,13 @@ var localChannel:_Gyroscope2::Valid_ChannelT; let localChannel = - Valid_ChannelT{local_failure=((Gyroscope2::abs(inChannel.valuea - - inChannel.valueb)) > delta);local_value=( if - ((Gyroscope2::abs(inChannel.valuea - inChannel.valueb)) > delta) then 0.0 + Valid_ChannelT{local_failure=((Gyroscope2::abs((inChannel.valuea - + inChannel.valueb))) > delta);local_value=( if + ((Gyroscope2::abs((inChannel.valuea - inChannel.valueb))) > delta) then 0.0 else ((inChannel.valuea + inChannel.valueb) / 2.0))}; outChannel = Valid_ChannelT{local_failure=(localChannel.local_failure or - (Gyroscope2::CrossFailDetectnbInChannel, localChannel, - previousOutChannel));local_value=localChannel.local_value}; + (Gyroscope2::CrossFailDetect(nbInChannel, localChannel, + previousOutChannel)));local_value=localChannel.local_value}; nextOutChannel = previousOutChannel; tel -- end of node Gyroscope2::Channel @@ -4298,8 +4307,9 @@ returns ( guaranteeOK:bool); let guaranteeOK = (outChannel.local_failure or - (((Gyroscope2::abs(inChannel.valuea - outChannel.local_value)) < delta) and - ((Gyroscope2::abs(inChannel.valueb - outChannel.local_value)) < delta))); + (((Gyroscope2::abs((inChannel.valuea - outChannel.local_value))) < delta) + and ((Gyroscope2::abs((inChannel.valueb - outChannel.local_value))) < + delta))); tel -- end of node Gyroscope2::guaranteeChannel @@ -4312,8 +4322,8 @@ node Gyroscope2::iteratedVoter( returns ( acc_out:bool); let - acc_out = (acc_in and (channel.local_failure or ((Gyroscope2::abs(vote - - channel.local_value)) < delta_to_god))); + acc_out = (acc_in and (channel.local_failure or ((Gyroscope2::abs((vote - + channel.local_value))) < delta_to_god))); tel -- end of node Gyroscope2::iteratedVoter @@ -4337,7 +4347,7 @@ node Gyroscope2::guaranteeEvaluateAxis( returns ( guaranteeOK:bool); let - guaranteeOK = ((Gyroscope2::abs(AxisValue - god)) < delta_to_god); + guaranteeOK = ((Gyroscope2::abs((AxisValue - god))) < delta_to_god); tel -- end of node Gyroscope2::guaranteeEvaluateAxis @@ -4348,7 +4358,7 @@ node Gyroscope2::ValueIsSecure( returns ( is_valid:bool); let - is_valid = ((Gyroscope2::abs(secure_value - god_value)) < + is_valid = ((Gyroscope2::abs((secure_value - god_value))) < delta_to_god_value); tel -- end of node Gyroscope2::ValueIsSecure @@ -4370,7 +4380,7 @@ let (dumbChannel, resChannels) = (fillred<<Gyroscope2::Channel, 4>>fillredInit, ([0, 1, 2, 3]), channels, (delta^4), (god^4), (delta_to_god^4)); - AxisValue = (Gyroscope2::VoterresChannels, god, delta_to_god); + AxisValue = (Gyroscope2::Voter(resChannels, god, delta_to_god)); fillredInit = (initChannels -> (pre resChannels)); tel -- end of node Gyroscope2::EvaluateAxis @@ -4417,36 +4427,36 @@ Opening file /home/jahier/lus2lic/src/test/should_work/demo/alias.lus const alias::SIZE = 3; function alias::aliasIterOp(i1:int; i2:A_int_3) returns (o:int); let - o = (Lustre::red<<Lustre::+, 3>>i1, i2); + o = (Lustre::red<<Lustre::+, 3>>(i1, i2)); tel -- end of node alias::aliasIterOp function alias::aliasBoolRed(i:A_bool_2) returns (o:bool); let - o = (Lustre::boolred<<0, 1, 2>>i); + o = (Lustre::boolred<<0, 1, 2>>(i)); tel -- end of node alias::aliasBoolRed node alias::unNoeud(a:int; b:A_int_3) returns (c:int); var x:bool; let - c = (alias::aliasIterOpa, b); - x = (alias::aliasBoolRed([true, false])); + c = (alias::aliasIterOp(a, b)); + x = (alias::aliasBoolRed(([true, false]))); tel -- end of node alias::unNoeud node alias::aliasGivenNode(a:int; b:A_int_3) returns (c:int); let - c = (alias::unNoeuda, b); + c = (alias::unNoeud(a, b)); tel -- end of node alias::aliasGivenNode function alias::aliasPredefNot(i:bool) returns (o:bool); let - o = (Lustre::not i); + o = (Lustre::not (i)); tel -- end of node alias::aliasPredefNot node alias::alias(a:bool) returns (b:bool; c:int); let - b = (alias::aliasPredefNota); - c = (alias::aliasGivenNode0, (map<<Lustre::+, 3>>(0^3), (SIZE^3))); + b = (alias::aliasPredefNot(a)); + c = (alias::aliasGivenNode(0, (map<<Lustre::+, 3>>(0^3), (SIZE^3)))); tel -- end of node alias::alias -- automatically defined aliases: @@ -4491,9 +4501,9 @@ var x:bool when z; y:bool when x; let - y = ((clock::clock2a, (b when a)) when x); - (z, x) = (clock::clock3(pre z)); - (c, d) = (clock::clock4a, (b when a)); + y = ((clock::clock2(a, (b when a))) when x); + (z, x) = (clock::clock3((pre z))); + (c, d) = (clock::clock4(a, (b when a))); tel -- end of node clock::clock @@ -4517,8 +4527,8 @@ returns ( Clock1ms:bool; Clock2ms:bool when Clock1ms); let - Clock1ms = (clock1_2ms::Clock1ms_nodedummy); - Clock2ms = (clock1_2ms::Clock2ms_node(dummy when Clock1ms)); + Clock1ms = (clock1_2ms::Clock1ms_node(dummy)); + Clock2ms = (clock1_2ms::Clock2ms_node((dummy when Clock1ms))); tel -- end of node clock1_2ms::clock1_2ms @@ -4782,7 +4792,7 @@ node lustre_test1_ok::subsys1(s1:real) returns (s2:real); var Discrete_Filter:real; let - Discrete_Filter = (lustre_test1_ok::TransFnc_1s1); + Discrete_Filter = (lustre_test1_ok::TransFnc_1(s1)); s2 = Discrete_Filter; tel -- end of node lustre_test1_ok::subsys1 @@ -4821,10 +4831,10 @@ let Out2_))); Out2 = ( if cl1_2 then (current Out2_) else (0.0 -> (pre Out2))); Out3 = ( if cl1_4 then (current subsys1_s2) else (0.0 -> (pre Out3))); - subsys1_Trigger = (lustre_test1_ok::risingIn3); + subsys1_Trigger = (lustre_test1_ok::rising(In3)); subsys1_s1 = zoh1; subsys1_s2 = ( if subsys1_Trigger then (current - (lustre_test1_ok::subsys1(subsys1_s1 when subsys1_Trigger))) else ((0.0 + (lustre_test1_ok::subsys1((subsys1_s1 when subsys1_Trigger)))) else ((0.0 when cl1_4) -> (pre subsys1_s2))); tel -- end of node lustre_test1_ok::lustre_test1_ok @@ -5078,10 +5088,10 @@ var cl1_12_3:bool; Out2_:real when cl1_4_2; let - cl1_4_2 = (sample_time_change::make_cl1_4_2true); - cl1_12_3 = (sample_time_change::make_cl1_12_3true); - Out2_ = (sample_time_change::sample_time_changecl1_4_2, cl1_12_3, (In3 - when cl1_12_3)); + cl1_4_2 = (sample_time_change::make_cl1_4_2(true)); + cl1_12_3 = (sample_time_change::make_cl1_12_3(true)); + Out2_ = (sample_time_change::sample_time_change(cl1_4_2, cl1_12_3, (In3 + when cl1_12_3))); Out2 = ( if cl1_4_2 then (current Out2_) else (0.0 -> (pre Out2))); tel -- end of node sample_time_change::MainNode @@ -5116,12 +5126,12 @@ tel -- end of node ex::id node ex::trueNode(x:bool) returns (y:bool); let - y = (x or (ex::idtrue, false)); + y = (x or (ex::id(true, false))); tel -- end of node ex::trueNode node ex::ex(i:bool) returns (o:bool); let - o = (true -> ((pre i) and (ex::trueNodei))); + o = (true -> ((pre i) and (ex::trueNode(i)))); tel -- end of node ex::ex @@ -5306,9 +5316,9 @@ var realiste:bool; let assert(realiste); - (vitesse, Plus, Moins) = (lecteur::Controleurdiff); - realiste = (lecteur::Environnementdiff, Plus, Moins); - ok = (lecteur::Proprietevitesse); + (vitesse, Plus, Moins) = (lecteur::Controleur(diff)); + realiste = (lecteur::Environnement(diff, Plus, Moins)); + ok = (lecteur::Propriete(vitesse)); tel -- end of node lecteur::lecteur @@ -5327,13 +5337,13 @@ tel -- end of node lucky::after node lucky::once_since(C:bool; A:bool) returns (X:bool); let - X = ( if A then C else ( if (lucky::afterA) then (C or (false -> (pre X))) - else false)); + X = ( if A then C else ( if (lucky::after(A)) then (C or (false -> (pre + X))) else false)); tel -- end of node lucky::once_since node lucky::once_from_to(C:bool; A:bool; B:bool) returns (X:bool); let - X = (lucky::impliesB, (false -> (pre (lucky::once_sinceC, A)))); + X = (lucky::implies(B, (false -> (pre (lucky::once_since(C, A)))))); tel -- end of node lucky::once_from_to node lucky::stable(i:bool) returns (o:int); @@ -5351,8 +5361,8 @@ let (signal > 20))); begin = (active and (false -> (not (pre active)))); en = ((not active) and (false -> (pre active))); - alarm = ((not (lucky::once_from_toaction, begin, en)) or - ((lucky::stableactive) > 10)); + alarm = ((not (lucky::once_from_to(action, begin, en))) or + ((lucky::stable(active)) > 10)); tel -- end of node lucky::lucky @@ -5386,7 +5396,7 @@ let (tabi[2][0] + tabi[2][1])); tabb[0] = b; tabb[1..2] = ([true, false]); - tabi[2] = (morel::mcmoreli); + tabi[2] = (morel::mcmorel(i)); tabi[0..1] = ([([10, 100]), ([1000, 10000])]); tel -- end of node morel::tab @@ -5402,7 +5412,7 @@ returns ( i2:int; i3:int); let - (b1, b2, b3, i1, i2, i3) = (morel::tabb, i); + (b1, b2, b3, i1, i2, i3) = (morel::tab(b, i)); tel -- end of node morel::morel -- automatically defined aliases: @@ -5442,7 +5452,7 @@ let (tabi[2][0] + tabi[2][1])); tabb[0] = b; tabb[1..2] = ([true, false]); - toto[2] = (morel2::mcmoreli); + toto[2] = (morel2::mcmorel(i)); toto[0..1] = ([([10, 100]), ([1000, 10000])]); tabi = toto; tel @@ -5481,7 +5491,7 @@ let (tabi[2][0] + tabi[2][1])); tabb[0] = b; tabb[1..2] = ([true, false]); - tabi[2] = (morel3::mcmoreli); + tabi[2] = (morel3::mcmorel(i)); tabi[0..1] = ([([10, 100]), ([1000, 10000])]); tel -- end of node morel3::tab @@ -5497,7 +5507,7 @@ returns ( i2:int; i3:int); let - (b1, b2, b3, i1, i2, i3) = (morel3::tabb, i); + (b1, b2, b3, i1, i2, i3) = (morel3::tab(b, i)); tel -- end of node morel3::morel3 -- automatically defined aliases: @@ -5540,7 +5550,7 @@ let (tabi[2][0] + tabi[2][1])); tabb[0] = b; tabb[1..2] = ([true, false]); - tabi[2] = (morel4::mcmoreli); + tabi[2] = (morel4::mcmorel(i)); tabi[0..1] = ([([10, 100]), ([1000, 10000])]); tel -- end of node morel4::tab @@ -5556,7 +5566,7 @@ returns ( i2:int; i3:int); let - (b1, b2, b3, i1, i2, i3) = (morel4::tabb, i); + (b1, b2, b3, i1, i2, i3) = (morel4::tab(b, i)); tel -- end of node morel4::morel4 -- automatically defined aliases: @@ -5601,7 +5611,7 @@ returns ( i2:int; i3:int); let - (b1, b2, b3, i1, i2, i3) = (morel5::tabt, b, i); + (b1, b2, b3, i1, i2, i3) = (morel5::tab(t, b, i)); tel -- end of node morel5::morel5 node morel5::mcmorel(i:int) returns (t:A_int_2; u:A_A_int_2_2); @@ -5722,7 +5732,7 @@ node onlyroll::threeoffour( returns ( r:bool); let - r = (onlyroll::oneoffour(not f1), (not f2), (not f3), (not f4)); + r = (onlyroll::oneoffour((not f1), (not f2), (not f3), (not f4))); tel -- end of node onlyroll::threeoffour node onlyroll::max2(one:real; two:real) returns (m:real); @@ -5739,7 +5749,8 @@ node onlyroll::max4( returns ( m:real); let - m = (onlyroll::max2(onlyroll::max2one, two), (onlyroll::max2three, four)); + m = (onlyroll::max2((onlyroll::max2(one, two)), (onlyroll::max2(three, + four)))); tel -- end of node onlyroll::max4 node onlyroll::min2(one:real; two:real) returns (m:real); @@ -5756,7 +5767,8 @@ node onlyroll::min4( returns ( m:real); let - m = (onlyroll::min2(onlyroll::min2one, two), (onlyroll::min2three, four)); + m = (onlyroll::min2((onlyroll::min2(one, two)), (onlyroll::min2(three, + four)))); tel -- end of node onlyroll::min4 @@ -5768,14 +5780,14 @@ node onlyroll::OlympicAverage( returns ( m:real); let - m = ((((((one + two) + three) + four) - (onlyroll::max4one, two, three, - four)) - (onlyroll::min4one, two, three, four)) / 2.0); + m = ((((((one + two) + three) + four) - (onlyroll::max4(one, two, three, + four))) - (onlyroll::min4(one, two, three, four))) / 2.0); tel -- end of node onlyroll::OlympicAverage node onlyroll::MedianValue3(a:real; b:real; c:real) returns (z:real); let - z = ((((a + b) + c) - (onlyroll::min2a, (onlyroll::min2b, c))) - - (onlyroll::max2a, (onlyroll::max2b, c))); + z = ((((a + b) + c) - (onlyroll::min2(a, (onlyroll::min2(b, c))))) - + (onlyroll::max2(a, (onlyroll::max2(b, c))))); tel -- end of node onlyroll::MedianValue3 @@ -5791,10 +5803,10 @@ node onlyroll::Median( returns ( r:real); let - r = ( if f1 then (onlyroll::MedianValue3x2, x3, x4) else ( if f2 then - (onlyroll::MedianValue3x1, x3, x4) else ( if f3 then - (onlyroll::MedianValue3x1, x2, x4) else (onlyroll::MedianValue3x1, x2, - x3)))); + r = ( if f1 then (onlyroll::MedianValue3(x2, x3, x4)) else ( if f2 then + (onlyroll::MedianValue3(x1, x3, x4)) else ( if f3 then + (onlyroll::MedianValue3(x1, x2, x4)) else (onlyroll::MedianValue3(x1, x2, + x3))))); tel -- end of node onlyroll::Median node onlyroll::Average2(a:real; b:real) returns (z:real); @@ -5815,14 +5827,14 @@ node onlyroll::Average( returns ( r:real); let - r = ( if f1 then ( if f2 then (onlyroll::Average2x3, x4) else ( if f3 then - (onlyroll::Average2x2, x4) else (onlyroll::Average2x3, x2))) else ( if f2 - then ( if f1 then (onlyroll::Average2x3, x4) else ( if f3 then - (onlyroll::Average2x1, x4) else (onlyroll::Average2x3, x1))) else ( if f3 - then ( if f2 then (onlyroll::Average2x1, x4) else ( if f4 then - (onlyroll::Average2x2, x1) else (onlyroll::Average2x4, x2))) else ( if f2 - then (onlyroll::Average2x3, x1) else ( if f3 then (onlyroll::Average2x2, - x1) else (onlyroll::Average2x3, x2)))))); + r = ( if f1 then ( if f2 then (onlyroll::Average2(x3, x4)) else ( if f3 + then (onlyroll::Average2(x2, x4)) else (onlyroll::Average2(x3, x2)))) else + ( if f2 then ( if f1 then (onlyroll::Average2(x3, x4)) else ( if f3 then + (onlyroll::Average2(x1, x4)) else (onlyroll::Average2(x3, x1)))) else ( if + f3 then ( if f2 then (onlyroll::Average2(x1, x4)) else ( if f4 then + (onlyroll::Average2(x2, x1)) else (onlyroll::Average2(x4, x2)))) else ( if + f2 then (onlyroll::Average2(x3, x1)) else ( if f3 then + (onlyroll::Average2(x2, x1)) else (onlyroll::Average2(x3, x2))))))); tel -- end of node onlyroll::Average @@ -5846,15 +5858,15 @@ var let cpt_roll = (0 -> ( if three_roll then SAFE_COUNTER_TIME else ( if ((pre cpt_roll) > 0) then ((pre cpt_roll) - 1) else 0))); - zero_roll = (onlyroll::noneoff1, f2, f3, f4); - one_roll = (onlyroll::oneoffourf1, f2, f3, f4); - two_roll = (onlyroll::twooffourf1, f2, f3, f4); - three_roll = (onlyroll::threeoffourf1, f2, f3, f4); - x = ( if (zero_roll and (cpt_roll = 0)) then (onlyroll::OlympicAveragex1, - x2, x3, x4) else ( if (one_roll and (cpt_roll = 0)) then - (onlyroll::Medianx1, x2, x3, x4, f1, f2, f3, f4) else ( if (two_roll and - (cpt_roll = 0)) then (onlyroll::Averagex1, x2, x3, x4, f1, f2, f3, f4) else - FAIL_SAFE_ROLL_VALUE))); + zero_roll = (onlyroll::noneof(f1, f2, f3, f4)); + one_roll = (onlyroll::oneoffour(f1, f2, f3, f4)); + two_roll = (onlyroll::twooffour(f1, f2, f3, f4)); + three_roll = (onlyroll::threeoffour(f1, f2, f3, f4)); + x = ( if (zero_roll and (cpt_roll = 0)) then (onlyroll::OlympicAverage(x1, + x2, x3, x4)) else ( if (one_roll and (cpt_roll = 0)) then + (onlyroll::Median(x1, x2, x3, x4, f1, f2, f3, f4)) else ( if (two_roll and + (cpt_roll = 0)) then (onlyroll::Average(x1, x2, x3, x4, f1, f2, f3, f4)) + else FAIL_SAFE_ROLL_VALUE))); tel -- end of node onlyroll::Calculate node onlyroll::abs(v:real) returns (a:real); @@ -5879,8 +5891,8 @@ returns ( local_value:real; inline_monitor_failed:bool); let - inline_monitor_failed = ((onlyroll::maintainTIME_ROLL, ((onlyroll::abs(xa - - xb)) > DELTA_ROLL)) or disc); + inline_monitor_failed = ((onlyroll::maintain(TIME_ROLL, + ((onlyroll::abs((xa - xb))) > DELTA_ROLL))) or disc); local_value = xa; tel -- end of node onlyroll::Monitor @@ -5905,14 +5917,14 @@ var two:bool; three:bool; let - one = ((onlyroll::abs(xi - pxother1)) > CROSS_CH_TOL_ROLL); - two = ((onlyroll::abs(xi - pxother2)) > CROSS_CH_TOL_ROLL); - three = ((onlyroll::abs(xi - pxother3)) > CROSS_CH_TOL_ROLL); - r = (onlyroll::maintainTIME_CROSS_ROLL, ( if pfother1 then ( if pfother2 + one = ((onlyroll::abs((xi - pxother1))) > CROSS_CH_TOL_ROLL); + two = ((onlyroll::abs((xi - pxother2))) > CROSS_CH_TOL_ROLL); + three = ((onlyroll::abs((xi - pxother3))) > CROSS_CH_TOL_ROLL); + r = (onlyroll::maintain(TIME_CROSS_ROLL, ( if pfother1 then ( if pfother2 then ( if pfother3 then false else three) else ( if pfother3 then two else (two and three))) else ( if pfother2 then ( if pfother3 then one else (one and three)) else ( if pfother3 then (one and two) else ((one and two) and - three))))); + three)))))); tel -- end of node onlyroll::values_nok @@ -5958,17 +5970,17 @@ let reset = (ongroundreset or (inairreset and (not cross_failure))); foreign_failure = ((pfother1 or pfother2) or pfother3); NLfaults = (choffi or local_failure); - from1to2 = (will_latch and (not (onlyroll::InNominalRangexi))); + from1to2 = (will_latch and (not (onlyroll::InNominalRange(xi)))); will_latch = cross_failure; - from1to3 = ((a and will_latch) and (onlyroll::InNominalRangexi)); + from1to3 = ((a and will_latch) and (onlyroll::InNominalRange(xi))); from2to3 = (a and (((pre will_latch) and foreign_failure) or local_failure)); from3to1 = ongroundreset; from2to1 = reset; r = (false -> ((((pre state) = 1) and cross_failure) or ((((pre state) = 2) and ((pre cross_failure) and foreign_failure)) or local_failure))); - cross_failure = (onlyroll::values_nokpfother1, pfother2, pfother3, xi, - pxother1, pxother2, pxother3); + cross_failure = (onlyroll::values_nok(pfother1, pfother2, pfother3, xi, + pxother1, pxother2, pxother3)); debug_cross_failure = cross_failure; tel -- end of node onlyroll::FailDetect @@ -5997,10 +6009,10 @@ returns ( var local_failure:bool; let - (xi, local_failure) = (onlyroll::Monitorxai, xbi, disci); + (xi, local_failure) = (onlyroll::Monitor(xai, xbi, disci)); (fi, debug_cross_failure, debug_st, aski) = - (onlyroll::FailDetectlocal_failure, xi, ongroundreset, inairreset, choffi, - pxother1, pxother2, pxother3, pfother1, pfother2, pfother3, allowedi); + (onlyroll::FailDetect(local_failure, xi, ongroundreset, inairreset, choffi, + pxother1, pxother2, pxother3, pfother1, pfother2, pfother3, allowedi)); debug_localfailure = local_failure; tel -- end of node onlyroll::Channel @@ -6093,24 +6105,24 @@ let debug_ch_failed3 = f3; debug_ch_failed4 = f4; (x1, f1, ask1, debug_localfailure1, debug_cross_failure1, debug_st1) = - (onlyroll::Channelongroundreset, inairreset, choff1, xa1, xb1, disc1, (0.0 + (onlyroll::Channel(ongroundreset, inairreset, choff1, xa1, xb1, disc1, (0.0 -> (pre x2)), (0.0 -> (pre x3)), (0.0 -> (pre x4)), (false -> (pre f2)), - (false -> (pre f3)), (false -> (pre f4)), allowed1); + (false -> (pre f3)), (false -> (pre f4)), allowed1)); (x2, f2, ask2, debug_localfailure2, debug_cross_failure2, debug_st2) = - (onlyroll::Channelongroundreset, inairreset, choff2, xa2, xb2, disc2, (0.0 + (onlyroll::Channel(ongroundreset, inairreset, choff2, xa2, xb2, disc2, (0.0 -> (pre x1)), (0.0 -> (pre x3)), (0.0 -> (pre x4)), (false -> (pre f1)), - (false -> (pre f3)), (false -> (pre f4)), allowed2); + (false -> (pre f3)), (false -> (pre f4)), allowed2)); (x3, f3, ask3, debug_localfailure3, debug_cross_failure3, debug_st3) = - (onlyroll::Channelongroundreset, inairreset, choff3, xa3, xb3, disc3, (0.0 + (onlyroll::Channel(ongroundreset, inairreset, choff3, xa3, xb3, disc3, (0.0 -> (pre x1)), (0.0 -> (pre x2)), (0.0 -> (pre x4)), (false -> (pre f1)), - (false -> (pre f2)), (false -> (pre f4)), allowed3); + (false -> (pre f2)), (false -> (pre f4)), allowed3)); (x4, f4, ask4, debug_localfailure4, debug_cross_failure4, debug_st4) = - (onlyroll::Channelongroundreset, inairreset, choff4, xa4, xb4, disc4, (0.0 + (onlyroll::Channel(ongroundreset, inairreset, choff4, xa4, xb4, disc4, (0.0 -> (pre x1)), (0.0 -> (pre x2)), (0.0 -> (pre x3)), (false -> (pre f1)), - (false -> (pre f2)), (false -> (pre f3)), allowed4); - (allowed1, allowed2, allowed3, allowed4) = (pre (onlyroll::Allocatorask1, - ask2, ask3, ask4, ongroundreset)); - x = (onlyroll::Calculatex1, x2, x3, x4, f1, f2, f3, f4); + (false -> (pre f2)), (false -> (pre f3)), allowed4)); + (allowed1, allowed2, allowed3, allowed4) = (pre (onlyroll::Allocator(ask1, + ask2, ask3, ask4, ongroundreset))); + x = (onlyroll::Calculate(x1, x2, x3, x4, f1, f2, f3, f4)); tel -- end of node onlyroll::onlyroll node onlyroll::InHardoverRange(r:real) returns (i:bool); @@ -6204,7 +6216,7 @@ node onlyroll2::threeoffour( returns ( r:bool); let - r = (onlyroll2::oneoffour(not f1), (not f2), (not f3), (not f4)); + r = (onlyroll2::oneoffour((not f1), (not f2), (not f3), (not f4))); tel -- end of node onlyroll2::threeoffour node onlyroll2::max2(one:real; two:real) returns (m:real); @@ -6221,8 +6233,8 @@ node onlyroll2::max4( returns ( m:real); let - m = (onlyroll2::max2(onlyroll2::max2one, two), (onlyroll2::max2three, - four)); + m = (onlyroll2::max2((onlyroll2::max2(one, two)), (onlyroll2::max2(three, + four)))); tel -- end of node onlyroll2::max4 node onlyroll2::min2(one:real; two:real) returns (m:real); @@ -6239,8 +6251,8 @@ node onlyroll2::min4( returns ( m:real); let - m = (onlyroll2::min2(onlyroll2::min2one, two), (onlyroll2::min2three, - four)); + m = (onlyroll2::min2((onlyroll2::min2(one, two)), (onlyroll2::min2(three, + four)))); tel -- end of node onlyroll2::min4 @@ -6252,14 +6264,14 @@ node onlyroll2::OlympicAverage( returns ( m:real); let - m = ((((((one + two) + three) + four) - (onlyroll2::max4one, two, three, - four)) - (onlyroll2::min4one, two, three, four)) / 2.0); + m = ((((((one + two) + three) + four) - (onlyroll2::max4(one, two, three, + four))) - (onlyroll2::min4(one, two, three, four))) / 2.0); tel -- end of node onlyroll2::OlympicAverage node onlyroll2::MedianValue3(a:real; b:real; c:real) returns (z:real); let - z = ((((a + b) + c) - (onlyroll2::min2a, (onlyroll2::min2b, c))) - - (onlyroll2::max2a, (onlyroll2::max2b, c))); + z = ((((a + b) + c) - (onlyroll2::min2(a, (onlyroll2::min2(b, c))))) - + (onlyroll2::max2(a, (onlyroll2::max2(b, c))))); tel -- end of node onlyroll2::MedianValue3 @@ -6275,10 +6287,10 @@ node onlyroll2::Median( returns ( r:real); let - r = ( if f1 then (onlyroll2::MedianValue3x2, x3, x4) else ( if f2 then - (onlyroll2::MedianValue3x1, x3, x4) else ( if f3 then - (onlyroll2::MedianValue3x1, x2, x4) else (onlyroll2::MedianValue3x1, x2, - x3)))); + r = ( if f1 then (onlyroll2::MedianValue3(x2, x3, x4)) else ( if f2 then + (onlyroll2::MedianValue3(x1, x3, x4)) else ( if f3 then + (onlyroll2::MedianValue3(x1, x2, x4)) else (onlyroll2::MedianValue3(x1, x2, + x3))))); tel -- end of node onlyroll2::Median node onlyroll2::Average2(a:real; b:real) returns (z:real); @@ -6299,14 +6311,14 @@ node onlyroll2::Average( returns ( r:real); let - r = ( if f1 then ( if f2 then (onlyroll2::Average2x3, x4) else ( if f3 - then (onlyroll2::Average2x2, x4) else (onlyroll2::Average2x3, x2))) else ( - if f2 then ( if f1 then (onlyroll2::Average2x3, x4) else ( if f3 then - (onlyroll2::Average2x1, x4) else (onlyroll2::Average2x3, x1))) else ( if f3 - then ( if f2 then (onlyroll2::Average2x1, x4) else ( if f4 then - (onlyroll2::Average2x2, x1) else (onlyroll2::Average2x4, x2))) else ( if f2 - then (onlyroll2::Average2x3, x1) else ( if f3 then (onlyroll2::Average2x2, - x1) else (onlyroll2::Average2x3, x2)))))); + r = ( if f1 then ( if f2 then (onlyroll2::Average2(x3, x4)) else ( if f3 + then (onlyroll2::Average2(x2, x4)) else (onlyroll2::Average2(x3, x2)))) + else ( if f2 then ( if f1 then (onlyroll2::Average2(x3, x4)) else ( if f3 + then (onlyroll2::Average2(x1, x4)) else (onlyroll2::Average2(x3, x1)))) + else ( if f3 then ( if f2 then (onlyroll2::Average2(x1, x4)) else ( if f4 + then (onlyroll2::Average2(x2, x1)) else (onlyroll2::Average2(x4, x2)))) + else ( if f2 then (onlyroll2::Average2(x3, x1)) else ( if f3 then + (onlyroll2::Average2(x2, x1)) else (onlyroll2::Average2(x3, x2))))))); tel -- end of node onlyroll2::Average @@ -6330,15 +6342,15 @@ var let cpt_roll = (0 -> ( if three_roll then SAFE_COUNTER_TIME else ( if ((pre cpt_roll) > 0) then ((pre cpt_roll) - 1) else 0))); - zero_roll = (onlyroll2::noneoff1, f2, f3, f4); - one_roll = (onlyroll2::oneoffourf1, f2, f3, f4); - two_roll = (onlyroll2::twooffourf1, f2, f3, f4); - three_roll = (onlyroll2::threeoffourf1, f2, f3, f4); - x = ( if (zero_roll and (cpt_roll = 0)) then (onlyroll2::OlympicAveragex1, - x2, x3, x4) else ( if (one_roll and (cpt_roll = 0)) then - (onlyroll2::Medianx1, x2, x3, x4, f1, f2, f3, f4) else ( if (two_roll and - (cpt_roll = 0)) then (onlyroll2::Averagex1, x2, x3, x4, f1, f2, f3, f4) - else FAIL_SAFE_ROLL_VALUE))); + zero_roll = (onlyroll2::noneof(f1, f2, f3, f4)); + one_roll = (onlyroll2::oneoffour(f1, f2, f3, f4)); + two_roll = (onlyroll2::twooffour(f1, f2, f3, f4)); + three_roll = (onlyroll2::threeoffour(f1, f2, f3, f4)); + x = ( if (zero_roll and (cpt_roll = 0)) then + (onlyroll2::OlympicAverage(x1, x2, x3, x4)) else ( if (one_roll and + (cpt_roll = 0)) then (onlyroll2::Median(x1, x2, x3, x4, f1, f2, f3, f4)) + else ( if (two_roll and (cpt_roll = 0)) then (onlyroll2::Average(x1, x2, + x3, x4, f1, f2, f3, f4)) else FAIL_SAFE_ROLL_VALUE))); tel -- end of node onlyroll2::Calculate node onlyroll2::abs(v:real) returns (a:real); @@ -6363,8 +6375,8 @@ returns ( local_value:real; inline_monitor_failed:bool); let - inline_monitor_failed = ((onlyroll2::maintainTIME_ROLL, - ((onlyroll2::abs(xa - xb)) > DELTA_ROLL)) or disc); + inline_monitor_failed = ((onlyroll2::maintain(TIME_ROLL, + ((onlyroll2::abs((xa - xb))) > DELTA_ROLL))) or disc); local_value = xa; tel -- end of node onlyroll2::Monitor @@ -6389,14 +6401,14 @@ var two:bool; three:bool; let - one = ((onlyroll2::abs(xi - pxother1)) > CROSS_CH_TOL_ROLL); - two = ((onlyroll2::abs(xi - pxother2)) > CROSS_CH_TOL_ROLL); - three = ((onlyroll2::abs(xi - pxother3)) > CROSS_CH_TOL_ROLL); - r = (onlyroll2::maintainTIME_CROSS_ROLL, ( if pfother1 then ( if pfother2 + one = ((onlyroll2::abs((xi - pxother1))) > CROSS_CH_TOL_ROLL); + two = ((onlyroll2::abs((xi - pxother2))) > CROSS_CH_TOL_ROLL); + three = ((onlyroll2::abs((xi - pxother3))) > CROSS_CH_TOL_ROLL); + r = (onlyroll2::maintain(TIME_CROSS_ROLL, ( if pfother1 then ( if pfother2 then ( if pfother3 then false else three) else ( if pfother3 then two else (two and three))) else ( if pfother2 then ( if pfother3 then one else (one and three)) else ( if pfother3 then (one and two) else ((one and two) and - three))))); + three)))))); tel -- end of node onlyroll2::values_nok @@ -6442,17 +6454,17 @@ let reset = (ongroundreset or (inairreset and (not cross_failure))); foreign_failure = ((pfother1 or pfother2) or pfother3); NLfaults = (choffi or local_failure); - from1to2 = (will_latch and (not (onlyroll2::InNominalRangexi))); + from1to2 = (will_latch and (not (onlyroll2::InNominalRange(xi)))); will_latch = cross_failure; - from1to3 = ((a and will_latch) and (onlyroll2::InNominalRangexi)); + from1to3 = ((a and will_latch) and (onlyroll2::InNominalRange(xi))); from2to3 = (a and (((pre will_latch) and foreign_failure) or local_failure)); from3to1 = ongroundreset; from2to1 = reset; r = (false -> ((((pre state) = 1) and cross_failure) or ((((pre state) = 2) and ((pre cross_failure) and foreign_failure)) or local_failure))); - cross_failure = (onlyroll2::values_nokpfother1, pfother2, pfother3, xi, - pxother1, pxother2, pxother3); + cross_failure = (onlyroll2::values_nok(pfother1, pfother2, pfother3, xi, + pxother1, pxother2, pxother3)); debug_cross_failure = cross_failure; tel -- end of node onlyroll2::FailDetect @@ -6481,10 +6493,11 @@ returns ( var local_failure:bool; let - (xi, local_failure) = (onlyroll2::Monitorxai, xbi, disci); + (xi, local_failure) = (onlyroll2::Monitor(xai, xbi, disci)); (fi, debug_cross_failure, debug_st, aski) = - (onlyroll2::FailDetectlocal_failure, xi, ongroundreset, inairreset, choffi, - pxother1, pxother2, pxother3, pfother1, pfother2, pfother3, allowedi); + (onlyroll2::FailDetect(local_failure, xi, ongroundreset, inairreset, + choffi, pxother1, pxother2, pxother3, pfother1, pfother2, pfother3, + allowedi)); debug_localfailure = local_failure; tel -- end of node onlyroll2::Channel @@ -6577,24 +6590,24 @@ let debug_ch_failed3 = f3; debug_ch_failed4 = f4; (x1, f1, ask1, debug_localfailure1, debug_cross_failure1, debug_st1) = - (onlyroll2::Channelongroundreset, inairreset, choff1, xa1, xb1, disc1, (0.0 - -> (pre x2)), (0.0 -> (pre x3)), (0.0 -> (pre x4)), (false -> (pre f2)), - (false -> (pre f3)), (false -> (pre f4)), allowed1); + (onlyroll2::Channel(ongroundreset, inairreset, choff1, xa1, xb1, disc1, + (0.0 -> (pre x2)), (0.0 -> (pre x3)), (0.0 -> (pre x4)), (false -> (pre + f2)), (false -> (pre f3)), (false -> (pre f4)), allowed1)); (x2, f2, ask2, debug_localfailure2, debug_cross_failure2, debug_st2) = - (onlyroll2::Channelongroundreset, inairreset, choff2, xa2, xb2, disc2, (0.0 - -> (pre x1)), (0.0 -> (pre x3)), (0.0 -> (pre x4)), (false -> (pre f1)), - (false -> (pre f3)), (false -> (pre f4)), allowed2); + (onlyroll2::Channel(ongroundreset, inairreset, choff2, xa2, xb2, disc2, + (0.0 -> (pre x1)), (0.0 -> (pre x3)), (0.0 -> (pre x4)), (false -> (pre + f1)), (false -> (pre f3)), (false -> (pre f4)), allowed2)); (x3, f3, ask3, debug_localfailure3, debug_cross_failure3, debug_st3) = - (onlyroll2::Channelongroundreset, inairreset, choff3, xa3, xb3, disc3, (0.0 - -> (pre x1)), (0.0 -> (pre x2)), (0.0 -> (pre x4)), (false -> (pre f1)), - (false -> (pre f2)), (false -> (pre f4)), allowed3); + (onlyroll2::Channel(ongroundreset, inairreset, choff3, xa3, xb3, disc3, + (0.0 -> (pre x1)), (0.0 -> (pre x2)), (0.0 -> (pre x4)), (false -> (pre + f1)), (false -> (pre f2)), (false -> (pre f4)), allowed3)); (x4, f4, ask4, debug_localfailure4, debug_cross_failure4, debug_st4) = - (onlyroll2::Channelongroundreset, inairreset, choff4, xa4, xb4, disc4, (0.0 - -> (pre x1)), (0.0 -> (pre x2)), (0.0 -> (pre x3)), (false -> (pre f1)), - (false -> (pre f2)), (false -> (pre f3)), allowed4); - (allowed1, allowed2, allowed3, allowed4) = (onlyroll2::Allocator(pre - ask1), (pre ask2), (pre ask3), (pre ask4), ongroundreset); - x = (onlyroll2::Calculatex1, x2, x3, x4, f1, f2, f3, f4); + (onlyroll2::Channel(ongroundreset, inairreset, choff4, xa4, xb4, disc4, + (0.0 -> (pre x1)), (0.0 -> (pre x2)), (0.0 -> (pre x3)), (false -> (pre + f1)), (false -> (pre f2)), (false -> (pre f3)), allowed4)); + (allowed1, allowed2, allowed3, allowed4) = (onlyroll2::Allocator((pre + ask1), (pre ask2), (pre ask3), (pre ask4), ongroundreset)); + x = (onlyroll2::Calculate(x1, x2, x3, x4, f1, f2, f3, f4)); tel -- end of node onlyroll2::onlyroll2 node onlyroll2::InHardoverRange(r:real) returns (i:bool); @@ -6636,8 +6649,8 @@ returns ( b5:bool; b6:bool); let - (b3, b4, b5, b6) = ((test::three_outputs(test::two_outputsb1, b2), true), - false); + (b3, b4, b5, b6) = ((test::three_outputs((test::two_outputs(b1, b2)), + true)), false); tel -- end of node test::test @@ -6675,7 +6688,7 @@ var bidon2:bool; let edge = (false -> ((in and (not (pre in))) or (bidon2 and bidon1))); - (bidon1, bidon2) = (toolate::bidonin); + (bidon1, bidon2) = (toolate::bidon(in)); tel -- end of node toolate::edge_detect node toolate::implies(X:bool; Y:bool) returns (XimpliesY:bool); @@ -6689,18 +6702,18 @@ var bidon2:bool; let afterX = (false -> ((pre (X or afterX)) or (bidon2 and bidon1))); - (bidon1, bidon2) = (toolate::bidonX); + (bidon1, bidon2) = (toolate::bidon(X)); tel -- end of node toolate::after node toolate::once_since(C:bool; A:bool) returns (X:bool); let - X = ( if A then C else ( if (toolate::afterA) then (C or (false -> (pre + X = ( if A then C else ( if (toolate::after(A)) then (C or (false -> (pre X))) else false)); tel -- end of node toolate::once_since node toolate::once_from_to(C:bool; A:bool; B:bool) returns (X:bool); let - X = (toolate::impliesB, (false -> (pre (toolate::once_sinceC, A)))); + X = (toolate::implies(B, (false -> (pre (toolate::once_since(C, A)))))); tel -- end of node toolate::once_from_to node toolate::toolate(active:bool; action:bool) returns (alarm:bool); @@ -6710,7 +6723,7 @@ var let begin = (active and (false -> (not (pre active)))); en = ((not active) and (false -> (pre active))); - alarm = (not (toolate::once_from_toaction, begin, en)); + alarm = (not (toolate::once_from_to(action, begin, en))); tel -- end of node toolate::toolate -- automatically defined aliases: @@ -6799,7 +6812,7 @@ node Gyroscope::ValueIsSecureII( returns ( is_valid:bool); let - is_valid = (((Gyroscope::abs(secure_value - god_value)) < 2.0) and + is_valid = (((Gyroscope::abs((secure_value - god_value))) < 2.0) and accu_in); tel -- end of node Gyroscope::ValueIsSecureII @@ -6822,8 +6835,8 @@ node Gyroscope::TooFar( returns ( nbToFarOut:int); let - nbToFarOut = ( if ((Gyroscope::abs(channel.valuea - god)) < delta_to_god) - then (nbToFarIn + 1) else nbToFarIn); + nbToFarOut = ( if ((Gyroscope::abs((channel.valuea - god))) < + delta_to_god) then (nbToFarIn + 1) else nbToFarIn); tel -- end of node Gyroscope::TooFar @@ -6876,8 +6889,8 @@ node Gyroscope::Maintain(n:int; val:bool) returns (m:bool); var cpt:int; let - cpt = (( if val then 1 else 0) -> ( if val then (Gyroscope::min_intn, - ((pre cpt) + 1)) else 0)); + cpt = (( if val then 1 else 0) -> ( if val then (Gyroscope::min_int(n, + ((pre cpt) + 1))) else 0)); m = (cpt >= n); tel -- end of node Gyroscope::Maintain @@ -6892,8 +6905,8 @@ returns ( var maintain:bool; let - maintain = (Gyroscope::MaintainTIME, ((Gyroscope::abs(inChannel.valuea - - inChannel.valueb)) > delta)); + maintain = (Gyroscope::Maintain(TIME, ((Gyroscope::abs((inChannel.valuea - + inChannel.valueb))) > delta))); outChannel = Valid_ChannelT{local_failure=maintain;local_value=( if maintain then 0.0 else ((inChannel.valuea + inChannel.valueb) / 2.0))}; tel @@ -6933,7 +6946,7 @@ var nbValid:real; mask:A_real_4; let - nbValid = (Gyroscope::countValidChannelschannels); + nbValid = (Gyroscope::countValidChannels(channels)); globalSum = (red<<Gyroscope::sum, 4>>0.0, mask); vote = (globalSum / nbValid); mask = (map<<Gyroscope::masking, 4>>channels); @@ -6971,8 +6984,8 @@ var let resChannels = (map<<Gyroscope::Channel, 4>>channels, (delta^4), (god^4), (delta_to_god^4)); - AxisValue = (Gyroscope::VoterresChannels, god, delta_to_god); - AxisValue2 = (Gyroscope::Voter2resChannels, god, delta_to_god); + AxisValue = (Gyroscope::Voter(resChannels, god, delta_to_god)); + AxisValue2 = (Gyroscope::Voter2(resChannels, god, delta_to_god)); tel -- end of node Gyroscope::EvaluateAxis @@ -7002,8 +7015,9 @@ returns ( guaranteeOK:bool); let guaranteeOK = (outChannel.local_failure or - (((Gyroscope::abs(inChannel.valuea - outChannel.local_value)) < delta) and - ((Gyroscope::abs(inChannel.valueb - outChannel.local_value)) < delta))); + (((Gyroscope::abs((inChannel.valuea - outChannel.local_value))) < delta) + and ((Gyroscope::abs((inChannel.valueb - outChannel.local_value))) < + delta))); tel -- end of node Gyroscope::guaranteeChannel @@ -7016,8 +7030,8 @@ node Gyroscope::iteratedVoter( returns ( acc_out:bool); let - acc_out = (acc_in and (channel.local_failure or ((Gyroscope::abs(vote - - channel.local_value)) < delta_to_god))); + acc_out = (acc_in and (channel.local_failure or ((Gyroscope::abs((vote - + channel.local_value))) < delta_to_god))); tel -- end of node Gyroscope::iteratedVoter @@ -7041,7 +7055,7 @@ node Gyroscope::guaranteeEvaluateAxis( returns ( guaranteeOK:bool); let - guaranteeOK = ((Gyroscope::abs(AxisValue - god)) < delta_to_god); + guaranteeOK = ((Gyroscope::abs((AxisValue - god))) < delta_to_god); tel -- end of node Gyroscope::guaranteeEvaluateAxis @@ -7052,7 +7066,7 @@ node Gyroscope::ValueIsSecure( returns ( is_valid:bool); let - is_valid = ((Gyroscope::abs(secure_value - god_value)) < + is_valid = ((Gyroscope::abs((secure_value - god_value))) < delta_to_god_value); tel -- end of node Gyroscope::ValueIsSecure @@ -7164,8 +7178,8 @@ let + 1)}; elt_out = ( if ((acc_in.actual_rank >= acc_in.rank) and (acc_in.actual_rank < (acc_in.rank + size))) then - (produitBool::selectElementOfRank_inArray_(acc_in.actual_rank - - acc_in.rank), acc_in.multiplieur) else false); + (produitBool::selectElementOfRank_inArray_((acc_in.actual_rank - + acc_in.rank), acc_in.multiplieur)) else false); tel -- end of node produitBool::shiftFill @@ -7199,7 +7213,7 @@ returns ( ligne:A_bool_20); let ligne = ( if (multiplicande = false) then (multiplicande^20) else - (produitBool::shiftacc_in)); + (produitBool::shift(acc_in))); acc_out = acc_in; tel -- end of node produitBool::PLC @@ -7262,8 +7276,8 @@ let + 1)}; o_elt_out = ( if ((i_acc_in.actual_rank >= i_acc_in.rank) and (i_acc_in.actual_rank < (i_acc_in.rank + c_size))) then - (shiftFill_ludic::n_selectElementOfRank_inArray_i_acc_in.actual_rank, - i_acc_in.multiplieur) else false); + (shiftFill_ludic::n_selectElementOfRank_inArray_(i_acc_in.actual_rank, + i_acc_in.multiplieur)) else false); tel -- end of node shiftFill_ludic::n_shiftFill -- automatically defined aliases: @@ -7324,8 +7338,8 @@ let + 1)}; o_elt_out = ( if ((i_acc_in.actual_rank >= i_acc_in.rank) and (i_acc_in.actual_rank < (i_acc_in.rank + c_size))) then - (shift_ludic::n_selectElementOfRank_inArray_i_acc_in.actual_rank, - i_acc_in.multiplieur) else false); + (shift_ludic::n_selectElementOfRank_inArray_(i_acc_in.actual_rank, + i_acc_in.multiplieur)) else false); tel -- end of node shift_ludic::n_shiftFill @@ -7419,11 +7433,11 @@ returns ( var fill_res:A_A_A_int_4_3_2; let - red_res = (arrays::big_sumfill_res); - fill_res = (arrays::big_incrinit_incr); - fillred_res = (init_long -> (arrays::add_longinit_long, (pre - fillred_res))); - ok = (false -> (arrays::big_xorfillred_res)); + red_res = (arrays::big_sum(fill_res)); + fill_res = (arrays::big_incr(init_incr)); + fillred_res = (init_long -> (arrays::add_long(init_long, (pre + fillred_res)))); + ok = (false -> (arrays::big_xor(fillred_res))); tel -- end of node arrays::arrays node arrays::add_byte(x:A_bool_4; y:A_bool_4) returns (s:A_bool_4); @@ -7539,7 +7553,7 @@ var acknowledge:A_bool_10; nb_acknowledge:int; let - acknowledge = (deSimone::deSimonetrue, request); + acknowledge = (deSimone::deSimone(true, request)); nb_acknowledge = (red<<deSimone::prop1_iter, 10>>0, acknowledge); ok = (nb_acknowledge <= 1); tel @@ -7580,7 +7594,7 @@ tel -- end of node mapiter::incr function mapiter::map_egal(i1:A_a_2; i2:A_a_2) returns (o:A_bool_2); let - o = (Lustre::map<<Lustre::=, 2>>i1, i2); + o = (Lustre::map<<Lustre::=, 2>>(i1, i2)); tel -- end of node mapiter::map_egal node mapiter::bitalt(in:bool) returns (sacc:bool; out:bool); @@ -7591,7 +7605,7 @@ tel -- end of node mapiter::bitalt function mapiter::fill_bitalt(in:bool) returns (sacc:bool; out:A_bool_2); let - (sacc, out) = (Lustre::fill<<mapiter::bitalt, 2>>in); + (sacc, out) = (Lustre::fill<<mapiter::bitalt, 2>>(in)); tel -- end of node mapiter::fill_bitalt node mapiter::initmat(iacc:bool) returns (sacc:bool; R:A_A_bool_2_3); @@ -7601,7 +7615,7 @@ tel -- end of node mapiter::initmat function mapiter::red_incr(init:int; b:A_bool_2) returns (res:int); let - res = (Lustre::red<<mapiter::incr, 2>>init, b); + res = (Lustre::red<<mapiter::incr, 2>>(init, b)); tel -- end of node mapiter::red_incr node mapiter::reducemat(iacc:int; I:A_A_bool_2_3) returns (res:int); @@ -7627,10 +7641,10 @@ var init2:A_A_bool_2_3; XORMAT:A_A_bool_2_3; let - (bid1, init1) = (mapiter::initmata); - (bid2, init2) = (mapiter::initmat(not a)); - XORMAT = (mapiter::composematinit1, init2); - nbTrue = (mapiter::reducemat0, XORMAT); + (bid1, init1) = (mapiter::initmat(a)); + (bid2, init2) = (mapiter::initmat((not a))); + XORMAT = (mapiter::composemat(init1, init2)); + nbTrue = (mapiter::reducemat(0, XORMAT)); tel -- end of node mapiter::mapiter -- automatically defined aliases: @@ -7901,8 +7915,8 @@ returns ( TabInfoChgIndiv:A__normal::T_InfoChgIndiv_20; TabInfoChgGlob:A__normal::T_InfoChgGlob_20); let - TabInfoChgIndiv = (normal::extract_tab_info_chg_indivEntreeGlob); - TabInfoChgGlob = ((normal::extract_info_chg_globEntreeGlob)^20); + TabInfoChgIndiv = (normal::extract_tab_info_chg_indiv(EntreeGlob)); + TabInfoChgGlob = ((normal::extract_info_chg_glob(EntreeGlob))^20); tel -- end of node normal::extrCharge node normal::trChItere(acc_in:int; elt:int) returns (acc_out:int); @@ -7953,8 +7967,8 @@ let TabComVal_bis = (map<<normal::egal_indice, 20>>TabIndiceGen, InfoGenGlob.chg2gen); (bid, TabIndiceGen) = (fill<<normal::copie, 20>>indice_gen); - TabComChg = (normal::traite_gen_coreindice_gen, InfoGenIndiv, InfoGenGlob, - TabEtatCharge, TabComVal_bis); + TabComChg = (normal::traite_gen_core(indice_gen, InfoGenIndiv, + InfoGenGlob, TabEtatCharge, TabComVal_bis)); TabComVal = (map<<normal::egal_indice, 20>>TabIndiceGen, InfoGenGlob.chg2gen); tel @@ -7996,8 +8010,8 @@ returns ( var bid:int; let - TabInfoGenIndiv = (normal::extract_tab_info_gen_indivEntreeGlob); - TabInfoGenGlob = ((normal::extract_info_gen_globEntreeGlob)^4); + TabInfoGenIndiv = (normal::extract_tab_info_gen_indiv(EntreeGlob)); + TabInfoGenGlob = ((normal::extract_info_gen_glob(EntreeGlob))^4); (bid, TabIndiceGen) = (fill<<normal::incr_acc, 4>>0); tel -- end of node normal::extrGen @@ -8041,13 +8055,13 @@ var AllTabComChg:A_A_int_20_4; AllTabComVal:A_A_bool_20_4; let - (TabInfoChgIndiv, TabInfoChgGlob) = (normal::extrChargeEntreeGlob); - TabEtatCharge = (normal::traiteChgTabInfoChgIndiv, TabInfoChgGlob); + (TabInfoChgIndiv, TabInfoChgGlob) = (normal::extrCharge(EntreeGlob)); + TabEtatCharge = (normal::traiteChg(TabInfoChgIndiv, TabInfoChgGlob)); (TabInfoGenIndiv, TabInfoGenGlob, TabIndiceGen) = - (normal::extrGenEntreeGlob); - (AllTabComChg, AllTabComVal) = (normal::traiteGenTabIndiceGen, - TabInfoGenIndiv, TabInfoGenGlob, TabEtatCharge); - TabComChg = (normal::fusion_comAllTabComChg, AllTabComVal); + (normal::extrGen(EntreeGlob)); + (AllTabComChg, AllTabComVal) = (normal::traiteGen(TabIndiceGen, + TabInfoGenIndiv, TabInfoGenGlob, TabEtatCharge)); + TabComChg = (normal::fusion_com(AllTabComChg, AllTabComVal)); tel -- end of node normal::normal @@ -8157,10 +8171,10 @@ var bid1:bool; bid2:bool; let - (bid1, init1) = (predefOp::initmatboola); - (bid2, init2) = (predefOp::initmatbool(not a)); - XORMAT = (predefOp::composematboolinit1, init2); - nbTrue = (predefOp::reducematbool0, XORMAT); + (bid1, init1) = (predefOp::initmatbool(a)); + (bid2, init2) = (predefOp::initmatbool((not a))); + XORMAT = (predefOp::composematbool(init1, init2)); + nbTrue = (predefOp::reducematbool(0, XORMAT)); tel -- end of node predefOp::predefOp2 @@ -8204,10 +8218,10 @@ var bid1:int; bid2:int; let - (bid1, init1) = (predefOp::initmatinta); - (bid2, init2) = (predefOp::initmatint(a * a)); - (matres1, matres2) = (predefOp::composematintinit1, init2); - res = (predefOp::reducematint0, matres1); + (bid1, init1) = (predefOp::initmatint(a)); + (bid2, init2) = (predefOp::initmatint((a * a))); + (matres1, matres2) = (predefOp::composematint(init1, init2)); + res = (predefOp::reducematint(0, matres1)); tel -- end of node predefOp::predefOp -- automatically defined aliases: @@ -8385,8 +8399,8 @@ returns ( TabInfoChgIndiv:A__testSilus::T_InfoChgIndiv_20; TabInfoChgGlob:A__testSilus::T_InfoChgGlob_20); let - TabInfoChgIndiv = (testSilus::extract_tab_info_chg_indivEntreeGlob); - TabInfoChgGlob = ((testSilus::extract_info_chg_globEntreeGlob)^20); + TabInfoChgIndiv = (testSilus::extract_tab_info_chg_indiv(EntreeGlob)); + TabInfoChgGlob = ((testSilus::extract_info_chg_glob(EntreeGlob))^20); tel -- end of node testSilus::extrCharge node testSilus::trChItere(acc_in:int; elt:int) returns (acc_out:int); @@ -8423,8 +8437,8 @@ var TabIndiceGen:A_int_20; bidon:int; let - TabComChg = (testSilus::traite_gen_coreindice_gen, InfoGenIndiv, - InfoGenGlob, TabEtatCharge, TabComVal); + TabComChg = (testSilus::traite_gen_core(indice_gen, InfoGenIndiv, + InfoGenGlob, TabEtatCharge, TabComVal)); TabComVal = (map<<testSilus::egal_indice, 20>>TabIndiceGen, InfoGenGlob.chg2gen); (bidon, TabIndiceGen) = (fill<<testSilus::copie, 20>>indice_gen); @@ -8478,8 +8492,8 @@ returns ( var bidon:int; let - TabInfoGenIndiv = (testSilus::extract_tab_info_gen_indivEntreeGlob); - TabInfoGenGlob = ((testSilus::extract_info_gen_globEntreeGlob)^4); + TabInfoGenIndiv = (testSilus::extract_tab_info_gen_indiv(EntreeGlob)); + TabInfoGenGlob = ((testSilus::extract_info_gen_glob(EntreeGlob))^4); (bidon, TabIndiceGen) = (fill<<testSilus::incr_acc, 4>>0); tel -- end of node testSilus::extrGen @@ -8512,13 +8526,13 @@ var AllTabComChg:A_A_int_20_4; AllTabComVal:A_A_bool_20_4; let - (TabInfoChgIndiv, TabInfoChgGlob) = (testSilus::extrChargeEntreeGlob); - TabEtatCharge = (testSilus::traiteChgTabInfoChgIndiv, TabInfoChgGlob); + (TabInfoChgIndiv, TabInfoChgGlob) = (testSilus::extrCharge(EntreeGlob)); + TabEtatCharge = (testSilus::traiteChg(TabInfoChgIndiv, TabInfoChgGlob)); (TabInfoGenIndiv, TabInfoGenGlob, TabIndiceGen) = - (testSilus::extrGenEntreeGlob); - (AllTabComChg, AllTabComVal) = (testSilus::traiteGenTabIndiceGen, - TabInfoGenIndiv, TabInfoGenGlob, TabEtatCharge); - TabComChg = (testSilus::fusion_comAllTabComChg, AllTabComVal); + (testSilus::extrGen(EntreeGlob)); + (AllTabComChg, AllTabComVal) = (testSilus::traiteGen(TabIndiceGen, + TabInfoGenIndiv, TabInfoGenGlob, TabEtatCharge)); + TabComChg = (testSilus::fusion_com(AllTabComChg, AllTabComVal)); tel -- end of node testSilus::testSilus -- automatically defined aliases: @@ -8636,7 +8650,7 @@ var accu_out:_triSel::sorted_iter_accu; TSorted:A_int_50; let - TSorted = (triSel::triSelTIn); + TSorted = (triSel::triSel(TIn)); accu_out = (red<<triSel::sorted_iter, 50>>sorted_iter_accu{prev_elt=0;prop_is_tt=true}, TSorted); ok = accu_out.prop_is_tt; @@ -8656,17 +8670,17 @@ type _TestCondact::t1 = int; type _TestCondact::t2 = int; node TestCondact::n(e:int) returns (s:int); let - s = (Util::carree); + s = (Util::carre(e)); tel -- end of node TestCondact::n node TestCondact::C(c:bool; d:int; x:int) returns (y:int); let - y = ( if c then (TestCondact::nx) else (d -> (pre y))); + y = ( if c then (TestCondact::n(x)) else (d -> (pre y))); tel -- end of node TestCondact::C node Main::Condact(c:bool; d:int; x:int) returns (y:int); let - y = (TestCondact::Cc, d, x); + y = (TestCondact::C(c, d, x)); tel -- end of node Main::Condact @@ -8721,12 +8735,12 @@ tel -- end of node util::igt node intArray::_isGreaterThan_(i:int; j:int) returns (res:bool); let - res = (util::igti, j); + res = (util::igt(i, j)); tel -- end of node intArray::_isGreaterThan_ function intArray::_isEqualTo_(i1:a; i2:a) returns (o:bool); let - o = (Lustre::=i1, i2); + o = (Lustre::=(i1, i2)); tel -- end of node intArray::_isEqualTo_ type _intArray::T_isElementOf_ = struct {eltToSearch : int; iselementof : bool}; @@ -8739,7 +8753,7 @@ returns ( let acc_out = T_isElementOf_{eltToSearch=acc_in.eltToSearch;iselementof=(acc_in or - (intArray::_isEqualTo_acc_in.eltToSearch, elt_in))}; + (intArray::_isEqualTo_(acc_in.eltToSearch, elt_in)))}; tel -- end of node intArray::iterated_isElementOf_ @@ -8759,7 +8773,8 @@ tel 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)); + ge = ((intArray::_isGreaterThan_(e1, e2)) or (intArray::_isEqualTo_(e1, + e2))); tel -- end of node intArray::_isGreaterOrEqualTo_ @@ -8770,8 +8785,8 @@ returns ( acc_out:_intArray::forSortingAlgo); let acc_out = - forSortingAlgo{previousElement=elt;sortedUpToHere=((intArray::_isGreaterOrEqualTo_elt, - acc_in.previousElement) and acc_in.sortedUpToHere)}; + forSortingAlgo{previousElement=elt;sortedUpToHere=((intArray::_isGreaterOrEqualTo_(elt, + acc_in.previousElement)) and acc_in.sortedUpToHere)}; tel -- end of node intArray::isLocallyLoselySorted @@ -8870,7 +8885,7 @@ tel -- end of node intArray::sort_ node intArray::selectMax(e1:int; e2:int) returns (e:int); let - e = ( if (intArray::_isGreaterThan_e1, e2) then e1 else e2); + e = ( if (intArray::_isGreaterThan_(e1, e2)) then e1 else e2); tel -- end of node intArray::selectMax @@ -8913,7 +8928,7 @@ tel -- end of node intArray::selectElementOfRank_inArray_ node intArray::selectMin(e1:int; e2:int) returns (e:int); let - e = ( if (intArray::_isGreaterThan_e1, e2) then e2 else e1); + e = ( if (intArray::_isGreaterThan_(e1, e2)) then e2 else e1); tel -- end of node intArray::selectMin @@ -8924,7 +8939,7 @@ returns ( var maximum:int; let - maximum = (intArray::getMaximumIn_array); + maximum = (intArray::getMaximumIn_(array)); minimumElement = (red<<intArray::selectMin, 10>>maximum, array); tel -- end of node intArray::getMinimumIn_ @@ -8937,10 +8952,10 @@ returns ( acc_out:_intArray::currentRank_withMemorizedRank); let acc_out = currentRank_withMemorizedRank{currentRank=(acc_in.currentRank + - 1);rankOfMemorizedVal=( if (intArray::_isGreaterThan_e1, - acc_in.memorizedVal) then acc_in.currentRank else - acc_in.rankOfMemorizedVal);memorizedVal=( if (intArray::_isGreaterThan_e1, - acc_in.memorizedVal) then e1 else acc_in.memorizedVal)}; + 1);rankOfMemorizedVal=( if (intArray::_isGreaterThan_(e1, + acc_in.memorizedVal)) then acc_in.currentRank else + acc_in.rankOfMemorizedVal);memorizedVal=( if (intArray::_isGreaterThan_(e1, + acc_in.memorizedVal)) then e1 else acc_in.memorizedVal)}; tel -- end of node intArray::selectMaxRank @@ -8965,8 +8980,8 @@ returns ( acc_out:_intArray::currentRank_withMemorizedRank); let acc_out = currentRank_withMemorizedRank{currentRank=(acc_in.currentRank + - 1);rankOfMemorizedVal=( if (intArray::_isEqualTo_acc_in.memorizedVal, elt) - then acc_in.currentRank else + 1);rankOfMemorizedVal=( if (intArray::_isEqualTo_(acc_in.memorizedVal, + elt)) then acc_in.currentRank else acc_in.rankOfMemorizedVal);memorizedVal=acc_in.memorizedVal}; tel -- end of node intArray::selectMinRank @@ -8978,7 +8993,7 @@ returns ( var minElement:int; let - minElement = (intArray::getMinimumIn_array); + minElement = (intArray::getMinimumIn_(array)); rankOfMinimumElement = (red<<intArray::selectMinRank, 10>>currentRank_withMemorizedRank{currentRank=0;rankOfMemorizedVal=0;memorizedVal=minElement}, array).rankOfMemorizedVal; @@ -8994,11 +9009,11 @@ returns ( pos_max:int; max:int); let - min = (intArray::getMinimumIn_a); - pos_min = (intArray::getRank_ofMinimumIn_a); - max = (intArray::getMaximumIn_a); - pos_max = (intArray::getRank_ofMaximumIn_a); - tri = (intArray::sort_a); + min = (intArray::getMinimumIn_(a)); + pos_min = (intArray::getRank_ofMinimumIn_(a)); + max = (intArray::getMaximumIn_(a)); + pos_max = (intArray::getRank_ofMaximumIn_(a)); + tri = (intArray::sort_(a)); tel -- end of node main::main -- automatically defined aliases: @@ -9126,7 +9141,7 @@ var accu_out:_tri::sorted_iter_accu; TSorted:A_int_10; let - TSorted = (tri::mainTIn); + TSorted = (tri::main(TIn)); accu_out = (red<<tri::sorted_iter, 10>>sorted_iter_accu{prev_elt=0;prop_is_tt=true}, TSorted); res = accu_out.prop_is_tt; @@ -9165,9 +9180,9 @@ returns ( obool:bool; oreal:real); let - oint = (Pint::n0, i); - obool = (Pbool::ntrue, (i < 50)); - oreal = (Preal::n0., (0. -> ((pi * ray) * ray))); + oint = (Pint::n(0, i)); + obool = (Pbool::n(true, (i < 50))); + oreal = (Preal::n(0., (0. -> ((pi * ray) * ray)))); tel -- end of node main::main @@ -9201,16 +9216,16 @@ returns ( out2:_inter::selType); let out2 = selType{i=0;b=true;r=0.}; - out.i = (pint::fby1out2.i, in.i); - out.b = (pbool::fby1out2.b, in.b); - out.r = (preal::fby1out2.r, in.r); + out.i = (pint::fby1(out2.i, in.i)); + out.b = (pbool::fby1(out2.b, in.b)); + out.r = (preal::fby1(out2.r, in.r)); tel -- end of node inter::preced node mainPack::preced(in:_inter::selType) returns (out:_inter::selType); var out2:_inter::selType; let - (out, out2) = (inter::precedin); + (out, out2) = (inter::preced(in)); tel -- end of node mainPack::preced const inter::n = -4; @@ -9246,9 +9261,9 @@ returns ( out2:_inter::selType); let out2 = selType{i=0;b=true;r=0.}; - out.i = (pint::fby1out2.i, in.i); - out.b = (pbool::fby1out2.b, in.b); - out.r = (preal::fby1out2.r, in.r); + out.i = (pint::fby1(out2.i, in.i)); + out.b = (pbool::fby1(out2.b, in.b)); + out.r = (preal::fby1(out2.r, in.r)); tel -- end of node inter::preced node main::foo(in:int) returns (out:int); @@ -9280,14 +9295,14 @@ node asservi::I2(d2x:real) returns (x:real); var dx:real; let - dx = (asservi::Id2x); + dx = (asservi::I(d2x)); x = (dx -> ((T * dx) + (pre x))); tel -- end of node asservi::I2 node asservi::PEND(d2x0:real; d2y0:real) returns (teta:real); let - teta = (asservi::I2((((asservi::sinteta) * (d2y0 + G)) - - ((asservi::costeta) * d2x0)) / L)); + teta = (asservi::I2(((((asservi::sin(teta)) * (d2y0 + G)) - + ((asservi::cos(teta)) * d2x0)) / L))); tel -- end of node asservi::PEND @@ -9306,12 +9321,12 @@ var x:real; y:real; let - d2x0 = (asservi::D(asservi::Dx0)); - d2y0 = (asservi::D(asservi::Dy0)); - teta = (asservi::PENDd2x0, d2y0); - x = (x0 + (L * (asservi::sinteta))); - y = (y0 + (L * (asservi::costeta))); - p = (asservi::make_pendx0, y0, x, y); + d2x0 = (asservi::D((asservi::D(x0)))); + d2y0 = (asservi::D((asservi::D(y0)))); + teta = (asservi::PEND(d2x0, d2y0)); + x = (x0 + (L * (asservi::sin(teta)))); + y = (y0 + (L * (asservi::cos(teta)))); + p = (asservi::make_pend(x0, y0, x, y)); tel -- end of node asservi::jeu extern function asservi::sqrt(x:real) returns (y:real); @@ -9326,15 +9341,15 @@ var y:real; let d2y0 = 0.0; - d2x0 = (delta -> (((((8.0 * G) * (asservi::sinteta)) / (asservi::costeta)) - + ((asservi::sqrt((1.0 * G) * L)) * (asservi::Dteta))) + ((0.5 * x0) / - L))); - teta = (asservi::PEND(delta -> d2x0), d2y0); - x = (x0 + (L * (asservi::sinteta))); - y = (y0 + (L * (asservi::costeta))); - x0 = (asservi::I2d2x0); - y0 = (asservi::I2d2y0); - p = (asservi::make_pendx0, y0, x, y); + d2x0 = (delta -> (((((8.0 * G) * (asservi::sin(teta))) / + (asservi::cos(teta))) + ((asservi::sqrt(((1.0 * G) * L))) * + (asservi::D(teta)))) + ((0.5 * x0) / L))); + teta = (asservi::PEND((delta -> d2x0), d2y0)); + x = (x0 + (L * (asservi::sin(teta)))); + y = (y0 + (L * (asservi::cos(teta)))); + x0 = (asservi::I2(d2x0)); + y0 = (asservi::I2(d2y0)); + p = (asservi::make_pend(x0, y0, x, y)); tel -- end of node asservi::asservi Those tests are supposed to generate errors @@ -9397,8 +9412,8 @@ var let go_up = (true -> ( if ((pre scie) >= 5) then false else ( if ((pre scie) <= 0) then true else (pre go_up)))); - scie = ( if reset then 0 else (0 -> ( if go_up then (activation1::upscie) - else (activation1::downscie)))); + scie = ( if reset then 0 else (0 -> ( if go_up then + (activation1::up(scie)) else (activation1::down(scie))))); tel -- end of node activation1::activation1 @@ -9421,8 +9436,8 @@ var let go_up = (true -> ( if ((pre scie) >= 5) then false else ( if ((pre scie) <= 0) then true else (pre go_up)))); - scie = (0 -> ( if evt then ( if go_up then (activation2::upscie) else - (activation2::downscie)) else (pre scie))); + scie = (0 -> ( if evt then ( if go_up then (activation2::up(scie)) else + (activation2::down(scie))) else (pre scie))); tel -- end of node activation2::activation2 @@ -9459,7 +9474,7 @@ var bidon2:bool; let edge = (false -> ((in and (not (pre in))) or (bidon2 and bidon1))); - (bidon1, bidon2) = (bug::bidonin); + (bidon1, bidon2) = (bug::bidon(in)); tel -- end of node bug::edge_detect node bug::after(X:bool) returns (afterX:bool); @@ -9468,12 +9483,12 @@ var bidon2:bool; let afterX = (false -> ((pre (X or afterX)) or (bidon2 and bidon1))); - (bidon1, bidon2) = (bug::bidonX); + (bidon1, bidon2) = (bug::bidon(X)); tel -- end of node bug::after node bug::once_since(C:bool; A:bool) returns (X:bool); let - X = ( if A then C else ( if (bug::afterA) then (C or (false -> (pre X))) + X = ( if A then C else ( if (bug::after(A)) then (C or (false -> (pre X))) else false)); tel -- end of node bug::once_since @@ -9484,7 +9499,7 @@ tel -- end of node bug::implies node bug::once_from_to(C:bool; A:bool; B:bool) returns (X:bool); let - X = (bug::impliesB, (false -> (pre (bug::once_sinceC, A)))); + X = (bug::implies(B, (false -> (pre (bug::once_since(C, A)))))); tel -- end of node bug::once_from_to @@ -9503,9 +9518,9 @@ var x:int; y:int; let - begin = (active -> (bug::edge_detectactive)); - en = (bug::edge_detect(not active)); - alarm = (not (bug::once_from_toaction, begin, en)); + begin = (active -> (bug::edge_detect(active))); + en = (bug::edge_detect((not active))); + alarm = (not (bug::once_from_to(action, begin, en))); (intO, realO) = ((((ze_const_int + x) + y), ((10.0 - 10.0) - 10.0)) -> (intI, ((pre realO) * realI))); x = (0 -> ( if active then y else ((pre x) + 1))); @@ -9618,7 +9633,7 @@ tel -- end of node piege::aux1 node piege::piege(in:bool) returns (out:bool); let - out = (in and (piege::aux1(piege::aux2out, out))); + out = (in and (piege::aux1((piege::aux2(out, out))))); tel -- end of node piege::piege