diff --git a/src/TODO b/src/TODO index 84c7f2bf6cf27368ed49cf6f00b28e66ecf4d26d..5291493ade9cc980f1bb6546986fb4bf44287bed 100644 --- a/src/TODO +++ b/src/TODO @@ -87,6 +87,8 @@ les operateurs aritmetiques, bof. * test/should_fail/semantics/bad_call03.lus Moi j'accepte ca... +* autoriser les noeuds (ou fonction) sans corps sans avoir a préciser +"extern" ? *********************************************************************************** *********************************************************************************** @@ -136,6 +138,13 @@ n'est pas le cas pour l'instant... *** facile + +* Pb des noms de modules + ../lus2lic should_work/NONREG/dependeur_struct.lus + -> + + ../lus2lic should_work/NONREG/Int.lus + * dans evalType, je ne checke pas tous les arguments ! ecrire les tests idoines puis faire ces checks. @@ -176,7 +185,14 @@ tel --------------------------------------------------------------------- -* Paramatrize the AS (cf SyntaxTreeCore) by the kind of ident that is +* finir solveIdent.ml + +ca devrait corriger le pb dans test/should_work/NONREG/alarme.lus ou +la constant "delai_reprise" est defini comme "alarme__delai_reprise" +et utilisée comme "delai_reprise". + + +Paramatrize the AS (cf SyntaxTreeCore) by the kind of ident that is used. Indeed, during parsing, we cannot always know what Ident.long should we have, given an Ident.idref, or a Ident.t. The idea is then to write a function resolve_name which profile is diff --git a/src/compiledData.ml b/src/compiledData.ml index 15bfdd2a41a202580dae3e9f3687e5cdbbb3703a..20cc272fe74a3e03a80e13c35dfd91cf718002f9 100644 --- a/src/compiledData.ml +++ b/src/compiledData.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 12/06/2008 (at 11:06) by Erwan Jahier> *) +(** Time-stamp: <modified the 12/06/2008 (at 17:07) by Erwan Jahier> *) (** @@ -286,6 +286,7 @@ and static_arg_eff = | NodeStaticArgEff of (Ident.t * node_exp_eff) +(* XXX rm: just for test *) let (make_dummy_var: Ident.idref -> var_info_eff) = fun idref -> let id = Ident.of_idref idref in diff --git a/src/compiledDataDump.ml b/src/compiledDataDump.ml index 0422381206be7e863646aaf39f7d594a2d6cdff3..e6afbf8217c03fe398c2b7785caaa3329dfe1e43 100644 --- a/src/compiledDataDump.ml +++ b/src/compiledDataDump.ml @@ -5,10 +5,10 @@ open Lxm -let (long : Ident.long -> string) = - fun id -> - let str = Ident.string_of_long id in - Str.global_replace (Str.regexp "::") "__" str +let (long : Ident.long -> string) = Ident.string_of_long +(* fun id -> *) +(* let str = Ident.string_of_long id in *) +(* Str.global_replace (Str.regexp "::") "__" str *) let rec string_of_const_eff = ( function @@ -61,6 +61,7 @@ and string_of_type_eff = function | Any -> "a" | Overload -> "o" + and (type_eff_list_to_string :type_eff list -> string) = fun tel -> diff --git a/src/ident.ml b/src/ident.ml index 539da0afeac89376ddc163ef9ac624d5f9cf7942..5e33b400046f19bbe1b122a29337c30249a2dfc2 100644 --- a/src/ident.ml +++ b/src/ident.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 03/06/2008 (at 09:50) by Erwan Jahier> *) +(** Time-stamp: <modified the 13/06/2008 (at 09:24) by Erwan Jahier> *) (* J'ai appele ca symbol (mais ca remplace le ident) : c'est juste une couche qui garantit l'unicite en memoire diff --git a/src/lazyCompiler.ml b/src/lazyCompiler.ml index 3a3d27f0aaf038e5293ec5a587e6a4d8de2cf070..c7b2a2e9591d981075047ed4ca5460b571f7a8bf 100644 --- a/src/lazyCompiler.ml +++ b/src/lazyCompiler.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 10/06/2008 (at 10:47) by Erwan Jahier> *) +(** Time-stamp: <modified the 12/06/2008 (at 18:02) by Erwan Jahier> *) open Lxm @@ -455,14 +455,14 @@ and (const_check_do : t -> Ident.long -> Lxm.t -> SymbolTab.t -> bool -> if (tdecl = teff ) then ceff else raise (Compile_error (const_def.src, Printf.sprintf - " this constant is declared as '%s' but evaluated as '%s'" - (CompiledDataDump.string_of_type_eff tdecl) - (CompiledDataDump.string_of_type_eff teff) + " this constant is declared as '%s' but evaluated as '%s'" + (CompiledDataDump.string_of_type_eff tdecl) + (CompiledDataDump.string_of_type_eff teff) ))) ) | [] -> assert false (* should not occur *) | _::_ -> raise (Compile_error(const_def.src, - "bad constant value: tuple not allowed")) + "bad constant value: tuple not allowed")) ) in if not provide_flag then diff --git a/src/parser.mly b/src/parser.mly index 50aeaa0edcd59287e0b5c0a96f6acbd02e0c5d68..b195436cca30bcf0512cfea4f2184782c7126dca 100644 --- a/src/parser.mly +++ b/src/parser.mly @@ -448,29 +448,22 @@ sxTypedValuedIdent : /* constantes */ -sxConstDecl: TK_CONST sxConstDeclList - {} - ; +sxConstDecl: TK_CONST sxConstDeclList {} ; -sxConstDeclList: sxOneConstDecl TK_SEMICOL - {} - | sxConstDeclList sxOneConstDecl TK_SEMICOL - {} - ; +sxConstDeclList: + | sxOneConstDecl TK_SEMICOL {} + | sxConstDeclList sxOneConstDecl TK_SEMICOL {} ; sxOneConstDecl: - /* Les listes d'idents en partie gauche sont - acceptées pour les constantes externes : - */ - sxIdent TK_COLON sxType - { (treat_external_const_list [$1] $3 ) } - | sxIdent TK_COMA sxIdentList TK_COLON sxType - { (treat_external_const_list ($1::(List.rev $3)) $5) } - /* Mais pas pour les constantes définies : - */ - | sxIdent TK_COLON sxType TK_EQ sxExpression - { (treat_defined_const $1 (Some $3) $5) } - | sxIdent TK_EQ sxExpression +/* Les listes d'idents en partie gauche sont + acceptées pour les constantes externes : */ + | sxIdent TK_COLON sxType { (treat_external_const_list [$1] $3 ) } + | sxIdent TK_COMA sxIdentList TK_COLON sxType +{ (treat_external_const_list ($1::(List.rev $3)) $5) } +/* Mais pas pour les constantes définies : */ +| sxIdent TK_COLON sxType TK_EQ sxExpression +{ (treat_defined_const $1 (Some $3) $5) } +| sxIdent TK_EQ sxExpression { (treat_defined_const $1 (None) $3 ) } ; @@ -532,33 +525,24 @@ sxExtNodeDecl: TK_EXTERN TK_FUNCTION sxIdent sxParams TK_RETURNS sxParams sxOptSemicol { treat_external_node false $3 $4 $6 } | TK_EXTERN TK_NODE sxIdent sxParams TK_RETURNS sxParams sxOptSemicol - /* WARNING ! il faut remettre les listes à l'endroit */ - { treat_external_node true $3 $4 $6 } - ; - + { treat_external_node true $3 $4 $6 } +; /* noeuds */ -sxNodeDecl: - sxLocalNode - {} - ; +sxNodeDecl: sxLocalNode {}; sxLocalNode: - TK_NODE sxIdent sxStaticParams sxParams TK_RETURNS sxParams sxPragma sxOptSemicol +| TK_NODE sxIdent sxStaticParams sxParams TK_RETURNS sxParams sxPragma sxOptSemicol sxLocals sxBody sxOptEndNode { treat_node_decl true $2 $3 $4 $6 $9 $7 (fst $10) (snd $10) } - | TK_FUNCTION sxIdent sxStaticParams sxParams TK_RETURNS sxParams sxPragma sxOptSemicol +| TK_FUNCTION sxIdent sxStaticParams sxParams TK_RETURNS sxParams sxPragma sxOptSemicol sxLocals sxBody sxOptEndNode { treat_node_decl false $2 $3 $4 $6 $9 $7 (fst $10) (snd $10) } -| TK_NODE sxIdent sxStaticParams sxNodeProfileOpt TK_EQ sxEffectiveNode - sxOptSemicol - { treat_node_alias true $2 $3 $4 $6 } -; -| TK_FUNCTION sxIdent sxStaticParams sxNodeProfileOpt TK_EQ sxEffectiveNode - sxOptSemicol - { treat_node_alias false $2 $3 $4 $6 } -; +| TK_NODE sxIdent sxStaticParams sxNodeProfileOpt TK_EQ sxEffectiveNode sxOptSemicol + { treat_node_alias true $2 $3 $4 $6 } ; +| TK_FUNCTION sxIdent sxStaticParams sxNodeProfileOpt TK_EQ sxEffectiveNode sxOptSemicol + { treat_node_alias false $2 $3 $4 $6 } ; sxNodeProfileOpt : /* nada */ diff --git a/src/test/test.res.exp b/src/test/test.res.exp index 4d102cda173474a8d8f6fca6fe2605fd686dc5c0..8166be1c9a553336bf045f76c341bbe0df9632e8 100644 --- a/src/test/test.res.exp +++ b/src/test/test.res.exp @@ -3,20 +3,20 @@ Non-regression tests ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/CURRENT.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/CURRENT.lus -node CURRENT__CURRENT(x:bool; y:bool when x) returns (z:bool when x); +node CURRENT::CURRENT(x:bool; y:bool when x) returns (z:bool when x); let z = y; tel --- end of node CURRENT__CURRENT +-- end of node CURRENT::CURRENT ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/Int.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/Int.lus -const Int8__n = 8; -type Int8__Int = bool^8; -const Int8__zero = [false, false, false, false, false, false, false, false]; +const Int8::n = 8; +type Int8::Int = bool^8; +const Int8::zero = [false, false, false, false, false, false, false, false]; -function Int8__fulladd( +function Int8::fulladd( ci:bool; x:bool; y:bool) @@ -27,33 +27,33 @@ let s = (ci xor (x xor y)); co = (((ci and x) or (x and y)) or (y and ci)); tel --- end of node Int8__fulladd -function Int8__incr(x:bool^8) returns (incr:bool^8); +-- end of node Int8::fulladd +function Int8::incr(x:bool^8) returns (incr:bool^8); var co:bool; let - (co, incr) = fillred<<node Int8__fulladd, const 8>>(true, x, zero); + (co, incr) = fillred<<node Int8::fulladd, const 8>>(true, x, zero); tel --- end of node Int8__incr -function Int8__add(x:bool^8; y:bool^8) returns (sum:bool^8); +-- end of node Int8::incr +function Int8::add(x:bool^8; y:bool^8) returns (sum:bool^8); var co:bool; let - (co, sum) = fillred<<node Int8__fulladd, const 8>>(false, x, y); + (co, sum) = fillred<<node Int8::fulladd, const 8>>(false, x, y); tel --- end of node Int8__add -node mainPack__Nat(evt:bool; reset:bool) returns (nat:Int8__Int); +-- end of node Int8::add +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 +-- end of node mainPack::Nat ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/PCOND.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/PCOND.lus -node PCOND__PCOND( +node PCOND::PCOND( h0:bool; hA:bool when h0; hB:bool when h0; @@ -72,13 +72,13 @@ let X = if ((hA and current (current (D)))) then (current (A)) else (current (B)) when hX; tel --- end of node PCOND__PCOND +-- end of node PCOND::PCOND ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/PCOND1.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/PCOND1.lus -node PCOND1__PCOND1( +node PCOND1::PCOND1( h0:bool; hA:bool when h0; hB:bool when h0; @@ -93,13 +93,13 @@ returns ( let hX = ((hC and current (hD)) and h0 when h0); tel --- end of node PCOND1__PCOND1 +-- end of node PCOND1::PCOND1 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/SOURIS.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/SOURIS.lus -node SOURIS__SOURIS( +node SOURIS::SOURIS( B1:bool; B2:bool; B3:bool; @@ -165,44 +165,44 @@ let TRIPLE = false -> ((pre(etat3) and etat0) or (((pre(etat2) and not(fin_tps)) and not(chgt)) and etat0)); tel --- end of node SOURIS__SOURIS +-- end of node SOURIS::SOURIS ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/Watch.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/Watch.lus -type Watch__STATUS_TYPE; -type Watch__ALARM_TIME_TYPE; -type Watch__WATCH_TIME_POSITION; -type Watch__ALARM_TIME_POSITION; -type Watch__DISPLAY_TYPE; -type Watch__WATCH_TIME_TYPE; -type Watch__STOPWATCH_TIME_TYPE; -type Watch__MAIN_DISPLAY_TYPE; -type Watch__LABELS_TYPE; -type Watch__DISPLAY_POSITION; -type Watch__MINI_DISPLAY_TYPE; -type Watch__string; -const Watch__INITIAL_WATCH_POSITION:Watch__WATCH_TIME_POSITION; -const Watch__INITIAL_WATCH_TIME:Watch__WATCH_TIME_TYPE; -const Watch__ALARM_DURATION:int; -const Watch__stringST:Watch__string; -const Watch__stringAL:Watch__string; -const Watch__INITIAL_ALARM_TIME:Watch__ALARM_TIME_TYPE; -const Watch__INITIAL_ALARM_POSITION:Watch__ALARM_TIME_POSITION; -const Watch__NULL_POSITION:Watch__DISPLAY_POSITION; -const Watch__INITIAL_STOPWATCH_TIME:Watch__STOPWATCH_TIME_TYPE; - -extern function Watch__ALARM_TO_DISPLAY_POS( - apos:Watch__ALARM_TIME_POSITION) -returns ( - dpos:Watch__DISPLAY_POSITION); - -extern function Watch__INCREMENT_STOPWATCH_TIME( - time:Watch__STOPWATCH_TIME_TYPE) -returns ( - newtime:Watch__STOPWATCH_TIME_TYPE); - -node Watch__TWO_STATES( +type Watch::STATUS_TYPE; +type Watch::ALARM_TIME_TYPE; +type Watch::WATCH_TIME_POSITION; +type Watch::ALARM_TIME_POSITION; +type Watch::DISPLAY_TYPE; +type Watch::WATCH_TIME_TYPE; +type Watch::STOPWATCH_TIME_TYPE; +type Watch::MAIN_DISPLAY_TYPE; +type Watch::LABELS_TYPE; +type Watch::DISPLAY_POSITION; +type Watch::MINI_DISPLAY_TYPE; +type Watch::string; +const Watch::INITIAL_WATCH_POSITION:Watch::WATCH_TIME_POSITION; +const Watch::INITIAL_WATCH_TIME:Watch::WATCH_TIME_TYPE; +const Watch::ALARM_DURATION:int; +const Watch::stringST:Watch::string; +const Watch::stringAL:Watch::string; +const Watch::INITIAL_ALARM_TIME:Watch::ALARM_TIME_TYPE; +const Watch::INITIAL_ALARM_POSITION:Watch::ALARM_TIME_POSITION; +const Watch::NULL_POSITION:Watch::DISPLAY_POSITION; +const Watch::INITIAL_STOPWATCH_TIME:Watch::STOPWATCH_TIME_TYPE; + +extern function Watch::ALARM_TO_DISPLAY_POS( + apos:Watch::ALARM_TIME_POSITION) +returns ( + dpos:Watch::DISPLAY_POSITION); + +extern function Watch::INCREMENT_STOPWATCH_TIME( + time:Watch::STOPWATCH_TIME_TYPE) +returns ( + newtime:Watch::STOPWATCH_TIME_TYPE); + +node Watch::TWO_STATES( init:bool; set:bool; reset:bool) @@ -212,116 +212,116 @@ let state = init -> if ((set and not(pre(state)))) then (true) else ( if ((reset and pre(state))) then (false) else (pre(state))); tel --- end of node Watch__TWO_STATES -node Watch__DIVIDE(scale:int) returns (quotient:bool); +-- end of node Watch::TWO_STATES +node Watch::DIVIDE(scale:int) returns (quotient:bool); var n:int; let (n, quotient) = (0, true) -> if (((pre(n) + 1) = scale)) then ((0, true)) else (((pre(n) + 1), false)); tel --- end of node Watch__DIVIDE +-- end of node Watch::DIVIDE -extern function Watch__MAKE_DISPLAY( - main:Watch__MAIN_DISPLAY_TYPE; - mini:Watch__MINI_DISPLAY_TYPE; - alpha:Watch__string; - status:Watch__STATUS_TYPE; - enhanced:Watch__DISPLAY_POSITION; - labels:Watch__LABELS_TYPE) +extern function Watch::MAKE_DISPLAY( + main:Watch::MAIN_DISPLAY_TYPE; + mini:Watch::MINI_DISPLAY_TYPE; + alpha:Watch::string; + status:Watch::STATUS_TYPE; + enhanced:Watch::DISPLAY_POSITION; + labels:Watch::LABELS_TYPE) returns ( - display:Watch__DISPLAY_TYPE); + display:Watch::DISPLAY_TYPE); -extern function Watch__WATCH_TIME_TO_MAIN_DISPLAY( - time:Watch__WATCH_TIME_TYPE) +extern function Watch::WATCH_TIME_TO_MAIN_DISPLAY( + time:Watch::WATCH_TIME_TYPE) returns ( - display:Watch__MAIN_DISPLAY_TYPE); + display:Watch::MAIN_DISPLAY_TYPE); -extern function Watch__WATCH_DATE_TO_MINI_DISPLAY( - time:Watch__WATCH_TIME_TYPE) +extern function Watch::WATCH_DATE_TO_MINI_DISPLAY( + time:Watch::WATCH_TIME_TYPE) returns ( - display:Watch__MINI_DISPLAY_TYPE); + display:Watch::MINI_DISPLAY_TYPE); -extern function Watch__WATCH_DAY_TO_ALPHA_DISPLAY( - time:Watch__WATCH_TIME_TYPE) +extern function Watch::WATCH_DAY_TO_ALPHA_DISPLAY( + time:Watch::WATCH_TIME_TYPE) returns ( - display:Watch__string); + display:Watch::string); -extern function Watch__STOPWATCH_TIME_TO_MAIN_DISPLAY( - time:Watch__STOPWATCH_TIME_TYPE) +extern function Watch::STOPWATCH_TIME_TO_MAIN_DISPLAY( + time:Watch::STOPWATCH_TIME_TYPE) returns ( - display:Watch__MAIN_DISPLAY_TYPE); + display:Watch::MAIN_DISPLAY_TYPE); -extern function Watch__WATCH_TIME_TO_MINI_DISPLAY( - time:Watch__WATCH_TIME_TYPE) +extern function Watch::WATCH_TIME_TO_MINI_DISPLAY( + time:Watch::WATCH_TIME_TYPE) returns ( - display:Watch__MINI_DISPLAY_TYPE); + display:Watch::MINI_DISPLAY_TYPE); -extern function Watch__ALARM_TIME_TO_MAIN_DISPLAY( - time:Watch__ALARM_TIME_TYPE) +extern function Watch::ALARM_TIME_TO_MAIN_DISPLAY( + time:Watch::ALARM_TIME_TYPE) returns ( - display:Watch__MAIN_DISPLAY_TYPE); + display:Watch::MAIN_DISPLAY_TYPE); -node Watch__DISPLAY( +node Watch::DISPLAY( mode_is_watch:bool; mode_is_stopwatch:bool; mode_is_alarm:bool; - watch_time:Watch__WATCH_TIME_TYPE; - stopwatch_time:Watch__STOPWATCH_TIME_TYPE; - alarm_time:Watch__ALARM_TIME_TYPE; - position_enhanced:Watch__DISPLAY_POSITION; - status:Watch__STATUS_TYPE; - labels:Watch__LABELS_TYPE) + watch_time:Watch::WATCH_TIME_TYPE; + stopwatch_time:Watch::STOPWATCH_TIME_TYPE; + alarm_time:Watch::ALARM_TIME_TYPE; + position_enhanced:Watch::DISPLAY_POSITION; + status:Watch::STATUS_TYPE; + labels:Watch::LABELS_TYPE) returns ( - display:Watch__DISPLAY_TYPE); + display:Watch::DISPLAY_TYPE); var - main_display:Watch__MAIN_DISPLAY_TYPE; - mini_display:Watch__MINI_DISPLAY_TYPE; - alpha_display:Watch__string; + main_display:Watch::MAIN_DISPLAY_TYPE; + mini_display:Watch::MINI_DISPLAY_TYPE; + alpha_display:Watch::string; let - display = Watch__MAKE_DISPLAY(main_display, mini_display, alpha_display, + 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_DISPLAY(watch_time), - Watch__WATCH_DATE_TO_MINI_DISPLAY(watch_time), - Watch__WATCH_DAY_TO_ALPHA_DISPLAY(watch_time))) else ( if + ((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))); + ((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); +-- end of node Watch::DISPLAY +extern function Watch::SOMME(i1:int; i2:int; i3:int) returns (somme:int); -extern function Watch__COMPARE_WATCH_ALARM_TIME( - watch_time:Watch__WATCH_TIME_TYPE; - alarm_time:Watch__ALARM_TIME_TYPE) +extern function Watch::COMPARE_WATCH_ALARM_TIME( + watch_time:Watch::WATCH_TIME_TYPE; + alarm_time:Watch::ALARM_TIME_TYPE) returns ( result:bool); -node Watch__EDGE(b:bool) returns (edge:bool); +node Watch::EDGE(b:bool) returns (edge:bool); let edge = b -> (b and not(pre(b))); tel --- end of node Watch__EDGE +-- end of node Watch::EDGE -extern function Watch__TOGGLE_24H_IN_ALARM_MODE( - time:Watch__ALARM_TIME_TYPE) +extern function Watch::TOGGLE_24H_IN_ALARM_MODE( + time:Watch::ALARM_TIME_TYPE) returns ( - newtime:Watch__ALARM_TIME_TYPE); + newtime:Watch::ALARM_TIME_TYPE); -extern function Watch__SET_ALARM_TIME( - time:Watch__ALARM_TIME_TYPE; - position:Watch__ALARM_TIME_POSITION) +extern function Watch::SET_ALARM_TIME( + time:Watch::ALARM_TIME_TYPE; + position:Watch::ALARM_TIME_POSITION) returns ( - new_time:Watch__ALARM_TIME_TYPE); + new_time:Watch::ALARM_TIME_TYPE); -extern function Watch__NEXT_ALARM_TIME_POSITION( - position:Watch__ALARM_TIME_POSITION) +extern function Watch::NEXT_ALARM_TIME_POSITION( + position:Watch::ALARM_TIME_POSITION) returns ( - new_position:Watch__ALARM_TIME_POSITION); + new_position:Watch::ALARM_TIME_POSITION); -node Watch__ALARM( +node Watch::ALARM( toggle_24h:bool; toggle_alarm:bool; in_set:bool; @@ -329,102 +329,102 @@ node Watch__ALARM( next_position:bool; stop_beep:bool; second:bool; - watch_time:Watch__WATCH_TIME_TYPE) + watch_time:Watch::WATCH_TIME_TYPE) returns ( - time:Watch__ALARM_TIME_TYPE; + time:Watch::ALARM_TIME_TYPE; status:bool; - enhance:Watch__ALARM_TIME_POSITION; + enhance:Watch::ALARM_TIME_POSITION; beep:int); var - position_set:Watch__ALARM_TIME_POSITION; + position_set:Watch::ALARM_TIME_POSITION; start_beeping:bool; time_out:bool; count:int; internal_status:int; let - start_beeping = (Watch__COMPARE_WATCH_ALARM_TIME(watch_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 + = 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_STATES(false, start_beeping, (stop_beep or + 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__EDGE(in_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 + (Watch::NEXT_ALARM_TIME_POSITION(pre(position_set))) else (pre(position_set))); tel --- end of node Watch__ALARM +-- end of node Watch::ALARM -extern function Watch__LABELS( +extern function Watch::LABELS( mode_is_watch:bool; mode_is_stopwatch:bool; mode_is_alarm:bool; mode_is_set_watch:bool; mode_is_set_alarm:bool) returns ( - labels:Watch__LABELS_TYPE); + labels:Watch::LABELS_TYPE); -extern function Watch__WATCH_TO_DISPLAY_POS( - wpos:Watch__WATCH_TIME_POSITION) +extern function Watch::WATCH_TO_DISPLAY_POS( + wpos:Watch::WATCH_TIME_POSITION) returns ( - dpos:Watch__DISPLAY_POSITION); + dpos:Watch::DISPLAY_POSITION); -extern function Watch__STATUS( +extern function Watch::STATUS( alarm_is_set:bool; chime_is_set:bool; stopwatch_running:bool; stopwatch_lapping:bool) returns ( - status:Watch__STATUS_TYPE); + status:Watch::STATUS_TYPE); -extern function Watch__IS_O_CLOCK( - time:Watch__WATCH_TIME_TYPE) +extern function Watch::IS_O_CLOCK( + time:Watch::WATCH_TIME_TYPE) returns ( is_o_clock:bool); -extern function Watch__INCREMENT_WATCH_TIME( - time:Watch__WATCH_TIME_TYPE) +extern function Watch::INCREMENT_WATCH_TIME( + time:Watch::WATCH_TIME_TYPE) returns ( - newtime:Watch__WATCH_TIME_TYPE); + newtime:Watch::WATCH_TIME_TYPE); -extern function Watch__TOGGLE_24H_IN_WATCH_MODE( - time:Watch__WATCH_TIME_TYPE) +extern function Watch::TOGGLE_24H_IN_WATCH_MODE( + time:Watch::WATCH_TIME_TYPE) returns ( - newtime:Watch__WATCH_TIME_TYPE); + newtime:Watch::WATCH_TIME_TYPE); -extern function Watch__CONFIRM_TIME( - time:Watch__WATCH_TIME_TYPE) +extern function Watch::CONFIRM_TIME( + time:Watch::WATCH_TIME_TYPE) returns ( - new_time:Watch__WATCH_TIME_TYPE); + new_time:Watch::WATCH_TIME_TYPE); -extern function Watch__INCREMENT_WATCH_TIME_IN_SET_MODE( - time:Watch__WATCH_TIME_TYPE; - position:Watch__WATCH_TIME_POSITION) +extern function Watch::INCREMENT_WATCH_TIME_IN_SET_MODE( + time:Watch::WATCH_TIME_TYPE; + position:Watch::WATCH_TIME_POSITION) returns ( - new_time:Watch__WATCH_TIME_TYPE); + new_time:Watch::WATCH_TIME_TYPE); -extern function Watch__SET_WATCH_TIME( - time:Watch__WATCH_TIME_TYPE; - position:Watch__WATCH_TIME_POSITION) +extern function Watch::SET_WATCH_TIME( + time:Watch::WATCH_TIME_TYPE; + position:Watch::WATCH_TIME_POSITION) returns ( - new_time:Watch__WATCH_TIME_TYPE); + new_time:Watch::WATCH_TIME_TYPE); -extern function Watch__NEXT_WATCH_TIME_POSITION( - position:Watch__WATCH_TIME_POSITION) +extern function Watch::NEXT_WATCH_TIME_POSITION( + position:Watch::WATCH_TIME_POSITION) returns ( - new_position:Watch__WATCH_TIME_POSITION); + new_position:Watch::WATCH_TIME_POSITION); -node Watch__WATCH( +node Watch::WATCH( second:bool; toggle_24h:bool; toggle_chime:bool; @@ -432,70 +432,70 @@ node Watch__WATCH( next_position:bool; set:bool) returns ( - time:Watch__WATCH_TIME_TYPE; - enhance:Watch__WATCH_TIME_POSITION; + time:Watch::WATCH_TIME_TYPE; + enhance:Watch::WATCH_TIME_POSITION; chime_is_set:bool; beep:int); var - position_set:Watch__WATCH_TIME_POSITION; + position_set:Watch::WATCH_TIME_POSITION; internal_chime_is_set:int; let internal_chime_is_set = 0 -> if (toggle_chime) then ( if ((pre(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_CLOCK(time) 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 + (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 + (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__EDGE(in_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 + (Watch::NEXT_WATCH_TIME_POSITION(pre(position_set))) else (pre(position_set))); tel --- end of node Watch__WATCH +-- end of node Watch::WATCH -extern function Watch__IS_ZERO_MOD_10_MN( - time:Watch__STOPWATCH_TIME_TYPE) +extern function Watch::IS_ZERO_MOD_10_MN( + time:Watch::STOPWATCH_TIME_TYPE) returns ( is_zero:bool); -node Watch__STOPWATCH( +node Watch::STOPWATCH( hs:bool; start_stop:bool; lap:bool) returns ( - time:Watch__STOPWATCH_TIME_TYPE; + time:Watch::STOPWATCH_TIME_TYPE; run_state:bool; lap_state:bool; beep:int); var reset:bool; must_beep:bool; - internal_time:Watch__STOPWATCH_TIME_TYPE; + internal_time:Watch::STOPWATCH_TIME_TYPE; let reset = false -> (lap and pre((not(run_state) and not(lap_state)))); - run_state = Watch__TWO_STATES(false, start_stop, start_stop); - lap_state = Watch__TWO_STATES(false, (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 + (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_MN(internal_time)) else (false)); + then (Watch::IS_ZERO_MOD_10_MN(internal_time)) else (false)); beep = if (must_beep) then (1) else (0); tel --- end of node Watch__STOPWATCH +-- end of node Watch::STOPWATCH -node Watch__BUTTONS( +node Watch::BUTTONS( UL:bool; LL:bool; UR:bool; @@ -546,27 +546,27 @@ let lap = (UR and mode_is_stopwatch); stop_alarm_beep = UR; tel --- end of node Watch__BUTTONS -extern function Watch__TIME_SCALE(bidon:int) returns (scale:int); +-- end of node Watch::BUTTONS +extern function Watch::TIME_SCALE(bidon:int) returns (scale:int); -node Watch__Watch( +node Watch::Watch( UPLEFT:bool; LOWLEFT:bool; UPRIGHT:bool; LOWRIGHT:bool; time_unit:bool) returns ( - display:Watch__DISPLAY_TYPE; + display:Watch::DISPLAY_TYPE; beep:int); var - watch_time:Watch__WATCH_TIME_TYPE; - watch_position_enhanced:Watch__WATCH_TIME_POSITION; - alarm_time:Watch__ALARM_TIME_TYPE; - alarm_position_enhanced:Watch__ALARM_TIME_POSITION; - stopwatch_time:Watch__STOPWATCH_TIME_TYPE; - position_enhanced:Watch__DISPLAY_POSITION; - status:Watch__STATUS_TYPE; - labels:Watch__LABELS_TYPE; + watch_time:Watch::WATCH_TIME_TYPE; + watch_position_enhanced:Watch::WATCH_TIME_POSITION; + alarm_time:Watch::ALARM_TIME_TYPE; + alarm_position_enhanced:Watch::ALARM_TIME_POSITION; + stopwatch_time:Watch::STOPWATCH_TIME_TYPE; + position_enhanced:Watch::DISPLAY_POSITION; + status:Watch::STATUS_TYPE; + labels:Watch::LABELS_TYPE; alarm_is_set:bool; mode_is_watch:bool; mode_is_stopwatch:bool; @@ -591,35 +591,35 @@ var chime_beep:int; stopwatch_beep:int; let - display = Watch__DISPLAY(mode_is_watch, mode_is_stopwatch, mode_is_alarm, + 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); + beep = Watch::SOMME(alarm_beep, chime_beep, stopwatch_beep); (alarm_time, alarm_is_set, alarm_position_enhanced, alarm_beep) = - Watch__ALARM(toggle_24h, toggle_alarm, mode_is_set_alarm, 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, + 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_POS(watch_position_enhanced)) else ( if + (Watch::WATCH_TO_DISPLAY_POS(watch_position_enhanced)) else ( if (mode_is_set_alarm) then - (Watch__ALARM_TO_DISPLAY_POS(alarm_position_enhanced)) else + (Watch::ALARM_TO_DISPLAY_POS(alarm_position_enhanced)) else (NULL_POSITION)); - status = Watch__STATUS(alarm_is_set, chime_is_set, stopwatch_running, + status = Watch::STATUS(alarm_is_set, chime_is_set, stopwatch_running, stopwatch_lapping); (watch_time, watch_position_enhanced, chime_is_set, chime_beep) = - Watch__WATCH(second, toggle_24h, toggle_chime, mode_is_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__STOPWATCH(time_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__BUTTONS(UPLEFT, LOWLEFT, UPRIGHT, LOWRIGHT); - second = (time_unit and current (Watch__DIVIDE(Watch__TIME_SCALE(0) when + 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); +-- end of node Watch::Watch +node Watch::MORE_RECENT(evt:bool; delay:int) returns (more_recent:bool); var deadline:int; let @@ -627,13 +627,13 @@ let -> if (evt) then ((true, 0)) else ( if (pre(more_recent)) then (((deadline < delay), (pre(deadline) + 1))) else ((false, pre(deadline))))); tel --- end of node Watch__MORE_RECENT +-- end of node Watch::MORE_RECENT ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/X.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/X.lus -node X__X( +node X::X( c:bool; n:int when c) returns ( @@ -645,30 +645,30 @@ let d = (c and (current (m) <= 10)); p = 0 when d -> (pre(p) + 1 when d); tel --- end of node X__X +-- end of node X::X ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/X1.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/X1.lus -node X1__X1(b:bool; n:int) returns (m:int); +node X1::X1(b:bool; n:int) returns (m:int); let m = current (n when b); tel --- end of node X1__X1 +-- end of node X1::X1 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/X2.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/X2.lus -node X2__X2(b:bool; n:int) returns (m:int); +node X2::X2(b:bool; n:int) returns (m:int); let m = 0 -> current (n when b); tel --- end of node X2__X2 +-- end of node X2::X2 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/X3.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/X3.lus -node X3__X3(n:int; b:bool) returns (m:int); +node X3::X3(n:int; b:bool) returns (m:int); var c:bool when b; d:bool when c; @@ -685,13 +685,13 @@ let u = current (r); m = current (u); tel --- end of node X3__X3 +-- end of node X3::X3 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/X6.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/X6.lus -node X6__X6( +node X6::X6( n:int; b:bool) returns ( @@ -711,12 +711,12 @@ let u = current (r); m = current (u); tel --- end of node X6__X6 +-- end of node X6::X6 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/_N_uu.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/_N_uu.lus -node _N_uu___N_uu(I_x:bool; I_y:bool; I_z:bool) returns (O_a:bool); +node _N_uu::_N_uu(I_x:bool; I_y:bool; I_z:bool) returns (O_a:bool); var V_V135_A_forbiden:bool; V_V111_X:bool; @@ -745,12 +745,12 @@ let (true) else ( if ((pre(V_V111_X) and not(V_V111_X))) then (false) else (pre(V_V136_B_forbiden))); tel --- end of node _N_uu___N_uu +-- end of node _N_uu::_N_uu ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/activation_ec.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/activation_ec.lus -node activation_ec__activation_ec(evt:bool) returns (scie:int); +node activation_ec::activation_ec(evt:bool) returns (scie:int); var V10_go_up:bool; let @@ -759,30 +759,30 @@ let V10_go_up = true -> if ((pre(scie) >= 5)) then (false) else ( if ((pre(scie) <= 0)) then (true) else (pre(V10_go_up))); tel --- end of node activation_ec__activation_ec +-- end of node activation_ec::activation_ec ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/after.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/after.lus -node after__after(x:bool) returns (after:bool); +node after::after(x:bool) returns (after:bool); let after = (x or false -> pre(after)); tel --- end of node after__after +-- end of node after::after ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/alarme.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/alarme.lus -const alarme__delai_reprise = 4; -const alarme__delai_vigilence = 3; -const alarme__delai_alarme = 6; -node alarme__edge(in:bool) returns (edge:bool); +const alarme::delai_reprise = 4; +const alarme::delai_vigilence = 3; +const alarme::delai_alarme = 6; +node alarme::edge(in:bool) returns (edge:bool); let edge = false -> (in and not(pre(in))); tel --- end of node alarme__edge +-- end of node alarme::edge -node alarme__bascule( +node alarme::bascule( init:bool; set:bool; reset:bool) @@ -792,9 +792,9 @@ let etat = init -> if ((set and not(pre(etat)))) then (true) else ( if ((reset and pre(etat))) then (false) else (pre(etat))); tel --- end of node alarme__bascule +-- end of node alarme::bascule -node alarme__decompte( +node alarme::decompte( init:bool; val_init:int; decr:bool) @@ -804,9 +804,9 @@ let n = 0 -> if (init) then (val_init) else ( if (decr) then ((pre(n) - 1)) else (pre(n))); tel --- end of node alarme__decompte +-- end of node alarme::decompte -node alarme__alarme( +node alarme::alarme( MA:bool; code:bool; pb_hab:bool; @@ -823,31 +823,31 @@ var tps_alarme:int; let assert(#(MA, code)); - 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 + 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, + 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)), + reprise = alarme::bascule(false, (pre(alarme) and (pre(tps_alarme) = 0)), (pre(tps_reprise) = 0)); - tps_reprise = alarme__decompte(alarme__edge(reprise), delai_reprise, + 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))))) + ((pre(alarme) and ((pre(tps_alarme) = 0) or alarme::edge(not(en_marche))))) then (false) else (pre(alarme))); tel --- end of node alarme__alarme +-- end of node alarme::alarme ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/arbitre.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/arbitre.lus -node arbitre__my_switch( +node arbitre::my_switch( set:bool; reset:bool; initial:bool) @@ -857,24 +857,24 @@ let level = initial -> if ((set and not(pre(level)))) then (true) else ( if ((reset and pre(level))) then (false) else (pre(level))); tel --- end of node arbitre__my_switch -extern node arbitre__xedge(x:bool) returns (y:bool); +-- end of node arbitre::my_switch +extern node arbitre::xedge(x:bool) returns (y:bool); -node arbitre__process( +node arbitre::process( request:bool; token:bool) returns ( grant:bool; new_token:bool); let - grant = arbitre__my_switch((token and request), not(request), (token and + 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 +-- end of node arbitre::process -node arbitre__mutex( +node arbitre::mutex( req0:bool; req1:bool; req2:bool; @@ -894,18 +894,18 @@ var new_token2:bool; new_token3:bool; let - (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); + (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); token3 = false -> pre(new_token2); tel --- end of node arbitre__mutex +-- end of node arbitre::mutex -node arbitre__arbitre( +node arbitre::arbitre( req0:bool; req1:bool; req2:bool; @@ -918,15 +918,15 @@ var gr2:bool; gr3:bool; let - (gr0, gr1, gr2, gr3) = arbitre__mutex(req0, req1, req2, req3); + (gr0, gr1, gr2, gr3) = arbitre::mutex(req0, req1, req2, req3); ok = #(gr0, gr1, gr2, gr3); tel --- end of node arbitre__arbitre +-- end of node arbitre::arbitre ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/argos.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/argos.lus -node argos__argos(a:bool; b:bool) returns (s0:bool; s1:bool; s2:bool); +node argos::argos(a:bool; b:bool) returns (s0:bool; s1:bool; s2:bool); var t0:bool; t1:bool; @@ -941,13 +941,13 @@ let t1 = false -> pre(((t1 and not(b)) or (t0 and b))); x = (t0 and y); tel --- end of node argos__argos +-- end of node argos::argos ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/assertion.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/assertion.lus -node assertion__assertion( +node assertion::assertion( a:bool; b:bool; c:bool; @@ -961,109 +961,109 @@ let assert(#(a, b, c, d)); ok = true; tel --- end of node assertion__assertion +-- end of node assertion::assertion ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/aux.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/aux.lus -node aux__aux(ck:bool) returns (x:int); +node aux::aux(ck:bool) returns (x:int); let x = (pre(x) + 1); tel --- end of node aux__aux +-- end of node aux::aux ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/aux1.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/aux1.lus -node aux1__aux1(a:int; b:int) returns (c:int; d:int); +node aux1::aux1(a:int; b:int) returns (c:int; d:int); let (c, d) = if ((a > 0)) then (pre((a, b))) else (((pre(a) + 1), (pre(b) + 1))); tel --- end of node aux1__aux1 +-- end of node aux1::aux1 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/bascule.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/bascule.lus -node bascule__bascule(r:bool; s:bool) returns (q:bool; n:bool); +node bascule::bascule(r:bool; s:bool) returns (q:bool; n:bool); let q = true -> (not(pre(r)) and not(pre(n))); n = false -> (not(pre(s)) and not(pre(q))); tel --- end of node bascule__bascule +-- end of node bascule::bascule ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/call.lus 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); +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__f(a), 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); -node call__call(a:int; b:bool) returns (x:int; y:int); +-- end of node call::n +extern function call::p(a:int) returns (x:int; y:int); +node call::call(a:int; b:bool) returns (x:int; y:int); var u:int; v:int; let - (u, v) = call__p(a); - (x, y) = call__n(a, b); + (u, v) = call::p(a); + (x, y) = call::n(a, b); tel --- end of node call__call +-- end of node call::call ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/ck2.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/ck2.lus -node ck2__ck2(c:bool; d:bool when c; e:int when d) returns (n:int); +node ck2::ck2(c:bool; d:bool when c; e:int when d) returns (n:int); let n = if ((c and current (d))) then (0) else (current (current (e))); tel --- end of node ck2__ck2 +-- end of node ck2::ck2 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/ck3.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/ck3.lus -node ck3__ck3(a:bool; b:bool when a; c:bool when b) returns (x:bool); +node ck3::ck3(a:bool; b:bool when a; c:bool when b) returns (x:bool); let x = current (current (c)); tel --- end of node ck3__ck3 +-- end of node ck3::ck3 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/ck4.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/ck4.lus -node ck4__ck4(a:int when b; b:bool) returns (c:int); +node ck4::ck4(a:int when b; b:bool) returns (c:int); let c = current (a); tel --- end of node ck4__ck4 +-- end of node ck4::ck4 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/ck5.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/ck5.lus -node ck5__edge(x:bool) returns (y:bool); +node ck5::edge(x:bool) returns (y:bool); let y = false -> (x and not(pre(x))); tel --- end of node ck5__edge -node ck5__ck5(b:bool; c:bool) returns (e:bool); +-- 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 +-- end of node ck5::ck5 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/ck6.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/ck6.lus -extern function ck6__p(d:int) returns (e:int; f:int); -node ck6__N(a:bool; m:int; n:int) returns (q:int; r:int when a); +extern function ck6::p(d:int) returns (e:int; f:int); +node ck6::N(a:bool; m:int; n:int) returns (q:int; r:int when a); let q = (m + n); r = q when a; tel --- end of node ck6__N -node ck6__ck6(b:bool; c:bool; n:int; m:int) returns (k:int; l:int); +-- end of node ck6::N +node ck6::ck6(b:bool; c:bool; n:int; m:int) returns (k:int; l:int); var u:int when b; v:int when b; @@ -1071,44 +1071,44 @@ var cc:bool when b; x:int when cc; let - (u, v) = ck6__p(n when b); - (w, x) = ck6__N(cc, 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)); tel --- end of node ck6__ck6 +-- end of node ck6::ck6 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/ck7.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/ck7.lus -node ck7__ck7(a:bool; m:int; n:int) returns (q:int; r:int when a); +node ck7::ck7(a:bool; m:int; n:int) returns (q:int; r:int when a); let q = (m + n); r = q when a; tel --- end of node ck7__ck7 +-- end of node ck7::ck7 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/clock.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/clock.lus -extern node clock__outOnIn(a:bool; b:bool) returns (c:bool when b); -extern node clock__inOnIn(a:bool; b:bool when a) returns (c:bool); +extern node clock::outOnIn(a:bool; b:bool) returns (c:bool when b); +extern node clock::inOnIn(a:bool; b:bool when a) returns (c:bool); -extern node clock__outOnOut( +extern node clock::outOnOut( a:bool; b:bool) returns ( c:bool; d:bool when c); -extern node clock__all( +extern node clock::all( a:bool; b:bool when a) returns ( c:bool when b; d:bool when c); -node clock__clock(in:bool) returns (ok:bool); +node clock::clock(in:bool) returns (ok:bool); var v1:bool; v4:bool; @@ -1118,22 +1118,22 @@ var v6:bool when v5; v7:bool when v6; let - v1 = clock__inOnIn(in, true when in); + v1 = clock::inOnIn(in, true when in); v2 = in when v4; - v3 = clock__outOnIn(in, v1); - (v4, v5) = clock__outOnOut(pre(v4), pre(v4)); - (v6, v7) = clock__all(v4, v5); + v3 = clock::outOnIn(in, v1); + (v4, v5) = clock::outOnOut(pre(v4), pre(v4)); + (v6, v7) = clock::all(v4, v5); ok = boolred<<const 3, const 3, const 7>>([v1, current (v2), current (v3), v4, current (v5), current (current (v6)), current (current (current (v7)))]); tel --- end of node clock__clock +-- end of node clock::clock ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/cminus.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/cminus.lus -node cminus__TWO_STATES( +node cminus::TWO_STATES( set:bool; reset:bool; init:bool) @@ -1143,9 +1143,9 @@ let state = init -> if ((set and not(pre(state)))) then (true) else ( if ((reset and pre(state))) then (false) else (pre(state))); tel --- end of node cminus__TWO_STATES +-- end of node cminus::TWO_STATES -node cminus__TWO_BUTTONS( +node cminus::TWO_BUTTONS( on:bool; off:bool; init:bool) @@ -1155,9 +1155,9 @@ let state = init -> if (on) then (true) else ( if (off) then (false) else (pre(state))); tel --- end of node cminus__TWO_BUTTONS +-- end of node cminus::TWO_BUTTONS -node cminus__cminus( +node cminus::cminus( e1:bool; e2:bool; e3:bool; @@ -1169,38 +1169,38 @@ var s2:bool; let assert(not((e1 and e2)) -> true); - s1 = cminus__TWO_STATES(e1, e2, init); - s2 = cminus__TWO_BUTTONS(e1, 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 +-- end of node cminus::cminus ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/compteur.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/compteur.lus -node compteur__compteur(evt:bool) returns (cpt:int); +node compteur::compteur(evt:bool) returns (cpt:int); let cpt = (0 -> pre(cpt) + if (evt) then (1) else (0)); tel --- end of node compteur__compteur +-- end of node compteur::compteur ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/cpt.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/cpt.lus -node cpt__cpt(evt:bool; reset:bool) returns (cpt:int); +node cpt::cpt(evt:bool; reset:bool) returns (cpt:int); let cpt = if (reset) then (0) else ((0 -> pre(cpt) + if (evt) then (1) else (0))); tel --- end of node cpt__cpt +-- end of node cpt::cpt ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/cst.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/cst.lus -const cst__i:int; -const cst__j:int; -const cst__k:int; -node cst__cst(x:int) returns (y:int); +const cst::i:int; +const cst::j:int; +const cst::k:int; +node cst::cst(x:int) returns (y:int); var z:int; t:int; @@ -1209,26 +1209,26 @@ let t = (j - k); y = ((x + (2 * z)) + (3 * t)); tel --- end of node cst__cst +-- end of node cst::cst ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/deconne.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/deconne.lus -type deconne__pendule; -const deconne__G = 10.000000; -const deconne__L = 2.000000; -const deconne__T = 0.100000; +type deconne::pendule; +const deconne::G = 10.000000; +const deconne::L = 2.000000; +const deconne::T = 0.100000; -extern function deconne__make_pend( +extern function deconne::make_pend( x0:real; y0:real; x:real; y:real) returns ( - p:deconne__pendule); -extern function deconne__cos(x:real) returns (y:real); -extern function deconne__sin(x:real) returns (y:real); -node deconne__deconne(delta:real) returns (p:deconne__pendule); + p:deconne::pendule); +extern function deconne::cos(x:real) returns (y:real); +extern function deconne::sin(x:real) returns (y:real); +node deconne::deconne(delta:real) returns (p:deconne::pendule); var teta:real; x0:real; @@ -1239,28 +1239,28 @@ let teta = 3.14; x0 = 0.; y0 = 0.; - x = (x0 + (L * deconne__sin(teta))); - y = (y0 + (L * deconne__cos(teta))); - p = deconne__make_pend(x0, 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 +-- end of node deconne::deconne ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/dep.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/dep.lus -node dep__dep(x:int) returns (u:int; v:int; y:int); +node dep::dep(x:int) returns (u:int; v:int; y:int); let u = x -> (x + pre(x)); v = 0 -> (pre(y) + 1); y = 0 -> (pre(v) + 1); tel --- end of node dep__dep +-- end of node dep::dep ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/dependeur.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/dependeur.lus -node dependeur__dependeur( +node dependeur::dependeur( time_in_ms:int) returns ( hour:int; @@ -1278,14 +1278,14 @@ let time_in_second = (time_in_ms div 1000); ms = (time_in_ms mod 1000); tel --- end of node dependeur__dependeur +-- end of node dependeur::dependeur ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/dependeur_struct.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/dependeur_struct.lus -type dependeur_struct__time = dependeur_struct::time {h : int; m : int; s : int; ms : int}; +type dependeur_struct::time = dependeur_struct::time {h : int; m : int; s : int; ms : int}; -node dependeur_struct__dependeur_struct( +node dependeur_struct::dependeur_struct( time_in_ms:int) returns ( theTime:dependeur_struct::time {h : int; @@ -1303,13 +1303,13 @@ let time_in_second = (time_in_ms div 1000); theTime. = (time_in_ms mod 1000); tel --- end of node dependeur_struct__dependeur_struct +-- end of node dependeur_struct::dependeur_struct ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/drapfab.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/drapfab.lus -node drapfab__drapfab( +node drapfab::drapfab( bleu:bool; rouge:bool; vert:bool) @@ -1332,38 +1332,38 @@ let or ((bleu and pre(bleu)) and pre(false -> pre(bleu)))) or ((vert and pre(vert)) and pre(false -> pre(vert)))); tel --- end of node drapfab__drapfab +-- end of node drapfab::drapfab ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/enum.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/enum.lus -type enum__couleur = enum {enum__bleu, enum__blanc, enum__rouge}; -type enum__color = enum {enum__blue, enum__white, enum__redd}; -const enum__bleu; -const enum__blanc; -const enum__redd; -const enum__rouge; -const enum__blue; -const enum__white; - -node enum__boo( +type enum::couleur = enum {enum::bleu, enum::blanc, enum::rouge}; +type enum::color = enum {enum::blue, enum::white, enum::redd}; +const enum::bleu; +const enum::blanc; +const enum::redd; +const enum::rouge; +const enum::blue; +const enum::white; + +node enum::boo( e:int) returns ( - c:enum {enum__bleu, enum__blanc, enum__rouge}; - c2:enum {enum__blue, enum__white, enum__redd}); + c:enum {enum::bleu, enum::blanc, enum::rouge}; + c2:enum {enum::blue, enum::white, enum::redd}); let c = if ((e = 0)) then (bleu) else ( if ((e = 1)) then (blanc) else (rouge)); c2 = if ((e = 0)) then (blue) else ( if ((e = 1)) then (white) else (redd)); tel --- end of node enum__boo +-- end of node enum::boo ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/eq1.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/eq1.lus -node eq1__eq1( +node eq1::eq1( a:bool; b:bool; c:bool; @@ -1381,18 +1381,18 @@ let y = #(c, d); z = ((w <> c) and not(e)); tel --- end of node eq1__eq1 +-- end of node eq1::eq1 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/ex.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/ex.lus -type ex__t = int^1^2^3^4; -type ex__t1 = int^1^2^3^4^4; -type ex__t2 = ex::t2 {a : int; b : bool^11^22}; -type ex__s1 = ex::s1 {x : int; y : int^1^2^3^4}; -type ex__s = ex::s {x : int^1^2^3^4; y : ex::s1 {x : int; y : int^1^2^3^4}}; +type ex::t = int^1^2^3^4; +type ex::t1 = int^1^2^3^4^4; +type ex::t2 = ex::t2 {a : int; b : bool^11^22}; +type ex::s1 = ex::s1 {x : int; y : int^1^2^3^4}; +type ex::s = ex::s {x : int^1^2^3^4; y : ex::s1 {x : int; y : int^1^2^3^4}}; -node ex__ex( +node ex::ex( a:ex::s {x : int^1^2^3^4; y : ex::s1 {x : int; y : int^1^2^3^4}}) @@ -1401,13 +1401,13 @@ returns ( let b = (a.x[0][0][0][0] + a.y.y[0][0][0][0]); tel --- end of node ex__ex +-- end of node ex::ex ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/exclusion.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/exclusion.lus -node exclusion__exclusion( +node exclusion::exclusion( a:bool; b:bool; c:bool; @@ -1425,28 +1425,28 @@ let xor_a_b_c_d = #(a, b, c, d); xor_xor_ab_xor_cd = #(#(a, b), #(c, d)); tel --- end of node exclusion__exclusion +-- end of node exclusion::exclusion ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/fby.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/fby.lus -node fby__followed_by(ck:bool) returns (x:int); +node fby::followed_by(ck:bool) returns (x:int); let x = 0 -> (pre(x) + 1); tel --- end of node fby__followed_by +-- end of node fby::followed_by ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/flo.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/flo.lus -node flo__SWITCH(init:bool; on:bool; off:bool) returns (state:bool); +node flo::SWITCH(init:bool; on:bool; off:bool) returns (state:bool); let state = if (on) then (true) else ( if (off) then (false) else (init -> pre(state))); tel --- end of node flo__SWITCH +-- end of node flo::SWITCH -node flo__flo( +node flo::flo( i1:bool; i2:bool; on1:bool; @@ -1456,25 +1456,25 @@ node flo__flo( returns ( flo:bool); let - flo = (flo__SWITCH(i1, on1, off1) and flo__SWITCH(i2, on2, off2)); + flo = (flo::SWITCH(i1, on1, off1) and flo::SWITCH(i2, on2, off2)); tel --- end of node flo__flo +-- end of node flo::flo ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/hanane.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/hanane.lus -type hanane__t1; -const hanane__a = 4; -type hanane__string = int^4; -type hanane__string2d = int^4^4; -type hanane__structT = hanane::structT {x : int; y : real; z : int^4^4^4}; -type hanane__t2; -type hanane__t3; -type hanane__tabStruct = hanane::structT {x : int; y : real; z : int^4^4^4}^2; -const hanane__b = true; -const hanane__c = 3.140000; - -node hanane__hanane( +type hanane::t1; +const hanane::a = 4; +type hanane::string = int^4; +type hanane::string2d = int^4^4; +type hanane::structT = hanane::structT {x : int; y : real; z : int^4^4^4}; +type hanane::t2; +type hanane::t3; +type hanane::tabStruct = hanane::structT {x : int; y : real; z : int^4^4^4}^2; +const hanane::b = true; +const hanane::c = 3.140000; + +node hanane::hanane( a1:bool; b1:int^4^4 when a1; c1:hanane::structT {x : int; @@ -1498,75 +1498,75 @@ let h5 = c1[1].z; h6 = current (c1[1].z[2]); tel --- end of node hanane__hanane +-- end of node hanane::hanane ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/import1.lus 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); +extern node import1::imp(x:int) returns (y:int); +node import1::import1(a:int; b:int) returns (c:int); let - c = (import1__imp(a) + import1__imp(b)); + c = (import1::imp(a) + import1::imp(b)); tel --- end of node import1__import1 +-- end of node import1::import1 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/initial.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/initial.lus -node initial__initial(justDoIt:bool) returns (oa:bool; ob:int; oc:real); +node initial::initial(justDoIt:bool) returns (oa:bool; ob:int; oc:real); let oa = false -> pre(oa); ob = 42 -> pre(ob); oc = 42.42 -> pre(oc); tel --- end of node initial__initial +-- end of node initial::initial ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/long_et_stupide_nom_de_noeud.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/long_et_stupide_nom_de_noeud.lus -node long_et_stupide_nom_de_noeud__long_et_stupide_nom_de_noeud( +node long_et_stupide_nom_de_noeud::long_et_stupide_nom_de_noeud( long_parametre:int) returns ( long_et_stupide_nom_de_sortie:int); let long_et_stupide_nom_de_sortie = (long_parametre + pre(long_parametre)); tel --- end of node long_et_stupide_nom_de_noeud__long_et_stupide_nom_de_noeud +-- end of node long_et_stupide_nom_de_noeud::long_et_stupide_nom_de_noeud ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/minmax1.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/minmax1.lus -node minmax1__minmax1(a:int; b:int) returns (min:int; max:int); +node minmax1::minmax1(a:int; b:int) returns (min:int; max:int); let (min, max) = if ((a < b)) then ((a, b)) else ((b, a)); tel --- end of node minmax1__minmax1 +-- end of node minmax1::minmax1 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/minmax2.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/minmax2.lus -node minmax2__minmax(a:int; b:int) returns (min:int; max:int); +node minmax2::minmax(a:int; b:int) returns (min:int; max:int); let (min, max) = if ((a < b)) then ((a, b)) else ((b, a)); tel --- end of node minmax2__minmax -node minmax2__minmax2(a:int; b:int) returns (min:int; max:int); +-- end of node minmax2::minmax +node minmax2::minmax2(a:int; b:int) returns (min:int; max:int); let - (min, max) = minmax2__minmax(a, b); + (min, max) = minmax2::minmax(a, b); tel --- end of node minmax2__minmax2 +-- end of node minmax2::minmax2 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/minmax3.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/minmax3.lus -node minmax3__minmax(a:int; b:int) returns (min:int; max:int); +node minmax3::minmax(a:int; b:int) returns (min:int; max:int); let (min, max) = if ((a <= b)) then ((a, b)) else ((b, a)); tel --- end of node minmax3__minmax +-- end of node minmax3::minmax -node minmax3__minmax3( +node minmax3::minmax3( a:int; b:int; c:int) @@ -1579,22 +1579,22 @@ var MAX_ab:int; MAX_minab_c:int; let - (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); + (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 +-- end of node minmax3::minmax3 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/minmax4.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/minmax4.lus -node minmax4__minmax(a:int; b:int) returns (min:int; max:int); +node minmax4::minmax(a:int; b:int) returns (min:int; max:int); let (min, max) = if ((a <= b)) then ((a, b)) else ((b, a)); tel --- end of node minmax4__minmax +-- end of node minmax4::minmax -node minmax4__minmax4( +node minmax4::minmax4( a:int; b:int; c:int; @@ -1612,24 +1612,24 @@ var MAX__minab_mincd:int; min__MAXab_MAXcd:int; let - (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); + (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 +-- end of node minmax4::minmax4 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/minmax4_bis.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/minmax4_bis.lus -node minmax4_bis__minmax(a:int; b:int) returns (min:int; max:int); +node minmax4_bis::minmax(a:int; b:int) returns (min:int; max:int); let (min, max) = if ((a <= b)) then ((a, b)) else ((b, a)); tel --- end of node minmax4_bis__minmax +-- end of node minmax4_bis::minmax -node minmax4_bis__minmax4_bis( +node minmax4_bis::minmax4_bis( a:int; b:int; c:int; @@ -1647,20 +1647,20 @@ var MAX__minab_mincd:int; min__MAXab_MAXcd:int; let - (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); + (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 +-- end of node minmax4_bis::minmax4_bis ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/minmax5.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/minmax5.lus -extern function minmax5__minmax(a:int; b:int) returns (min:int; max:int); +extern function minmax5::minmax(a:int; b:int) returns (min:int; max:int); -node minmax5__minmax5( +node minmax5::minmax5( a:int; b:int; c:int; @@ -1678,26 +1678,26 @@ var MAX__minab_mincd:int; min__MAXab_MAXcd:int; let - (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); + (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 +-- end of node minmax5::minmax5 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/minmax5_random.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/minmax5_random.lus -extern function minmax5_random__minmax( +extern function minmax5_random::minmax( a:int; b:int) returns ( min:int; max:int); -node minmax5_random__minmax5_random( +node minmax5_random::minmax5_random( a:int; b:int; c:int; @@ -1715,24 +1715,24 @@ var MAX__minab_mincd:int; min__MAXab_MAXcd:int; let - (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); + (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 +-- end of node minmax5_random::minmax5_random ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/minmax6.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/minmax6.lus -node minmax6__minmax(a:int; b:int) returns (min:int; max:int); +node minmax6::minmax(a:int; b:int) returns (min:int; max:int); let (min, max) = if ((a <= b)) then ((a, b)) else ((b, a)); tel --- end of node minmax6__minmax +-- end of node minmax6::minmax -node minmax6__minmax6( +node minmax6::minmax6( a:int; b:int; c:int; @@ -1762,60 +1762,60 @@ var M3:int; M5:int; let - (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); + (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 +-- end of node minmax6::minmax6 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mm.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/mm.lus -type mm__pair = mm::pair {a : int; b : int}; -type mm__pairpair = mm::pairpair {a : mm::pair {a : int; b : int}; b : mm::pair {a : int; b : int}}; -node mm__mm(a:int; b:int) returns (min:int; max:int); +type mm::pair = mm::pair {a : int; b : int}; +type mm::pairpair = mm::pairpair {a : mm::pair {a : int; b : int}; b : mm::pair {a : int; b : int}}; +node mm::mm(a:int; b:int) returns (min:int; max:int); let (min, max) = if ((a > b)) then ((b, a)) else ((a, b)); tel --- end of node mm__mm +-- end of node mm::mm ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mm1.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/mm1.lus -type mm1__pair = mm1::pair {a : int; b : int}; -type mm1__pairpair = mm1::pairpair {a : mm1::pair {a : int; b : int}; b : mm1::pair {a : int; b : int}}; -node mm1__mm1(a:int; b:int) returns (y:mm1::pair {a : int; b : int}); +type mm1::pair = mm1::pair {a : int; b : int}; +type mm1::pairpair = mm1::pairpair {a : mm1::pair {a : int; b : int}; b : mm1::pair {a : int; b : int}}; +node mm1::mm1(a:int; b:int) returns (y:mm1::pair {a : int; b : int}); let (y., y.) = if ((a > b)) then ((b, a)) else ((a, b)); tel --- end of node mm1__mm1 +-- end of node mm1::mm1 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mm22.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/mm22.lus -type mm22__pair = mm22::pair {a : int; b : int}; -type mm22__pairpair = mm22::pairpair {a : mm22::pair {a : int; b : int}; b : mm22::pair {a : int; b : int}}; -node mm22__mm22(a:int; b:int) returns (y:mm22::pair {a : int; b : int}); +type mm22::pair = mm22::pair {a : int; b : int}; +type mm22::pairpair = mm22::pairpair {a : mm22::pair {a : int; b : int}; b : mm22::pair {a : int; b : int}}; +node mm22::mm22(a:int; b:int) returns (y:mm22::pair {a : int; b : int}); let y. = if ((a > b)) then (b) else (a); y. = if ((a > b)) then (a) else (b); tel --- end of node mm22__mm22 +-- end of node mm22::mm22 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mm3.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/mm3.lus -type mm3__pair = mm3::pair {a : int; b : int}; -type mm3__pairpair = mm3::pairpair {a : mm3::pair {a : int; b : int}; b : mm3::pair {a : int; b : int}}; +type mm3::pair = mm3::pair {a : int; b : int}; +type mm3::pairpair = mm3::pairpair {a : mm3::pair {a : int; b : int}; b : mm3::pair {a : int; b : int}}; -node mm3__mm3( +node mm3::mm3( a:mm3::pair {a : int; b : int}) returns ( @@ -1824,18 +1824,18 @@ returns ( let (y., y.) = if ((a.a > a.b)) then ((a.b, a.a)) else ((a.a, a.b)); tel --- end of node mm3__mm3 +-- end of node mm3::mm3 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mouse.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/mouse.lus -node mouse__edge(x:bool) returns (e:bool); +node mouse::edge(x:bool) returns (e:bool); let e = false -> (x and not(pre(x))); tel --- end of node mouse__edge +-- end of node mouse::edge -node mouse__mouse( +node mouse::mouse( click:bool; clock:bool; delay:int) @@ -1847,9 +1847,9 @@ var counting:bool; more_than_one_click:bool; let - single_click = (mouse__edge(not(counting)) and not(false -> + single_click = (mouse::edge(not(counting)) and not(false -> pre(more_than_one_click))); - double_click = (mouse__edge(not(counting)) and false -> + 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); @@ -1858,13 +1858,13 @@ let pre(counting))) then ((pre(clock_decount) - 1)) else (0 -> pre(clock_decount))); tel --- end of node mouse__mouse +-- end of node mouse::mouse ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mouse1.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/mouse1.lus -node mouse1__mouse1( +node mouse1::mouse1( click:bool; clock:bool; delay:int) @@ -1885,18 +1885,18 @@ let pre(counting))) then ((pre(clock_decount) - 1)) else (0 -> pre(clock_decount))); tel --- end of node mouse1__mouse1 +-- end of node mouse1::mouse1 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mouse2.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/mouse2.lus -node mouse2__edge(x:bool) returns (e:bool); +node mouse2::edge(x:bool) returns (e:bool); let e = false -> (x and not(pre(x))); tel --- end of node mouse2__edge +-- end of node mouse2::edge -node mouse2__mouse2( +node mouse2::mouse2( click:bool; clock:bool; delay:int) @@ -1908,9 +1908,9 @@ var counting:bool; more_than_one_click:bool; let - single = (mouse2__edge(not(counting)) and not(false -> + single = (mouse2::edge(not(counting)) and not(false -> pre(more_than_one_click))); - double = (mouse2__edge(not(counting)) and false -> + 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); @@ -1919,13 +1919,13 @@ let pre(counting))) then ((pre(clock_decount) - 1)) else (0 -> pre(clock_decount))); tel --- end of node mouse2__mouse2 +-- end of node mouse2::mouse2 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mouse3.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/mouse3.lus -node mouse3__mouse3( +node mouse3::mouse3( click:bool; clock:bool; delay:int) @@ -1940,21 +1940,21 @@ let pre(counting))) then ((pre(clock_decount) - 1)) else (0 -> pre(clock_decount))); tel --- end of node mouse3__mouse3 +-- end of node mouse3::mouse3 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/multiclock.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/multiclock.lus -node multiclock__moyenne(x:int; y:int) returns (m:int); +node multiclock::moyenne(x:int; y:int) returns (m:int); var s:int; let m = (s / 2); s = (x + y); tel --- end of node multiclock__moyenne +-- end of node multiclock::moyenne -node multiclock__multiclock( +node multiclock::multiclock( x:int; y:int; c:bool; @@ -1966,15 +1966,15 @@ 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 +-- end of node multiclock::multiclock ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc1.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/nc1.lus -node nc1__n1(n1e1:bool; n1e2:bool) returns (n1s:bool); +node nc1::n1(n1e1:bool; n1e2:bool) returns (n1s:bool); var n1b1:bool; n1b2:bool; @@ -1983,21 +1983,21 @@ let n1b2 = (n1e1 and n1e2); n1s = (n1b1 or n1b2); tel --- end of node nc1__n1 -node nc1__nc1(nc1e1:bool; nc1e2:bool) returns (nc1s:bool); +-- end of node nc1::n1 +node nc1::nc1(nc1e1:bool; nc1e2:bool) returns (nc1s:bool); var nc1b1:bool; let - nc1b1 = nc1__n1(nc1e1, nc1e2); + nc1b1 = nc1::n1(nc1e1, nc1e2); nc1s = (nc1b1 or nc1e1); tel --- end of node nc1__nc1 +-- end of node nc1::nc1 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc10.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/nc10.lus -node nc10__n4( +node nc10::n4( n4e1:int; n4e2:int; n4e3:int; @@ -2009,39 +2009,39 @@ let n4s1 = (n4e1 + n4e2); n4s2 = (n4e3 + n4e4); tel --- end of node nc10__n4 -node nc10__n3(n3e1:int; n3e2:int) returns (n3s:int); +-- end of node nc10::n4 +node nc10::n3(n3e1:int; n3e2:int) returns (n3s:int); var n3i1:int; n3i2:int; let - (n3i1, n3i2) = nc10__n4(n3e1, 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); +-- end of node nc10::n3 +node nc10::n2(n2e1:int; n2e2:int) returns (n2s:int); let - n2s = (nc10__n3(n2e1, n2e1) + nc10__n3(n2e2, n2e2)); + n2s = (nc10::n3(n2e1, n2e1) + nc10::n3(n2e2, n2e2)); tel --- end of node nc10__n2 -node nc10__n1(n1e1:int) returns (n1s:int); +-- end of node nc10::n2 +node nc10::n1(n1e1:int) returns (n1s:int); let - n1s = (nc10__n2(n1e1, 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); +-- end of node nc10::n1 +node nc10::nc10(nc10e1:int) returns (ok:bool); var nc10b1:int; let - nc10b1 = nc10__n1(nc10e1); + nc10b1 = nc10::n1(nc10e1); ok = (nc10b1 = (nc10e1 * 24)); tel --- end of node nc10__nc10 +-- end of node nc10::nc10 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc2.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/nc2.lus -node nc2__n1(n1e1:bool; n1e2:bool) returns (n1s:bool); +node nc2::n1(n1e1:bool; n1e2:bool) returns (n1s:bool); var n1b1:bool; n1b2:bool; @@ -2050,20 +2050,20 @@ let n1b2 = (n1e1 and n1e2); n1s = (n1b1 or n1b2); tel --- end of node nc2__n1 -node nc2__nc2(nc2e1:bool; nc2e2:bool) returns (nc2s:bool); +-- end of node nc2::n1 +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 +-- end of node nc2::nc2 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc3.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/nc3.lus -node nc3__n1(n1e1:bool; n1e2:bool) returns (n1s:bool); +node nc3::n1(n1e1:bool; n1e2:bool) returns (n1s:bool); var n1b1:bool; n1b2:bool; @@ -2072,22 +2072,22 @@ let n1b2 = (n1e1 and n1e2); n1s = (n1b1 or n1b2); tel --- end of node nc3__n1 -node nc3__nc3(nc3e1:bool; nc3e2:bool) returns (nc3s:bool); +-- end of node nc3::n1 +node nc3::nc3(nc3e1:bool; nc3e2:bool) returns (nc3s:bool); 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 +-- end of node nc3::nc3 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc4.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/nc4.lus -node nc4__n1(n1e1:bool; n1e2:bool) returns (n1s:bool); +node nc4::n1(n1e1:bool; n1e2:bool) returns (n1s:bool); var n1b1:bool; n1b2:bool; @@ -2096,8 +2096,8 @@ let n1b2 = (n1e1 and n1e2); n1s = (n1b1 or n1b2); tel --- end of node nc4__n1 -node nc4__n2(n2e1:bool; n2e2:bool) returns (n2s:bool); +-- end of node nc4::n1 +node nc4::n2(n2e1:bool; n2e2:bool) returns (n2s:bool); var n2b1:bool; n2b2:bool; @@ -2106,87 +2106,87 @@ let n2b2 = (n2e1 or n2e2); n2s = (n2b1 and n2b2); tel --- end of node nc4__n2 -node nc4__nc4(nc4e1:bool; nc4e2:bool) returns (nc4s:bool); +-- end of node nc4::n2 +node nc4::nc4(nc4e1:bool; nc4e2:bool) returns (nc4s:bool); 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 +-- end of node nc4::nc4 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc5.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/nc5.lus -node nc5__n4(n4e1:int) returns (n4s:int); +node nc5::n4(n4e1:int) returns (n4s:int); let n4s = (n4e1 + 1); tel --- end of node nc5__n4 -node nc5__n3(n3e1:int) returns (n3s:int); +-- end of node nc5::n4 +node nc5::n3(n3e1:int) returns (n3s:int); let - n3s = nc5__n4(n3e1); + n3s = nc5::n4(n3e1); tel --- end of node nc5__n3 -node nc5__n2(n2e1:int) returns (n2s:int); +-- end of node nc5::n3 +node nc5::n2(n2e1:int) returns (n2s:int); let - n2s = nc5__n3(n2e1); + n2s = nc5::n3(n2e1); tel --- end of node nc5__n2 -node nc5__n1(n1e1:int) returns (n1s:int); +-- end of node nc5::n2 +node nc5::n1(n1e1:int) returns (n1s:int); let - n1s = nc5__n2(n1e1); + n1s = nc5::n2(n1e1); tel --- end of node nc5__n1 -node nc5__nc5(nc5e1:int) returns (ok:bool); +-- end of node nc5::n1 +node nc5::nc5(nc5e1:int) returns (ok:bool); var nc5b1:int; let - nc5b1 = nc5__n1(nc5e1); + nc5b1 = nc5::n1(nc5e1); ok = (nc5b1 = (nc5e1 + 1)); tel --- end of node nc5__nc5 +-- end of node nc5::nc5 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc6.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/nc6.lus -node nc6__n4(n4e1:int) returns (n4s:int); +node nc6::n4(n4e1:int) returns (n4s:int); let n4s = (n4e1 + 1); tel --- end of node nc6__n4 -node nc6__n3(n3e1:int) returns (n3s:int); +-- 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); +-- 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); +-- 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); +-- end of node nc6::n1 +node nc6::nc6(nc6e1:int) returns (ok:bool); var nc6b1:int; let - nc6b1 = nc6__n1(nc6e1); + nc6b1 = nc6::n1(nc6e1); ok = (nc6b1 = (nc6e1 + 4)); tel --- end of node nc6__nc6 +-- end of node nc6::nc6 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc7.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/nc7.lus -node nc7__n4( +node nc7::n4( n4e1:int; n4e2:int; n4e3:int; @@ -2197,68 +2197,68 @@ returns ( let n4s = ((((n4e1 + n4e2) + n4e3) + n4e4) + n4e5); tel --- end of node nc7__n4 -node nc7__n3(n3e1:int) returns (n3s:int); +-- end of node nc7::n4 +node nc7::n3(n3e1:int) returns (n3s:int); let - n3s = nc7__n4(n3e1, 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); +-- end of node nc7::n3 +node nc7::n2(n2e1:int) returns (n2s:int); let - n2s = nc7__n3(n2e1); + n2s = nc7::n3(n2e1); tel --- end of node nc7__n2 -node nc7__n1(n1e1:int) returns (n1s:int); +-- end of node nc7::n2 +node nc7::n1(n1e1:int) returns (n1s:int); let - n1s = nc7__n2(n1e1); + n1s = nc7::n2(n1e1); tel --- end of node nc7__n1 -node nc7__nc7(nc7e1:int) returns (ok:bool); +-- end of node nc7::n1 +node nc7::nc7(nc7e1:int) returns (ok:bool); var nc7b1:int; let - nc7b1 = nc7__n1(nc7e1); + nc7b1 = nc7::n1(nc7e1); ok = (nc7b1 = (nc7e1 * 5)); tel --- end of node nc7__nc7 +-- end of node nc7::nc7 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc8.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/nc8.lus -node nc8__n4(n4e1:int; n4e2:int; n4e3:int; n4e4:int) returns (n4s:int); +node nc8::n4(n4e1:int; n4e2:int; n4e3:int; n4e4:int) returns (n4s:int); let n4s = (((n4e1 + n4e2) + n4e3) + n4e4); tel --- end of node nc8__n4 -node nc8__n3(n3e1:int; n3e2:int) returns (n3s:int); +-- end of node nc8::n4 +node nc8::n3(n3e1:int; n3e2:int) returns (n3s:int); let - n3s = (nc8__n4(n3e1, n3e1, n3e1, n3e1) + nc8__n4(n3e2, 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); +-- end of node nc8::n3 +node nc8::n2(n2e1:int; n2e2:int) returns (n2s:int); let - n2s = (nc8__n3(n2e1, n2e1) + nc8__n3(n2e2, n2e2)); + n2s = (nc8::n3(n2e1, n2e1) + nc8::n3(n2e2, n2e2)); tel --- end of node nc8__n2 -node nc8__n1(n1e1:int) returns (n1s:int); +-- end of node nc8::n2 +node nc8::n1(n1e1:int) returns (n1s:int); let - n1s = (nc8__n2(n1e1, n1e1) + nc8__n2(n1e1, n1e1)); + n1s = (nc8::n2(n1e1, n1e1) + nc8::n2(n1e1, n1e1)); tel --- end of node nc8__n1 -node nc8__nc8(nc8e1:int) returns (ok:bool); +-- end of node nc8::n1 +node nc8::nc8(nc8e1:int) returns (ok:bool); var nc8b1:int; let - nc8b1 = nc8__n1(nc8e1); + nc8b1 = nc8::n1(nc8e1); ok = (nc8b1 = (nc8e1 * 32)); tel --- end of node nc8__nc8 +-- end of node nc8::nc8 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc9.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/nc9.lus -node nc9__n4( +node nc9::n4( n4e1:int; n4e2:int; n4e3:int; @@ -2270,74 +2270,74 @@ let n4s1 = (n4e1 + n4e2); n4s2 = (n4e3 + n4e4); tel --- end of node nc9__n4 -node nc9__n3(n3e1:int; n3e2:int) returns (n3s:int); +-- end of node nc9::n4 +node nc9::n3(n3e1:int; n3e2:int) returns (n3s:int); var n3i1:int; n3i2:int; let - (n3i1, n3i2) = nc9__n4(n3e1, 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); +-- end of node nc9::n3 +node nc9::n2(n2e1:int; n2e2:int) returns (n2s:int); let - n2s = (nc9__n3(n2e1, n2e1) + nc9__n3(n2e2, n2e2)); + n2s = (nc9::n3(n2e1, n2e1) + nc9::n3(n2e2, n2e2)); tel --- end of node nc9__n2 -node nc9__n1(n1e1:int) returns (n1s:int); +-- end of node nc9::n2 +node nc9::n1(n1e1:int) returns (n1s:int); let - n1s = (nc9__n2(n1e1, n1e1) + nc9__n2(n1e1, n1e1)); + n1s = (nc9::n2(n1e1, n1e1) + nc9::n2(n1e1, n1e1)); tel --- end of node nc9__n1 -node nc9__nc9(nc9e1:int) returns (ok:bool); +-- end of node nc9::n1 +node nc9::nc9(nc9e1:int) returns (ok:bool); var nc9b1:int; let - nc9b1 = nc9__n1(nc9e1); + nc9b1 = nc9::n1(nc9e1); ok = (nc9b1 = (nc9e1 * 16)); tel --- end of node nc9__nc9 +-- end of node nc9::nc9 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/node_caller1.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/node_caller1.lus -node node_caller1__ex5(a:int) returns (b:int); +node node_caller1::ex5(a:int) returns (b:int); let b = (a - 700000); tel --- end of node node_caller1__ex5 -node node_caller1__ex4(a:int) returns (b:int); +-- end of node node_caller1::ex5 +node node_caller1::ex4(a:int) returns (b:int); let - b = (node_caller1__ex5(a) + 4); + b = (node_caller1::ex5(a) + 4); tel --- end of node node_caller1__ex4 -node node_caller1__ex3(a:int) returns (b:int); +-- end of node node_caller1::ex4 +node node_caller1::ex3(a:int) returns (b:int); let - b = (node_caller1__ex4(a) + 3); + b = (node_caller1::ex4(a) + 3); tel --- end of node node_caller1__ex3 -node node_caller1__ex2(a:int) returns (b:int); +-- end of node node_caller1::ex3 +node node_caller1::ex2(a:int) returns (b:int); let - b = (node_caller1__ex3(a) + 2); + b = (node_caller1::ex3(a) + 2); tel --- end of node node_caller1__ex2 -node node_caller1__ex1(a:int) returns (b:int); +-- end of node node_caller1::ex2 +node node_caller1::ex1(a:int) returns (b:int); let - b = (node_caller1__ex2(a) + 1); + b = (node_caller1::ex2(a) + 1); tel --- end of node node_caller1__ex1 -node node_caller1__node_caller1(a:int) returns (b:int); +-- end of node node_caller1::ex1 +node node_caller1::node_caller1(a:int) returns (b:int); let - b = node_caller1__ex1(a); + b = node_caller1::ex1(a); tel --- end of node node_caller1__node_caller1 +-- end of node node_caller1::node_caller1 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/o2l_feux_compl.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/o2l_feux_compl.lus -node o2l_feux_compl__o2l_feux_compl( +node o2l_feux_compl::o2l_feux_compl( TD:bool; TI:bool; CP:bool; @@ -2598,22 +2598,22 @@ let (((o2l_P_14 and not(TI)) and not(CP)) and not(LP))) or (((o2l_P_15 and not(TI)) and not(CP)) and LP)); tel --- end of node o2l_feux_compl__o2l_feux_compl +-- end of node o2l_feux_compl::o2l_feux_compl ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/patrick.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/patrick.lus -node patrick__patrick(a:int; b:int; c:bool; d:bool) returns (s:int); +node patrick::patrick(a:int; b:int; c:bool; d:bool) returns (s:int); let s = if (c) then (a) else ((1 + if (d) then (b) else (4))); tel --- end of node patrick__patrick +-- end of node patrick::patrick ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/poussoir.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/poussoir.lus -node poussoir__TWO_STATES( +node poussoir::TWO_STATES( set:bool; reset:bool; init:bool) @@ -2623,60 +2623,60 @@ let state = init -> if ((set and not(pre(state)))) then (true) else ( if ((reset and pre(state))) then (false) else (pre(state))); tel --- end of node poussoir__TWO_STATES -node poussoir__ONE_BUTTON(change:bool; init:bool) returns (state:bool); +-- end of node poussoir::TWO_STATES +node poussoir::ONE_BUTTON(change:bool; init:bool) returns (state:bool); let state = init -> if (change) then (not(pre(state))) else (pre(state)); tel --- end of node poussoir__ONE_BUTTON -node poussoir__poussoir(e3:bool; init:bool) returns (s3:bool; s4:bool); +-- end of node poussoir::ONE_BUTTON +node poussoir::poussoir(e3:bool; init:bool) returns (s3:bool; s4:bool); let - s3 = poussoir__TWO_STATES(e3, e3, init); - s4 = poussoir__ONE_BUTTON(e3, init); + s3 = poussoir::TWO_STATES(e3, e3, init); + s4 = poussoir::ONE_BUTTON(e3, init); tel --- end of node poussoir__poussoir +-- end of node poussoir::poussoir ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/rs.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/rs.lus -node rs__rs(r:bool; s:bool) returns (q:bool); +node rs::rs(r:bool; s:bool) returns (q:bool); var n:bool; let q = false -> (not(pre(r)) and not(pre(n))); n = true -> (not(pre(s)) and not(pre(q))); tel --- end of node rs__rs +-- end of node rs::rs ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/s.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/s.lus -node s__s(a:int; b:int) returns (t:int); +node s::s(a:int; b:int) returns (t:int); let assert((a = 0)); t = b; tel --- end of node s__s +-- end of node s::s ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/simple.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/simple.lus -type simple__S; -type simple__T = int; -type simple__H = simple::H {x : simple__S; y : int}; -type simple__U = simple::U {a : int; b : simple::H {x : simple__S; y : int}}; -type simple__V = simple::U {a : int; b : simple::H {x : simple__S; y : int}}^4; -const simple__size = 16; -type simple__W = int^18; -const simple__pi = 3.141600; -const simple__right = 1.570800; -const simple__u = false; -const simple__c = true; - -node simple__simple( +type simple::S; +type simple::T = int; +type simple::H = simple::H {x : simple::S; y : int}; +type simple::U = simple::U {a : int; b : simple::H {x : simple::S; y : int}}; +type simple::V = simple::U {a : int; b : simple::H {x : simple::S; y : int}}^4; +const simple::size = 16; +type simple::W = int^18; +const simple::pi = 3.141600; +const simple::right = 1.570800; +const simple::u = false; +const simple::c = true; + +node simple::simple( e:bool; a:simple::U {a : int; - b : simple::H {x : simple__S; + b : simple::H {x : simple::S; y : int}}) returns ( b:int); @@ -2687,15 +2687,15 @@ let x = a.a; b = (x + 1); tel --- end of node simple__simple -extern function simple__f1(x:int) returns (y:int); -extern function simple__f2(u:int; v:int) returns (s:int; t:bool); +-- end of node simple::simple +extern function simple::f1(x:int) returns (y:int); +extern function simple::f2(u:int; v:int) returns (s:int; t:bool); ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/stopwatch.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/stopwatch.lus -node stopwatch__simple_stopwatch( +node stopwatch::simple_stopwatch( time_unit:bool; reset:bool; start_stop:bool) @@ -2708,9 +2708,9 @@ let running = false -> if (start_stop) then (not(pre(running))) else (pre(running)); tel --- end of node stopwatch__simple_stopwatch +-- end of node stopwatch::simple_stopwatch -node stopwatch__stopwatch( +node stopwatch::stopwatch( time_unit:bool; b1:bool; b2:bool) @@ -2724,7 +2724,7 @@ var lap:bool; internal_time:int; let - (internal_time, running) = stopwatch__simple_stopwatch(time_unit, reset, + (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; @@ -2732,13 +2732,13 @@ let lap = (b2 and false -> pre((running or frozen))); time = if (frozen) then (pre(time)) else (internal_time); tel --- end of node stopwatch__stopwatch +-- end of node stopwatch::stopwatch ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/testCA.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/testCA.lus -node testCA__testCA( +node testCA::testCA( time_in_ms:int) returns ( hour:int; @@ -2756,40 +2756,40 @@ let time_in_second = (time_in_ms div 1000); ms = (time_in_ms mod 1000); tel --- end of node testCA__testCA +-- end of node testCA::testCA ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/trivial.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/trivial.lus -node trivial__edge(x:bool) returns (e:bool); +node trivial::edge(x:bool) returns (e:bool); let e = false -> (x and not(pre(x))); tel --- end of node trivial__edge -node trivial__trivial(x:bool) returns (y:bool); +-- end of node trivial::edge +node trivial::trivial(x:bool) returns (y:bool); let - y = trivial__edge(x); + y = trivial::edge(x); tel --- end of node trivial__trivial +-- end of node trivial::trivial ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/trivial2.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/trivial2.lus -node trivial2__edge(x:bool) returns (e:bool); +node trivial2::edge(x:bool) returns (e:bool); let e = false -> (x and not(pre(x))); tel --- end of node trivial2__edge -node trivial2__trivial2(x:bool) returns (y:bool); +-- end of node trivial2::edge +node trivial2::trivial2(x:bool) returns (y:bool); let - y = trivial2__edge(trivial2__edge(x)); + y = trivial2::edge(trivial2::edge(x)); tel --- end of node trivial2__trivial2 +-- end of node trivial2::trivial2 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/uu.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/uu.lus -node uu__uu(x:bool; y:bool; z:bool) returns (a:bool); +node uu::uu(x:bool; y:bool; z:bool) returns (a:bool); var V112_X:bool; V111_X:bool; @@ -2818,16 +2818,16 @@ let else ( if ((pre(V111_X) and not(V111_X))) then (false) else (pre(V136_B_forbiden))); tel --- end of node uu__uu +-- end of node uu::uu ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/v1.lus Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/v1.lus -node v1__v1(m:int; b:bool) returns (n:int); +node v1::v1(m:int; b:bool) returns (n:int); let n = if (b) then (m) else ((m - 1)); tel --- end of node v1__v1 +-- end of node v1::v1 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/consensus.lus @@ -2839,36 +2839,36 @@ Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/consensus.lus ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/fby.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/fby.lus -node fby__rising_edge_bis(X:bool) returns (ok:bool); +node fby::rising_edge_bis(X:bool) returns (ok:bool); let ok = (false fby not(X) fby X and X); tel --- end of node fby__rising_edge_bis -node fby__rising_edge(X:bool) returns (ok:bool); +-- end of node fby::rising_edge_bis +node fby::rising_edge(X:bool) returns (ok:bool); let ok = (false fby not(X) and X); tel --- end of node fby__rising_edge +-- end of node fby::rising_edge ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/func_with_body.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/func_with_body.lus -extern node func_with_body__ext(x:int) returns (y:int); -function func_with_body__trivial(x:int) returns (y:int); +extern node func_with_body::ext(x:int) returns (y:int); +function func_with_body::trivial(x:int) returns (y:int); let y = 1; tel --- end of node func_with_body__trivial +-- end of node func_with_body::trivial ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/heater_control.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/heater_control.lus -const heater_control__FAILURE = -999.000000; -const heater_control__TMIN = 6.000000; -const heater_control__TMAX = 9.000000; -const heater_control__DELTA = 0.500000; +const heater_control::FAILURE = -999.000000; +const heater_control::TMIN = 6.000000; +const heater_control::TMAX = 9.000000; +const heater_control::DELTA = 0.500000; -node heater_control__not_a_sauna2( +node heater_control::not_a_sauna2( T:real; T1:real; T2:real; @@ -2879,30 +2879,30 @@ returns ( let ok = true -> (pre(T) < (TMAX - 6.0)); tel --- end of node heater_control__not_a_sauna2 -node heater_control__min2(one:real; two:real) returns (m:real); +-- end of node heater_control::not_a_sauna2 +node heater_control::min2(one:real; two:real) returns (m:real); let m = if ((one < two)) then (one) else (two); tel --- end of node heater_control__min2 -node heater_control__max2(one:real; two:real) returns (m:real); +-- end of node heater_control::min2 +node heater_control::max2(one:real; two:real) returns (m:real); let m = if ((one > two)) then (one) else (two); tel --- end of node heater_control__max2 -node heater_control__Median(a:real; b:real; c:real) returns (z:real); +-- 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__min2(a, heater_control__min2(b, c))) - - heater_control__max2(a, heater_control__max2(b, 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); +-- end of node heater_control::Median +node heater_control::abs(v:real) returns (a:real); let a = if ((v >= 0.0)) then (v) else (-(v)); tel --- end of node heater_control__abs +-- end of node heater_control::abs -node heater_control__noneoftree( +node heater_control::noneoftree( f1:bool; f2:bool; f3:bool) @@ -2911,9 +2911,9 @@ returns ( let r = ((not(f1) and not(f2)) and not(f3)); tel --- end of node heater_control__noneoftree +-- end of node heater_control::noneoftree -node heater_control__oneoftree( +node heater_control::oneoftree( f1:bool; f2:bool; f3:bool) @@ -2923,9 +2923,9 @@ let r = ((((f1 and not(f2)) and not(f3)) or ((f2 and not(f1)) and not(f3))) or ((f3 and not(f1)) and not(f2))); tel --- end of node heater_control__oneoftree +-- end of node heater_control::oneoftree -node heater_control__alloftree( +node heater_control::alloftree( f1:bool; f2:bool; f3:bool) @@ -2934,14 +2934,14 @@ returns ( let r = ((f1 and f2) and f3); tel --- end of node heater_control__alloftree -node heater_control__Average(a:real; b:real) returns (z:real); +-- end of node heater_control::alloftree +node heater_control::Average(a:real; b:real) returns (z:real); let z = ((a + b) / 2.0); tel --- end of node heater_control__Average +-- end of node heater_control::Average -node heater_control__heater_control( +node heater_control::heater_control( T:real; T1:real; T2:real; @@ -2954,23 +2954,23 @@ 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__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)))))); + 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)))); tel --- end of node heater_control__heater_control +-- end of node heater_control::heater_control -node heater_control__not_a_sauna( +node heater_control::not_a_sauna( T:real; T1:real; T2:real; @@ -2981,13 +2981,13 @@ returns ( let ok = true -> (pre(T) < (TMAX + 1.0)); tel --- end of node heater_control__not_a_sauna +-- end of node heater_control::not_a_sauna ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/left.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/left.lus -type left__truc = left::truc {a : bool^100; b : int}; -node left__toto(x:bool) returns (t:left::truc {a : bool^100; b : int}^3); +type left::truc = left::truc {a : bool^100; b : int}; +node left::toto(x:bool) returns (t:left::truc {a : bool^100; b : int}^3); let t[0].[0..98 step 2][48..0 step -2] = true^25; t[0].[0..98 step 2][1..49 step 2] = false^25; @@ -2997,32 +2997,32 @@ let t[0]. = 42; t[1..2] = truc{a=true^100;b=0}^2; tel --- end of node left__toto +-- end of node left::toto ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/newpacks.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/newpacks.lus -type preal__t = real; -node preal__fby1(init:real; fb:real) returns (next:real); +type preal::t = real; +node preal::fby1(init:real; fb:real) returns (next:real); let next = init -> pre(fb); tel --- end of node preal__fby1 -type pbool__t = bool; -node pbool__fby1(init:bool; fb:bool) returns (next:bool); +-- end of node preal::fby1 +type pbool::t = bool; +node pbool::fby1(init:bool; fb:bool) returns (next:bool); let next = init -> pre(fb); tel --- end of node pbool__fby1 -type pint__t = int; -node pint__fby1(init:int; fb:int) returns (next:int); +-- end of node pbool::fby1 +type pint::t = int; +node pint::fby1(init:int; fb:int) returns (next:int); let next = init -> pre(fb); tel --- end of node pint__fby1 -type inter__selType = inter::selType {i : int; b : bool; r : real}; +-- end of node pint::fby1 +type inter::selType = inter::selType {i : int; b : bool; r : real}; -node inter__preced( +node inter::preced( in:inter::selType {i : int; b : bool; r : real}) @@ -3035,54 +3035,54 @@ returns ( r : real}); let out2 = selType{i=0;b=true;r=.0}; - out. = pint__fby1(out2.i, in.i); - out. = pbool__fby1(out2.b, in.b); - out. = preal__fby1(out2.r, in.r); + out. = pint::fby1(out2.i, in.i); + out. = pbool::fby1(out2.b, in.b); + out. = preal::fby1(out2.r, in.r); tel --- end of node inter__preced -node mainPack__preced(in:inter__selType) returns (out:inter__selType); +-- end of node inter::preced +node mainPack::preced(in:inter::selType) returns (out:inter::selType); var - out2:inter__selType; + out2:inter::selType; let - (out, out2) = inter__preced(in); + (out, out2) = inter::preced(in); tel --- end of node mainPack__preced -const inter__n = -4; +-- end of node mainPack::preced +const inter::n = -4; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/onlyroll.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/onlyroll.lus -const onlyroll__NRminP = -5.100000; -const onlyroll__NRminR = -25.300000; -const onlyroll__NRmaxP = 5.100000; -const onlyroll__DELTA_PITCH = 3.000000; -const onlyroll__NRmaxR = 25.300000; -const onlyroll__FAIL_SAFE_PITCH_VALUE = 4.000000; -const onlyroll__DELTA_YAW = 2.730000; -const onlyroll__NRminY = -5.000000; -const onlyroll__HORminP = -57.000000; -const onlyroll__XFAIL_SAFE_ROLL_VALUE = 1.100000; -const onlyroll__NRmaxY = 5.000000; -const onlyroll__HORminR = -285.000000; -const onlyroll__HORmaxP = 57.000000; -const onlyroll__CROSS_CH_TOL_PITCH = 10.100000; -const onlyroll__HORmaxR = 285.000000; -const onlyroll__FAIL_SAFE_YAW_VALUE = 4.000000; -const onlyroll__HORminY = -57.000000; -const onlyroll__DELTA_ROLL = 14.900000; -const onlyroll__FAIL_SAFE_ROLL_VALUE = 1.000000; -const onlyroll__OneSecond = 10; -const onlyroll__HORmaxY = 57.000000; -const onlyroll__TIME_ROLL = 3; -const onlyroll__CROSS_CH_TOL_ROLL = 51.000000; -const onlyroll__BID_LAST = 2.200000; -const onlyroll__TIME5 = 4; -const onlyroll__SAFE_COUNTER_TIME = 3; -const onlyroll__BID_VAL = 3.300000; -const onlyroll__CROSS_CH_TOL_YAW = 10.000000; -const onlyroll__TIME_CROSS_ROLL = 3; - -node onlyroll__noneof( +const onlyroll::NRminP = -5.100000; +const onlyroll::NRminR = -25.300000; +const onlyroll::NRmaxP = 5.100000; +const onlyroll::DELTA_PITCH = 3.000000; +const onlyroll::NRmaxR = 25.300000; +const onlyroll::FAIL_SAFE_PITCH_VALUE = 4.000000; +const onlyroll::DELTA_YAW = 2.730000; +const onlyroll::NRminY = -5.000000; +const onlyroll::HORminP = -57.000000; +const onlyroll::XFAIL_SAFE_ROLL_VALUE = 1.100000; +const onlyroll::NRmaxY = 5.000000; +const onlyroll::HORminR = -285.000000; +const onlyroll::HORmaxP = 57.000000; +const onlyroll::CROSS_CH_TOL_PITCH = 10.100000; +const onlyroll::HORmaxR = 285.000000; +const onlyroll::FAIL_SAFE_YAW_VALUE = 4.000000; +const onlyroll::HORminY = -57.000000; +const onlyroll::DELTA_ROLL = 14.900000; +const onlyroll::FAIL_SAFE_ROLL_VALUE = 1.000000; +const onlyroll::OneSecond = 10; +const onlyroll::HORmaxY = 57.000000; +const onlyroll::TIME_ROLL = 3; +const onlyroll::CROSS_CH_TOL_ROLL = 51.000000; +const onlyroll::BID_LAST = 2.200000; +const onlyroll::TIME5 = 4; +const onlyroll::SAFE_COUNTER_TIME = 3; +const onlyroll::BID_VAL = 3.300000; +const onlyroll::CROSS_CH_TOL_YAW = 10.000000; +const onlyroll::TIME_CROSS_ROLL = 3; + +node onlyroll::noneof( f1:bool; f2:bool; f3:bool; @@ -3092,9 +3092,9 @@ returns ( let r = (((not(f1) and not(f2)) and not(f3)) and not(f4)); tel --- end of node onlyroll__noneof +-- end of node onlyroll::noneof -node onlyroll__oneoffour( +node onlyroll::oneoffour( f1:bool; f2:bool; f3:bool; @@ -3106,9 +3106,9 @@ let and not(f3)) and not(f4))) or (((f3 and not(f1)) and not(f2)) and not(f4))) or (((f4 and not(f1)) and not(f2)) and not(f3))); tel --- end of node onlyroll__oneoffour +-- end of node onlyroll::oneoffour -node onlyroll__twooffour( +node onlyroll::twooffour( f1:bool; f2:bool; f3:bool; @@ -3124,9 +3124,9 @@ let and ((((f2 and not(f3)) and not(f1)) or ((f3 and not(f2)) and not(f1))) or ((f1 and not(f2)) and not(f3))))); tel --- end of node onlyroll__twooffour +-- end of node onlyroll::twooffour -node onlyroll__threeoffour( +node onlyroll::threeoffour( f1:bool; f2:bool; f3:bool; @@ -3134,16 +3134,16 @@ 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); +-- end of node onlyroll::threeoffour +node onlyroll::max2(one:real; two:real) returns (m:real); let m = if ((one > two)) then (one) else (two); tel --- end of node onlyroll__max2 +-- end of node onlyroll::max2 -node onlyroll__max4( +node onlyroll::max4( one:real; two:real; three:real; @@ -3151,16 +3151,16 @@ node onlyroll__max4( returns ( m:real); let - m = onlyroll__max2(onlyroll__max2(one, two), onlyroll__max2(three, 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); +-- end of node onlyroll::max4 +node onlyroll::min2(one:real; two:real) returns (m:real); let m = if ((one < two)) then (one) else (two); tel --- end of node onlyroll__min2 +-- end of node onlyroll::min2 -node onlyroll__min4( +node onlyroll::min4( one:real; two:real; three:real; @@ -3168,11 +3168,11 @@ node onlyroll__min4( returns ( m:real); let - m = onlyroll__min2(onlyroll__min2(one, two), onlyroll__min2(three, four)); + m = onlyroll::min2(onlyroll::min2(one, two), onlyroll::min2(three, four)); tel --- end of node onlyroll__min4 +-- end of node onlyroll::min4 -node onlyroll__OlympicAverage( +node onlyroll::OlympicAverage( one:real; two:real; three:real; @@ -3180,18 +3180,18 @@ node onlyroll__OlympicAverage( returns ( m:real); let - m = ((((((one + two) + three) + four) - onlyroll__max4(one, two, three, - four)) - onlyroll__min4(one, 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); +-- end of node onlyroll::OlympicAverage +node onlyroll::MedianValue3(a:real; b:real; c:real) returns (z:real); let - z = ((((a + b) + c) - onlyroll__min2(a, onlyroll__min2(b, c))) - - onlyroll__max2(a, onlyroll__max2(b, 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 +-- end of node onlyroll::MedianValue3 -node onlyroll__Median( +node onlyroll::Median( x1:real; x2:real; x3:real; @@ -3203,19 +3203,19 @@ node onlyroll__Median( returns ( r:real); let - 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, + 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); +-- end of node onlyroll::Median +node onlyroll::Average2(a:real; b:real) returns (z:real); let z = ((a + b) / 2.0); tel --- end of node onlyroll__Average2 +-- end of node onlyroll::Average2 -node onlyroll__Average( +node onlyroll::Average( x1:real; x2:real; x3:real; @@ -3227,18 +3227,18 @@ node onlyroll__Average( returns ( r:real); let - 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)))))); + 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 +-- end of node onlyroll::Average -node onlyroll__Calculate( +node onlyroll::Calculate( x1:real; x2:real; x3:real; @@ -3258,23 +3258,23 @@ 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__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); + 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, + (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); +-- end of node onlyroll::Calculate +node onlyroll::abs(v:real) returns (a:real); let a = if ((v >= 0.0)) then (v) else (-(v)); tel --- end of node onlyroll__abs -node onlyroll__maintain(n:int; val:bool) returns (m:bool); +-- end of node onlyroll::abs +node onlyroll::maintain(n:int; val:bool) returns (m:bool); var cpt:int; let @@ -3282,9 +3282,9 @@ let (0); m = (cpt >= n); tel --- end of node onlyroll__maintain +-- end of node onlyroll::maintain -node onlyroll__Monitor( +node onlyroll::Monitor( xa:real; xb:real; disc:bool) @@ -3292,18 +3292,18 @@ returns ( local_value:real; inline_monitor_failed:bool); let - inline_monitor_failed = (onlyroll__maintain(TIME_ROLL, (onlyroll__abs((xa + inline_monitor_failed = (onlyroll::maintain(TIME_ROLL, (onlyroll::abs((xa - xb)) > DELTA_ROLL)) or disc); local_value = xa; tel --- end of node onlyroll__Monitor -node onlyroll__InNominalRange(r:real) returns (i:bool); +-- end of node onlyroll::Monitor +node onlyroll::InNominalRange(r:real) returns (i:bool); let i = ((r < NRmaxR) and (r > NRminR)); tel --- end of node onlyroll__InNominalRange +-- end of node onlyroll::InNominalRange -node onlyroll__values_nok( +node onlyroll::values_nok( pfother1:bool; pfother2:bool; pfother3:bool; @@ -3318,18 +3318,18 @@ 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__maintain(TIME_CROSS_ROLL, if (pfother1) then ( if + 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))))); tel --- end of node onlyroll__values_nok +-- end of node onlyroll::values_nok -node onlyroll__FailDetect( +node onlyroll::FailDetect( local_failure:bool; xi:real; ongroundreset:bool; @@ -3372,23 +3372,23 @@ 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__InNominalRange(xi))); + from1to2 = (will_latch and not(onlyroll::InNominalRange(xi))); will_latch = cross_failure; - from1to3 = ((a and will_latch) and onlyroll__InNominalRange(xi)); + 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__InNominalRange(xi)) or (((pre(state) = 2) and (pre(cross_failure) + onlyroll::InNominalRange(xi)) or (((pre(state) = 2) and (pre(cross_failure) and foreign_failure)) or local_failure)); - cross_failure = onlyroll__values_nok(pfother1, pfother2, pfother3, xi, + cross_failure = onlyroll::values_nok(pfother1, pfother2, pfother3, xi, pxother1, pxother2, pxother3); debug_cross_failure = cross_failure; tel --- end of node onlyroll__FailDetect +-- end of node onlyroll::FailDetect -node onlyroll__Channel( +node onlyroll::Channel( ongroundreset:bool; inairreset:bool; choffi:bool; @@ -3412,15 +3412,15 @@ returns ( var local_failure:bool; let - (xi, local_failure) = onlyroll__Monitor(xai, xbi, disci); + (xi, local_failure) = onlyroll::Monitor(xai, xbi, disci); (fi, debug_cross_failure, debug_st, aski) = - onlyroll__FailDetect(local_failure, xi, ongroundreset, inairreset, choffi, + 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 +-- end of node onlyroll::Channel -node onlyroll__Allocator( +node onlyroll::Allocator( r1:bool; r2:bool; r3:bool; @@ -3446,9 +3446,9 @@ let then (1) else (0)) + if (a2) then (1) else (0)) + if (a3) then (1) else (0)) + if (a4) then (1) else (0))); tel --- end of node onlyroll__Allocator +-- end of node onlyroll::Allocator -node onlyroll__onlyroll( +node onlyroll::onlyroll( xa1:real; xb1:real; xa2:real; @@ -3508,56 +3508,56 @@ let debug_ch_failed3 = f3; debug_ch_failed4 = f4; (x1, f1, ask1, debug_localfailure1, debug_cross_failure1, debug_st1) = - onlyroll__Channel(ongroundreset, 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); (x2, f2, ask2, debug_localfailure2, debug_cross_failure2, debug_st2) = - onlyroll__Channel(ongroundreset, 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); (x3, f3, ask3, debug_localfailure3, debug_cross_failure3, debug_st3) = - onlyroll__Channel(ongroundreset, 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); (x4, f4, ask4, debug_localfailure4, debug_cross_failure4, debug_st4) = - onlyroll__Channel(ongroundreset, 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__Allocator(ask1, ask2, + (allowed1, allowed2, allowed3, allowed4) = onlyroll::Allocator(ask1, ask2, ask3, ask4, ongroundreset); - x = onlyroll__Calculate(x1, x2, x3, x4, f1, f2, f3, f4); + 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); +-- end of node onlyroll::onlyroll +node onlyroll::InHardoverRange(r:real) returns (i:bool); let i = ((r > HORmaxR) or (r < HORminR)); tel --- end of node onlyroll__InHardoverRange +-- end of node onlyroll::InHardoverRange ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/p.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/p.lus -type preal__t = real; -node preal__fby1(init:real; fb:real) returns (next:real); +type preal::t = real; +node preal::fby1(init:real; fb:real) returns (next:real); let next = init -> pre(fb); tel --- end of node preal__fby1 -type pbool__t = bool; -node pbool__fby1(init:bool; fb:bool) returns (next:bool); +-- end of node preal::fby1 +type pbool::t = bool; +node pbool::fby1(init:bool; fb:bool) returns (next:bool); let next = init -> pre(fb); tel --- end of node pbool__fby1 -type pint__t = int; -node pint__fby1(init:int; fb:int) returns (next:int); +-- end of node pbool::fby1 +type pint::t = int; +node pint::fby1(init:int; fb:int) returns (next:int); let next = init -> pre(fb); tel --- end of node pint__fby1 -type inter__selType = inter::selType {i : int; b : bool; r : real}; +-- end of node pint::fby1 +type inter::selType = inter::selType {i : int; b : bool; r : real}; -node inter__preced( +node inter::preced( in:inter::selType {i : int; b : bool; r : real}) @@ -3570,52 +3570,52 @@ returns ( r : real}); let out2 = selType{i=0;b=true;r=.0}; - out. = pint__fby1(out2.i, in.i); - out. = pbool__fby1(out2.b, in.b); - out. = preal__fby1(out2.r, in.r); + out. = pint::fby1(out2.i, in.i); + out. = pbool::fby1(out2.b, in.b); + out. = preal::fby1(out2.r, in.r); tel --- end of node inter__preced -node mainPack__preced(in:inter__selType) returns (out:inter__selType); +-- end of node inter::preced +node mainPack::preced(in:inter::selType) returns (out:inter::selType); var - out2:inter__selType; + out2:inter::selType; let - (out, out2) = inter__preced(in); + (out, out2) = inter::preced(in); tel --- end of node mainPack__preced -const inter__n = -4; +-- end of node mainPack::preced +const inter::n = -4; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/packs.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/packs.lus -type preal__t = real; -node preal__fby1(init:real; fb:real) returns (next:real); +type preal::t = real; +node preal::fby1(init:real; fb:real) returns (next:real); let next = init -> pre(fb); tel --- end of node preal__fby1 -type pbool__t = bool; -node pbool__fby1(init:bool; fb:bool) returns (next:bool); +-- end of node preal::fby1 +type pbool::t = bool; +node pbool::fby1(init:bool; fb:bool) returns (next:bool); let next = init -> pre(fb); tel --- end of node pbool__fby1 -type pint__t = int; -node pint__fby1(init:int; fb:int) returns (next:int); +-- end of node pbool::fby1 +type pint::t = int; +node pint::fby1(init:int; fb:int) returns (next:int); let next = init -> pre(fb); tel --- end of node pint__fby1 -const inter__n = -4; -const mainPack__N = 8; -type mainPack__T = int^8; -type mainPack__couleurs = enum {mainPack__bleu, mainPack__rose, mainPack__jaune}; -const mainPack__bleu; -const mainPack__jaune; -const mainPack__rose; -const mainPack__X = 8; -type inter__selType = inter::selType {i : int; b : bool; r : real}; - -node inter__preced( +-- end of node pint::fby1 +const inter::n = -4; +const mainPack::N = 8; +type mainPack::T = int^8; +type mainPack::couleurs = enum {mainPack::bleu, mainPack::rose, mainPack::jaune}; +const mainPack::bleu; +const mainPack::jaune; +const mainPack::rose; +const mainPack::X = 8; +type inter::selType = inter::selType {i : int; b : bool; r : real}; + +node inter::preced( in:inter::selType {i : int; b : bool; r : real}) @@ -3628,21 +3628,21 @@ returns ( r : real}); let out2 = selType{i=0;b=true;r=0.0}; - out. = pint__fby1(out2.i, in.i); - out. = pbool__fby1(out2.b, in.b); - out. = preal__fby1(out2.r, in.r); + out. = pint::fby1(out2.i, in.i); + out. = pbool::fby1(out2.b, in.b); + out. = preal::fby1(out2.r, in.r); tel --- end of node inter__preced -node mainPack__preced(in:inter__selType) returns (out:inter__selType); +-- end of node inter::preced +node mainPack::preced(in:inter::selType) returns (out:inter::selType); var - out2:inter__selType; + out2:inter::selType; let - (out, out2) = inter__preced(in); + (out, out2) = inter::preced(in); tel --- end of node mainPack__preced -type inter__toto = enum {inter__X, inter__Y}; -const inter__X; -const inter__Y; +-- end of node mainPack::preced +type inter::toto = enum {inter::X, inter::Y}; +const inter::X; +const inter::Y; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/pfs.lus @@ -3653,9 +3653,9 @@ Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/pfs.lus ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/struct0.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/struct0.lus -type struct0__Toto = struct0::Toto {x : int (1); y : int (2)}; +type struct0::Toto = struct0::Toto {x : int (1); y : int (2)}; -node struct0__bibi( +node struct0::bibi( dummy:int) returns ( z:struct0::Toto {x : int ( @@ -3665,19 +3665,19 @@ returns ( let z = Toto{x=3}; tel --- end of node struct0__bibi +-- end of node struct0::bibi ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/t.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/t.lus -const t__A = [[1, 1], [1, 1], [1, 1]]; -const t__B = [2, 2]; -node t__toto(x:bool) returns (a:int^2^3; b:int^2); +const t::A = [[1, 1], [1, 1], [1, 1]]; +const t::B = [2, 2]; +node t::toto(x:bool) returns (a:int^2^3; b:int^2); let a = A; b = B; tel --- end of node t__toto +-- end of node t::toto ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/t0.lus @@ -3699,187 +3699,187 @@ Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/t2.lus ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/test.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/test.lus -const P1__y = 3; -type P1__titi = int^5; +const P1::y = 3; +type P1::titi = int^5; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/trivial.lus Opening file /home/jahier/lus2lic/src/test/should_work/Pascal/trivial.lus -node trivial__trivial(x:int) returns (y:int); +node trivial::trivial(x:int) returns (y:int); let y = 1; tel --- end of node trivial__trivial +-- end of node trivial::trivial ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/call/bad_call02.lus Opening file /home/jahier/lus2lic/src/test/should_work/call/bad_call02.lus -node bad_call02__bad_call02(a:int; c:bool) returns (x:int); +node bad_call02::bad_call02(a:int; c:bool) returns (x:int); let x = a when c; tel --- end of node bad_call02__bad_call02 +-- end of node bad_call02::bad_call02 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/call/call01.lus Opening file /home/jahier/lus2lic/src/test/should_work/call/call01.lus -function call01__toto(i1:bool; i2:bool) returns (o:bool); +function call01::toto(i1:bool; i2:bool) returns (o:bool); let - o = Lustre__and(i1, i2); + o = Lustre::and(i1, i2); tel --- end of node call01__toto -node call01__call01(x:bool; y:bool) returns (z:bool); +-- end of node call01::toto +node call01::call01(x:bool; y:bool) returns (z:bool); let - z = call01__toto(x, y); + z = call01::toto(x, y); tel --- end of node call01__call01 -extern function call01__momo(x:bool; y:bool) returns (z:bool); +-- end of node call01::call01 +extern function call01::momo(x:bool; y:bool) returns (z:bool); ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/call/call02.lus Opening file /home/jahier/lus2lic/src/test/should_work/call/call02.lus -function call02__toto(i1:bool; i2:bool) returns (o:bool); +function call02::toto(i1:bool; i2:bool) returns (o:bool); let - o = Lustre__and(i1, i2); + o = Lustre::and(i1, i2); tel --- end of node call02__toto -function call02__titi(i1:bool; i2:bool) returns (o:bool); +-- end of node call02::toto +function call02::titi(i1:bool; i2:bool) returns (o:bool); let - o = call02__toto(i1, i2); + o = call02::toto(i1, i2); tel --- end of node call02__titi -node call02__call02(x:bool; y:bool) returns (z:bool); +-- end of node call02::titi +node call02::call02(x:bool; y:bool) returns (z:bool); let - z = call02__titi(x, y); + z = call02::titi(x, y); tel --- end of node call02__call02 +-- end of node call02::call02 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/call/call03.lus Opening file /home/jahier/lus2lic/src/test/should_work/call/call03.lus -function call03__tutu(i1:bool^2; i2:bool^2) returns (o:bool^2); +function call03::tutu(i1:bool^2; i2:bool^2) returns (o:bool^2); let - o = Lustre__map<<node Lustre__or, const 2>>(i1, i2); + o = Lustre::map<<node Lustre::or, const 2>>(i1, i2); tel --- end of node call03__tutu -node call03__call03(x:bool^2; y:bool^2) returns (z:bool^2); +-- end of node call03::tutu +node call03::call03(x:bool^2; y:bool^2) returns (z:bool^2); let - z = call03__tutu(x, y); + z = call03::tutu(x, y); tel --- end of node call03__call03 -extern function call03__momo(x:bool; y:bool) returns (z:bool); +-- end of node call03::call03 +extern function call03::momo(x:bool; y:bool) returns (z:bool); ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/call/call04.lus Opening file /home/jahier/lus2lic/src/test/should_work/call/call04.lus -function call04__toto(i1:bool; i2:bool) returns (o:bool); +function call04::toto(i1:bool; i2:bool) returns (o:bool); let - o = Lustre__and(i1, i2); + o = Lustre::and(i1, i2); tel --- end of node call04__toto -function call04__titi(i1:bool; i2:bool) returns (o:bool); +-- end of node call04::toto +function call04::titi(i1:bool; i2:bool) returns (o:bool); let - o = call04__toto(i1, i2); + o = call04::toto(i1, i2); tel --- end of node call04__titi -function call04__tutu(i1:bool^2; i2:bool^2) returns (o:bool^2); +-- end of node call04::titi +function call04::tutu(i1:bool^2; i2:bool^2) returns (o:bool^2); let - o = Lustre__map<<node call04__titi, const 2>>(i1, i2); + o = Lustre::map<<node call04::titi, const 2>>(i1, i2); tel --- end of node call04__tutu -node call04__call04(x:bool^2; y:bool^2) returns (z:bool^2); +-- end of node call04::tutu +node call04::call04(x:bool^2; y:bool^2) returns (z:bool^2); let - z = call04__tutu(x, y); + z = call04::tutu(x, y); tel --- end of node call04__call04 +-- end of node call04::call04 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/call/call05.lus 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); +extern function call05::momo(x:bool; y:bool) returns (z:bool); +node call05::call05(x:bool; y:bool) returns (z:bool); let - z = call05__momo(x, y); + z = call05::momo(x, y); tel --- end of node call05__call05 +-- end of node call05::call05 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/call/call06.lus Opening file /home/jahier/lus2lic/src/test/should_work/call/call06.lus -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); +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__bip(x, y); + (z, t) = call06::bip(x, y); tel --- end of node call06__call06 +-- end of node call06::call06 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/call/call07.lus Opening file /home/jahier/lus2lic/src/test/should_work/call/call07.lus -node call07__call07(x:bool; y:bool; z:bool) returns (t:bool); +node call07::call07(x:bool; y:bool; z:bool) returns (t:bool); let t = #(x, y, z); tel --- end of node call07__call07 +-- end of node call07::call07 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/clock/clock.lus Opening file /home/jahier/lus2lic/src/test/should_work/clock/clock.lus -extern node clock__clock3(u:bool) returns (toto:bool; y:bool when toto); +extern node clock::clock3(u:bool) returns (toto:bool; y:bool when toto); -extern node clock__clock4( +extern node clock::clock4( u:bool; v:bool when u) returns ( x:bool; y:bool when x); -extern node clock__clock5( +extern node clock::clock5( x:bool; y:bool when x; z:bool when y) returns ( a:bool); -node clock__clock(a:bool; b:bool) returns (c:bool; d:bool when c); +node clock::clock(a:bool; b:bool) returns (c:bool; d:bool when c); var z:bool; x:bool when z; y:bool when x; e:bool when b; let - (z, x) = clock__clock3(z); - (c, d) = clock__clock4(a, b when a); - z = clock__clock5(a, b when a, e when b when a); + (z, x) = clock::clock3(z); + (c, d) = clock::clock4(a, b when a); + z = clock::clock5(a, b when a, e when b when a); tel --- end of node clock__clock -extern node clock__clock2(u:bool; v:bool when u) returns (y:bool); +-- end of node clock::clock +extern node clock::clock2(u:bool; v:bool when u) returns (y:bool); ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/Gyroscope2.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/Gyroscope2.lus -type Gyroscope2__Valid_ChannelT = Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}; -type Gyroscope2__CFF_Eltstruct = Gyroscope2::CFF_Eltstruct {indx : int; indx_toChange : int; value : Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}}; -type Gyroscope2__Faulty_ChannelT = Gyroscope2::Faulty_ChannelT {valuea : real; valueb : real}; -type Gyroscope2__Faulty_Array = Gyroscope2::Faulty_ChannelT {valuea : real; valueb : real}^4^3; -type Gyroscope2__CFF_struct = Gyroscope2::CFF_struct {indx : int; indx_toChange : int; tabToFill : Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}^3}; -const Gyroscope2__DELTA_PITCH = 2.000000; -const Gyroscope2__DELTA_YAW = 2.000000; -const Gyroscope2__DELTA_TO_GOD_YAW = 2.000000; -const Gyroscope2__DELTA_ROLL = 2.000000; -const Gyroscope2__CROSS_CHANNEL_TOLERANCE = 1.000000; -const Gyroscope2__GOD_PITCH = 16.000000; -const Gyroscope2__GOD_ROLL = 15.000000; -const Gyroscope2__GOD_YAW = 14.000000; -const Gyroscope2__DELTA_TO_GOD_ROLL = 2.000000; -const Gyroscope2__DELTA_TO_GOD_PITCH = 2.000000; -node Gyroscope2__abs(in:real) returns (out:real); +type Gyroscope2::Valid_ChannelT = Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}; +type Gyroscope2::CFF_Eltstruct = Gyroscope2::CFF_Eltstruct {indx : int; indx_toChange : int; value : Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}}; +type Gyroscope2::Faulty_ChannelT = Gyroscope2::Faulty_ChannelT {valuea : real; valueb : real}; +type Gyroscope2::Faulty_Array = Gyroscope2::Faulty_ChannelT {valuea : real; valueb : real}^4^3; +type Gyroscope2::CFF_struct = Gyroscope2::CFF_struct {indx : int; indx_toChange : int; tabToFill : Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}^3}; +const Gyroscope2::DELTA_PITCH = 2.000000; +const Gyroscope2::DELTA_YAW = 2.000000; +const Gyroscope2::DELTA_TO_GOD_YAW = 2.000000; +const Gyroscope2::DELTA_ROLL = 2.000000; +const Gyroscope2::CROSS_CHANNEL_TOLERANCE = 1.000000; +const Gyroscope2::GOD_PITCH = 16.000000; +const Gyroscope2::GOD_ROLL = 15.000000; +const Gyroscope2::GOD_YAW = 14.000000; +const Gyroscope2::DELTA_TO_GOD_ROLL = 2.000000; +const Gyroscope2::DELTA_TO_GOD_PITCH = 2.000000; +node Gyroscope2::abs(in:real) returns (out:real); let out = if ((in < 0.0)) then (-(in)) else (in); tel --- end of node Gyroscope2__abs +-- end of node Gyroscope2::abs -node Gyroscope2__ValueIsSecureII( +node Gyroscope2::ValueIsSecureII( accu_in:bool; secure_value:real; delta_to_god_value:real; @@ -3887,12 +3887,12 @@ 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 +-- end of node Gyroscope2::ValueIsSecureII -node Gyroscope2__countFalse( +node Gyroscope2::countFalse( accu_in:real; elt_in:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}) @@ -3902,9 +3902,9 @@ let accu_out = if (elt_in.local_failure) then (accu_in) else ((accu_in + 1.0)); tel --- end of node Gyroscope2__countFalse +-- end of node Gyroscope2::countFalse -node Gyroscope2__TooFar( +node Gyroscope2::TooFar( nbToFarIn:int; channel:Gyroscope2::Faulty_ChannelT {valuea : real; valueb : real}; @@ -3913,12 +3913,12 @@ node Gyroscope2__TooFar( returns ( nbToFarOut:int); let - nbToFarOut = if ((Gyroscope2__abs((channel.valuea - god)) < + nbToFarOut = if ((Gyroscope2::abs((channel.valuea - god)) < delta_to_god)) then ((nbToFarIn + 1)) else (nbToFarIn); tel --- end of node Gyroscope2__TooFar +-- end of node Gyroscope2::TooFar -node Gyroscope2__assumeEvaluateAxis( +node Gyroscope2::assumeEvaluateAxis( channels:Gyroscope2::Faulty_ChannelT {valuea : real; valueb : real}^4; delta:real; @@ -3929,13 +3929,13 @@ returns ( var NbToFar:int; let - NbToFar = red<<node Gyroscope2__TooFar, const 4>>(0, channels, god^4, + NbToFar = red<<node Gyroscope2::TooFar, const 4>>(0, channels, god^4, delta_to_god^4); assumeOK = (NbToFar <= 1); tel --- end of node Gyroscope2__assumeEvaluateAxis +-- end of node Gyroscope2::assumeEvaluateAxis -node Gyroscope2__assumeChannel( +node Gyroscope2::assumeChannel( previousOutChannel:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}^4; nbInChannel:int; @@ -3949,24 +3949,24 @@ returns ( let assumeOK = true; tel --- end of node Gyroscope2__assumeChannel +-- end of node Gyroscope2::assumeChannel -node Gyroscope2__countValidChannels( +node Gyroscope2::countValidChannels( channels:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}^4) returns ( nb:real); let - nb = red<<node Gyroscope2__countFalse, const 4>>(0.0, channels); + nb = red<<node Gyroscope2::countFalse, const 4>>(0.0, channels); tel --- end of node Gyroscope2__countValidChannels -node Gyroscope2__sum(accu_in:real; elt_in:real) returns (accu_out:real); +-- end of node Gyroscope2::countValidChannels +node Gyroscope2::sum(accu_in:real; elt_in:real) returns (accu_out:real); let accu_out = (accu_in + elt_in); tel --- end of node Gyroscope2__sum +-- end of node Gyroscope2::sum -node Gyroscope2__masking( +node Gyroscope2::masking( channel:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}) returns ( @@ -3974,9 +3974,9 @@ returns ( let out = if (channel.local_failure) then (0.0) else (channel.local_value); tel --- end of node Gyroscope2__masking +-- end of node Gyroscope2::masking -node Gyroscope2__Voter( +node Gyroscope2::Voter( channels:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}^4; god:real; @@ -3988,14 +3988,14 @@ var nbValid:real; mask:real^4; let - nbValid = Gyroscope2__countValidChannels(channels); - globalSum = red<<node Gyroscope2__sum, const 4>>(0.0, mask); + nbValid = Gyroscope2::countValidChannels(channels); + globalSum = red<<node Gyroscope2::sum, const 4>>(0.0, mask); vote = (globalSum / nbValid); - mask = map<<node Gyroscope2__masking, const 4>>(channels); + mask = map<<node Gyroscope2::masking, const 4>>(channels); tel --- end of node Gyroscope2__Voter +-- end of node Gyroscope2::Voter -node Gyroscope2__selectFailure( +node Gyroscope2::selectFailure( from:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}) returns ( @@ -4003,9 +4003,9 @@ returns ( let failure = from.local_failure; tel --- end of node Gyroscope2__selectFailure +-- end of node Gyroscope2::selectFailure -node Gyroscope2__addOneChannelIter( +node Gyroscope2::addOneChannelIter( acc_in:Gyroscope2::CFF_Eltstruct {indx : int; indx_toChange : int; value : Gyroscope2::Valid_ChannelT {local_failure : bool; @@ -4025,9 +4025,9 @@ let elt_out = if ((acc_in.indx = acc_in.indx_toChange)) then (acc_in.value) else (elt_in); tel --- end of node Gyroscope2__addOneChannelIter +-- end of node Gyroscope2::addOneChannelIter -node Gyroscope2__addOneChannel( +node Gyroscope2::addOneChannel( indx_toChange:int; channeltToAdd:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}; @@ -4039,14 +4039,14 @@ returns ( var acc_out:Gyroscope2::CFF_Eltstruct {indx : int; indx_toChange : int; value : Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}}; let - (acc_out, tabToFillAfter) = fillred<<node Gyroscope2__addOneChannelIter, + (acc_out, tabToFillAfter) = fillred<<node Gyroscope2::addOneChannelIter, const 3>>(CFF_Eltstruct{indx=0;indx_toChange=indx_toChange;value=channeltToAdd}, tabToFill); tel --- end of node Gyroscope2__addOneChannel +-- end of node Gyroscope2::addOneChannel -node Gyroscope2__CFC_iter( +node Gyroscope2::CFC_iter( structIn:Gyroscope2::CFF_struct {indx : int; indx_toChange : int; tabToFill : Gyroscope2::Valid_ChannelT {local_failure : bool; @@ -4062,12 +4062,12 @@ 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__addOneChannel(structIn.indx, currentChannel, + (Gyroscope2::addOneChannel(structIn.indx, currentChannel, structIn.tabToFill))}; tel --- end of node Gyroscope2__CFC_iter +-- end of node Gyroscope2::CFC_iter -node Gyroscope2__ComputeForeignChannels( +node Gyroscope2::ComputeForeignChannels( currentChannelIndx:int; allChannels:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}^4) @@ -4079,14 +4079,14 @@ var localtabToFill:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}; let localtabToFill = Valid_ChannelT{local_failure=false;local_value=0.0}; - acc_out = red<<node Gyroscope2__CFC_iter, const + acc_out = red<<node Gyroscope2::CFC_iter, const 4>>(CFF_struct{indx=0;indx_toChange=currentChannelIndx;tabToFill=localtabToFill^3}, allChannels); foreignChannels = acc_out.tabToFill; tel --- end of node Gyroscope2__ComputeForeignChannels +-- end of node Gyroscope2::ComputeForeignChannels -node Gyroscope2__compare_rolls( +node Gyroscope2::compare_rolls( acc_in:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}; channel:Gyroscope2::Valid_ChannelT {local_failure : bool; @@ -4097,12 +4097,12 @@ 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 +-- end of node Gyroscope2::compare_rolls -node Gyroscope2__values_nok( +node Gyroscope2::values_nok( localChannel:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}; foreign_Channels:Gyroscope2::Valid_ChannelT {local_failure : bool; @@ -4113,22 +4113,22 @@ var diff:bool^3; lc:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}; let - (lc, diff) = fillred<<node Gyroscope2__compare_rolls, const + (lc, diff) = fillred<<node Gyroscope2::compare_rolls, const 3>>(localChannel, foreign_Channels); - 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 + 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 + (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 + (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 +-- end of node Gyroscope2::values_nok -node Gyroscope2__CrossFailDetect( +node Gyroscope2::CrossFailDetect( currentChannel:int; localChannel:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}; @@ -4139,13 +4139,13 @@ returns ( var foreign_Channels:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}^3; let - foreign_Channels = Gyroscope2__ComputeForeignChannels(currentChannel, + foreign_Channels = Gyroscope2::ComputeForeignChannels(currentChannel, previousOutChannel); - crossFailure = Gyroscope2__values_nok(localChannel, foreign_Channels); + crossFailure = Gyroscope2::values_nok(localChannel, foreign_Channels); tel --- end of node Gyroscope2__CrossFailDetect +-- end of node Gyroscope2::CrossFailDetect -node Gyroscope2__Channel( +node Gyroscope2::Channel( previousOutChannel:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}^4; nbInChannel:int; @@ -4163,18 +4163,18 @@ var localChannel:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}; let localChannel = - Valid_ChannelT{local_failure=(Gyroscope2__abs((inChannel.valuea - + Valid_ChannelT{local_failure=(Gyroscope2::abs((inChannel.valuea - inChannel.valueb)) > delta);local_value= if - ((Gyroscope2__abs((inChannel.valuea - inChannel.valueb)) > delta)) then + ((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__CrossFailDetect(nbInChannel, localChannel, + Gyroscope2::CrossFailDetect(nbInChannel, localChannel, previousOutChannel));local_value=localChannel.local_value}; nextOutChannel = previousOutChannel; tel --- end of node Gyroscope2__Channel +-- end of node Gyroscope2::Channel -node Gyroscope2__guaranteeChannel( +node Gyroscope2::guaranteeChannel( previousOutChannel:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}^4; nbInChannel:int; @@ -4191,12 +4191,12 @@ 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 +-- end of node Gyroscope2::guaranteeChannel -node Gyroscope2__iteratedVoter( +node Gyroscope2::iteratedVoter( acc_in:bool; channel:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}; @@ -4206,12 +4206,12 @@ node Gyroscope2__iteratedVoter( returns ( acc_out:bool); let - acc_out = (acc_in and (channel.local_failure or (Gyroscope2__abs((vote - + acc_out = (acc_in and (channel.local_failure or (Gyroscope2::abs((vote - channel.local_value)) < delta_to_god))); tel --- end of node Gyroscope2__iteratedVoter +-- end of node Gyroscope2::iteratedVoter -node Gyroscope2__assumeVoter( +node Gyroscope2::assumeVoter( channels:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}^4; god:real; @@ -4221,9 +4221,9 @@ returns ( let assumeOK = true; tel --- end of node Gyroscope2__assumeVoter +-- end of node Gyroscope2::assumeVoter -node Gyroscope2__guaranteeEvaluateAxis( +node Gyroscope2::guaranteeEvaluateAxis( channels:Gyroscope2::Faulty_ChannelT {valuea : real; valueb : real}^4; delta:real; @@ -4233,23 +4233,23 @@ 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 +-- end of node Gyroscope2::guaranteeEvaluateAxis -node Gyroscope2__ValueIsSecure( +node Gyroscope2::ValueIsSecure( secure_value:real; delta_to_god_value:real; god_value:real) 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 +-- end of node Gyroscope2::ValueIsSecure -node Gyroscope2__EvaluateAxis( +node Gyroscope2::EvaluateAxis( channels:Gyroscope2::Faulty_ChannelT {valuea : real; valueb : real}^4; delta:real; @@ -4264,14 +4264,14 @@ var fillredInit:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}^4; let initChannels = Valid_ChannelT{local_failure=false;local_value=0.0}^4; - (dumbChannel, resChannels) = fillred<<node Gyroscope2__Channel, const + (dumbChannel, resChannels) = fillred<<node Gyroscope2::Channel, const 4>>(fillredInit, [0, 1, 2, 3], channels, delta^4, god^4, delta_to_god^4); - AxisValue = Gyroscope2__Voter(resChannels, god, delta_to_god); + AxisValue = Gyroscope2::Voter(resChannels, god, delta_to_god); fillredInit = initChannels -> pre(resChannels); tel --- end of node Gyroscope2__EvaluateAxis +-- end of node Gyroscope2::EvaluateAxis -node Gyroscope2__Gyroscope2( +node Gyroscope2::Gyroscope2( axis:Gyroscope2::Faulty_ChannelT {valuea : real; valueb : real}^4^3) returns ( @@ -4279,16 +4279,16 @@ returns ( var secure_values:real^3; let - secure_values = map<<node Gyroscope2__EvaluateAxis, const 3>>(axis, + secure_values = map<<node Gyroscope2::EvaluateAxis, const 3>>(axis, [DELTA_ROLL, DELTA_PITCH, DELTA_YAW], [GOD_ROLL, GOD_PITCH, GOD_YAW], [DELTA_TO_GOD_ROLL, DELTA_TO_GOD_PITCH, DELTA_TO_GOD_YAW]); - valid = red<<node Gyroscope2__ValueIsSecureII, const 3>>(true, + valid = red<<node Gyroscope2::ValueIsSecureII, const 3>>(true, secure_values, [DELTA_TO_GOD_ROLL, DELTA_TO_GOD_PITCH, DELTA_TO_GOD_YAW], [GOD_ROLL, GOD_PITCH, GOD_YAW]); tel --- end of node Gyroscope2__Gyroscope2 +-- end of node Gyroscope2::Gyroscope2 -node Gyroscope2__guaranteeVoter( +node Gyroscope2::guaranteeVoter( channels:Gyroscope2::Valid_ChannelT {local_failure : bool; local_value : real}^4; god:real; @@ -4297,244 +4297,244 @@ node Gyroscope2__guaranteeVoter( returns ( guaranteeOK:bool); let - guaranteeOK = red<<node Gyroscope2__iteratedVoter, const 4>>(true, + guaranteeOK = red<<node Gyroscope2::iteratedVoter, const 4>>(true, channels, god^4, delta_to_god^4, vote^4); tel --- end of node Gyroscope2__guaranteeVoter +-- end of node Gyroscope2::guaranteeVoter ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/alias.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/alias.lus -const alias__SIZE = 3; -function alias__aliasIterOp(i1:int; i2:int^3) returns (o:int); +const alias::SIZE = 3; +function alias::aliasIterOp(i1:int; i2:int^3) returns (o:int); let - o = Lustre__red<<node Lustre__+, const 3>>(i1, i2); + o = Lustre::red<<node Lustre::+, const 3>>(i1, i2); tel --- end of node alias__aliasIterOp -function alias__aliasBoolRed(i:bool^2) returns (o:bool); +-- end of node alias::aliasIterOp +function alias::aliasBoolRed(i:bool^2) returns (o:bool); let - o = Lustre__boolred<<const 0, const 1, const 2>>(i); + o = Lustre::boolred<<const 0, const 1, const 2>>(i); tel --- end of node alias__aliasBoolRed -node alias__unNoeud(a:int; b:int^3) returns (c:int); +-- end of node alias::aliasBoolRed +node alias::unNoeud(a:int; b:int^3) returns (c:int); var x:bool; let - c = alias__aliasIterOp(a, 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:int^3) returns (c:int); +-- end of node alias::unNoeud +node alias::aliasGivenNode(a:int; b:int^3) returns (c:int); let - c = alias__unNoeud(a, b); + c = alias::unNoeud(a, b); tel --- end of node alias__aliasGivenNode -function alias__aliasPredefNot(i:bool) returns (o:bool); +-- 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); +-- end of node alias::aliasPredefNot +node alias::alias(a:bool) returns (b:bool; c:int); let - b = alias__aliasPredefNot(a); - c = alias__aliasGivenNode(0, map<<node Lustre__+, const 3>>(0^3, SIZE^3)); + b = alias::aliasPredefNot(a); + c = alias::aliasGivenNode(0, map<<node Lustre::+, const 3>>(0^3, SIZE^3)); tel --- end of node alias__alias +-- end of node alias::alias ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/bred.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/bred.lus -node bred__bred(a:bool^2) returns (x:bool); +node bred::bred(a:bool^2) returns (x:bool); let x = boolred<<const 0, const 1, const 2>>(a); tel --- end of node bred__bred +-- end of node bred::bred ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/bred_lv4.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/bred_lv4.lus -type bred_lv4__T1_ARRAY = bool^2; -node bred_lv4__bred(i_a:bool^2) returns (o_x:bool); +type bred_lv4::T1_ARRAY = bool^2; +node bred_lv4::bred(i_a:bool^2) returns (o_x:bool); let o_x = boolred<<const 0, const 1, const 2>>(i_a); tel --- end of node bred_lv4__bred +-- end of node bred_lv4::bred ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/clock.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/clock.lus -extern node clock__clock2(u:bool; v:bool when u) returns (y:bool); -extern node clock__clock3(u:bool) returns (x:bool; y:bool when x); +extern node clock::clock2(u:bool; v:bool when u) returns (y:bool); +extern node clock::clock3(u:bool) returns (x:bool; y:bool when x); -extern node clock__clock4( +extern node clock::clock4( u:bool; v:bool when u) returns ( x:bool; y:bool when x); -node clock__clock(a:bool; b:bool) returns (c:bool; d:bool when c); +node clock::clock(a:bool; b:bool) returns (c:bool; d:bool when c); var z:bool; x:bool when z; y:bool when x; let - y = clock__clock2(a, b when a) when x; - (z, x) = clock__clock3(pre(z)); - (c, d) = clock__clock4(a, 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 +-- end of node clock::clock ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/clock1_2ms.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/clock1_2ms.lus -node clock1_2ms__Clock1ms_node(dummy:bool) returns (Clock1ms:bool); +node clock1_2ms::Clock1ms_node(dummy:bool) returns (Clock1ms:bool); let Clock1ms = true -> not(pre(Clock1ms)); tel --- end of node clock1_2ms__Clock1ms_node -node clock1_2ms__Clock2ms_node(dummy:bool) returns (Clock2ms:bool); +-- end of node clock1_2ms::Clock1ms_node +node clock1_2ms::Clock2ms_node(dummy:bool) returns (Clock2ms:bool); let Clock2ms = true -> not(pre(Clock2ms)); tel --- end of node clock1_2ms__Clock2ms_node +-- end of node clock1_2ms::Clock2ms_node -node clock1_2ms__clock1_2ms( +node clock1_2ms::clock1_2ms( dummy:bool) returns ( Clock1ms:bool; Clock2ms:bool when Clock1ms); let - Clock1ms = clock1_2ms__Clock1ms_node(dummy); - 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 +-- end of node clock1_2ms::clock1_2ms ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/decl.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/decl.lus -type decl__t1; -type decl__t2; -type decl__t3; -const decl__g = 4; -type decl__t4 = decl__t1^8; -const decl__d = true; -const decl__h = 2; -type decl__t5 = decl__t1^8^5; -type decl__coord = decl::coord {x : real; y : real}; -type decl__coord_tab = decl::coord {x : real; y : real}^1; -type decl__couleur = enum {decl__bleu, decl__blanc, decl__rouge}; -const decl__e = 8.500000; -const decl__blanc; -const decl__f; -const decl__bleu; -const decl__rouge; -const decl__a:int; -const decl__b:int; -const decl__c:int; - -extern node decl__decl( - a1:decl__t1; - b1:decl__t1; - c1:decl__t1) +type decl::t1; +type decl::t2; +type decl::t3; +const decl::g = 4; +type decl::t4 = decl::t1^8; +const decl::d = true; +const decl::h = 2; +type decl::t5 = decl::t1^8^5; +type decl::coord = decl::coord {x : real; y : real}; +type decl::coord_tab = decl::coord {x : real; y : real}^1; +type decl::couleur = enum {decl::bleu, decl::blanc, decl::rouge}; +const decl::e = 8.500000; +const decl::blanc; +const decl::f; +const decl::bleu; +const decl::rouge; +const decl::a:int; +const decl::b:int; +const decl::c:int; + +extern node decl::decl( + a1:decl::t1; + b1:decl::t1; + c1:decl::t1) returns ( d1:bool); -extern function decl__f1( - a1:enum {decl__bleu, decl__blanc, decl__rouge}; - b1:enum {decl__bleu, decl__blanc, decl__rouge}; - c1:enum {decl__bleu, decl__blanc, decl__rouge}) +extern function decl::f1( + a1:enum {decl::bleu, decl::blanc, decl::rouge}; + b1:enum {decl::bleu, decl::blanc, decl::rouge}; + c1:enum {decl::bleu, decl::blanc, decl::rouge}) returns ( d1:bool^2); -extern node decl__n2( - a1:decl__t1^8; - b1:decl__t1^8; - c1:decl__t1^8; +extern node decl::n2( + a1:decl::t1^8; + b1:decl::t1^8; + c1:decl::t1^8; d1:bool) returns ( - e1:decl__t1^8^5); + e1:decl::t1^8^5); ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/declaration.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/declaration.lus -type declaration__t1; -type declaration__t2; -type declaration__t3; -const declaration__g = 4; -type declaration__t4 = declaration__t1^8; -const declaration__d = true; -const declaration__h = 2; -type declaration__t5 = declaration__t1^8^5; -type declaration__coord = declaration::coord {x : real; y : real}; -type declaration__coord_tab = declaration::coord {x : real; y : real}^1; -type declaration__couleur = enum {declaration__bleu, declaration__blanc, declaration__rouge}; -const declaration__e = 8.500000; -const declaration__blanc; -const declaration__f; -const declaration__bleu; -const declaration__rouge; -const declaration__a:int; -const declaration__b:int; -const declaration__c:int; -node declaration__declaration(a1:int) returns (b1:int); +type declaration::t1; +type declaration::t2; +type declaration::t3; +const declaration::g = 4; +type declaration::t4 = declaration::t1^8; +const declaration::d = true; +const declaration::h = 2; +type declaration::t5 = declaration::t1^8^5; +type declaration::coord = declaration::coord {x : real; y : real}; +type declaration::coord_tab = declaration::coord {x : real; y : real}^1; +type declaration::couleur = enum {declaration::bleu, declaration::blanc, declaration::rouge}; +const declaration::e = 8.500000; +const declaration::blanc; +const declaration::f; +const declaration::bleu; +const declaration::rouge; +const declaration::a:int; +const declaration::b:int; +const declaration::c:int; +node declaration::declaration(a1:int) returns (b1:int); let b1 = a1; tel --- end of node declaration__declaration +-- end of node declaration::declaration -extern function declaration__f1( - a1:enum {declaration__bleu, declaration__blanc, declaration__rouge}; - b1:enum {declaration__bleu, declaration__blanc, declaration__rouge}; - c1:enum {declaration__bleu, declaration__blanc, declaration__rouge}) +extern function declaration::f1( + a1:enum {declaration::bleu, declaration::blanc, declaration::rouge}; + b1:enum {declaration::bleu, declaration::blanc, declaration::rouge}; + c1:enum {declaration::bleu, declaration::blanc, declaration::rouge}) returns ( d1:bool^2); -extern node declaration__n1( - a1:declaration__t1; - b1:declaration__t1; - c1:declaration__t1) +extern node declaration::n1( + a1:declaration::t1; + b1:declaration::t1; + c1:declaration::t1) returns ( d1:bool); -extern node declaration__n2( - a1:declaration__t1^8; - b1:declaration__t1^8; - c1:declaration__t1^8; +extern node declaration::n2( + a1:declaration::t1^8; + b1:declaration::t1^8; + c1:declaration::t1^8; d1:bool) returns ( - e1:declaration__t1^8^5); -node declaration__n4(a1:bool) returns (b1:bool); + e1:declaration::t1^8^5); +node declaration::n4(a1:bool) returns (b1:bool); var c1:bool; let c1 = not(c1); b1 = not((a1 and c1)); tel --- end of node declaration__n4 -node declaration__n5(a1:real) returns (b1:real); +-- end of node declaration::n4 +node declaration::n5(a1:real) returns (b1:real); var c1:real; let b1 = (a1 / c1); tel --- end of node declaration__n5 +-- end of node declaration::n5 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/def.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/def.lus -type def__t1; -const def__a = 4; -type def__string = int^4; -type def__string2d = int^4^4; -type def__structT = def::structT {x : int; y : real; z : int^4^4^4}; -type def__t2; -type def__t3; -type def__tabStruct = def::structT {x : int; y : real; z : int^4^4^4}^2; -const def__id_int = 5; -const def__b = true; -const def__c = 3.140000; - -node def__def( +type def::t1; +const def::a = 4; +type def::string = int^4; +type def::string2d = int^4^4; +type def::structT = def::structT {x : int; y : real; z : int^4^4^4}; +type def::t2; +type def::t3; +type def::tabStruct = def::structT {x : int; y : real; z : int^4^4^4}^2; +const def::id_int = 5; +const def::b = true; +const def::c = 3.140000; + +node def::def( a1:bool; b1:int^4^4 when a1; c1:def::structT {x : int; @@ -4580,27 +4580,27 @@ let h6[0] = current (c1[1].z[2][1]); h6[3] = current (c1[1].z[2][1]); tel --- end of node def__def +-- end of node def::def ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/filliter.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/filliter.lus -type filliter__t = int^5; -const filliter__NBC = 3; -node filliter__copie(acc_in:int) returns (acc_out:int; elt:int); +type filliter::t = int^5; +const filliter::NBC = 3; +node filliter::copie(acc_in:int) returns (acc_out:int; elt:int); let acc_out = acc_in; elt = acc_in; tel --- end of node filliter__copie -node filliter__incr_acc(acc_in:int) returns (acc_out:int; res:int); +-- end of node filliter::copie +node filliter::incr_acc(acc_in:int) returns (acc_out:int; res:int); let res = acc_in; acc_out = (res + 1); tel --- end of node filliter__incr_acc +-- end of node filliter::incr_acc -node filliter__filliter( +node filliter::filliter( c:bool; i1:int when c; i2:int when c) @@ -4613,17 +4613,17 @@ var bid2:int when c; let s1 = x[0..2]; - (bid1, x) = fill<<node filliter__copie, const 4>>(i1); - (bid2, s2) = fill<<node filliter__incr_acc, const 3>>(i2); + (bid1, x) = fill<<node filliter::copie, const 4>>(i1); + (bid2, s2) = fill<<node filliter::incr_acc, const 3>>(i2); tel --- end of node filliter__filliter +-- end of node filliter::filliter ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/filter.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/filter.lus -type filter__complexe = filter::complexe {x : real; y : real}; -type filter__cdouble = filter::cdouble {x : filter::complexe {x : real; y : real}; y : filter::complexe {x : real; y : real}}; -node filter__filter(a:real; b:real) returns (ok:bool); +type filter::complexe = filter::complexe {x : real; y : real}; +type filter::cdouble = filter::cdouble {x : filter::complexe {x : real; y : real}; y : filter::complexe {x : real; y : real}}; +node filter::filter(a:real; b:real) returns (ok:bool); var i:real; z:filter::cdouble {x : filter::complexe {x : real; y : real}; y : filter::complexe {x : real; y : real}}; @@ -4635,34 +4635,34 @@ let i = 1.; ok = (z.y.y < z.y.x); tel --- end of node filter__filter +-- end of node filter::filter ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/lustre_test1_ok.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/lustre_test1_ok.lus -node lustre_test1_ok__rising(in:bool) returns (out:bool); +node lustre_test1_ok::rising(in:bool) returns (out:bool); let out = false -> (in and not(pre(in))); tel --- end of node lustre_test1_ok__rising -node lustre_test1_ok__TransFnc_1(E:real) returns (S:real); +-- end of node lustre_test1_ok::rising +node lustre_test1_ok::TransFnc_1(E:real) returns (S:real); var Sm_1:real; let S = ((1.0 * E) - (0.5 * Sm_1)); Sm_1 = 0.0 -> pre(S); tel --- end of node lustre_test1_ok__TransFnc_1 -node lustre_test1_ok__subsys1(s1:real) returns (s2:real); +-- end of node lustre_test1_ok::TransFnc_1 +node lustre_test1_ok::subsys1(s1:real) returns (s2:real); var Discrete_Filter:real; let - Discrete_Filter = lustre_test1_ok__TransFnc_1(s1); + Discrete_Filter = lustre_test1_ok::TransFnc_1(s1); s2 = Discrete_Filter; tel --- end of node lustre_test1_ok__subsys1 +-- end of node lustre_test1_ok::subsys1 -node lustre_test1_ok__lustre_test1_ok( +node lustre_test1_ok::lustre_test1_ok( In1:real; cl1_2:bool; cl1_4:bool; @@ -4696,30 +4696,30 @@ let pre(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__rising(In3); + 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 when + (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 +-- end of node lustre_test1_ok::lustre_test1_ok ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/map_red_iter.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/map_red_iter.lus -const map_red_iter__NBC = 20; -type map_red_iter__INTNBC = int^20; -const map_red_iter__NBG = 4; -type map_red_iter__INTNBG = int^4; -type map_red_iter__T_EntreeGlob = map_red_iter::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}; -type map_red_iter__T_ComChg = int; -type map_red_iter__T_InfoGenIndiv = map_red_iter::T_InfoGenIndiv {mesure_gen : int}; -type map_red_iter__T_EtatCharge = int; -type map_red_iter__T_InfoChgGlob = map_red_iter::T_InfoChgGlob {chg2gen : int^20}; -type map_red_iter__T_InfoChgIndiv = map_red_iter::T_InfoChgIndiv {mesure_chg : int}; -type map_red_iter__T_InfoGenGlob = map_red_iter::T_InfoGenGlob {elt_bidon : int; chg2gen : int^20}; - -node map_red_iter__traite_genCore_itere( +const map_red_iter::NBC = 20; +type map_red_iter::INTNBC = int^20; +const map_red_iter::NBG = 4; +type map_red_iter::INTNBG = int^4; +type map_red_iter::T_EntreeGlob = map_red_iter::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}; +type map_red_iter::T_ComChg = int; +type map_red_iter::T_InfoGenIndiv = map_red_iter::T_InfoGenIndiv {mesure_gen : int}; +type map_red_iter::T_EtatCharge = int; +type map_red_iter::T_InfoChgGlob = map_red_iter::T_InfoChgGlob {chg2gen : int^20}; +type map_red_iter::T_InfoChgIndiv = map_red_iter::T_InfoChgIndiv {mesure_chg : int}; +type map_red_iter::T_InfoGenGlob = map_red_iter::T_InfoGenGlob {elt_bidon : int; chg2gen : int^20}; + +node map_red_iter::traite_genCore_itere( acc_in:int; elt1:bool; elt2:int) @@ -4730,9 +4730,9 @@ let elt = if (elt1) then (elt2) else (acc_in); acc_out = acc_in; tel --- end of node map_red_iter__traite_genCore_itere +-- end of node map_red_iter::traite_genCore_itere -node map_red_iter__map_red_iter( +node map_red_iter::map_red_iter( indice_gen:int; InfoGenIndiv:map_red_iter::T_InfoGenIndiv {mesure_gen : int}; InfoGenGlob:map_red_iter::T_InfoGenGlob {elt_bidon : int; @@ -4744,25 +4744,25 @@ returns ( var bidon:int; let - (bidon, TabComChg) = fillred<<node map_red_iter__traite_genCore_itere, + (bidon, TabComChg) = fillred<<node map_red_iter::traite_genCore_itere, const 20>>(indice_gen, TabComVal, InfoGenGlob.chg2gen); tel --- end of node map_red_iter__map_red_iter +-- end of node map_red_iter::map_red_iter ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/mapdeRed.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/mapdeRed.lus -const mapdeRed__m = 3; -const mapdeRed__n = 2; -const mapdeRed__p = 5; -node mapdeRed__incr(i:int) returns (accu:int; s:int); +const mapdeRed::m = 3; +const mapdeRed::n = 2; +const mapdeRed::p = 5; +node mapdeRed::incr(i:int) returns (accu:int; s:int); let accu = (i + 1); s = i; tel --- end of node mapdeRed__incr +-- end of node mapdeRed::incr -node mapdeRed__mapdeRed( +node mapdeRed::mapdeRed( init:int^2; init2:int) returns ( @@ -4770,35 +4770,35 @@ returns ( T:int^2^3; bid:int); let - (bid, T) = fill<<node Lustre__fill<<node mapdeRed__incr, const 2>>, const + (bid, T) = fill<<node Lustre::fill<<node mapdeRed::incr, const 2>>, const 3>>(init2); - r = red<<node Lustre__map<<node Lustre__+, const 2>>, const 3>>(init, T); + r = red<<node Lustre::map<<node Lustre::+, const 2>>, const 3>>(init, T); tel --- end of node mapdeRed__mapdeRed +-- end of node mapdeRed::mapdeRed ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/mapiter.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/mapiter.lus -node mapiter__incr_tab(a:int) returns (b:int); +node mapiter::incr_tab(a:int) returns (b:int); let b = (a + 1); tel --- end of node mapiter__incr_tab -node mapiter__mapiter(i1:int^7^3) returns (s1:int^7^3); +-- end of node mapiter::incr_tab +node mapiter::mapiter(i1:int^7^3) returns (s1:int^7^3); let - s1 = map<<node Lustre__map<<node mapiter__incr_tab, const 7>>, const + s1 = map<<node Lustre::map<<node mapiter::incr_tab, const 7>>, const 3>>(i1); tel --- end of node mapiter__mapiter +-- end of node mapiter::mapiter ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/mappredef.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/mappredef.lus -const mappredef__N = 3; -type mappredef__tab_int = int^3; -type mappredef__tab_bool = bool^3; +const mappredef::N = 3; +type mappredef::tab_int = int^3; +type mappredef::tab_bool = bool^3; -node mappredef__mappredef( +node mappredef::mappredef( x:bool^3; a:int^3; b:int^3) @@ -4809,15 +4809,15 @@ var z:int; let z = if (x[0]) then (a[0]) else (b[0]); - c = map<<node Lustre__if, const 3>>(x, a, b); - d = map<<node Lustre__-, const 3>>(b); + c = map<<node Lustre::if, const 3>>(x, a, b); + d = map<<node Lustre::-, const 3>>(b); tel --- end of node mappredef__mappredef +-- end of node mappredef::mappredef ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/plus.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/plus.lus -node plus__plus(a:int; b:int) returns (c:int; d:int; e:int; f:int); +node plus::plus(a:int; b:int) returns (c:int; d:int; e:int; f:int); let c = (a + b); d = (a + b); @@ -4825,49 +4825,49 @@ let f = if (nor((c < b), (c <= b))) then (a) else ((b + if (boolred<<const 0, const 0, const 2>>([(c < b), (c <= b)])) then (a) else (b))); tel --- end of node plus__plus +-- end of node plus::plus ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/pre_x.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/pre_x.lus -node pre_x__pre_x(a:int; b:int) returns (x:bool); +node pre_x::pre_x(a:int; b:int) returns (x:bool); let x = false -> if ((pre(a) = pre(b))) then (not(pre(x))) else (pre(x)); tel --- end of node pre_x__pre_x +-- end of node pre_x::pre_x ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/rediter.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/rediter.lus -node rediter__max(init:int; a:int) returns (b:int); +node rediter::max(init:int; a:int) returns (b:int); let b = if ((init > a)) then (init) else (a); tel --- end of node rediter__max -node rediter__rediter(a:int^5^3) returns (b:int); +-- end of node rediter::max +node rediter::rediter(a:int^5^3) returns (b:int); let - b = red<<node Lustre__red<<node rediter__max, const 5>>, const 3>>(0, a); + b = red<<node Lustre::red<<node rediter::max, const 5>>, const 3>>(0, a); tel --- end of node rediter__rediter +-- end of node rediter::rediter ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/redoptest.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/redoptest.lus -node redoptest__max(init:int; a:int) returns (b:int); +node redoptest::max(init:int; a:int) returns (b:int); let b = if ((init > a)) then (init) else (a); tel --- end of node redoptest__max -node redoptest__redoptest(a:int^5^3) returns (b:int); +-- end of node redoptest::max +node redoptest::redoptest(a:int^5^3) returns (b:int); let - b = red<<node Lustre__red<<node Lustre__+, const 5>>, const 3>>(0, a); + b = red<<node Lustre::red<<node Lustre::+, const 5>>, const 3>>(0, a); tel --- end of node redoptest__redoptest +-- end of node redoptest::redoptest ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/sample_time_change.lus Opening file /home/jahier/lus2lic/src/test/should_work/demo/sample_time_change.lus -node sample_time_change__make_cl1_4_2(in:bool) returns (out:bool); +node sample_time_change::make_cl1_4_2(in:bool) returns (out:bool); var cl1:bool; cl2:bool; @@ -4884,8 +4884,8 @@ let pha2 = false -> pre(pha1); out = pha2; tel --- end of node sample_time_change__make_cl1_4_2 -node sample_time_change__make_cl1_12_3(in:bool) returns (out:bool); +-- end of node sample_time_change::make_cl1_4_2 +node sample_time_change::make_cl1_12_3(in:bool) returns (out:bool); var cl1:bool; cl2:bool; @@ -4920,9 +4920,9 @@ let pha3 = false -> pre(pha2); out = pha3; tel --- end of node sample_time_change__make_cl1_12_3 +-- end of node sample_time_change::make_cl1_12_3 -node sample_time_change__sample_time_change( +node sample_time_change::sample_time_change( cl1_4_2:bool; cl1_12_3:bool; In3:real when cl1_12_3) @@ -4936,77 +4936,77 @@ let Unit_Delay2 = 0.0 when cl1_4_2 -> pre(Unit_Delay2); Out2 = Unit_Delay2; tel --- end of node sample_time_change__sample_time_change -node sample_time_change__MainNode(In3:real) returns (Out2:real); +-- end of node sample_time_change::sample_time_change +node sample_time_change::MainNode(In3:real) returns (Out2:real); var cl1_4_2:bool; cl1_12_3:bool; Out2_:real when cl1_4_2; let - 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_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 +-- end of node sample_time_change::MainNode ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/bob.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/bob.lus -node bob__bob(i:bool) returns (o:bool when i); +node bob::bob(i:bool) returns (o:bool when i); let assert(true -> (i <> pre(i))); o = true -> pre(false -> pre(i)) when i; tel --- end of node bob__bob +-- end of node bob::bob ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/def.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/def.lus -node def__def(i:bool) returns (a:bool; b:bool); +node def::def(i:bool) returns (a:bool; b:bool); let a = true; b = false; tel --- end of node def__def +-- end of node def::def ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/ex.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/ex.lus -node ex__id(f:bool; a:bool) returns (g:bool); +node ex::id(f:bool; a:bool) returns (g:bool); let g = (f or a); tel --- end of node ex__id -node ex__trueNode(x:bool) returns (y:bool); +-- end of node ex::id +node ex::trueNode(x:bool) returns (y:bool); let - y = (x or ex__id(true, false)); + y = (x or ex::id(true, false)); tel --- end of node ex__trueNode -node ex__ex(i:bool) returns (o:bool); +-- end of node ex::trueNode +node ex::ex(i:bool) returns (o:bool); let - o = true -> (pre(i) and ex__trueNode(i)); + o = true -> (pre(i) and ex::trueNode(i)); tel --- end of node ex__ex +-- end of node ex::ex ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/iter.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/iter.lus -const iter__n = 5; -node iter__filled(accu_in:int) returns (accu_out:int; elt:int); +const iter::n = 5; +node iter::filled(accu_in:int) returns (accu_out:int; elt:int); let accu_out = (accu_in + 1); elt = accu_in; tel --- end of node iter__filled -node iter__mapped(elt_in:int) returns (elt_out:int); +-- end of node iter::filled +node iter::mapped(elt_in:int) returns (elt_out:int); let elt_out = (elt_in + 1); tel --- end of node iter__mapped +-- end of node iter::mapped -node iter__garcia( +node iter::garcia( accu_in:int; elt_in:int) returns ( @@ -5016,9 +5016,9 @@ let accu_out = (accu_in + 1); elt_out = (elt_in + accu_out); tel --- end of node iter__garcia +-- end of node iter::garcia -node iter__iter( +node iter::iter( init:int) returns ( Tab_out:int^5; @@ -5029,24 +5029,24 @@ var T_inter:int^5; bidon:int; let - (bidon, T_inter) = fill<<node iter__filled, const 5>>(init); - Tab_out = map<<node iter__mapped, const 5>>(T_inter); - Red_plus = red<<node Lustre__+, const 5>>(-(100), Tab_out); - (zorroAcc, zorroTab) = fillred<<node iter__garcia, const 5>>(0, [0, 0, 0, + (bidon, T_inter) = fill<<node iter::filled, const 5>>(init); + Tab_out = map<<node iter::mapped, const 5>>(T_inter); + Red_plus = red<<node Lustre::+, const 5>>(-(100), Tab_out); + (zorroAcc, zorroTab) = fillred<<node iter::garcia, const 5>>(0, [0, 0, 0, 0, 0]); tel --- end of node iter__iter -node iter__plus(accu_in:int; elt_in:int) returns (accu_out:int); +-- end of node iter::iter +node iter::plus(accu_in:int; elt_in:int) returns (accu_out:int); let accu_out = (accu_in + elt_in); tel --- end of node iter__plus +-- end of node iter::plus ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/iterate.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/iterate.lus -node iterate__mapped( +node iterate::mapped( elt_in1:int; elt_in2:int) returns ( @@ -5056,9 +5056,9 @@ let elt_out1 = elt_in1; elt_out2 = elt_in2; tel --- end of node iterate__mapped +-- end of node iterate::mapped -node iterate__redduced( +node iterate::redduced( accu_in:int; elt_in1:int; elt_in2:int) @@ -5067,9 +5067,9 @@ returns ( let accu_out = ((accu_in + elt_in1) + elt_in2); tel --- end of node iterate__redduced +-- end of node iterate::redduced -node iterate__filled( +node iterate::filled( accu_in:int) returns ( accu_out:int; @@ -5080,9 +5080,9 @@ let elt_out1 = accu_in; elt_out2 = (accu_in * 2); tel --- end of node iterate__filled +-- end of node iterate::filled -node iterate__fill_redduced( +node iterate::fill_redduced( accu_in:int; elt_in1:int; elt_in2:int) @@ -5097,9 +5097,9 @@ let elt_out2 = elt_in2; elt_out3 = (elt_in1 + elt_in2); tel --- end of node iterate__fill_redduced +-- end of node iterate::fill_redduced -node iterate__iterate( +node iterate::iterate( IN1:int^10; IN2:int^10) returns ( @@ -5115,18 +5115,18 @@ returns ( var bidon:int; let - (out_map1, out_map2) = map<<node iterate__mapped, const 10>>(IN1, IN2); - out_red1 = red<<node iterate__redduced, const 10>>(0, IN1, IN2); - (bidon, out_fill1, out_fill2) = fill<<node iterate__filled, const 10>>(0); + (out_map1, out_map2) = map<<node iterate::mapped, const 10>>(IN1, IN2); + out_red1 = red<<node iterate::redduced, const 10>>(0, IN1, IN2); + (bidon, out_fill1, out_fill2) = fill<<node iterate::filled, const 10>>(0); (out_fillred1, out_fillred2, out_fillred3, OUT) = fillred<<node - iterate__fill_redduced, const 10>>(0, IN1, IN2); + iterate::fill_redduced, const 10>>(0, IN1, IN2); tel --- end of node iterate__iterate +-- end of node iterate::iterate ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/lecteur.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/lecteur.lus -node lecteur__Propriete(vitesse:int) returns (ok:bool); +node lecteur::Propriete(vitesse:int) returns (ok:bool); var cpt:int; acceptable:bool; @@ -5135,9 +5135,9 @@ let cpt = 0 -> if (acceptable) then (0) else ((pre(cpt) + 1)); ok = true -> (pre(cpt) < 15); tel --- end of node lecteur__Propriete +-- end of node lecteur::Propriete -node lecteur__Controleur( +node lecteur::Controleur( diff:int) returns ( vitesse:int; @@ -5148,9 +5148,9 @@ let Plus = (vitesse <= 9); Moins = (vitesse >= 11); tel --- end of node lecteur__Controleur +-- end of node lecteur::Controleur -node lecteur__Environnement( +node lecteur::Environnement( diff:int; Plus:bool; Moins:bool) @@ -5161,8 +5161,8 @@ let ((diff >= 1)) else (true)) and if (false -> pre(Moins)) then ((diff <= -(1))) else (true)); tel --- end of node lecteur__Environnement -node lecteur__lecteur(diff:int) returns (ok:bool); +-- end of node lecteur::Environnement +node lecteur::lecteur(diff:int) returns (ok:bool); var vitesse:int; Plus:bool; @@ -5170,42 +5170,42 @@ var realiste:bool; let assert(realiste); - (vitesse, Plus, Moins) = lecteur__Controleur(diff); - realiste = lecteur__Environnement(diff, Plus, Moins); - ok = lecteur__Propriete(vitesse); + (vitesse, Plus, Moins) = lecteur::Controleur(diff); + realiste = lecteur::Environnement(diff, Plus, Moins); + ok = lecteur::Propriete(vitesse); tel --- end of node lecteur__lecteur +-- end of node lecteur::lecteur ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/lucky.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/lucky.lus -node lucky__implies(X:bool; Y:bool) returns (XimpliesY:bool); +node lucky::implies(X:bool; Y:bool) returns (XimpliesY:bool); let XimpliesY = (not(X) or Y); tel --- end of node lucky__implies -node lucky__after(X:bool) returns (afterX:bool); +-- end of node lucky::implies +node lucky::after(X:bool) returns (afterX:bool); let afterX = false -> pre((X or afterX)); tel --- end of node lucky__after -node lucky__once_since(C:bool; A:bool) returns (X:bool); +-- 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__after(A)) then ((C or 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); +-- end of node lucky::once_since +node lucky::once_from_to(C:bool; A:bool; B:bool) returns (X:bool); let - X = lucky__implies(B, false -> pre(lucky__once_since(C, 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); +-- end of node lucky::once_from_to +node lucky::stable(i:bool) returns (o:int); let o = if (true -> (i = pre(i))) then ((1 + 0 -> pre(o))) else (0); tel --- end of node lucky__stable -node lucky__lucky(signal:int; action:bool) returns (alarm:bool); +-- end of node lucky::stable +node lucky::lucky(signal:int; action:bool) returns (alarm:bool); var active:bool; begin:bool; @@ -5215,23 +5215,23 @@ let ((signal > 20)); begin = (active and false -> not(pre(active))); en = (not(active) and false -> pre(active)); - alarm = (not(lucky__once_from_to(action, begin, en)) or - (lucky__stable(active) > 10)); + alarm = (not(lucky::once_from_to(action, begin, en)) or + (lucky::stable(active) > 10)); tel --- end of node lucky__lucky +-- end of node lucky::lucky ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/morel.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/morel.lus -type morel__arrayb = bool^3; -type morel__arrayi = int^2^3; -node morel__mcmorel(i:int) returns (t:int^2); +type morel::arrayb = bool^3; +type morel::arrayi = int^2^3; +node morel::mcmorel(i:int) returns (t:int^2); let t = [i, i] -> [(pre(t[0]) + 1), (pre(t[1]) + 2)]; tel --- end of node morel__mcmorel +-- end of node morel::mcmorel -node morel__tab( +node morel::tab( b:bool; i:int) returns ( @@ -5249,12 +5249,12 @@ let (i1, i2, i3) = ((tabi[0][0] + tabi[0][1]), (tabi[1][0] + tabi[1][1]), (tabi[2][0] + tabi[2][1])); tabb[1..2] = [true, false]; - tabi[2] = morel__mcmorel(i); + tabi[2] = morel::mcmorel(i); tabi[0..1] = [[10, 100], [1000, 10000]]; tel --- end of node morel__tab +-- end of node morel::tab -node morel__morel( +node morel::morel( b:bool; i:int) returns ( @@ -5265,24 +5265,24 @@ returns ( i2:int; i3:int); let - (b1, b2, b3, i1, i2, i3) = morel__tab(b, i); + (b1, b2, b3, i1, i2, i3) = morel::tab(b, i); tel --- end of node morel__morel +-- end of node morel::morel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/morel2.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/morel2.lus -type morel2__a2 = int^2; -type morel2__a32 = int^2^3; -type morel2__arrayb = bool^3; -type morel2__arrayi = int^2^3; -node morel2__mcmorel(i:int) returns (t:int^2); +type morel2::a2 = int^2; +type morel2::a32 = int^2^3; +type morel2::arrayb = bool^3; +type morel2::arrayi = int^2^3; +node morel2::mcmorel(i:int) returns (t:int^2); let t = [i, i] -> [(pre(t[0]) + 1), (pre(t[1]) + 2)]; tel --- end of node morel2__mcmorel +-- end of node morel2::mcmorel -node morel2__morel2( +node morel2::morel2( b:bool; i:int) returns ( @@ -5302,24 +5302,24 @@ let (tabi[2][0] + tabi[2][1])); tabb[0] = b; tabb[1..2] = [true, false]; - toto[2] = morel2__mcmorel(i); + toto[2] = morel2::mcmorel(i); toto[0..1] = [[10, 100], [1000, 10000]]; tabi = toto; tel --- end of node morel2__morel2 +-- end of node morel2::morel2 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/morel3.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/morel3.lus -type morel3__arrayb = bool^3; -type morel3__arrayi = int^2^3; -node morel3__mcmorel(i:int) returns (t:int^2); +type morel3::arrayb = bool^3; +type morel3::arrayi = int^2^3; +node morel3::mcmorel(i:int) returns (t:int^2); let t = [i, i] -> [1, (pre(t[1]) + 2)]; tel --- end of node morel3__mcmorel +-- end of node morel3::mcmorel -node morel3__tab( +node morel3::tab( b:bool; i:int) returns ( @@ -5338,12 +5338,12 @@ let (tabi[2][0] + tabi[2][1])); tabb[0] = b; tabb[1..2] = [true, false]; - tabi[2] = morel3__mcmorel(i); + tabi[2] = morel3::mcmorel(i); tabi[0..1] = [[10, 100], [1000, 10000]]; tel --- end of node morel3__tab +-- end of node morel3::tab -node morel3__morel3( +node morel3::morel3( b:bool; i:int) returns ( @@ -5354,18 +5354,18 @@ returns ( i2:int; i3:int); let - (b1, b2, b3, i1, i2, i3) = morel3__tab(b, i); + (b1, b2, b3, i1, i2, i3) = morel3::tab(b, i); tel --- end of node morel3__morel3 +-- end of node morel3::morel3 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/morel4.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/morel4.lus -type morel4__tube = morel4::tube {in : int; out : int}; -type morel4__toto = morel4::toto {titi : morel4::tube {in : int; out : int}; tutu : bool}; -type morel4__arrayb = bool^3; -type morel4__arrayi = int^2^3; -node morel4__mcmorel(i:int) returns (t:int^2); +type morel4::tube = morel4::tube {in : int; out : int}; +type morel4::toto = morel4::toto {titi : morel4::tube {in : int; out : int}; tutu : bool}; +type morel4::arrayb = bool^3; +type morel4::arrayi = int^2^3; +node morel4::mcmorel(i:int) returns (t:int^2); var yo:morel4::toto {titi : morel4::tube {in : int; out : int}; tutu : bool}; let @@ -5373,9 +5373,9 @@ let yo. = true; t = [yo.titi.in, yo.titi.out] -> [(pre(t[0]) + 1), pre(t[1])]; tel --- end of node morel4__mcmorel +-- end of node morel4::mcmorel -node morel4__tab( +node morel4::tab( b:bool; i:int) returns ( @@ -5394,12 +5394,12 @@ let (tabi[2][0] + tabi[2][1])); tabb[0] = b; tabb[1..2] = [true, false]; - tabi[2] = morel4__mcmorel(i); + tabi[2] = morel4::mcmorel(i); tabi[0..1] = [[10, 100], [1000, 10000]]; tel --- end of node morel4__tab +-- end of node morel4::tab -node morel4__morel4( +node morel4::morel4( b:bool; i:int) returns ( @@ -5410,19 +5410,19 @@ returns ( i2:int; i3:int); let - (b1, b2, b3, i1, i2, i3) = morel4__tab(b, i); + (b1, b2, b3, i1, i2, i3) = morel4::tab(b, i); tel --- end of node morel4__morel4 +-- end of node morel4::morel4 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/morel5.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/morel5.lus -type morel5__tube = morel5::tube {in : int; out : int}; -type morel5__toto = morel5::toto {titi : morel5::tube {in : int; out : int}; tutu : bool}; -type morel5__arrayb = bool^3; -type morel5__arrayi = int^2^3; +type morel5::tube = morel5::tube {in : int; out : int}; +type morel5::toto = morel5::toto {titi : morel5::tube {in : int; out : int}; tutu : bool}; +type morel5::arrayb = bool^3; +type morel5::arrayi = int^2^3; -node morel5__tab( +node morel5::tab( yo:morel5::toto {titi : morel5::tube {in : int; out : int}; tutu : bool}; @@ -5440,9 +5440,9 @@ let (i1, i2, i3) = ((tabi[0][0] + tabi[0][1]), ((tabi[1][0] + tabi[1][1]) + yo.titi.in), ((tabi[2][0] + tabi[2][1]) + yo.titi.out)); tel --- end of node morel5__tab +-- end of node morel5::tab -node morel5__morel5( +node morel5::morel5( t:morel5::toto {titi : morel5::tube {in : int; out : int}; tutu : bool}; @@ -5456,10 +5456,10 @@ returns ( i2:int; i3:int); let - (b1, b2, b3, i1, i2, i3) = morel5__tab(t, 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:int^2; u:int^2^2); +-- end of node morel5::morel5 +node morel5::mcmorel(i:int) returns (t:int^2; u:int^2^2); var yo:morel5::toto {titi : morel5::tube {in : int; out : int}; tutu : bool}; let @@ -5468,60 +5468,60 @@ let t = [yo.titi.in, yo.titi.out] -> [(pre(t[0]) + 1), pre(t[1])]; u = [[10, 100], [1000, 10000]]; tel --- end of node morel5__mcmorel +-- end of node morel5::mcmorel ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/noAlarm.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/noAlarm.lus -node noAlarm__noAlarm(alarm:bool) returns (ok:bool); +node noAlarm::noAlarm(alarm:bool) returns (ok:bool); let ok = not(alarm); tel --- end of node noAlarm__noAlarm +-- end of node noAlarm::noAlarm ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/notTwo.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/notTwo.lus -node notTwo__notTwo(a:bool; b:bool) returns (o:bool); +node notTwo::notTwo(a:bool; b:bool) returns (o:bool); let o = not((a and b)); tel --- end of node notTwo__notTwo +-- end of node notTwo::notTwo ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/onlyroll.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/onlyroll.lus -const onlyroll__NRminP = -5.100000; -const onlyroll__NRminR = -25.300000; -const onlyroll__NRmaxP = 5.100000; -const onlyroll__DELTA_PITCH = 3.000000; -const onlyroll__NRmaxR = 25.300000; -const onlyroll__FAIL_SAFE_PITCH_VALUE = 4.000000; -const onlyroll__DELTA_YAW = 2.730000; -const onlyroll__NRminY = -5.000000; -const onlyroll__HORminP = -57.000000; -const onlyroll__XFAIL_SAFE_ROLL_VALUE = 1.100000; -const onlyroll__NRmaxY = 5.000000; -const onlyroll__HORminR = -285.000000; -const onlyroll__HORmaxP = 57.000000; -const onlyroll__CROSS_CH_TOL_PITCH = 10.100000; -const onlyroll__HORmaxR = 285.000000; -const onlyroll__FAIL_SAFE_YAW_VALUE = 4.000000; -const onlyroll__HORminY = -57.000000; -const onlyroll__DELTA_ROLL = 14.900000; -const onlyroll__FAIL_SAFE_ROLL_VALUE = 1.000000; -const onlyroll__OneSecond = 10; -const onlyroll__HORmaxY = 57.000000; -const onlyroll__TIME_ROLL = 3; -const onlyroll__CROSS_CH_TOL_ROLL = 51.000000; -const onlyroll__BID_LAST = 2.200000; -const onlyroll__TIME5 = 4; -const onlyroll__SAFE_COUNTER_TIME = 3; -const onlyroll__BID_VAL = 3.300000; -const onlyroll__CROSS_CH_TOL_YAW = 10.000000; -const onlyroll__TIME_CROSS_ROLL = 3; - -node onlyroll__noneof( +const onlyroll::NRminP = -5.100000; +const onlyroll::NRminR = -25.300000; +const onlyroll::NRmaxP = 5.100000; +const onlyroll::DELTA_PITCH = 3.000000; +const onlyroll::NRmaxR = 25.300000; +const onlyroll::FAIL_SAFE_PITCH_VALUE = 4.000000; +const onlyroll::DELTA_YAW = 2.730000; +const onlyroll::NRminY = -5.000000; +const onlyroll::HORminP = -57.000000; +const onlyroll::XFAIL_SAFE_ROLL_VALUE = 1.100000; +const onlyroll::NRmaxY = 5.000000; +const onlyroll::HORminR = -285.000000; +const onlyroll::HORmaxP = 57.000000; +const onlyroll::CROSS_CH_TOL_PITCH = 10.100000; +const onlyroll::HORmaxR = 285.000000; +const onlyroll::FAIL_SAFE_YAW_VALUE = 4.000000; +const onlyroll::HORminY = -57.000000; +const onlyroll::DELTA_ROLL = 14.900000; +const onlyroll::FAIL_SAFE_ROLL_VALUE = 1.000000; +const onlyroll::OneSecond = 10; +const onlyroll::HORmaxY = 57.000000; +const onlyroll::TIME_ROLL = 3; +const onlyroll::CROSS_CH_TOL_ROLL = 51.000000; +const onlyroll::BID_LAST = 2.200000; +const onlyroll::TIME5 = 4; +const onlyroll::SAFE_COUNTER_TIME = 3; +const onlyroll::BID_VAL = 3.300000; +const onlyroll::CROSS_CH_TOL_YAW = 10.000000; +const onlyroll::TIME_CROSS_ROLL = 3; + +node onlyroll::noneof( f1:bool; f2:bool; f3:bool; @@ -5531,9 +5531,9 @@ returns ( let r = (((not(f1) and not(f2)) and not(f3)) and not(f4)); tel --- end of node onlyroll__noneof +-- end of node onlyroll::noneof -node onlyroll__oneoffour( +node onlyroll::oneoffour( f1:bool; f2:bool; f3:bool; @@ -5545,9 +5545,9 @@ let and not(f3)) and not(f4))) or (((f3 and not(f1)) and not(f2)) and not(f4))) or (((f4 and not(f1)) and not(f2)) and not(f3))); tel --- end of node onlyroll__oneoffour +-- end of node onlyroll::oneoffour -node onlyroll__twooffour( +node onlyroll::twooffour( f1:bool; f2:bool; f3:bool; @@ -5563,9 +5563,9 @@ let and ((((f2 and not(f3)) and not(f1)) or ((f3 and not(f2)) and not(f1))) or ((f1 and not(f2)) and not(f3))))); tel --- end of node onlyroll__twooffour +-- end of node onlyroll::twooffour -node onlyroll__threeoffour( +node onlyroll::threeoffour( f1:bool; f2:bool; f3:bool; @@ -5573,16 +5573,16 @@ 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); +-- end of node onlyroll::threeoffour +node onlyroll::max2(one:real; two:real) returns (m:real); let m = if ((one > two)) then (one) else (two); tel --- end of node onlyroll__max2 +-- end of node onlyroll::max2 -node onlyroll__max4( +node onlyroll::max4( one:real; two:real; three:real; @@ -5590,16 +5590,16 @@ node onlyroll__max4( returns ( m:real); let - m = onlyroll__max2(onlyroll__max2(one, two), onlyroll__max2(three, 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); +-- end of node onlyroll::max4 +node onlyroll::min2(one:real; two:real) returns (m:real); let m = if ((one < two)) then (one) else (two); tel --- end of node onlyroll__min2 +-- end of node onlyroll::min2 -node onlyroll__min4( +node onlyroll::min4( one:real; two:real; three:real; @@ -5607,11 +5607,11 @@ node onlyroll__min4( returns ( m:real); let - m = onlyroll__min2(onlyroll__min2(one, two), onlyroll__min2(three, four)); + m = onlyroll::min2(onlyroll::min2(one, two), onlyroll::min2(three, four)); tel --- end of node onlyroll__min4 +-- end of node onlyroll::min4 -node onlyroll__OlympicAverage( +node onlyroll::OlympicAverage( one:real; two:real; three:real; @@ -5619,18 +5619,18 @@ node onlyroll__OlympicAverage( returns ( m:real); let - m = ((((((one + two) + three) + four) - onlyroll__max4(one, two, three, - four)) - onlyroll__min4(one, 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); +-- end of node onlyroll::OlympicAverage +node onlyroll::MedianValue3(a:real; b:real; c:real) returns (z:real); let - z = ((((a + b) + c) - onlyroll__min2(a, onlyroll__min2(b, c))) - - onlyroll__max2(a, onlyroll__max2(b, 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 +-- end of node onlyroll::MedianValue3 -node onlyroll__Median( +node onlyroll::Median( x1:real; x2:real; x3:real; @@ -5642,19 +5642,19 @@ node onlyroll__Median( returns ( r:real); let - 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, + 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); +-- end of node onlyroll::Median +node onlyroll::Average2(a:real; b:real) returns (z:real); let z = ((a + b) / 2.0); tel --- end of node onlyroll__Average2 +-- end of node onlyroll::Average2 -node onlyroll__Average( +node onlyroll::Average( x1:real; x2:real; x3:real; @@ -5666,18 +5666,18 @@ node onlyroll__Average( returns ( r:real); let - 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)))))); + 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 +-- end of node onlyroll::Average -node onlyroll__Calculate( +node onlyroll::Calculate( x1:real; x2:real; x3:real; @@ -5697,23 +5697,23 @@ 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__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); + 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, + (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); +-- end of node onlyroll::Calculate +node onlyroll::abs(v:real) returns (a:real); let a = if ((v >= 0.0)) then (v) else (-(v)); tel --- end of node onlyroll__abs -node onlyroll__maintain(n:int; val:bool) returns (m:bool); +-- end of node onlyroll::abs +node onlyroll::maintain(n:int; val:bool) returns (m:bool); var cpt:int; let @@ -5721,9 +5721,9 @@ let (0); m = (cpt >= n); tel --- end of node onlyroll__maintain +-- end of node onlyroll::maintain -node onlyroll__Monitor( +node onlyroll::Monitor( xa:real; xb:real; disc:bool) @@ -5731,18 +5731,18 @@ returns ( local_value:real; inline_monitor_failed:bool); let - inline_monitor_failed = (onlyroll__maintain(TIME_ROLL, (onlyroll__abs((xa + inline_monitor_failed = (onlyroll::maintain(TIME_ROLL, (onlyroll::abs((xa - xb)) > DELTA_ROLL)) or disc); local_value = xa; tel --- end of node onlyroll__Monitor -node onlyroll__InNominalRange(r:real) returns (i:bool); +-- end of node onlyroll::Monitor +node onlyroll::InNominalRange(r:real) returns (i:bool); let i = ((r < NRmaxR) and (r > NRminR)); tel --- end of node onlyroll__InNominalRange +-- end of node onlyroll::InNominalRange -node onlyroll__values_nok( +node onlyroll::values_nok( pfother1:bool; pfother2:bool; pfother3:bool; @@ -5757,18 +5757,18 @@ 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__maintain(TIME_CROSS_ROLL, if (pfother1) then ( if + 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))))); tel --- end of node onlyroll__values_nok +-- end of node onlyroll::values_nok -node onlyroll__FailDetect( +node onlyroll::FailDetect( local_failure:bool; xi:real; ongroundreset:bool; @@ -5811,22 +5811,22 @@ 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__InNominalRange(xi))); + from1to2 = (will_latch and not(onlyroll::InNominalRange(xi))); will_latch = cross_failure; - from1to3 = ((a and will_latch) and onlyroll__InNominalRange(xi)); + 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_nok(pfother1, pfother2, pfother3, xi, + cross_failure = onlyroll::values_nok(pfother1, pfother2, pfother3, xi, pxother1, pxother2, pxother3); debug_cross_failure = cross_failure; tel --- end of node onlyroll__FailDetect +-- end of node onlyroll::FailDetect -node onlyroll__Channel( +node onlyroll::Channel( ongroundreset:bool; inairreset:bool; choffi:bool; @@ -5850,15 +5850,15 @@ returns ( var local_failure:bool; let - (xi, local_failure) = onlyroll__Monitor(xai, xbi, disci); + (xi, local_failure) = onlyroll::Monitor(xai, xbi, disci); (fi, debug_cross_failure, debug_st, aski) = - onlyroll__FailDetect(local_failure, xi, ongroundreset, inairreset, choffi, + 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 +-- end of node onlyroll::Channel -node onlyroll__Allocator( +node onlyroll::Allocator( r1:bool; r2:bool; r3:bool; @@ -5884,9 +5884,9 @@ let (1) else ((0 + if (a2) then (1) else ((0 + if (a3) then (1) else ((0 + if (a4) then (1) else (0))))))))); tel --- end of node onlyroll__Allocator +-- end of node onlyroll::Allocator -node onlyroll__onlyroll( +node onlyroll::onlyroll( xa1:real; xb1:real; xa2:real; @@ -5946,66 +5946,66 @@ let debug_ch_failed3 = f3; debug_ch_failed4 = f4; (x1, f1, ask1, debug_localfailure1, debug_cross_failure1, debug_st1) = - onlyroll__Channel(ongroundreset, 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); (x2, f2, ask2, debug_localfailure2, debug_cross_failure2, debug_st2) = - onlyroll__Channel(ongroundreset, 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); (x3, f3, ask3, debug_localfailure3, debug_cross_failure3, debug_st3) = - onlyroll__Channel(ongroundreset, 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); (x4, f4, ask4, debug_localfailure4, debug_cross_failure4, debug_st4) = - onlyroll__Channel(ongroundreset, 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__Allocator(ask1, + (allowed1, allowed2, allowed3, allowed4) = pre(onlyroll::Allocator(ask1, ask2, ask3, ask4, ongroundreset)); - x = onlyroll__Calculate(x1, x2, x3, x4, f1, f2, f3, f4); + 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); +-- end of node onlyroll::onlyroll +node onlyroll::InHardoverRange(r:real) returns (i:bool); let i = ((r > HORmaxR) or (r < HORminR)); tel --- end of node onlyroll__InHardoverRange +-- end of node onlyroll::InHardoverRange ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/onlyroll2.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/onlyroll2.lus -const onlyroll2__NRminP = -5.100000; -const onlyroll2__NRminR = -25.300000; -const onlyroll2__NRmaxP = 5.100000; -const onlyroll2__DELTA_PITCH = 3.000000; -const onlyroll2__NRmaxR = 25.300000; -const onlyroll2__FAIL_SAFE_PITCH_VALUE = 4.000000; -const onlyroll2__DELTA_YAW = 2.730000; -const onlyroll2__NRminY = -5.000000; -const onlyroll2__HORminP = -57.000000; -const onlyroll2__XFAIL_SAFE_ROLL_VALUE = 1.100000; -const onlyroll2__NRmaxY = 5.000000; -const onlyroll2__HORminR = -285.000000; -const onlyroll2__HORmaxP = 57.000000; -const onlyroll2__CROSS_CH_TOL_PITCH = 10.100000; -const onlyroll2__HORmaxR = 285.000000; -const onlyroll2__FAIL_SAFE_YAW_VALUE = 4.000000; -const onlyroll2__HORminY = -57.000000; -const onlyroll2__DELTA_ROLL = 14.900000; -const onlyroll2__FAIL_SAFE_ROLL_VALUE = 1.000000; -const onlyroll2__OneSecond = 10; -const onlyroll2__HORmaxY = 57.000000; -const onlyroll2__TIME_ROLL = 3; -const onlyroll2__CROSS_CH_TOL_ROLL = 51.000000; -const onlyroll2__BID_LAST = 2.200000; -const onlyroll2__TIME5 = 4; -const onlyroll2__SAFE_COUNTER_TIME = 3; -const onlyroll2__BID_VAL = 3.300000; -const onlyroll2__CROSS_CH_TOL_YAW = 10.000000; -const onlyroll2__TIME_CROSS_ROLL = 3; - -node onlyroll2__noneof( +const onlyroll2::NRminP = -5.100000; +const onlyroll2::NRminR = -25.300000; +const onlyroll2::NRmaxP = 5.100000; +const onlyroll2::DELTA_PITCH = 3.000000; +const onlyroll2::NRmaxR = 25.300000; +const onlyroll2::FAIL_SAFE_PITCH_VALUE = 4.000000; +const onlyroll2::DELTA_YAW = 2.730000; +const onlyroll2::NRminY = -5.000000; +const onlyroll2::HORminP = -57.000000; +const onlyroll2::XFAIL_SAFE_ROLL_VALUE = 1.100000; +const onlyroll2::NRmaxY = 5.000000; +const onlyroll2::HORminR = -285.000000; +const onlyroll2::HORmaxP = 57.000000; +const onlyroll2::CROSS_CH_TOL_PITCH = 10.100000; +const onlyroll2::HORmaxR = 285.000000; +const onlyroll2::FAIL_SAFE_YAW_VALUE = 4.000000; +const onlyroll2::HORminY = -57.000000; +const onlyroll2::DELTA_ROLL = 14.900000; +const onlyroll2::FAIL_SAFE_ROLL_VALUE = 1.000000; +const onlyroll2::OneSecond = 10; +const onlyroll2::HORmaxY = 57.000000; +const onlyroll2::TIME_ROLL = 3; +const onlyroll2::CROSS_CH_TOL_ROLL = 51.000000; +const onlyroll2::BID_LAST = 2.200000; +const onlyroll2::TIME5 = 4; +const onlyroll2::SAFE_COUNTER_TIME = 3; +const onlyroll2::BID_VAL = 3.300000; +const onlyroll2::CROSS_CH_TOL_YAW = 10.000000; +const onlyroll2::TIME_CROSS_ROLL = 3; + +node onlyroll2::noneof( f1:bool; f2:bool; f3:bool; @@ -6015,9 +6015,9 @@ returns ( let r = (((not(f1) and not(f2)) and not(f3)) and not(f4)); tel --- end of node onlyroll2__noneof +-- end of node onlyroll2::noneof -node onlyroll2__oneoffour( +node onlyroll2::oneoffour( f1:bool; f2:bool; f3:bool; @@ -6029,9 +6029,9 @@ let and not(f3)) and not(f4))) or (((f3 and not(f1)) and not(f2)) and not(f4))) or (((f4 and not(f1)) and not(f2)) and not(f3))); tel --- end of node onlyroll2__oneoffour +-- end of node onlyroll2::oneoffour -node onlyroll2__twooffour( +node onlyroll2::twooffour( f1:bool; f2:bool; f3:bool; @@ -6047,9 +6047,9 @@ let and ((((f2 and not(f3)) and not(f1)) or ((f3 and not(f2)) and not(f1))) or ((f1 and not(f2)) and not(f3))))); tel --- end of node onlyroll2__twooffour +-- end of node onlyroll2::twooffour -node onlyroll2__threeoffour( +node onlyroll2::threeoffour( f1:bool; f2:bool; f3:bool; @@ -6057,16 +6057,16 @@ 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); +-- end of node onlyroll2::threeoffour +node onlyroll2::max2(one:real; two:real) returns (m:real); let m = if ((one > two)) then (one) else (two); tel --- end of node onlyroll2__max2 +-- end of node onlyroll2::max2 -node onlyroll2__max4( +node onlyroll2::max4( one:real; two:real; three:real; @@ -6074,17 +6074,17 @@ node onlyroll2__max4( returns ( m:real); let - m = onlyroll2__max2(onlyroll2__max2(one, two), onlyroll2__max2(three, + 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); +-- end of node onlyroll2::max4 +node onlyroll2::min2(one:real; two:real) returns (m:real); let m = if ((one < two)) then (one) else (two); tel --- end of node onlyroll2__min2 +-- end of node onlyroll2::min2 -node onlyroll2__min4( +node onlyroll2::min4( one:real; two:real; three:real; @@ -6092,12 +6092,12 @@ node onlyroll2__min4( returns ( m:real); let - m = onlyroll2__min2(onlyroll2__min2(one, two), onlyroll2__min2(three, + m = onlyroll2::min2(onlyroll2::min2(one, two), onlyroll2::min2(three, four)); tel --- end of node onlyroll2__min4 +-- end of node onlyroll2::min4 -node onlyroll2__OlympicAverage( +node onlyroll2::OlympicAverage( one:real; two:real; three:real; @@ -6105,18 +6105,18 @@ node onlyroll2__OlympicAverage( returns ( m:real); let - m = ((((((one + two) + three) + four) - onlyroll2__max4(one, two, three, - four)) - onlyroll2__min4(one, 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); +-- end of node onlyroll2::OlympicAverage +node onlyroll2::MedianValue3(a:real; b:real; c:real) returns (z:real); let - z = ((((a + b) + c) - onlyroll2__min2(a, onlyroll2__min2(b, c))) - - onlyroll2__max2(a, onlyroll2__max2(b, 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 +-- end of node onlyroll2::MedianValue3 -node onlyroll2__Median( +node onlyroll2::Median( x1:real; x2:real; x3:real; @@ -6128,19 +6128,19 @@ node onlyroll2__Median( returns ( r:real); let - 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, + 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); +-- end of node onlyroll2::Median +node onlyroll2::Average2(a:real; b:real) returns (z:real); let z = ((a + b) / 2.0); tel --- end of node onlyroll2__Average2 +-- end of node onlyroll2::Average2 -node onlyroll2__Average( +node onlyroll2::Average( x1:real; x2:real; x3:real; @@ -6152,19 +6152,19 @@ node onlyroll2__Average( returns ( r:real); let - 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)))))); + 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 +-- end of node onlyroll2::Average -node onlyroll2__Calculate( +node onlyroll2::Calculate( x1:real; x2:real; x3:real; @@ -6184,23 +6184,23 @@ 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__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); + 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, + (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); +-- end of node onlyroll2::Calculate +node onlyroll2::abs(v:real) returns (a:real); let a = if ((v >= 0.0)) then (v) else (-(v)); tel --- end of node onlyroll2__abs -node onlyroll2__maintain(n:int; val:bool) returns (m:bool); +-- end of node onlyroll2::abs +node onlyroll2::maintain(n:int; val:bool) returns (m:bool); var cpt:int; let @@ -6208,9 +6208,9 @@ let (0); m = (cpt >= n); tel --- end of node onlyroll2__maintain +-- end of node onlyroll2::maintain -node onlyroll2__Monitor( +node onlyroll2::Monitor( xa:real; xb:real; disc:bool) @@ -6218,18 +6218,18 @@ returns ( local_value:real; inline_monitor_failed:bool); let - inline_monitor_failed = (onlyroll2__maintain(TIME_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 -node onlyroll2__InNominalRange(r:real) returns (i:bool); +-- end of node onlyroll2::Monitor +node onlyroll2::InNominalRange(r:real) returns (i:bool); let i = ((r < NRmaxR) and (r > NRminR)); tel --- end of node onlyroll2__InNominalRange +-- end of node onlyroll2::InNominalRange -node onlyroll2__values_nok( +node onlyroll2::values_nok( pfother1:bool; pfother2:bool; pfother3:bool; @@ -6244,18 +6244,18 @@ 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__maintain(TIME_CROSS_ROLL, if (pfother1) then ( if + 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))))); tel --- end of node onlyroll2__values_nok +-- end of node onlyroll2::values_nok -node onlyroll2__FailDetect( +node onlyroll2::FailDetect( local_failure:bool; xi:real; ongroundreset:bool; @@ -6298,22 +6298,22 @@ 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__InNominalRange(xi))); + from1to2 = (will_latch and not(onlyroll2::InNominalRange(xi))); will_latch = cross_failure; - from1to3 = ((a and will_latch) and onlyroll2__InNominalRange(xi)); + 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_nok(pfother1, pfother2, pfother3, xi, + cross_failure = onlyroll2::values_nok(pfother1, pfother2, pfother3, xi, pxother1, pxother2, pxother3); debug_cross_failure = cross_failure; tel --- end of node onlyroll2__FailDetect +-- end of node onlyroll2::FailDetect -node onlyroll2__Channel( +node onlyroll2::Channel( ongroundreset:bool; inairreset:bool; choffi:bool; @@ -6337,15 +6337,15 @@ returns ( var local_failure:bool; let - (xi, local_failure) = onlyroll2__Monitor(xai, xbi, disci); + (xi, local_failure) = onlyroll2::Monitor(xai, xbi, disci); (fi, debug_cross_failure, debug_st, aski) = - onlyroll2__FailDetect(local_failure, xi, ongroundreset, inairreset, choffi, + 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 +-- end of node onlyroll2::Channel -node onlyroll2__Allocator( +node onlyroll2::Allocator( r1:bool; r2:bool; r3:bool; @@ -6371,9 +6371,9 @@ let (1) else ((0 + if (a2) then (1) else ((0 + if (a3) then (1) else ((0 + if (a4) then (1) else (0))))))))); tel --- end of node onlyroll2__Allocator +-- end of node onlyroll2::Allocator -node onlyroll2__onlyroll2( +node onlyroll2::onlyroll2( xa1:real; xb1:real; xa2:real; @@ -6433,37 +6433,37 @@ let debug_ch_failed3 = f3; debug_ch_failed4 = f4; (x1, f1, ask1, debug_localfailure1, debug_cross_failure1, debug_st1) = - onlyroll2__Channel(ongroundreset, inairreset, choff1, xa1, xb1, disc1, 0.0 + 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__Channel(ongroundreset, inairreset, choff2, xa2, xb2, disc2, 0.0 + 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__Channel(ongroundreset, inairreset, choff3, xa3, xb3, disc3, 0.0 + 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__Channel(ongroundreset, inairreset, choff4, xa4, xb4, disc4, 0.0 + 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), + (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); + 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); +-- end of node onlyroll2::onlyroll2 +node onlyroll2::InHardoverRange(r:real) returns (i:bool); let i = ((r > HORmaxR) or (r < HORminR)); tel --- end of node onlyroll2__InHardoverRange +-- end of node onlyroll2::InHardoverRange ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/test.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/test.lus -node test__three_outputs( +node test::three_outputs( c1:bool; c2:bool; c3:bool) @@ -6475,15 +6475,15 @@ let (c4, c5, c6) = (true, false, true) -> if (c1) then (((c1, c2), c3)) else ((c1, (c2, c3))); tel --- end of node test__three_outputs -node test__two_outputs(c1:bool; c2:bool) returns (c4:bool; c5:bool); +-- end of node test::three_outputs +node test::two_outputs(c1:bool; c2:bool) returns (c4:bool; c5:bool); let c4 = false -> pre(c1); c5 = true -> pre(c2); tel --- end of node test__two_outputs +-- end of node test::two_outputs -node test__test( +node test::test( b1:bool; b2:bool) returns ( @@ -6492,30 +6492,30 @@ returns ( b5:bool; b6:bool); let - (b3, b4, b5, b6) = (test__three_outputs(test__two_outputs(b1, b2), true), + (b3, b4, b5, b6) = (test::three_outputs(test::two_outputs(b1, b2), true), false); tel --- end of node test__test +-- end of node test::test ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/titi.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/titi.lus -node titi__titi(a:bool; b:bool) returns (x:bool); +node titi::titi(a:bool; b:bool) returns (x:bool); let x = current (a when b); tel --- end of node titi__titi +-- end of node titi::titi ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/toolate.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/toolate.lus -type toolate__tab1 = int^2; -type toolate__tab2 = int^3^4; -type toolate__tab3 = int^5^6^7; -const toolate__ze_const_int = 5; -type toolate__bool4 = bool^5; -type toolate__really = real; -node toolate__bidon(in:bool) returns (out1:bool; out2:bool); +type toolate::tab1 = int^2; +type toolate::tab2 = int^3^4; +type toolate::tab3 = int^5^6^7; +const toolate::ze_const_int = 5; +type toolate::bool4 = bool^5; +type toolate::really = real; +node toolate::bidon(in:bool) returns (out1:bool; out2:bool); var toto:int^2; let @@ -6524,69 +6524,69 @@ let out1 = (true or (in and (toto[0] < 20))); out2 = (false and in); tel --- end of node toolate__bidon -node toolate__edge_detect(in:bool) returns (edge:bool); +-- end of node toolate::bidon +node toolate::edge_detect(in:bool) returns (edge:bool); var bidon1:bool; bidon2:bool; let edge = false -> ((in and not(pre(in))) or (bidon2 and bidon1)); - (bidon1, bidon2) = toolate__bidon(in); + (bidon1, bidon2) = toolate::bidon(in); tel --- end of node toolate__edge_detect -node toolate__implies(X:bool; Y:bool) returns (XimpliesY:bool); +-- end of node toolate::edge_detect +node toolate::implies(X:bool; Y:bool) returns (XimpliesY:bool); let XimpliesY = (not(X) or Y); tel --- end of node toolate__implies -node toolate__after(X:bool) returns (afterX:bool); +-- end of node toolate::implies +node toolate::after(X:bool) returns (afterX:bool); var bidon1:bool; bidon2:bool; let afterX = false -> (pre((X or afterX)) or (bidon2 and bidon1)); - (bidon1, bidon2) = toolate__bidon(X); + (bidon1, bidon2) = toolate::bidon(X); tel --- end of node toolate__after -node toolate__once_since(C:bool; A:bool) returns (X:bool); +-- 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__after(A)) then ((C or false -> + 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); +-- end of node toolate::once_since +node toolate::once_from_to(C:bool; A:bool; B:bool) returns (X:bool); let - X = toolate__implies(B, false -> pre(toolate__once_since(C, 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); +-- end of node toolate::once_from_to +node toolate::toolate(active:bool; action:bool) returns (alarm:bool); var begin:bool; en:bool; let begin = (active and false -> not(pre(active))); en = (not(active) and false -> pre(active)); - alarm = not(toolate__once_from_to(action, begin, en)); + alarm = not(toolate::once_from_to(action, begin, en)); tel --- end of node toolate__toolate +-- end of node toolate::toolate ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/toto.lus Opening file /home/jahier/lus2lic/src/test/should_work/fab_test/toto.lus -node toto__toto(a:bool; b:bool) returns (x:bool); +node toto::toto(a:bool; b:bool) returns (x:bool); var c:bool when b; let c = a when b; x = current (current (a when b when c)); tel --- end of node toto__toto +-- end of node toto::toto ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/FillFollowedByRed.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/FillFollowedByRed.lus -node FillFollowedByRed__reduced( +node FillFollowedByRed::reduced( acc_in:bool; elt_in:real) returns ( @@ -6594,9 +6594,9 @@ returns ( let ok = (acc_in and (0. < elt_in)); tel --- end of node FillFollowedByRed__reduced +-- end of node FillFollowedByRed::reduced -node FillFollowedByRed__filled( +node FillFollowedByRed::filled( acc_in:real) returns ( acc_out:real; @@ -6605,9 +6605,9 @@ let acc_out = (acc_in + 1.); elt_out = (acc_in + 1.); tel --- end of node FillFollowedByRed__filled +-- end of node FillFollowedByRed::filled -node FillFollowedByRed__FillFollowedByRed( +node FillFollowedByRed::FillFollowedByRed( initFill:real) returns ( ok:bool); @@ -6615,35 +6615,35 @@ var TabOutFill:real^10; bidon:real; let - (bidon, TabOutFill) = fill<<node FillFollowedByRed__filled, const + (bidon, TabOutFill) = fill<<node FillFollowedByRed::filled, const 10>>(initFill); - ok = red<<node FillFollowedByRed__reduced, const 10>>(true, TabOutFill); + ok = red<<node FillFollowedByRed::reduced, const 10>>(true, TabOutFill); tel --- end of node FillFollowedByRed__FillFollowedByRed +-- end of node FillFollowedByRed::FillFollowedByRed ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/Gyroscope.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/Gyroscope.lus -type Gyroscope__Faulty_ChannelT = Gyroscope::Faulty_ChannelT {valuea : real; valueb : real}; -type Gyroscope__Faulty_Array = Gyroscope::Faulty_ChannelT {valuea : real; valueb : real}^4^3; -type Gyroscope__Valid_ChannelT = Gyroscope::Valid_ChannelT {local_failure : bool; local_value : real}; -const Gyroscope__DELTA_PITCH = 2.000000; -const Gyroscope__DELTA_YAW = 2.000000; -const Gyroscope__DELTA_TO_GOD_YAW = 2.000000; -const Gyroscope__DELTA_ROLL = 2.000000; -const Gyroscope__GOD_PITCH = 16.000000; -const Gyroscope__GOD_ROLL = 15.000000; -const Gyroscope__GOD_YAW = 14.000000; -const Gyroscope__DELTA_TO_GOD_ROLL = 2.000000; -const Gyroscope__TIME = 3; -const Gyroscope__DELTA_TO_GOD_PITCH = 2.000000; -node Gyroscope__abs(in:real) returns (out:real); +type Gyroscope::Faulty_ChannelT = Gyroscope::Faulty_ChannelT {valuea : real; valueb : real}; +type Gyroscope::Faulty_Array = Gyroscope::Faulty_ChannelT {valuea : real; valueb : real}^4^3; +type Gyroscope::Valid_ChannelT = Gyroscope::Valid_ChannelT {local_failure : bool; local_value : real}; +const Gyroscope::DELTA_PITCH = 2.000000; +const Gyroscope::DELTA_YAW = 2.000000; +const Gyroscope::DELTA_TO_GOD_YAW = 2.000000; +const Gyroscope::DELTA_ROLL = 2.000000; +const Gyroscope::GOD_PITCH = 16.000000; +const Gyroscope::GOD_ROLL = 15.000000; +const Gyroscope::GOD_YAW = 14.000000; +const Gyroscope::DELTA_TO_GOD_ROLL = 2.000000; +const Gyroscope::TIME = 3; +const Gyroscope::DELTA_TO_GOD_PITCH = 2.000000; +node Gyroscope::abs(in:real) returns (out:real); let out = if ((in < 0.0)) then (-(in)) else (in); tel --- end of node Gyroscope__abs +-- end of node Gyroscope::abs -node Gyroscope__ValueIsSecureII( +node Gyroscope::ValueIsSecureII( accu_in:bool; secure_value:real; delta_to_god:real; @@ -6651,12 +6651,12 @@ 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 +-- end of node Gyroscope::ValueIsSecureII -node Gyroscope__countFalse( +node Gyroscope::countFalse( accu_in:real; elt_in:Gyroscope::Valid_ChannelT {local_failure : bool; local_value : real}) @@ -6666,9 +6666,9 @@ let accu_out = if (elt_in.local_failure) then (accu_in) else ((accu_in + 1.0)); tel --- end of node Gyroscope__countFalse +-- end of node Gyroscope::countFalse -node Gyroscope__TooFar( +node Gyroscope::TooFar( nbToFarIn:int; channel:Gyroscope::Faulty_ChannelT {valuea : real; valueb : real}; @@ -6677,12 +6677,12 @@ node Gyroscope__TooFar( returns ( nbToFarOut:int); let - nbToFarOut = if ((Gyroscope__abs((channel.valuea - god)) < delta_to_god)) + nbToFarOut = if ((Gyroscope::abs((channel.valuea - god)) < delta_to_god)) then ((nbToFarIn + 1)) else (nbToFarIn); tel --- end of node Gyroscope__TooFar +-- end of node Gyroscope::TooFar -node Gyroscope__assumeEvaluateAxis( +node Gyroscope::assumeEvaluateAxis( channels:Gyroscope::Faulty_ChannelT {valuea : real; valueb : real}^4; delta:real; @@ -6693,13 +6693,13 @@ returns ( var NbToFar:int; let - NbToFar = red<<node Gyroscope__TooFar, const 4>>(0, channels, god^4, + NbToFar = red<<node Gyroscope::TooFar, const 4>>(0, channels, god^4, delta_to_god^4); assumeOK = (NbToFar <= 1); tel --- end of node Gyroscope__assumeEvaluateAxis +-- end of node Gyroscope::assumeEvaluateAxis -node Gyroscope__assumeSum( +node Gyroscope::assumeSum( accu_in:real; elt_in:real) returns ( @@ -6709,9 +6709,9 @@ var let assumeOK = (varBidon < elt_in); tel --- end of node Gyroscope__assumeSum +-- end of node Gyroscope::assumeSum -node Gyroscope__assumeChannel( +node Gyroscope::assumeChannel( inChannel:Gyroscope::Faulty_ChannelT {valuea : real; valueb : real}; delta:real; @@ -6722,23 +6722,23 @@ returns ( let assumeOK = true; tel --- end of node Gyroscope__assumeChannel -node Gyroscope__min_int(n1:int; n2:int) returns (n:int); +-- end of node Gyroscope::assumeChannel +node Gyroscope::min_int(n1:int; n2:int) returns (n:int); let n = if ((n1 > n2)) then (n2) else (n1); tel --- end of node Gyroscope__min_int -node Gyroscope__Maintain(n:int; val:bool) returns (m:bool); +-- end of node Gyroscope::min_int +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_int(n, + 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 +-- end of node Gyroscope::Maintain -node Gyroscope__Channel( +node Gyroscope::Channel( inChannel:Gyroscope::Faulty_ChannelT {valuea : real; valueb : real}; delta:real; @@ -6750,30 +6750,30 @@ returns ( var maintain:bool; let - maintain = Gyroscope__Maintain(TIME, (Gyroscope__abs((inChannel.valuea - + 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 --- end of node Gyroscope__Channel +-- end of node Gyroscope::Channel -node Gyroscope__countValidChannels( +node Gyroscope::countValidChannels( channels:Gyroscope::Valid_ChannelT {local_failure : bool; local_value : real}^4) returns ( nb:real); let - nb = red<<node Gyroscope__countFalse, const 4>>(0.0, channels); + nb = red<<node Gyroscope::countFalse, const 4>>(0.0, channels); tel --- end of node Gyroscope__countValidChannels -node Gyroscope__sum(accu_in:real; elt_in:real) returns (accu_out:real); +-- end of node Gyroscope::countValidChannels +node Gyroscope::sum(accu_in:real; elt_in:real) returns (accu_out:real); let accu_out = (accu_in + elt_in); tel --- end of node Gyroscope__sum +-- end of node Gyroscope::sum -node Gyroscope__masking( +node Gyroscope::masking( channel:Gyroscope::Valid_ChannelT {local_failure : bool; local_value : real}) returns ( @@ -6781,9 +6781,9 @@ returns ( let out = if (channel.local_failure) then (0.0) else (channel.local_value); tel --- end of node Gyroscope__masking +-- end of node Gyroscope::masking -node Gyroscope__Voter( +node Gyroscope::Voter( channels:Gyroscope::Valid_ChannelT {local_failure : bool; local_value : real}^4; god:real; @@ -6795,14 +6795,14 @@ var nbValid:real; mask:real^4; let - nbValid = Gyroscope__countValidChannels(channels); - globalSum = red<<node Gyroscope__sum, const 4>>(0.0, mask); + nbValid = Gyroscope::countValidChannels(channels); + globalSum = red<<node Gyroscope::sum, const 4>>(0.0, mask); vote = (globalSum / nbValid); - mask = map<<node Gyroscope__masking, const 4>>(channels); + mask = map<<node Gyroscope::masking, const 4>>(channels); tel --- end of node Gyroscope__Voter +-- end of node Gyroscope::Voter -node Gyroscope__Voter2( +node Gyroscope::Voter2( channels:Gyroscope::Valid_ChannelT {local_failure : bool; local_value : real}^4; god:real; @@ -6817,11 +6817,11 @@ let nbValid = 0.0; globalSum = 0.0; vote = 0.0; - mask = map<<node Gyroscope__masking, const 4>>(channels); + mask = map<<node Gyroscope::masking, const 4>>(channels); tel --- end of node Gyroscope__Voter2 +-- end of node Gyroscope::Voter2 -node Gyroscope__EvaluateAxis( +node Gyroscope::EvaluateAxis( channels:Gyroscope::Faulty_ChannelT {valuea : real; valueb : real}^4; delta:real; @@ -6833,14 +6833,14 @@ var resChannels:Gyroscope::Valid_ChannelT {local_failure : bool; local_value : real}^4; AxisValue2:real; let - resChannels = map<<node Gyroscope__Channel, const 4>>(channels, delta^4, + resChannels = map<<node Gyroscope::Channel, const 4>>(channels, delta^4, god^4, delta_to_god^4); - AxisValue = Gyroscope__Voter(resChannels, god, delta_to_god); - AxisValue2 = Gyroscope__Voter2(resChannels, 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 +-- end of node Gyroscope::EvaluateAxis -node Gyroscope__Gyroscope( +node Gyroscope::Gyroscope( axis:Gyroscope::Faulty_ChannelT {valuea : real; valueb : real}^4^3) returns ( @@ -6848,16 +6848,16 @@ returns ( var secure_values:real^3; let - secure_values = map<<node Gyroscope__EvaluateAxis, const 3>>(axis, + secure_values = map<<node Gyroscope::EvaluateAxis, const 3>>(axis, [DELTA_ROLL, DELTA_PITCH, DELTA_YAW], [GOD_ROLL, GOD_PITCH, GOD_YAW], [DELTA_TO_GOD_ROLL, DELTA_TO_GOD_PITCH, DELTA_TO_GOD_YAW]); - valid = red<<node Gyroscope__ValueIsSecureII, const 3>>(true, + valid = red<<node Gyroscope::ValueIsSecureII, const 3>>(true, secure_values, [DELTA_TO_GOD_ROLL, DELTA_TO_GOD_PITCH, DELTA_TO_GOD_YAW], [GOD_ROLL, GOD_PITCH, GOD_YAW]); tel --- end of node Gyroscope__Gyroscope +-- end of node Gyroscope::Gyroscope -node Gyroscope__guaranteeChannel( +node Gyroscope::guaranteeChannel( inChannel:Gyroscope::Faulty_ChannelT {valuea : real; valueb : real}; delta:real; @@ -6869,12 +6869,12 @@ 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 +-- end of node Gyroscope::guaranteeChannel -node Gyroscope__iteratedVoter( +node Gyroscope::iteratedVoter( acc_in:bool; channel:Gyroscope::Valid_ChannelT {local_failure : bool; local_value : real}; @@ -6884,12 +6884,12 @@ node Gyroscope__iteratedVoter( returns ( acc_out:bool); let - acc_out = (acc_in and (channel.local_failure or (Gyroscope__abs((vote - + acc_out = (acc_in and (channel.local_failure or (Gyroscope::abs((vote - channel.local_value)) < delta_to_god))); tel --- end of node Gyroscope__iteratedVoter +-- end of node Gyroscope::iteratedVoter -node Gyroscope__assumeVoter( +node Gyroscope::assumeVoter( channels:Gyroscope::Valid_ChannelT {local_failure : bool; local_value : real}^4; god:real; @@ -6899,9 +6899,9 @@ returns ( let assumeOK = true; tel --- end of node Gyroscope__assumeVoter +-- end of node Gyroscope::assumeVoter -node Gyroscope__guaranteeEvaluateAxis( +node Gyroscope::guaranteeEvaluateAxis( channels:Gyroscope::Faulty_ChannelT {valuea : real; valueb : real}^4; delta:real; @@ -6911,23 +6911,23 @@ 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 +-- end of node Gyroscope::guaranteeEvaluateAxis -node Gyroscope__ValueIsSecure( +node Gyroscope::ValueIsSecure( secure_value:real; delta_to_god_value:real; god_value:real) 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 +-- end of node Gyroscope::ValueIsSecure -node Gyroscope__guaranteeSum( +node Gyroscope::guaranteeSum( accu_in:real; elt_in:real; accu_out:real) @@ -6938,9 +6938,9 @@ var let guaranteeOK = ((elt_in + otherVarBidon) < accu_out); tel --- end of node Gyroscope__guaranteeSum +-- end of node Gyroscope::guaranteeSum -node Gyroscope__guaranteeVoter( +node Gyroscope::guaranteeVoter( channels:Gyroscope::Valid_ChannelT {local_failure : bool; local_value : real}^4; god:real; @@ -6949,22 +6949,22 @@ node Gyroscope__guaranteeVoter( returns ( guaranteeOK:bool); let - guaranteeOK = red<<node Gyroscope__iteratedVoter, const 4>>(true, + guaranteeOK = red<<node Gyroscope::iteratedVoter, const 4>>(true, channels, god^4, delta_to_god^4, vote^4); tel --- end of node Gyroscope__guaranteeVoter +-- end of node Gyroscope::guaranteeVoter ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/ProduitBool/produitBool.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/ProduitBool/produitBool.lus -const produitBool__size = 10; -type produitBool__Tacc_in = produitBool::Tacc_in {multiplieur : bool^10; rank : int}; -type produitBool__T_isElementOf_ = produitBool::T_isElementOf_ {eltToSearch : bool; iselementof : bool}; -type produitBool__iteratedStruct = produitBool::iteratedStruct {currentRank : int; rankToSelect : int; elementSelected : bool}; -type produitBool__Tacc_inShift2 = produitBool::Tacc_inShift2 {multiplieur : bool^10; rank : int; actual_rank : int}; -type produitBool__Tacc_inShift = produitBool::Tacc_inShift {acc_in_PLC : produitBool::Tacc_in {multiplieur : bool^10; rank : int}; actual_rank : int}; - -node produitBool__iterated_isElementOf_( +const produitBool::size = 10; +type produitBool::Tacc_in = produitBool::Tacc_in {multiplieur : bool^10; rank : int}; +type produitBool::T_isElementOf_ = produitBool::T_isElementOf_ {eltToSearch : bool; iselementof : bool}; +type produitBool::iteratedStruct = produitBool::iteratedStruct {currentRank : int; rankToSelect : int; elementSelected : bool}; +type produitBool::Tacc_inShift2 = produitBool::Tacc_inShift2 {multiplieur : bool^10; rank : int; actual_rank : int}; +type produitBool::Tacc_inShift = produitBool::Tacc_inShift {acc_in_PLC : produitBool::Tacc_in {multiplieur : bool^10; rank : int}; actual_rank : int}; + +node produitBool::iterated_isElementOf_( acc_in:produitBool::T_isElementOf_ {eltToSearch : bool; iselementof : bool}; elt_in:bool) @@ -6976,9 +6976,9 @@ let T_isElementOf_{eltToSearch=acc_in.eltToSearch;iselementof=(acc_in.iselementof or (acc_in.eltToSearch = elt_in))}; tel --- end of node produitBool__iterated_isElementOf_ +-- end of node produitBool::iterated_isElementOf_ -node produitBool___isElementOf_( +node produitBool::_isElementOf_( e:bool; t:bool^10) returns ( @@ -6986,13 +6986,13 @@ returns ( var acc_out:produitBool::T_isElementOf_ {eltToSearch : bool; iselementof : bool}; let - acc_out = red<<node produitBool__iterated_isElementOf_, const + acc_out = red<<node produitBool::iterated_isElementOf_, const 10>>(T_isElementOf_{eltToSearch=e;iselementof=false}, t); iselementof = acc_out.iselementof; tel --- end of node produitBool___isElementOf_ +-- end of node produitBool::_isElementOf_ -node produitBool__selectOneStage( +node produitBool::selectOneStage( acc_in:produitBool::iteratedStruct {currentRank : int; rankToSelect : int; elementSelected : bool}; @@ -7007,9 +7007,9 @@ let ((acc_in.currentRank = acc_in.rankToSelect)) then (currentElt) else (acc_in.elementSelected)}; tel --- end of node produitBool__selectOneStage +-- end of node produitBool::selectOneStage -node produitBool__selectElementOfRank_inArray_( +node produitBool::selectElementOfRank_inArray_( rankToSelect:int; array:bool^10) returns ( @@ -7017,14 +7017,14 @@ returns ( var iterationResult:produitBool::iteratedStruct {currentRank : int; rankToSelect : int; elementSelected : bool}; let - iterationResult = red<<node produitBool__selectOneStage, const + iterationResult = red<<node produitBool::selectOneStage, const 10>>(iteratedStruct{currentRank=0;rankToSelect=rankToSelect;elementSelected=array[0]}, array); elementSelected = iterationResult.elementSelected; tel --- end of node produitBool__selectElementOfRank_inArray_ +-- end of node produitBool::selectElementOfRank_inArray_ -node produitBool__shiftFill( +node produitBool::shiftFill( acc_in:produitBool::Tacc_inShift2 {multiplieur : bool^10; rank : int; actual_rank : int}) @@ -7039,12 +7039,12 @@ 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 - + (produitBool::selectElementOfRank_inArray_((acc_in.actual_rank - acc_in.rank), acc_in.multiplieur)) else (false); tel --- end of node produitBool__shiftFill +-- end of node produitBool::shiftFill -node produitBool__shift( +node produitBool::shift( acc_in:produitBool::Tacc_in {multiplieur : bool^10; rank : int}) returns ( @@ -7052,12 +7052,12 @@ returns ( var bidon:produitBool::Tacc_inShift2 {multiplieur : bool^10; rank : int; actual_rank : int}; let - (bidon, ligne) = fill<<node produitBool__shiftFill, const + (bidon, ligne) = fill<<node produitBool::shiftFill, const 20>>(Tacc_inShift2{multiplieur=acc_in.multiplieur;rank=acc_in.rank;actual_rank=0}); tel --- end of node produitBool__shift +-- end of node produitBool::shift -node produitBool__produitBool( +node produitBool::produitBool( multiplicande:bool^10; multiplieur:bool^10) returns ( @@ -7065,9 +7065,9 @@ returns ( let matrice = true^20^10; tel --- end of node produitBool__produitBool +-- end of node produitBool::produitBool -node produitBool__PLC( +node produitBool::PLC( acc_in:produitBool::Tacc_in {multiplieur : bool^10; rank : int}; multiplicande:bool) @@ -7077,27 +7077,27 @@ returns ( ligne:bool^20); let ligne = if ((multiplicande = false)) then (multiplicande^20) else - (produitBool__shift(acc_in)); + (produitBool::shift(acc_in)); tel --- end of node produitBool__PLC +-- end of node produitBool::PLC ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/ProduitBool/shiftFill_ludic.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/ProduitBool/shiftFill_ludic.lus -type shiftFill_ludic__T1_ARRAY = bool^10; -type shiftFill_ludic__T4_STRUCT = shiftFill_ludic::T4_STRUCT {multiplieur : bool^10; rank : int}; -type shiftFill_ludic__T6_STRUCT = shiftFill_ludic::T6_STRUCT {eltToSearch : bool; iselementof : bool}; -type shiftFill_ludic__T5_STRUCT = shiftFill_ludic::T5_STRUCT {acc_in_PLC : shiftFill_ludic::T4_STRUCT {multiplieur : bool^10; rank : int}; actual_rank : int}; -type shiftFill_ludic__t_Tacc_inShift = shiftFill_ludic::T5_STRUCT {acc_in_PLC : shiftFill_ludic::T4_STRUCT {multiplieur : bool^10; rank : int}; actual_rank : int}; -type shiftFill_ludic__t_T_isElementOf_ = shiftFill_ludic::T6_STRUCT {eltToSearch : bool; iselementof : bool}; -type shiftFill_ludic__T2_STRUCT = shiftFill_ludic::T2_STRUCT {multiplieur : bool^10; rank : int; actual_rank : int}; -type shiftFill_ludic__t_Tacc_in = shiftFill_ludic::T4_STRUCT {multiplieur : bool^10; rank : int}; -type shiftFill_ludic__t_Tacc_inShift2 = shiftFill_ludic::T2_STRUCT {multiplieur : bool^10; rank : int; actual_rank : int}; -type shiftFill_ludic__T3_STRUCT = shiftFill_ludic::T3_STRUCT {currentRank : int; rankToSelect : int; elementSelected : bool}; -type shiftFill_ludic__t_iteratedStruct = shiftFill_ludic::T3_STRUCT {currentRank : int; rankToSelect : int; elementSelected : bool}; -const shiftFill_ludic__c_size = 10; - -node shiftFill_ludic__n_selectOneStage( +type shiftFill_ludic::T1_ARRAY = bool^10; +type shiftFill_ludic::T4_STRUCT = shiftFill_ludic::T4_STRUCT {multiplieur : bool^10; rank : int}; +type shiftFill_ludic::T6_STRUCT = shiftFill_ludic::T6_STRUCT {eltToSearch : bool; iselementof : bool}; +type shiftFill_ludic::T5_STRUCT = shiftFill_ludic::T5_STRUCT {acc_in_PLC : shiftFill_ludic::T4_STRUCT {multiplieur : bool^10; rank : int}; actual_rank : int}; +type shiftFill_ludic::t_Tacc_inShift = shiftFill_ludic::T5_STRUCT {acc_in_PLC : shiftFill_ludic::T4_STRUCT {multiplieur : bool^10; rank : int}; actual_rank : int}; +type shiftFill_ludic::t_T_isElementOf_ = shiftFill_ludic::T6_STRUCT {eltToSearch : bool; iselementof : bool}; +type shiftFill_ludic::T2_STRUCT = shiftFill_ludic::T2_STRUCT {multiplieur : bool^10; rank : int; actual_rank : int}; +type shiftFill_ludic::t_Tacc_in = shiftFill_ludic::T4_STRUCT {multiplieur : bool^10; rank : int}; +type shiftFill_ludic::t_Tacc_inShift2 = shiftFill_ludic::T2_STRUCT {multiplieur : bool^10; rank : int; actual_rank : int}; +type shiftFill_ludic::T3_STRUCT = shiftFill_ludic::T3_STRUCT {currentRank : int; rankToSelect : int; elementSelected : bool}; +type shiftFill_ludic::t_iteratedStruct = shiftFill_ludic::T3_STRUCT {currentRank : int; rankToSelect : int; elementSelected : bool}; +const shiftFill_ludic::c_size = 10; + +node shiftFill_ludic::n_selectOneStage( i_acc_in:shiftFill_ludic::T3_STRUCT {currentRank : int; rankToSelect : int; elementSelected : bool}; @@ -7112,9 +7112,9 @@ let ((i_acc_in.currentRank = i_acc_in.rankToSelect)) then (i_currentElt) else (i_acc_in.elementSelected)}; tel --- end of node shiftFill_ludic__n_selectOneStage +-- end of node shiftFill_ludic::n_selectOneStage -node shiftFill_ludic__n_selectElementOfRank_inArray_( +node shiftFill_ludic::n_selectElementOfRank_inArray_( i_rankToSelect:int; i_array:bool^10) returns ( @@ -7122,14 +7122,14 @@ returns ( var v_iterationResult:shiftFill_ludic::T3_STRUCT {currentRank : int; rankToSelect : int; elementSelected : bool}; let - v_iterationResult = red<<node shiftFill_ludic__n_selectOneStage, const + v_iterationResult = red<<node shiftFill_ludic::n_selectOneStage, const 10>>(T3_STRUCT{currentRank=0;rankToSelect=i_rankToSelect;elementSelected=i_array[0]}, i_array); o_elementSelected = v_iterationResult.elementSelected; tel --- end of node shiftFill_ludic__n_selectElementOfRank_inArray_ +-- end of node shiftFill_ludic::n_selectElementOfRank_inArray_ -node shiftFill_ludic__n_shiftFill( +node shiftFill_ludic::n_shiftFill( i_acc_in:shiftFill_ludic::T2_STRUCT {multiplieur : bool^10; rank : int; actual_rank : int}) @@ -7144,29 +7144,29 @@ 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, + (shiftFill_ludic::n_selectElementOfRank_inArray_(i_acc_in.actual_rank, i_acc_in.multiplieur)) else (false); tel --- end of node shiftFill_ludic__n_shiftFill +-- end of node shiftFill_ludic::n_shiftFill ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/ProduitBool/shift_ludic.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/ProduitBool/shift_ludic.lus -type shift_ludic__T1_ARRAY = bool^10; -type shift_ludic__T4_STRUCT = shift_ludic::T4_STRUCT {currentRank : int; rankToSelect : int; elementSelected : bool}; -type shift_ludic__T5_STRUCT = shift_ludic::T5_STRUCT {multiplieur : bool^10; rank : int}; -type shift_ludic__T6_STRUCT = shift_ludic::T6_STRUCT {acc_in_PLC : shift_ludic::T5_STRUCT {multiplieur : bool^10; rank : int}; actual_rank : int}; -type shift_ludic__T3_ARRAY = bool^20; -type shift_ludic__t_Tacc_inShift = shift_ludic::T6_STRUCT {acc_in_PLC : shift_ludic::T5_STRUCT {multiplieur : bool^10; rank : int}; actual_rank : int}; -type shift_ludic__T7_STRUCT = shift_ludic::T7_STRUCT {eltToSearch : bool; iselementof : bool}; -type shift_ludic__t_T_isElementOf_ = shift_ludic::T7_STRUCT {eltToSearch : bool; iselementof : bool}; -type shift_ludic__T2_STRUCT = shift_ludic::T2_STRUCT {multiplieur : bool^10; rank : int; actual_rank : int}; -type shift_ludic__t_Tacc_in = shift_ludic::T5_STRUCT {multiplieur : bool^10; rank : int}; -type shift_ludic__t_Tacc_inShift2 = shift_ludic::T2_STRUCT {multiplieur : bool^10; rank : int; actual_rank : int}; -type shift_ludic__t_iteratedStruct = shift_ludic::T4_STRUCT {currentRank : int; rankToSelect : int; elementSelected : bool}; -const shift_ludic__c_size = 10; - -node shift_ludic__n_selectOneStage( +type shift_ludic::T1_ARRAY = bool^10; +type shift_ludic::T4_STRUCT = shift_ludic::T4_STRUCT {currentRank : int; rankToSelect : int; elementSelected : bool}; +type shift_ludic::T5_STRUCT = shift_ludic::T5_STRUCT {multiplieur : bool^10; rank : int}; +type shift_ludic::T6_STRUCT = shift_ludic::T6_STRUCT {acc_in_PLC : shift_ludic::T5_STRUCT {multiplieur : bool^10; rank : int}; actual_rank : int}; +type shift_ludic::T3_ARRAY = bool^20; +type shift_ludic::t_Tacc_inShift = shift_ludic::T6_STRUCT {acc_in_PLC : shift_ludic::T5_STRUCT {multiplieur : bool^10; rank : int}; actual_rank : int}; +type shift_ludic::T7_STRUCT = shift_ludic::T7_STRUCT {eltToSearch : bool; iselementof : bool}; +type shift_ludic::t_T_isElementOf_ = shift_ludic::T7_STRUCT {eltToSearch : bool; iselementof : bool}; +type shift_ludic::T2_STRUCT = shift_ludic::T2_STRUCT {multiplieur : bool^10; rank : int; actual_rank : int}; +type shift_ludic::t_Tacc_in = shift_ludic::T5_STRUCT {multiplieur : bool^10; rank : int}; +type shift_ludic::t_Tacc_inShift2 = shift_ludic::T2_STRUCT {multiplieur : bool^10; rank : int; actual_rank : int}; +type shift_ludic::t_iteratedStruct = shift_ludic::T4_STRUCT {currentRank : int; rankToSelect : int; elementSelected : bool}; +const shift_ludic::c_size = 10; + +node shift_ludic::n_selectOneStage( i_acc_in:shift_ludic::T4_STRUCT {currentRank : int; rankToSelect : int; elementSelected : bool}; @@ -7181,9 +7181,9 @@ let ((i_acc_in.currentRank = i_acc_in.rankToSelect)) then (i_currentElt) else (i_acc_in.elementSelected)}; tel --- end of node shift_ludic__n_selectOneStage +-- end of node shift_ludic::n_selectOneStage -node shift_ludic__n_selectElementOfRank_inArray_( +node shift_ludic::n_selectElementOfRank_inArray_( i_rankToSelect:int; i_array:bool^10) returns ( @@ -7191,14 +7191,14 @@ returns ( var v_iterationResult:shift_ludic::T4_STRUCT {currentRank : int; rankToSelect : int; elementSelected : bool}; let - v_iterationResult = red<<node shift_ludic__n_selectOneStage, const + v_iterationResult = red<<node shift_ludic::n_selectOneStage, const 10>>(T4_STRUCT{currentRank=0;rankToSelect=i_rankToSelect;elementSelected=i_array[0]}, i_array); o_elementSelected = v_iterationResult.elementSelected; tel --- end of node shift_ludic__n_selectElementOfRank_inArray_ +-- end of node shift_ludic::n_selectElementOfRank_inArray_ -node shift_ludic__n_shiftFill( +node shift_ludic::n_shiftFill( i_acc_in:shift_ludic::T2_STRUCT {multiplieur : bool^10; rank : int; actual_rank : int}) @@ -7213,12 +7213,12 @@ 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, + (shift_ludic::n_selectElementOfRank_inArray_(i_acc_in.actual_rank, i_acc_in.multiplieur)) else (false); tel --- end of node shift_ludic__n_shiftFill +-- end of node shift_ludic::n_shiftFill -node shift_ludic__n_shift( +node shift_ludic::n_shift( i_acc_in:shift_ludic::T5_STRUCT {multiplieur : bool^10; rank : int}) returns ( @@ -7226,49 +7226,49 @@ returns ( var v_bidon:shift_ludic::T2_STRUCT {multiplieur : bool^10; rank : int; actual_rank : int}; let - (v_bidon, o_ligne) = fill<<node shift_ludic__n_shiftFill, const + (v_bidon, o_ligne) = fill<<node shift_ludic::n_shiftFill, const 20>>(T2_STRUCT{multiplieur=i_acc_in.multiplieur;rank=i_acc_in.rank;actual_rank=0}); tel --- end of node shift_ludic__n_shift +-- end of node shift_ludic::n_shift ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/arrays.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/arrays.lus -const arrays__n = 4; -const arrays__m = 3; -const arrays__p = 2; -type arrays__tab3d = int^4^3^2; -type arrays__byte = bool^4; -type arrays__word = bool^4^3; -type arrays__long = bool^4^3^2; -node arrays__incr(accin:int) returns (accout:int; val:int); +const arrays::n = 4; +const arrays::m = 3; +const arrays::p = 2; +type arrays::tab3d = int^4^3^2; +type arrays::byte = bool^4; +type arrays::word = bool^4^3; +type arrays::long = bool^4^3^2; +node arrays::incr(accin:int) returns (accout:int; val:int); let accout = (accin + 1); val = accin; tel --- end of node arrays__incr -node arrays__big_sum(x:int^4^3^2) returns (s:int); +-- end of node arrays::incr +node arrays::big_sum(x:int^4^3^2) returns (s:int); let - s = red<<node Lustre__red<<node Lustre__red<<node Lustre__+, const 4>>, + s = red<<node Lustre::red<<node Lustre::red<<node Lustre::+, const 4>>, const 3>>, const 2>>(0, x); tel --- end of node arrays__big_sum -node arrays__big_or(x:bool^4^3^2) returns (s:bool); +-- end of node arrays::big_sum +node arrays::big_or(x:bool^4^3^2) returns (s:bool); let - s = red<<node Lustre__red<<node Lustre__red<<node Lustre__or, const 4>>, + s = red<<node Lustre::red<<node Lustre::red<<node Lustre::or, const 4>>, const 3>>, const 2>>(false, x); tel --- end of node arrays__big_or -node arrays__big_incr(init:int) returns (x:int^4^3^2); +-- end of node arrays::big_or +node arrays::big_incr(init:int) returns (x:int^4^3^2); var accout:int; let - (accout, x) = fill<<node Lustre__fill<<node Lustre__fill<<node - arrays__incr, const 4>>, const 3>>, const 2>>(init); + (accout, x) = fill<<node Lustre::fill<<node Lustre::fill<<node + arrays::incr, const 4>>, const 3>>, const 2>>(init); tel --- end of node arrays__big_incr +-- end of node arrays::big_incr -node arrays__full_adder( +node arrays::full_adder( ci:bool; x:bool; y:bool) @@ -7279,23 +7279,23 @@ let s = ((ci xor x) xor y); co = if (ci) then ((x or y)) else ((x and y)); tel --- end of node arrays__full_adder -node arrays__add_long(x:bool^4^3^2; y:bool^4^3^2) returns (s:bool^4^3^2); +-- end of node arrays::full_adder +node arrays::add_long(x:bool^4^3^2; y:bool^4^3^2) returns (s:bool^4^3^2); var co:bool; let - (co, s) = fillred<<node Lustre__fillred<<node Lustre__fillred<<node - arrays__full_adder, const 4>>, const 3>>, const 2>>(false, x, y); + (co, s) = fillred<<node Lustre::fillred<<node Lustre::fillred<<node + arrays::full_adder, const 4>>, const 3>>, const 2>>(false, x, y); tel --- end of node arrays__add_long -node arrays__big_xor(x:bool^4^3^2) returns (s:bool); +-- end of node arrays::add_long +node arrays::big_xor(x:bool^4^3^2) returns (s:bool); let - s = red<<node Lustre__red<<node Lustre__red<<node Lustre__xor, const 4>>, + s = red<<node Lustre::red<<node Lustre::red<<node Lustre::xor, const 4>>, const 3>>, const 2>>(false, x); tel --- end of node arrays__big_xor +-- end of node arrays::big_xor -node arrays__arrays( +node arrays::arrays( init_incr:int; init_long:bool^4^3^2) returns ( @@ -7305,30 +7305,30 @@ returns ( var fill_res:int^4^3^2; let - 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); + 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:bool^4; y:bool^4) returns (s:bool^4); +-- end of node arrays::arrays +node arrays::add_byte(x:bool^4; y:bool^4) returns (s:bool^4); var co:bool; let - (co, s) = fillred<<node arrays__full_adder, const 4>>(false, x, y); + (co, s) = fillred<<node arrays::full_adder, const 4>>(false, x, y); tel --- end of node arrays__add_byte +-- end of node arrays::add_byte ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/calculs_max.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/calculs_max.lus -const calculs_max__taille = 10; -type calculs_max__bool_arrays = bool^10; -type calculs_max__int_arrays = int^10; -type calculs_max__struct_fill_bool = calculs_max::struct_fill_bool {imax1 : int; imax2 : int; icourant : int}; -type calculs_max__struct_max = calculs_max::struct_max {max1 : int; max2 : int; imax1 : int; imax2 : int; icourant : int}; +const calculs_max::taille = 10; +type calculs_max::bool_arrays = bool^10; +type calculs_max::int_arrays = int^10; +type calculs_max::struct_fill_bool = calculs_max::struct_fill_bool {imax1 : int; imax2 : int; icourant : int}; +type calculs_max::struct_max = calculs_max::struct_max {max1 : int; max2 : int; imax1 : int; imax2 : int; icourant : int}; -node calculs_max__max( +node calculs_max::max( strin:calculs_max::struct_max {max1 : int; max2 : int; imax1 : int; @@ -7351,9 +7351,9 @@ let (struct_max{max1=ecourant;max2=strin.max1;imax1=strin.icourant;imax2=strin.imax1;icourant=(strin.icourant + 1)})); tel --- end of node calculs_max__max +-- end of node calculs_max::max -node calculs_max__fill_bool( +node calculs_max::fill_bool( s_in:calculs_max::struct_fill_bool {imax1 : int; imax2 : int; icourant : int}) @@ -7368,30 +7368,30 @@ let + 1)}; elt = ((s_in.icourant = s_in.imax1) or (s_in.icourant = s_in.imax2)); tel --- end of node calculs_max__fill_bool -node calculs_max__calculs_max(A:int^10) returns (res:bool^10); +-- end of node calculs_max::fill_bool +node calculs_max::calculs_max(A:int^10) returns (res:bool^10); var local_struct:calculs_max::struct_max {max1 : int; max2 : int; imax1 : int; imax2 : int; icourant : int}; tmp:calculs_max::struct_fill_bool {imax1 : int; imax2 : int; icourant : int}; let - local_struct = red<<node calculs_max__max, const + local_struct = red<<node calculs_max::max, const 10>>(struct_max{max1=0;max2=0;imax1=-(1);imax2=-(1);icourant=0}, A); - (tmp, res) = fill<<node calculs_max__fill_bool, const + (tmp, res) = fill<<node calculs_max::fill_bool, const 10>>(struct_fill_bool{imax1=local_struct.imax1;imax2=local_struct.imax2;icourant=0}); tel --- end of node calculs_max__calculs_max +-- end of node calculs_max::calculs_max ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/deSimone.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/deSimone.lus -const deSimone__size = 10; -type deSimone__tabType = bool^10; -type deSimone__cell_accu = deSimone::cell_accu {token : bool; grant : bool}; +const deSimone::size = 10; +type deSimone::tabType = bool^10; +type deSimone::cell_accu = deSimone::cell_accu {token : bool; grant : bool}; *** Error in file "should_work/lionel/deSimone.lus", line 51, col 23 to 30, token 'deSimone': type error: *** arity error: 2 argument(s) are expected, whereas 1 is/are provided -node deSimone__oneCell( +node deSimone::oneCell( accu_in:deSimone::cell_accu {token : bool; grant : bool}; req:bool) @@ -7405,9 +7405,9 @@ let accu_out = cell_accu{token=accu_in.token;grant=(not(req) and accu_in.grant)}; tel --- end of node deSimone__oneCell +-- end of node deSimone::oneCell -node deSimone__prop1_iter( +node deSimone::prop1_iter( accu_in:int; elt_in:bool) returns ( @@ -7415,9 +7415,9 @@ returns ( let accu_out = (accu_in + if (elt_in) then (1) else (0)); tel --- end of node deSimone__prop1_iter +-- end of node deSimone::prop1_iter -node deSimone__deSimone( +node deSimone::deSimone( new_token:bool; request:bool^10) returns ( @@ -7425,78 +7425,78 @@ returns ( var accu_out:deSimone::cell_accu {token : bool; grant : bool}; let - (accu_out, acknowledge) = fillred<<node deSimone__oneCell, const + (accu_out, acknowledge) = fillred<<node deSimone::oneCell, const 10>>(cell_accu{token=new_token;grant=true}, request); tel --- end of node deSimone__deSimone +-- end of node deSimone::deSimone ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/iterFibo.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/iterFibo.lus -type iterFibo__T_fibo = int^2; -node iterFibo__fibo(accu_in:int^2) returns (accu_out:int^2; elt:int); +type iterFibo::T_fibo = int^2; +node iterFibo::fibo(accu_in:int^2) returns (accu_out:int^2; elt:int); let accu_out = [(accu_in[0] + accu_in[1]), accu_in[0]]; elt = (accu_in[0] + accu_in[1]); tel --- end of node iterFibo__fibo -node iterFibo__iterFibo(x:int; y:int) returns (T:int^10); +-- end of node iterFibo::fibo +node iterFibo::iterFibo(x:int; y:int) returns (T:int^10); var bidon:int^2; let - (bidon, T) = fill<<node iterFibo__fibo, const 10>>([x, y]); + (bidon, T) = fill<<node iterFibo::fibo, const 10>>([x, y]); tel --- end of node iterFibo__iterFibo +-- end of node iterFibo::iterFibo ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/mapiter.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/mapiter.lus -const mapiter__L = 2; -type mapiter__Reg_L = bool^2; -const mapiter__H = 3; -type mapiter__T_Reg_H = bool^2^3; -node mapiter__incr(init:int; b:bool) returns (res:int); +const mapiter::L = 2; +type mapiter::Reg_L = bool^2; +const mapiter::H = 3; +type mapiter::T_Reg_H = bool^2^3; +node mapiter::incr(init:int; b:bool) returns (res:int); let res = if ((b = true)) then ((init + 1)) else (init); tel --- end of node mapiter__incr -function mapiter__map_egal(i1:a^2; i2:a^2) returns (o:bool^2); +-- end of node mapiter::incr +function mapiter::map_egal(i1:a^2; i2:a^2) returns (o:bool^2); let - o = Lustre__map<<node Lustre__=, const 2>>(i1, i2); + o = Lustre::map<<node Lustre::=, const 2>>(i1, i2); tel --- end of node mapiter__map_egal -node mapiter__bitalt(in:bool) returns (sacc:bool; out:bool); +-- end of node mapiter::map_egal +node mapiter::bitalt(in:bool) returns (sacc:bool; out:bool); let sacc = not(in); out = in; tel --- end of node mapiter__bitalt -function mapiter__fill_bitalt(in:bool) returns (sacc:bool; out:bool^2); +-- end of node mapiter::bitalt +function mapiter::fill_bitalt(in:bool) returns (sacc:bool; out:bool^2); let - (sacc, out) = Lustre__fill<<node mapiter__bitalt, const 2>>(in); + (sacc, out) = Lustre::fill<<node mapiter::bitalt, const 2>>(in); tel --- end of node mapiter__fill_bitalt -node mapiter__initmat(iacc:bool) returns (sacc:bool; R:bool^2^3); +-- end of node mapiter::fill_bitalt +node mapiter::initmat(iacc:bool) returns (sacc:bool; R:bool^2^3); let - (sacc, R) = fill<<node mapiter__fill_bitalt, const 3>>(iacc); + (sacc, R) = fill<<node mapiter::fill_bitalt, const 3>>(iacc); tel --- end of node mapiter__initmat -function mapiter__red_incr(init:int; b:bool^2) returns (res:int); +-- end of node mapiter::initmat +function mapiter::red_incr(init:int; b:bool^2) returns (res:int); let - res = Lustre__red<<node mapiter__incr, const 2>>(init, b); + res = Lustre::red<<node mapiter::incr, const 2>>(init, b); tel --- end of node mapiter__red_incr -node mapiter__reducemat(iacc:int; I:bool^2^3) returns (res:int); +-- end of node mapiter::red_incr +node mapiter::reducemat(iacc:int; I:bool^2^3) returns (res:int); let - res = red<<node mapiter__red_incr, const 3>>(iacc, I); + res = red<<node mapiter::red_incr, const 3>>(iacc, I); tel --- end of node mapiter__reducemat -node mapiter__composemat(i1:bool^2^3; i2:bool^2^3) returns (s1:bool^2^3); +-- end of node mapiter::reducemat +node mapiter::composemat(i1:bool^2^3; i2:bool^2^3) returns (s1:bool^2^3); let - s1 = map<<node mapiter__map_egal, const 3>>(i1, i2); + s1 = map<<node mapiter::map_egal, const 3>>(i1, i2); tel --- end of node mapiter__composemat -node mapiter__mapiter(a:bool) returns (nbTrue:int); +-- end of node mapiter::composemat +node mapiter::mapiter(a:bool) returns (nbTrue:int); var bid1:bool; bid2:bool; @@ -7504,58 +7504,58 @@ var init2:bool^2^3; XORMAT:bool^2^3; let - (bid1, init1) = mapiter__initmat(a); - (bid2, init2) = mapiter__initmat(not(a)); - XORMAT = mapiter__composemat(init1, init2); - nbTrue = mapiter__reducemat(0, 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 +-- end of node mapiter::mapiter ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/matrice.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/matrice.lus -type matrice__T_fibo = int^2; -const matrice__m = 3; -const matrice__n = 2; -node matrice__fibo(accu_in:int^2) returns (accu_out:int^2; elt:int); +type matrice::T_fibo = int^2; +const matrice::m = 3; +const matrice::n = 2; +node matrice::fibo(accu_in:int^2) returns (accu_out:int^2; elt:int); let accu_out = [(accu_in[0] + accu_in[1]), accu_in[0]]; elt = (accu_in[0] + accu_in[1]); tel --- end of node matrice__fibo -node matrice__matrice(a:int) returns (sum:int; bid:int^2; T:int^3^2); +-- end of node matrice::fibo +node matrice::matrice(a:int) returns (sum:int; bid:int^2; T:int^3^2); let - (bid, T) = fill<<node Lustre__fill<<node matrice__fibo, const 3>>, const + (bid, T) = fill<<node Lustre::fill<<node matrice::fibo, const 3>>, const 2>>([a, a]); - sum = red<<node Lustre__red<<node Lustre__+, const 3>>, const 2>>(0, T); + sum = red<<node Lustre::red<<node Lustre::+, const 3>>, const 2>>(0, T); tel --- end of node matrice__matrice +-- end of node matrice::matrice ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/matrice2.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/matrice2.lus -const matrice2__m = 2; -const matrice2__n = 2; -node matrice2__matrice2(a:int) returns (res:int); +const matrice2::m = 2; +const matrice2::n = 2; +node matrice2::matrice2(a:int) returns (res:int); let - res = red<<node Lustre__red<<node Lustre__+, const 2>>, const 2>>(0, + res = red<<node Lustre::red<<node Lustre::+, const 2>>, const 2>>(0, 1^2^2); tel --- end of node matrice2__matrice2 +-- end of node matrice2::matrice2 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/minus.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/minus.lus -const minus__m = 2; -const minus__n = 3; -node minus__bitalt(a:bool) returns (out:bool; b:bool); +const minus::m = 2; +const minus::n = 3; +node minus::bitalt(a:bool) returns (out:bool; b:bool); let b = a; out = not(a); tel --- end of node minus__bitalt +-- end of node minus::bitalt -node minus__minus( +node minus::minus( a:bool^3^2; b:bool^3^2; c:bool^3^2) @@ -7566,22 +7566,22 @@ returns ( var bid:bool; let - T1 = map<<node Lustre__map<<node Lustre__if, const 3>>, const 2>>(a, b, + T1 = map<<node Lustre::map<<node Lustre::if, const 3>>, const 2>>(a, b, c); - (bid, T2) = fill<<node Lustre__fill<<node minus__bitalt, const 3>>, const + (bid, T2) = fill<<node Lustre::fill<<node minus::bitalt, const 3>>, const 2>>(a[0][0]); - r = red<<node Lustre__red<<node Lustre__xor, const 3>>, const 2>>(a[0][0], + r = red<<node Lustre::red<<node Lustre::xor, const 3>>, const 2>>(a[0][0], T1); tel --- end of node minus__minus +-- end of node minus::minus ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/moyenne.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/moyenne.lus -type moyenne__moyenne_accu = moyenne::moyenne_accu {sum : real; moyenne : real; rank : real}; -const moyenne__size = 10; +type moyenne::moyenne_accu = moyenne::moyenne_accu {sum : real; moyenne : real; rank : real}; +const moyenne::size = 10; -node moyenne__moyenne_step( +node moyenne::moyenne_step( accu_in:moyenne::moyenne_accu {sum : real; moyenne : real; rank : real}; @@ -7594,94 +7594,94 @@ let accu_out = moyenne_accu{sum=(accu_in.sum + elt_in);moyenne=((accu_in.sum + elt_in) / (accu_in.rank + 1.0));rank=(accu_in.rank + 1.0)}; tel --- end of node moyenne__moyenne_step -node moyenne__moyenne(Tab:real^10) returns (moy:real); +-- end of node moyenne::moyenne_step +node moyenne::moyenne(Tab:real^10) returns (moy:real); var accu_out:moyenne::moyenne_accu {sum : real; moyenne : real; rank : real}; let - accu_out = red<<node moyenne__moyenne_step, const + accu_out = red<<node moyenne::moyenne_step, const 10>>(moyenne_accu{sum=0.0;moyenne=0.0;rank=0.0}, Tab); moy = accu_out.moyenne; tel --- end of node moyenne__moyenne +-- end of node moyenne::moyenne ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/normal.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/normal.lus -const normal__NBC = 20; -type normal__INTNBC = int^20; -const normal__NBG = 4; -type normal__INTNBG = int^4; -type normal__T_EntreeGlob = normal::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}; -type normal__T_ComChg = int; -type normal__T_InfoGenIndiv = normal::T_InfoGenIndiv {mesure_gen : int}; -type normal__T_EtatCharge = int; -type normal__T_InfoChgGlob = normal::T_InfoChgGlob {chg2gen : int^20}; -type normal__T_InfoChgIndiv = normal::T_InfoChgIndiv {mesure_chg : int}; -type normal__T_InfoGenGlob = normal::T_InfoGenGlob {elt_bidon : int; chg2gen : int^20}; -const normal__EC_LESTAGE = 3; -const normal__COM_ON = 1; -const normal__EC_OFF = 1; -const normal__COM_OFF = 2; -const normal__EC_NON_CTRL = 2; -const normal__EC_DELESTAGE = 4; -const normal__EC_ON = 0; -const normal__COM_ERR = 0; - -node normal__int2InfoChgIndiv( +const normal::NBC = 20; +type normal::INTNBC = int^20; +const normal::NBG = 4; +type normal::INTNBG = int^4; +type normal::T_EntreeGlob = normal::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}; +type normal::T_ComChg = int; +type normal::T_InfoGenIndiv = normal::T_InfoGenIndiv {mesure_gen : int}; +type normal::T_EtatCharge = int; +type normal::T_InfoChgGlob = normal::T_InfoChgGlob {chg2gen : int^20}; +type normal::T_InfoChgIndiv = normal::T_InfoChgIndiv {mesure_chg : int}; +type normal::T_InfoGenGlob = normal::T_InfoGenGlob {elt_bidon : int; chg2gen : int^20}; +const normal::EC_LESTAGE = 3; +const normal::COM_ON = 1; +const normal::EC_OFF = 1; +const normal::COM_OFF = 2; +const normal::EC_NON_CTRL = 2; +const normal::EC_DELESTAGE = 4; +const normal::EC_ON = 0; +const normal::COM_ERR = 0; + +node normal::int2InfoChgIndiv( m:int) returns ( InfoChgIndiv:normal::T_InfoChgIndiv {mesure_chg : int}); let InfoChgIndiv = T_InfoChgIndiv{mesure_chg=m}; tel --- end of node normal__int2InfoChgIndiv +-- end of node normal::int2InfoChgIndiv -node normal__extract_tab_info_chg_indiv( +node normal::extract_tab_info_chg_indiv( EntreeGlob:normal::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}) returns ( TabInfoChgIndiv:normal::T_InfoChgIndiv {mesure_chg : int}^20); let - TabInfoChgIndiv = map<<node normal__int2InfoChgIndiv, const + TabInfoChgIndiv = map<<node normal::int2InfoChgIndiv, const 20>>(EntreeGlob.mesure_chgs); tel --- end of node normal__extract_tab_info_chg_indiv +-- end of node normal::extract_tab_info_chg_indiv -node normal__int2InfoGenIndiv( +node normal::int2InfoGenIndiv( m:int) returns ( InfoGenIndiv:normal::T_InfoGenIndiv {mesure_gen : int}); let InfoGenIndiv = T_InfoGenIndiv{mesure_gen=m}; tel --- end of node normal__int2InfoGenIndiv +-- end of node normal::int2InfoGenIndiv -node normal__extract_tab_info_gen_indiv( +node normal::extract_tab_info_gen_indiv( EntreeGlob:normal::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}) returns ( TabInfoGenIndiv:normal::T_InfoGenIndiv {mesure_gen : int}^4); let - TabInfoGenIndiv = map<<node normal__int2InfoGenIndiv, const + TabInfoGenIndiv = map<<node normal::int2InfoGenIndiv, const 4>>(EntreeGlob.mesure_gens); tel --- end of node normal__extract_tab_info_gen_indiv -node normal__egal_indice(indice:int; val:int) returns (r:bool); +-- end of node normal::extract_tab_info_gen_indiv +node normal::egal_indice(indice:int; val:int) returns (r:bool); let r = (val = indice); tel --- end of node normal__egal_indice -node normal__copie(acc_in:int) returns (acc_out:int; elt:int); +-- end of node normal::egal_indice +node normal::copie(acc_in:int) returns (acc_out:int; elt:int); let acc_out = acc_in; elt = acc_in; tel --- end of node normal__copie +-- end of node normal::copie -node normal__essai_traite_gen( +node normal::essai_traite_gen( indice_gen:int; infoGenGlob:normal::T_InfoGenGlob {elt_bidon : int; chg2gen : int^20}) @@ -7691,13 +7691,13 @@ var Tab_indiceGen:int^20; bid:int; let - (bid, Tab_indiceGen) = fill<<node normal__copie, const 20>>(indice_gen); - TabComVal = map<<node normal__egal_indice, const 20>>(Tab_indiceGen, + (bid, Tab_indiceGen) = fill<<node normal::copie, const 20>>(indice_gen); + TabComVal = map<<node normal::egal_indice, const 20>>(Tab_indiceGen, infoGenGlob.chg2gen); tel --- end of node normal__essai_traite_gen +-- end of node normal::essai_traite_gen -node normal__fusion_une_com( +node normal::fusion_une_com( in_com:int; cur_com:int; cur_val:bool) @@ -7706,21 +7706,21 @@ returns ( let out_com = if (cur_val) then (cur_com) else (in_com); tel --- end of node normal__fusion_une_com +-- end of node normal::fusion_une_com -node normal__fusion_tab_com( +node normal::fusion_tab_com( acc_in:int^20; TabCom:int^20; TabVal:bool^20) returns ( acc_out:int^20); let - acc_out = map<<node normal__fusion_une_com, const 20>>(acc_in, TabCom, + acc_out = map<<node normal::fusion_une_com, const 20>>(acc_in, TabCom, TabVal); tel --- end of node normal__fusion_tab_com +-- end of node normal::fusion_tab_com -node normal__fusion_com( +node normal::fusion_com( AllTabComChg:int^20^4; AllTabComVal:bool^20^4) returns ( @@ -7729,12 +7729,12 @@ var Vide:int^20; let Vide = COM_ERR^20; - TabComChg = red<<node normal__fusion_tab_com, const 4>>(Vide, + TabComChg = red<<node normal::fusion_tab_com, const 4>>(Vide, AllTabComChg, AllTabComVal); tel --- end of node normal__fusion_com +-- end of node normal::fusion_com -node normal__traite_genCore_itere( +node normal::traite_genCore_itere( acc_in:int; elt1:bool; elt2:int) @@ -7745,37 +7745,37 @@ let elt = if (elt1) then (elt2) else (acc_in); acc_out = acc_in; tel --- end of node normal__traite_genCore_itere +-- end of node normal::traite_genCore_itere -node normal__essai2( +node normal::essai2( a:int^20; d:normal::T_InfoGenGlob {elt_bidon : int; chg2gen : int^20}) returns ( c:bool^20); let - c = map<<node normal__egal_indice, const 20>>(a, d.chg2gen); + c = map<<node normal::egal_indice, const 20>>(a, d.chg2gen); tel --- end of node normal__essai2 -node normal__id(elt_in:int) returns (elt_out:int); +-- end of node normal::essai2 +node normal::id(elt_in:int) returns (elt_out:int); let elt_out = elt_in; tel --- end of node normal__id +-- end of node normal::id -node normal__extract_info_chg_glob( +node normal::extract_info_chg_glob( EntreeGlob:normal::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}) returns ( InfoChgGlob:normal::T_InfoChgGlob {chg2gen : int^20}); let - InfoChgGlob = T_InfoChgGlob{chg2gen=map<<node normal__id, const + InfoChgGlob = T_InfoChgGlob{chg2gen=map<<node normal::id, const 20>>(EntreeGlob.chg2gen)}; tel --- end of node normal__extract_info_chg_glob +-- end of node normal::extract_info_chg_glob -node normal__extrCharge( +node normal::extrCharge( EntreeGlob:normal::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}) @@ -7783,29 +7783,29 @@ returns ( TabInfoChgIndiv:normal::T_InfoChgIndiv {mesure_chg : int}^20; TabInfoChgGlob:normal::T_InfoChgGlob {chg2gen : int^20}^20); let - TabInfoChgIndiv = normal__extract_tab_info_chg_indiv(EntreeGlob); - TabInfoChgGlob = normal__extract_info_chg_glob(EntreeGlob)^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); +-- end of node normal::extrCharge +node normal::trChItere(acc_in:int; elt:int) returns (acc_out:int); let acc_out = if ((acc_in > elt)) then (acc_in) else (elt); tel --- end of node normal__trChItere +-- end of node normal::trChItere -node normal__essai3( +node normal::essai3( indice:int^20; info:normal::T_InfoGenGlob {elt_bidon : int; chg2gen : int^20}) returns ( Connerie:bool^20); let - Connerie = map<<node normal__egal_indice, const 20>>(indice, + Connerie = map<<node normal::egal_indice, const 20>>(indice, info.chg2gen); tel --- end of node normal__essai3 +-- end of node normal::essai3 -node normal__traite_gen_core( +node normal::traite_gen_core( indice_gen:int; InfoGenIndiv:normal::T_InfoGenIndiv {mesure_gen : int}; InfoGenGlob:normal::T_InfoGenGlob {elt_bidon : int; @@ -7817,12 +7817,12 @@ returns ( var bidon:int; let - (bidon, TabComChg) = fillred<<node normal__traite_genCore_itere, const + (bidon, TabComChg) = fillred<<node normal::traite_genCore_itere, const 20>>(indice_gen, TabComVal, InfoGenGlob.chg2gen); tel --- end of node normal__traite_gen_core +-- end of node normal::traite_gen_core -node normal__traite_gen( +node normal::traite_gen( indice_gen:int; InfoGenIndiv:normal::T_InfoGenIndiv {mesure_gen : int}; InfoGenGlob:normal::T_InfoGenGlob {elt_bidon : int; @@ -7836,17 +7836,17 @@ var TabIndiceGen:int^20; bid:int; let - TabComVal_bis = map<<node normal__egal_indice, const 20>>(TabIndiceGen, + TabComVal_bis = map<<node normal::egal_indice, const 20>>(TabIndiceGen, InfoGenGlob.chg2gen); - (bid, TabIndiceGen) = fill<<node normal__copie, const 20>>(indice_gen); - TabComChg = normal__traite_gen_core(indice_gen, InfoGenIndiv, InfoGenGlob, + (bid, TabIndiceGen) = fill<<node normal::copie, const 20>>(indice_gen); + TabComChg = normal::traite_gen_core(indice_gen, InfoGenIndiv, InfoGenGlob, TabEtatCharge, TabComVal_bis); - TabComVal = map<<node normal__egal_indice, const 20>>(TabIndiceGen, + TabComVal = map<<node normal::egal_indice, const 20>>(TabIndiceGen, InfoGenGlob.chg2gen); tel --- end of node normal__traite_gen +-- end of node normal::traite_gen -node normal__extract_info_gen_glob( +node normal::extract_info_gen_glob( EntreeGlob:normal::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}) @@ -7854,29 +7854,29 @@ returns ( InfoGenGlob:normal::T_InfoGenGlob {elt_bidon : int; chg2gen : int^20}); let - InfoGenGlob = T_InfoGenGlob{elt_bidon=0;chg2gen=map<<node normal__id, + InfoGenGlob = T_InfoGenGlob{elt_bidon=0;chg2gen=map<<node normal::id, const 20>>(EntreeGlob.chg2gen)}; tel --- end of node normal__extract_info_gen_glob +-- end of node normal::extract_info_gen_glob -node normal__traite_charge( +node normal::traite_charge( InfoChgIndiv:normal::T_InfoChgIndiv {mesure_chg : int}; InfoChgGlob:normal::T_InfoChgGlob {chg2gen : int^20}) returns ( EtatCharge:int); let - EtatCharge = red<<node normal__trChItere, const + EtatCharge = red<<node normal::trChItere, const 20>>(InfoChgIndiv.mesure_chg, InfoChgGlob.chg2gen); tel --- end of node normal__traite_charge -node normal__incr_acc(acc_in:int) returns (acc_out:int; res:int); +-- end of node normal::traite_charge +node normal::incr_acc(acc_in:int) returns (acc_out:int; res:int); let res = acc_in; acc_out = (res + 1); tel --- end of node normal__incr_acc +-- end of node normal::incr_acc -node normal__extrGen( +node normal::extrGen( EntreeGlob:normal::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}) @@ -7888,13 +7888,13 @@ returns ( var bid:int; let - TabInfoGenIndiv = normal__extract_tab_info_gen_indiv(EntreeGlob); - TabInfoGenGlob = normal__extract_info_gen_glob(EntreeGlob)^4; - (bid, TabIndiceGen) = fill<<node normal__incr_acc, const 4>>(0); + TabInfoGenIndiv = normal::extract_tab_info_gen_indiv(EntreeGlob); + TabInfoGenGlob = normal::extract_info_gen_glob(EntreeGlob)^4; + (bid, TabIndiceGen) = fill<<node normal::incr_acc, const 4>>(0); tel --- end of node normal__extrGen +-- end of node normal::extrGen -node normal__traiteGen( +node normal::traiteGen( TabIndiceGen:int^4; TabInfoGenIndiv:normal::T_InfoGenIndiv {mesure_gen : int}^4; TabInfoGenGlob:normal::T_InfoGenGlob {elt_bidon : int; @@ -7904,23 +7904,23 @@ returns ( AllTabComChg:int^20^4; AllTabComVal:bool^20^4); let - (AllTabComChg, AllTabComVal) = map<<node normal__traite_gen, const + (AllTabComChg, AllTabComVal) = map<<node normal::traite_gen, const 4>>(TabIndiceGen, TabInfoGenIndiv, TabInfoGenGlob, TabEtatCharge^4); tel --- end of node normal__traiteGen +-- end of node normal::traiteGen -node normal__traiteChg( +node normal::traiteChg( TabInfoChgIndiv:normal::T_InfoChgIndiv {mesure_chg : int}^20; TabInfoChgGlob:normal::T_InfoChgGlob {chg2gen : int^20}^20) returns ( TabEtatCharge:int^20); let - TabEtatCharge = map<<node normal__traite_charge, const + TabEtatCharge = map<<node normal::traite_charge, const 20>>(TabInfoChgIndiv, TabInfoChgGlob); tel --- end of node normal__traiteChg +-- end of node normal::traiteChg -node normal__normal( +node normal::normal( EntreeGlob:normal::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}) @@ -7936,17 +7936,17 @@ var AllTabComChg:int^20^4; AllTabComVal:bool^20^4; let - (TabInfoChgIndiv, TabInfoChgGlob) = normal__extrCharge(EntreeGlob); - TabEtatCharge = normal__traiteChg(TabInfoChgIndiv, TabInfoChgGlob); + (TabInfoChgIndiv, TabInfoChgGlob) = normal::extrCharge(EntreeGlob); + TabEtatCharge = normal::traiteChg(TabInfoChgIndiv, TabInfoChgGlob); (TabInfoGenIndiv, TabInfoGenGlob, TabIndiceGen) = - normal__extrGen(EntreeGlob); - (AllTabComChg, AllTabComVal) = normal__traiteGen(TabIndiceGen, + normal::extrGen(EntreeGlob); + (AllTabComChg, AllTabComVal) = normal::traiteGen(TabIndiceGen, TabInfoGenIndiv, TabInfoGenGlob, TabEtatCharge); - TabComChg = normal__fusion_com(AllTabComChg, AllTabComVal); + TabComChg = normal::fusion_com(AllTabComChg, AllTabComVal); tel --- end of node normal__normal +-- end of node normal::normal -node normal__traite_gen_bis( +node normal::traite_gen_bis( a:int; c:normal::T_InfoGenGlob {elt_bidon : int; chg2gen : int^20}) @@ -7956,17 +7956,17 @@ var loc_a:int^20; bid:int; let - (bid, loc_a) = fill<<node normal__copie, const 20>>(a); - e = map<<node normal__egal_indice, const 20>>(loc_a, c.chg2gen); + (bid, loc_a) = fill<<node normal::copie, const 20>>(a); + e = map<<node normal::egal_indice, const 20>>(loc_a, c.chg2gen); tel --- end of node normal__traite_gen_bis +-- end of node normal::traite_gen_bis ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/pipeline.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/pipeline.lus -const pipeline__size = 10; +const pipeline::size = 10; -node pipeline__oneStep_pipe( +node pipeline::oneStep_pipe( accu_in:bool; elt_in:bool) returns ( @@ -7976,60 +7976,60 @@ let elt_out = true -> pre(not(accu_in)); accu_out = elt_in; tel --- end of node pipeline__oneStep_pipe -node pipeline__pipeline(in:bool^10) returns (out:bool^10); +-- end of node pipeline::oneStep_pipe +node pipeline::pipeline(in:bool^10) returns (out:bool^10); var accu_out:bool; let - (accu_out, out) = fillred<<node pipeline__oneStep_pipe, const 10>>(true -> + (accu_out, out) = fillred<<node pipeline::oneStep_pipe, const 10>>(true -> pre(accu_out), in); tel --- end of node pipeline__pipeline +-- end of node pipeline::pipeline ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/predefOp.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/predefOp.lus -const predefOp__L = 2; -type predefOp__Reg_L = bool^2; -const predefOp__H = 3; -type predefOp__T_Reg_H = bool^2^3; -type predefOp__Tab_L = int^2; -type predefOp__T_Tab_H = int^2^3; -node predefOp__incr(init:int; b:bool) returns (res:int); +const predefOp::L = 2; +type predefOp::Reg_L = bool^2; +const predefOp::H = 3; +type predefOp::T_Reg_H = bool^2^3; +type predefOp::Tab_L = int^2; +type predefOp::T_Tab_H = int^2^3; +node predefOp::incr(init:int; b:bool) returns (res:int); let res = if ((b = true)) then ((init + 1)) else (init); tel --- end of node predefOp__incr -node predefOp__bitalt(iacc:bool) returns (oacc:bool; res:bool); +-- end of node predefOp::incr +node predefOp::bitalt(iacc:bool) returns (oacc:bool; res:bool); let res = iacc; oacc = not(res); tel --- end of node predefOp__bitalt -node predefOp__initmatbool(iacc:bool) returns (sacc:bool; R:bool^2^3); +-- end of node predefOp::bitalt +node predefOp::initmatbool(iacc:bool) returns (sacc:bool; R:bool^2^3); let - (sacc, R) = fill<<node Lustre__fill<<node predefOp__bitalt, const 2>>, + (sacc, R) = fill<<node Lustre::fill<<node predefOp::bitalt, const 2>>, const 3>>(iacc); tel --- end of node predefOp__initmatbool +-- end of node predefOp::initmatbool -node predefOp__composematbool( +node predefOp::composematbool( i1:bool^2^3; i2:bool^2^3) returns ( s1:bool^2^3); let - s1 = map<<node Lustre__map<<node Lustre__=>, const 2>>, const 3>>(i1, i2); + s1 = map<<node Lustre::map<<node Lustre::=>, const 2>>, const 3>>(i1, i2); tel --- end of node predefOp__composematbool -node predefOp__reducematbool(iacc:int; I:bool^2^3) returns (res:int); +-- end of node predefOp::composematbool +node predefOp::reducematbool(iacc:int; I:bool^2^3) returns (res:int); let - res = red<<node Lustre__red<<node predefOp__incr, const 2>>, const + res = red<<node Lustre::red<<node predefOp::incr, const 2>>, const 3>>(iacc, I); tel --- end of node predefOp__reducematbool +-- end of node predefOp::reducematbool -node predefOp__predefOp2( +node predefOp::predefOp2( a:bool) returns ( nbTrue:int; @@ -8040,44 +8040,44 @@ var bid1:bool; bid2:bool; let - (bid1, init1) = predefOp__initmatbool(a); - (bid2, init2) = predefOp__initmatbool(not(a)); - XORMAT = predefOp__composematbool(init1, init2); - nbTrue = predefOp__reducematbool(0, 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 +-- end of node predefOp::predefOp2 -node predefOp__composematint( +node predefOp::composematint( i1:int^2^3; i2:int^2^3) returns ( s1:int^2^3; s2:bool^2^3); let - s1 = map<<node Lustre__map<<node Lustre__/, const 2>>, const 3>>(i1, i2); - s2 = map<<node Lustre__map<<node Lustre__>=, const 2>>, const 3>>(i1, i2); + s1 = map<<node Lustre::map<<node Lustre::/, const 2>>, const 3>>(i1, i2); + s2 = map<<node Lustre::map<<node Lustre::>=, const 2>>, const 3>>(i1, i2); tel --- end of node predefOp__composematint -node predefOp__incremental(iacc:int) returns (oacc:int; res:int); +-- end of node predefOp::composematint +node predefOp::incremental(iacc:int) returns (oacc:int; res:int); let res = iacc; oacc = (res + 1); tel --- end of node predefOp__incremental -node predefOp__reducematint(iacc:int; I:int^2^3) returns (res:int); +-- end of node predefOp::incremental +node predefOp::reducematint(iacc:int; I:int^2^3) returns (res:int); let - res = red<<node Lustre__red<<node Lustre__+, const 2>>, const 3>>(iacc, + res = red<<node Lustre::red<<node Lustre::+, const 2>>, const 3>>(iacc, I); tel --- end of node predefOp__reducematint -node predefOp__initmatint(iacc:int) returns (sacc:int; R:int^2^3); +-- end of node predefOp::reducematint +node predefOp::initmatint(iacc:int) returns (sacc:int; R:int^2^3); let - (sacc, R) = fill<<node Lustre__fill<<node predefOp__incremental, const + (sacc, R) = fill<<node Lustre::fill<<node predefOp::incremental, const 2>>, const 3>>(iacc); tel --- end of node predefOp__initmatint +-- end of node predefOp::initmatint -node predefOp__predefOp( +node predefOp::predefOp( a:int) returns ( res:int; @@ -8089,117 +8089,117 @@ var bid1:int; bid2:int; let - (bid1, init1) = predefOp__initmatint(a); - (bid2, init2) = predefOp__initmatint((a * a)); - (matres1, matres2) = predefOp__composematint(init1, init2); - res = predefOp__reducematint(0, 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 +-- end of node predefOp::predefOp ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/redIf.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/redIf.lus -node redIf__monIf(a:bool; b:bool; c:bool) returns (r:bool); +node redIf::monIf(a:bool; b:bool; c:bool) returns (r:bool); let r = if (a) then (b) else (c); tel --- end of node redIf__monIf -node redIf__redIf(a:bool; b:bool^3; c:bool^3) returns (r:bool); +-- end of node redIf::monIf +node redIf::redIf(a:bool; b:bool^3; c:bool^3) returns (r:bool); let - r = red<<node Lustre__if, const 3>>(a, b, c); + r = red<<node Lustre::if, const 3>>(a, b, c); tel --- end of node redIf__redIf +-- end of node redIf::redIf ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/simpleRed.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/simpleRed.lus -const simpleRed__m = 3; -const simpleRed__n = 2; -node simpleRed__simpleRed(a:int) returns (res:int); +const simpleRed::m = 3; +const simpleRed::n = 2; +node simpleRed::simpleRed(a:int) returns (res:int); let - res = red<<node Lustre__+, const 3>>(0, a^3); + res = red<<node Lustre::+, const 3>>(0, a^3); tel --- end of node simpleRed__simpleRed +-- end of node simpleRed::simpleRed ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/testSilus.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/testSilus.lus -const testSilus__NBC = 20; -type testSilus__INTNBC = int^20; -const testSilus__NBG = 4; -type testSilus__INTNBG = int^4; -type testSilus__T_EntreeGlob = testSilus::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}; -type testSilus__T_ComChg = int; -type testSilus__T_InfoGenIndiv = testSilus::T_InfoGenIndiv {mesure_gen : int}; -type testSilus__BOOLNBC = bool^20; -type testSilus__T_EtatCharge = int; -type testSilus__T_InfoChgGlob = testSilus::T_InfoChgGlob {chg2gen : int^20}; -type testSilus__T_InfoChgIndiv = testSilus::T_InfoChgIndiv {mesure_chg : int}; -type testSilus__T_ComChgNBC = int^20; -type testSilus__T_InfoGenGlob = testSilus::T_InfoGenGlob {elt_bidon : int; chg2gen : int^20}; -const testSilus__EC_LESTAGE = 3; -const testSilus__COM_ON = 1; -const testSilus__EC_OFF = 1; -const testSilus__COM_OFF = 2; -const testSilus__EC_NON_CTRL = 2; -const testSilus__EC_DELESTAGE = 4; -const testSilus__EC_ON = 0; -const testSilus__COM_ERR = 0; - -node testSilus__int2InfoChgIndiv( +const testSilus::NBC = 20; +type testSilus::INTNBC = int^20; +const testSilus::NBG = 4; +type testSilus::INTNBG = int^4; +type testSilus::T_EntreeGlob = testSilus::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}; +type testSilus::T_ComChg = int; +type testSilus::T_InfoGenIndiv = testSilus::T_InfoGenIndiv {mesure_gen : int}; +type testSilus::BOOLNBC = bool^20; +type testSilus::T_EtatCharge = int; +type testSilus::T_InfoChgGlob = testSilus::T_InfoChgGlob {chg2gen : int^20}; +type testSilus::T_InfoChgIndiv = testSilus::T_InfoChgIndiv {mesure_chg : int}; +type testSilus::T_ComChgNBC = int^20; +type testSilus::T_InfoGenGlob = testSilus::T_InfoGenGlob {elt_bidon : int; chg2gen : int^20}; +const testSilus::EC_LESTAGE = 3; +const testSilus::COM_ON = 1; +const testSilus::EC_OFF = 1; +const testSilus::COM_OFF = 2; +const testSilus::EC_NON_CTRL = 2; +const testSilus::EC_DELESTAGE = 4; +const testSilus::EC_ON = 0; +const testSilus::COM_ERR = 0; + +node testSilus::int2InfoChgIndiv( m:int) returns ( InfoChgIndiv:testSilus::T_InfoChgIndiv {mesure_chg : int}); let InfoChgIndiv = T_InfoChgIndiv{mesure_chg=m}; tel --- end of node testSilus__int2InfoChgIndiv +-- end of node testSilus::int2InfoChgIndiv -node testSilus__extract_tab_info_chg_indiv( +node testSilus::extract_tab_info_chg_indiv( EntreeGlob:testSilus::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}) returns ( TabInfoChgIndiv:testSilus::T_InfoChgIndiv {mesure_chg : int}^20); let - TabInfoChgIndiv = map<<node testSilus__int2InfoChgIndiv, const + TabInfoChgIndiv = map<<node testSilus::int2InfoChgIndiv, const 20>>(EntreeGlob.mesure_chgs); tel --- end of node testSilus__extract_tab_info_chg_indiv +-- end of node testSilus::extract_tab_info_chg_indiv -node testSilus__int2InfoGenIndiv( +node testSilus::int2InfoGenIndiv( m:int) returns ( InfoGenIndiv:testSilus::T_InfoGenIndiv {mesure_gen : int}); let InfoGenIndiv = T_InfoGenIndiv{mesure_gen=m}; tel --- end of node testSilus__int2InfoGenIndiv +-- end of node testSilus::int2InfoGenIndiv -node testSilus__extract_tab_info_gen_indiv( +node testSilus::extract_tab_info_gen_indiv( EntreeGlob:testSilus::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}) returns ( TabInfoGenIndiv:testSilus::T_InfoGenIndiv {mesure_gen : int}^4); let - TabInfoGenIndiv = map<<node testSilus__int2InfoGenIndiv, const + TabInfoGenIndiv = map<<node testSilus::int2InfoGenIndiv, const 4>>(EntreeGlob.mesure_gens); tel --- end of node testSilus__extract_tab_info_gen_indiv -node testSilus__egal_indice(indice:int; val:int) returns (r:bool); +-- end of node testSilus::extract_tab_info_gen_indiv +node testSilus::egal_indice(indice:int; val:int) returns (r:bool); let r = (val = indice); tel --- end of node testSilus__egal_indice -node testSilus__copie(acc_in:int) returns (acc_out:int; elt:int); +-- end of node testSilus::egal_indice +node testSilus::copie(acc_in:int) returns (acc_out:int; elt:int); let acc_out = acc_in; elt = acc_in; tel --- end of node testSilus__copie +-- end of node testSilus::copie -node testSilus__fusion_une_com( +node testSilus::fusion_une_com( in_com:int; cur_com:int; cur_val:bool) @@ -8208,21 +8208,21 @@ returns ( let out_com = if (cur_val) then (cur_com) else (in_com); tel --- end of node testSilus__fusion_une_com +-- end of node testSilus::fusion_une_com -node testSilus__fusion_tab_com( +node testSilus::fusion_tab_com( acc_in:int^20; TabCom:int^20; TabVal:bool^20) returns ( acc_out:int^20); let - acc_out = map<<node testSilus__fusion_une_com, const 20>>(acc_in, TabCom, + acc_out = map<<node testSilus::fusion_une_com, const 20>>(acc_in, TabCom, TabVal); tel --- end of node testSilus__fusion_tab_com +-- end of node testSilus::fusion_tab_com -node testSilus__fusion_com( +node testSilus::fusion_com( AllTabComChg:int^20^4; AllTabComVal:bool^20^4) returns ( @@ -8231,12 +8231,12 @@ var Vide:int^20; let Vide = COM_ERR^20; - TabComChg = red<<node testSilus__fusion_tab_com, const 4>>(Vide, + TabComChg = red<<node testSilus::fusion_tab_com, const 4>>(Vide, AllTabComChg, AllTabComVal); tel --- end of node testSilus__fusion_com +-- end of node testSilus::fusion_com -node testSilus__traite_genCore_itere( +node testSilus::traite_genCore_itere( acc_in:int; elt1:bool; elt2:int) @@ -8247,26 +8247,26 @@ let elt = if (elt1) then (elt2) else (acc_in); acc_out = acc_in; tel --- end of node testSilus__traite_genCore_itere -node testSilus__id(elt_in:int) returns (elt_out:int); +-- end of node testSilus::traite_genCore_itere +node testSilus::id(elt_in:int) returns (elt_out:int); let elt_out = elt_in; tel --- end of node testSilus__id +-- end of node testSilus::id -node testSilus__extract_info_chg_glob( +node testSilus::extract_info_chg_glob( EntreeGlob:testSilus::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}) returns ( InfoChgGlob:testSilus::T_InfoChgGlob {chg2gen : int^20}); let - InfoChgGlob = T_InfoChgGlob{chg2gen=map<<node testSilus__id, const + InfoChgGlob = T_InfoChgGlob{chg2gen=map<<node testSilus::id, const 20>>(EntreeGlob.chg2gen)}; tel --- end of node testSilus__extract_info_chg_glob +-- end of node testSilus::extract_info_chg_glob -node testSilus__extrCharge( +node testSilus::extrCharge( EntreeGlob:testSilus::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}) @@ -8274,17 +8274,17 @@ returns ( TabInfoChgIndiv:testSilus::T_InfoChgIndiv {mesure_chg : int}^20; TabInfoChgGlob:testSilus::T_InfoChgGlob {chg2gen : int^20}^20); let - TabInfoChgIndiv = testSilus__extract_tab_info_chg_indiv(EntreeGlob); - TabInfoChgGlob = testSilus__extract_info_chg_glob(EntreeGlob)^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); +-- end of node testSilus::extrCharge +node testSilus::trChItere(acc_in:int; elt:int) returns (acc_out:int); let acc_out = if ((acc_in > elt)) then (acc_in) else (elt); tel --- end of node testSilus__trChItere +-- end of node testSilus::trChItere -node testSilus__traite_gen_core( +node testSilus::traite_gen_core( indice_gen:int; InfoGenIndiv:testSilus::T_InfoGenIndiv {mesure_gen : int}; InfoGenGlob:testSilus::T_InfoGenGlob {elt_bidon : int; @@ -8296,12 +8296,12 @@ returns ( var bidon:int; let - (bidon, TabComChg) = fillred<<node testSilus__traite_genCore_itere, const + (bidon, TabComChg) = fillred<<node testSilus::traite_genCore_itere, const 20>>(indice_gen, TabComVal, InfoGenGlob.chg2gen); tel --- end of node testSilus__traite_gen_core +-- end of node testSilus::traite_gen_core -node testSilus__traite_gen( +node testSilus::traite_gen( indice_gen:int; InfoGenIndiv:testSilus::T_InfoGenIndiv {mesure_gen : int}; InfoGenGlob:testSilus::T_InfoGenGlob {elt_bidon : int; @@ -8314,16 +8314,16 @@ var TabIndiceGen:int^20; bidon:int; let - TabComChg = testSilus__traite_gen_core(indice_gen, InfoGenIndiv, + TabComChg = testSilus::traite_gen_core(indice_gen, InfoGenIndiv, InfoGenGlob, TabEtatCharge, TabComVal); - TabComVal = map<<node testSilus__egal_indice, const 20>>(TabIndiceGen, + TabComVal = map<<node testSilus::egal_indice, const 20>>(TabIndiceGen, InfoGenGlob.chg2gen); - (bidon, TabIndiceGen) = fill<<node testSilus__copie, const + (bidon, TabIndiceGen) = fill<<node testSilus::copie, const 20>>(indice_gen); tel --- end of node testSilus__traite_gen +-- end of node testSilus::traite_gen -node testSilus__extract_info_gen_glob( +node testSilus::extract_info_gen_glob( EntreeGlob:testSilus::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}) @@ -8331,40 +8331,40 @@ returns ( InfoGenGlob:testSilus::T_InfoGenGlob {elt_bidon : int; chg2gen : int^20}); let - InfoGenGlob = T_InfoGenGlob{elt_bidon=0;chg2gen=map<<node testSilus__id, + InfoGenGlob = T_InfoGenGlob{elt_bidon=0;chg2gen=map<<node testSilus::id, const 20>>(EntreeGlob.chg2gen)}; tel --- end of node testSilus__extract_info_gen_glob +-- end of node testSilus::extract_info_gen_glob -node testSilus__traite_charge( +node testSilus::traite_charge( InfoChgIndiv:testSilus::T_InfoChgIndiv {mesure_chg : int}; InfoChgGlob:testSilus::T_InfoChgGlob {chg2gen : int^20}) returns ( EtatCharge:int); let - EtatCharge = red<<node testSilus__trChItere, const + EtatCharge = red<<node testSilus::trChItere, const 20>>(InfoChgIndiv.mesure_chg, InfoChgGlob.chg2gen); tel --- end of node testSilus__traite_charge +-- end of node testSilus::traite_charge -node testSilus__traiteChg( +node testSilus::traiteChg( TabInfoChgIndiv:testSilus::T_InfoChgIndiv {mesure_chg : int}^20; TabInfoChgGlob:testSilus::T_InfoChgGlob {chg2gen : int^20}^20) returns ( TabEtatCharge:int^20); let - TabEtatCharge = map<<node testSilus__traite_charge, const + TabEtatCharge = map<<node testSilus::traite_charge, const 20>>(TabInfoChgIndiv, TabInfoChgGlob); tel --- end of node testSilus__traiteChg -node testSilus__incr_acc(acc_in:int) returns (acc_out:int; res:int); +-- end of node testSilus::traiteChg +node testSilus::incr_acc(acc_in:int) returns (acc_out:int; res:int); let res = acc_in; acc_out = (res + 1); tel --- end of node testSilus__incr_acc +-- end of node testSilus::incr_acc -node testSilus__extrGen( +node testSilus::extrGen( EntreeGlob:testSilus::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}) @@ -8376,13 +8376,13 @@ returns ( var bidon:int; let - TabInfoGenIndiv = testSilus__extract_tab_info_gen_indiv(EntreeGlob); - TabInfoGenGlob = testSilus__extract_info_gen_glob(EntreeGlob)^4; - (bidon, TabIndiceGen) = fill<<node testSilus__incr_acc, const 4>>(0); + TabInfoGenIndiv = testSilus::extract_tab_info_gen_indiv(EntreeGlob); + TabInfoGenGlob = testSilus::extract_info_gen_glob(EntreeGlob)^4; + (bidon, TabIndiceGen) = fill<<node testSilus::incr_acc, const 4>>(0); tel --- end of node testSilus__extrGen +-- end of node testSilus::extrGen -node testSilus__traiteGen( +node testSilus::traiteGen( TabIndiceGen:int^4; TabInfoGenIndiv:testSilus::T_InfoGenIndiv {mesure_gen : int}^4; TabInfoGenGlob:testSilus::T_InfoGenGlob {elt_bidon : int; @@ -8392,12 +8392,12 @@ returns ( AllTabComChg:int^20^4; AllTabComVal:bool^20^4); let - (AllTabComChg, AllTabComVal) = map<<node testSilus__traite_gen, const + (AllTabComChg, AllTabComVal) = map<<node testSilus::traite_gen, const 4>>(TabIndiceGen, TabInfoGenIndiv, TabInfoGenGlob, TabEtatCharge^4); tel --- end of node testSilus__traiteGen +-- end of node testSilus::traiteGen -node testSilus__testSilus( +node testSilus::testSilus( EntreeGlob:testSilus::T_EntreeGlob {chg2gen : int^20; mesure_chgs : int^20; mesure_gens : int^4}) @@ -8413,28 +8413,28 @@ var AllTabComChg:int^20^4; AllTabComVal:bool^20^4; let - (TabInfoChgIndiv, TabInfoChgGlob) = testSilus__extrCharge(EntreeGlob); - TabEtatCharge = testSilus__traiteChg(TabInfoChgIndiv, TabInfoChgGlob); + (TabInfoChgIndiv, TabInfoChgGlob) = testSilus::extrCharge(EntreeGlob); + TabEtatCharge = testSilus::traiteChg(TabInfoChgIndiv, TabInfoChgGlob); (TabInfoGenIndiv, TabInfoGenGlob, TabIndiceGen) = - testSilus__extrGen(EntreeGlob); - (AllTabComChg, AllTabComVal) = testSilus__traiteGen(TabIndiceGen, + testSilus::extrGen(EntreeGlob); + (AllTabComChg, AllTabComVal) = testSilus::traiteGen(TabIndiceGen, TabInfoGenIndiv, TabInfoGenGlob, TabEtatCharge); - TabComChg = testSilus__fusion_com(AllTabComChg, AllTabComVal); + TabComChg = testSilus::fusion_com(AllTabComChg, AllTabComVal); tel --- end of node testSilus__testSilus +-- end of node testSilus::testSilus ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/triSel.lus Opening file /home/jahier/lus2lic/src/test/should_work/lionel/triSel.lus -const triSel__size = 50; -type triSel__tabSize = int^50; -type triSel__Sort_accu = triSel::Sort_accu {CurrentRank : int; Tab : int^50}; -type triSel__Select_accu = triSel::Select_accu {RankToFind : int; CurrentRank : int; Val : int}; -type triSel__MinFR_accu = triSel::MinFR_accu {MinVal : int; MinRank : int; RankFrom : int; Rank : int}; -type triSel__sorted_iter_accu = triSel::sorted_iter_accu {prev_elt : int; prop_is_tt : bool}; -type triSel__Exchange_accu = triSel::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; - -node triSel__minFromRank( +const triSel::size = 50; +type triSel::tabSize = int^50; +type triSel::Sort_accu = triSel::Sort_accu {CurrentRank : int; Tab : int^50}; +type triSel::Select_accu = triSel::Select_accu {RankToFind : int; CurrentRank : int; Val : int}; +type triSel::MinFR_accu = triSel::MinFR_accu {MinVal : int; MinRank : int; RankFrom : int; Rank : int}; +type triSel::sorted_iter_accu = triSel::sorted_iter_accu {prev_elt : int; prop_is_tt : bool}; +type triSel::Exchange_accu = triSel::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; + +node triSel::minFromRank( accu_in:triSel::MinFR_accu {MinVal : int; MinRank : int; RankFrom : int; @@ -8455,9 +8455,9 @@ let accu_in.MinVal)) then (accu_in.Rank) else (accu_in.MinRank)) else (accu_in.MinRank));RankFrom=accu_in.RankFrom;Rank=(accu_in.Rank + 1)}; tel --- end of node triSel__minFromRank +-- end of node triSel::minFromRank -node triSel__select( +node triSel::select( accu_in:triSel::Select_accu {RankToFind : int; CurrentRank : int; Val : int}; @@ -8472,9 +8472,9 @@ let + 1);Val= if ((accu_in.RankToFind = accu_in.CurrentRank)) then (elt) else (accu_in.Val)}; tel --- end of node triSel__select +-- end of node triSel::select -node triSel__Exchange_i_j( +node triSel::Exchange_i_j( accu_in:triSel::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; @@ -8496,9 +8496,9 @@ let else ( if ((accu_in.Rank = accu_in.RankFrom)) then (accu_in.MinVal) else (eltIn)); tel --- end of node triSel__Exchange_i_j +-- end of node triSel::Exchange_i_j -node triSel__UnarySort( +node triSel::UnarySort( accu_in:triSel::Sort_accu {CurrentRank : int; Tab : int^50}; eltIn:int) @@ -8511,29 +8511,29 @@ var accu_out_exchange:triSel::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; localTab:int^50; let - accu_out_min = red<<node triSel__minFromRank, const + accu_out_min = red<<node triSel::minFromRank, const 50>>(MinFR_accu{MinVal=0;MinRank=0;RankFrom=accu_in.CurrentRank;Rank=0}, accu_in.Tab); - accu_out_select = red<<node triSel__select, const + accu_out_select = red<<node triSel::select, const 50>>(Select_accu{RankToFind=accu_in.CurrentRank;CurrentRank=0;Val=0}, accu_in.Tab); - (accu_out_exchange, localTab) = fillred<<node triSel__Exchange_i_j, const + (accu_out_exchange, localTab) = fillred<<node triSel::Exchange_i_j, const 50>>(Exchange_accu{MinVal=accu_out_min.MinVal;MinRank=accu_out_min.MinRank;RankFrom=accu_out_select.RankToFind;CurrentVal=accu_out_select.Val;Rank=0}, accu_in.Tab); accu_out = Sort_accu{CurrentRank=(accu_in.CurrentRank + 1);Tab=localTab}; tel --- end of node triSel__UnarySort -node triSel__triSel(TIn:int^50) returns (TSorted:int^50); +-- end of node triSel::UnarySort +node triSel::triSel(TIn:int^50) returns (TSorted:int^50); var UnarySort_accu_out:triSel::Sort_accu {CurrentRank : int; Tab : int^50}; let - UnarySort_accu_out = red<<node triSel__UnarySort, const + UnarySort_accu_out = red<<node triSel::UnarySort, const 50>>(Sort_accu{CurrentRank=0;Tab=TIn}, TIn); TSorted = UnarySort_accu_out.Tab; tel --- end of node triSel__triSel +-- end of node triSel::triSel -node triSel__sorted_iter( +node triSel::sorted_iter( accu_in:triSel::sorted_iter_accu {prev_elt : int; prop_is_tt : bool}; elt:int) @@ -8544,53 +8544,53 @@ let accu_out = sorted_iter_accu{prev_elt=elt;prop_is_tt=((accu_in.prev_elt <= elt) and accu_in.prop_is_tt)}; tel --- end of node triSel__sorted_iter -node triSel__Sorted(TIn:int^50) returns (ok:bool); +-- end of node triSel::sorted_iter +node triSel::Sorted(TIn:int^50) returns (ok:bool); var accu_out:triSel::sorted_iter_accu {prev_elt : int; prop_is_tt : bool}; TSorted:int^50; let - TSorted = triSel__triSel(TIn); - accu_out = red<<node triSel__sorted_iter, const + TSorted = triSel::triSel(TIn); + accu_out = red<<node triSel::sorted_iter, const 50>>(sorted_iter_accu{prev_elt=0;prop_is_tt=true}, TSorted); ok = accu_out.prop_is_tt; tel --- end of node triSel__Sorted +-- end of node triSel::Sorted ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/Condact.lus Opening file /home/jahier/lus2lic/src/test/should_work/packEnvTest/Condact.lus -node Util__carre(e:int) returns (s:int); +node Util::carre(e:int) returns (s:int); let s = (e * e); tel --- end of node Util__carre -type TestCondact__t1 = int; -type TestCondact__t2 = int; -node TestCondact__n(e:int) returns (s:int); +-- end of node Util::carre +type TestCondact::t1 = int; +type TestCondact::t2 = int; +node TestCondact::n(e:int) returns (s:int); let - s = Util__carre(e); + s = Util::carre(e); tel --- end of node TestCondact__n -node TestCondact__C(c:bool; d:int; x:int) returns (y:int); +-- end of node TestCondact::n +node TestCondact::C(c:bool; d:int; x:int) returns (y:int); let - y = if (c) then (current (TestCondact__n(x))) else (d -> pre(y)); + y = if (c) then (current (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); +-- end of node TestCondact::C +node Main::Condact(c:bool; d:int; x:int) returns (y:int); let - y = TestCondact__C(c, d, x); + y = TestCondact::C(c, d, x); tel --- end of node Main__Condact +-- end of node Main::Condact ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/contractForElementSelectionInArray/contractForElementSelectionInArray.lus Opening file /home/jahier/lus2lic/src/test/should_work/packEnvTest/contractForElementSelectionInArray/contractForElementSelectionInArray.lus -type contractForElementSelectionInArray__elementType = int; -type contractForElementSelectionInArray__iteratedStruct = contractForElementSelectionInArray::iteratedStruct {currentRank : int; rankToSelect : int; elementSelected : int}; -const contractForElementSelectionInArray__size = 10; +type contractForElementSelectionInArray::elementType = int; +type contractForElementSelectionInArray::iteratedStruct = contractForElementSelectionInArray::iteratedStruct {currentRank : int; rankToSelect : int; elementSelected : int}; +const contractForElementSelectionInArray::size = 10; -node contractForElementSelectionInArray__selectOneStage( +node contractForElementSelectionInArray::selectOneStage( acc_in:contractForElementSelectionInArray::iteratedStruct {currentRank : int; rankToSelect : int; elementSelected : int}; @@ -8605,9 +8605,9 @@ let ((acc_in.currentRank = acc_in.rankToSelect)) then (currentElt) else (acc_in.elementSelected)}; tel --- end of node contractForElementSelectionInArray__selectOneStage +-- end of node contractForElementSelectionInArray::selectOneStage -node contractForElementSelectionInArray__selectEltInArray( +node contractForElementSelectionInArray::selectEltInArray( array:int^10; rankToSelect:int) returns ( @@ -8616,38 +8616,38 @@ var iterationResult:contractForElementSelectionInArray::iteratedStruct {currentRank : int; rankToSelect : int; elementSelected : int}; let iterationResult = red<<node - contractForElementSelectionInArray__selectOneStage, const + contractForElementSelectionInArray::selectOneStage, const 10>>(iteratedStruct{currentRank=0;rankToSelect=rankToSelect;elementSelected=0}, array); elementSelected = iterationResult.elementSelected; tel --- end of node contractForElementSelectionInArray__selectEltInArray +-- end of node contractForElementSelectionInArray::selectEltInArray ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/contractForElementSelectionInArray/main.lus Opening file /home/jahier/lus2lic/src/test/should_work/packEnvTest/contractForElementSelectionInArray/main.lus Opening file /home/jahier/lus2lic/src/test/should_work/packEnvTest/contractForElementSelectionInArray/packageTableau.lus -type intArray__elementType = int; -const intArray__size = 10; -type intArray__arrayType = int^10; -node util__igt(i:int; j:int) returns (res:bool); +type intArray::elementType = int; +const intArray::size = 10; +type intArray::arrayType = int^10; +node util::igt(i:int; j:int) returns (res:bool); let res = (i > j); tel --- end of node util__igt -node intArray___isGreaterThan_(i:int; j:int) returns (res:bool); +-- end of node util::igt +node intArray::_isGreaterThan_(i:int; j:int) returns (res:bool); let - res = util__igt(i, j); + res = util::igt(i, j); tel --- end of node intArray___isGreaterThan_ -function intArray___isEqualTo_(i1:a; i2:a) returns (o:bool); +-- 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_ = intArray::T_isElementOf_ {eltToSearch : int; iselementof : bool}; +-- end of node intArray::_isEqualTo_ +type intArray::T_isElementOf_ = intArray::T_isElementOf_ {eltToSearch : int; iselementof : bool}; -node intArray__iterated_isElementOf_( +node intArray::iterated_isElementOf_( acc_in:intArray::T_isElementOf_ {eltToSearch : int; iselementof : bool}; elt_in:int) @@ -8657,25 +8657,25 @@ 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_ -node intArray___isElementOf_(e:int; t:int^10) returns (iselementof:bool); +-- end of node intArray::iterated_isElementOf_ +node intArray::_isElementOf_(e:int; t:int^10) returns (iselementof:bool); var acc_out:intArray::T_isElementOf_ {eltToSearch : int; iselementof : bool}; let - acc_out = red<<node intArray__iterated_isElementOf_, const + acc_out = red<<node intArray::iterated_isElementOf_, const 10>>(T_isElementOf_{eltToSearch=e;iselementof=false}, t); tel --- end of node intArray___isElementOf_ -type intArray__forSortingAlgo = intArray::forSortingAlgo {previousElement : int; sortedUpToHere : bool}; -node intArray___isGreaterOrEqualTo_(e1:int; e2:int) returns (ge:bool); +-- end of node intArray::_isElementOf_ +type intArray::forSortingAlgo = intArray::forSortingAlgo {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_ +-- end of node intArray::_isGreaterOrEqualTo_ -node intArray__isLocallyLoselySorted( +node intArray::isLocallyLoselySorted( acc_in:intArray::forSortingAlgo {previousElement : int; sortedUpToHere : bool}; elt:int) @@ -8684,29 +8684,29 @@ returns ( sortedUpToHere : bool}); let acc_out = - forSortingAlgo{previousElement=elt;sortedUpToHere=(intArray___isGreaterOrEqualTo_(elt, + forSortingAlgo{previousElement=elt;sortedUpToHere=(intArray::_isGreaterOrEqualTo_(elt, acc_in.previousElement) and acc_in.sortedUpToHere)}; tel --- end of node intArray__isLocallyLoselySorted +-- end of node intArray::isLocallyLoselySorted -node intArray___isLoselySorted( +node intArray::_isLoselySorted( array:int^10) returns ( array_isLoselySorted:bool); var result:intArray::forSortingAlgo {previousElement : int; sortedUpToHere : bool}; let - result = red<<node intArray__isLocallyLoselySorted, const + result = red<<node intArray::isLocallyLoselySorted, const 10>>(forSortingAlgo{previousElement=array[0];sortedUpToHere=true}, array); array_isLoselySorted = result.sortedUpToHere; tel --- end of node intArray___isLoselySorted -type intArray__Sort_accu = intArray::Sort_accu {CurrentRank : int; Tab : int^10}; -type intArray__Select_accu = intArray::Select_accu {RankToFind : int; CurrentRank : int; Val : int}; -type intArray__MinFR_accu = intArray::MinFR_accu {MinVal : int; MinRank : int; RankFrom : int; Rank : int}; -type intArray__Exchange_accu = intArray::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; +-- end of node intArray::_isLoselySorted +type intArray::Sort_accu = intArray::Sort_accu {CurrentRank : int; Tab : int^10}; +type intArray::Select_accu = intArray::Select_accu {RankToFind : int; CurrentRank : int; Val : int}; +type intArray::MinFR_accu = intArray::MinFR_accu {MinVal : int; MinRank : int; RankFrom : int; Rank : int}; +type intArray::Exchange_accu = intArray::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; -node intArray__minFromRank( +node intArray::minFromRank( accu_in:intArray::MinFR_accu {MinVal : int; MinRank : int; RankFrom : int; @@ -8725,9 +8725,9 @@ let ((TabEltIn < accu_in.MinVal)) then (accu_in.Rank) else (accu_in.MinRank)) else (accu_in.MinRank);RankFrom=accu_in.RankFrom;Rank=(accu_in.Rank + 1)}; tel --- end of node intArray__minFromRank +-- end of node intArray::minFromRank -node intArray__select( +node intArray::select( accu_in:intArray::Select_accu {RankToFind : int; CurrentRank : int; Val : int}; @@ -8742,9 +8742,9 @@ let + 1);Val= if ((accu_in.RankToFind = accu_in.CurrentRank)) then (elt) else (accu_in.Val)}; tel --- end of node intArray__select +-- end of node intArray::select -node intArray__Exchange_i_j( +node intArray::Exchange_i_j( accu_in:intArray::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; @@ -8766,9 +8766,9 @@ let else ( if ((accu_in.Rank = accu_in.RankFrom)) then (accu_in.MinVal) else (eltIn)); tel --- end of node intArray__Exchange_i_j +-- end of node intArray::Exchange_i_j -node intArray__UnarySort( +node intArray::UnarySort( accu_in:intArray::Sort_accu {CurrentRank : int; Tab : int^10}; eltIn:int) @@ -8781,42 +8781,42 @@ var accu_out_exchange:intArray::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; localTab:int^10; let - accu_out_min = red<<node intArray__minFromRank, const + accu_out_min = red<<node intArray::minFromRank, const 10>>(MinFR_accu{MinVal=0;MinRank=accu_in.CurrentRank;RankFrom=accu_in.CurrentRank;Rank=0}, accu_in.Tab); - accu_out_select = red<<node intArray__select, const + accu_out_select = red<<node intArray::select, const 10>>(Select_accu{RankToFind=accu_in.CurrentRank;CurrentRank=0;Val=0}, accu_in.Tab); - (accu_out_exchange, localTab) = fillred<<node intArray__Exchange_i_j, + (accu_out_exchange, localTab) = fillred<<node intArray::Exchange_i_j, const 10>>(Exchange_accu{MinVal=accu_out_min.MinVal;MinRank=accu_out_min.MinRank;RankFrom=accu_out_select.RankToFind;CurrentVal=accu_out_select.Val;Rank=0}, accu_in.Tab); accu_out = Sort_accu{CurrentRank=(accu_in.CurrentRank + 1);Tab=localTab}; tel --- end of node intArray__UnarySort -node intArray__sort_(array:int^10) returns (arraySorted:int^10); +-- end of node intArray::UnarySort +node intArray::sort_(array:int^10) returns (arraySorted:int^10); var UnarySort_accu_out:intArray::Sort_accu {CurrentRank : int; Tab : int^10}; let - UnarySort_accu_out = red<<node intArray__UnarySort, const + UnarySort_accu_out = red<<node intArray::UnarySort, const 10>>(Sort_accu{CurrentRank=0;Tab=array}, array); arraySorted = UnarySort_accu_out.Tab; tel --- end of node intArray__sort_ -node intArray__selectMax(e1:int; e2:int) returns (e:int); +-- 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 -node intArray__getMaximumIn_(array:int^10) returns (maximumElement:int); +-- end of node intArray::selectMax +node intArray::getMaximumIn_(array:int^10) returns (maximumElement:int); let - maximumElement = red<<node intArray__selectMax, const 10>>(array[0], + maximumElement = red<<node intArray::selectMax, const 10>>(array[0], array); tel --- end of node intArray__getMaximumIn_ -type intArray__iteratedStruct = intArray::iteratedStruct {currentRank : int; rankToSelect : int; elementSelected : int}; +-- end of node intArray::getMaximumIn_ +type intArray::iteratedStruct = intArray::iteratedStruct {currentRank : int; rankToSelect : int; elementSelected : int}; -node intArray__selectOneStage( +node intArray::selectOneStage( acc_in:intArray::iteratedStruct {currentRank : int; rankToSelect : int; elementSelected : int}; @@ -8831,9 +8831,9 @@ let ((acc_in.currentRank = acc_in.rankToSelect)) then (currentElt) else (acc_in.elementSelected)}; tel --- end of node intArray__selectOneStage +-- end of node intArray::selectOneStage -node intArray__selectElementOfRank_inArray_( +node intArray::selectElementOfRank_inArray_( rankToSelect:int; array:int^10) returns ( @@ -8841,29 +8841,29 @@ returns ( var iterationResult:intArray::iteratedStruct {currentRank : int; rankToSelect : int; elementSelected : int}; let - iterationResult = red<<node intArray__selectOneStage, const + iterationResult = red<<node intArray::selectOneStage, const 10>>(iteratedStruct{currentRank=0;rankToSelect=rankToSelect;elementSelected=array[0]}, array); elementSelected = iterationResult.elementSelected; tel --- end of node intArray__selectElementOfRank_inArray_ -node intArray__selectMin(e1:int; e2:int) returns (e:int); +-- 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 -node intArray__getMinimumIn_(array:int^10) returns (minimumElement:int); +-- end of node intArray::selectMin +node intArray::getMinimumIn_(array:int^10) returns (minimumElement:int); var maximum:int; let - maximum = intArray__getMaximumIn_(array); - minimumElement = red<<node intArray__selectMin, const 10>>(maximum, + maximum = intArray::getMaximumIn_(array); + minimumElement = red<<node intArray::selectMin, const 10>>(maximum, array); tel --- end of node intArray__getMinimumIn_ -type intArray__currentRank_withMemorizedRank = intArray::currentRank_withMemorizedRank {currentRank : int; rankOfMemorizedVal : int; memorizedVal : int}; +-- end of node intArray::getMinimumIn_ +type intArray::currentRank_withMemorizedRank = intArray::currentRank_withMemorizedRank {currentRank : int; rankOfMemorizedVal : int; memorizedVal : int}; -node intArray__selectMaxRank( +node intArray::selectMaxRank( acc_in:intArray::currentRank_withMemorizedRank {currentRank : int; rankOfMemorizedVal : int; memorizedVal : int}; @@ -8874,28 +8874,28 @@ returns ( memorizedVal : int}); let acc_out = currentRank_withMemorizedRank{currentRank=(acc_in.currentRank + - 1);rankOfMemorizedVal= if (intArray___isGreaterThan_(e1, + 1);rankOfMemorizedVal= if (intArray::_isGreaterThan_(e1, acc_in.memorizedVal)) then (acc_in.currentRank) else - (acc_in.rankOfMemorizedVal);memorizedVal= if (intArray___isGreaterThan_(e1, + (acc_in.rankOfMemorizedVal);memorizedVal= if (intArray::_isGreaterThan_(e1, acc_in.memorizedVal)) then (e1) else (acc_in.memorizedVal)}; tel --- end of node intArray__selectMaxRank +-- end of node intArray::selectMaxRank -node intArray__getRank_ofMaximumIn_( +node intArray::getRank_ofMaximumIn_( array:int^10) returns ( rankOfMaximumElement:int); var local:intArray::currentRank_withMemorizedRank {currentRank : int; rankOfMemorizedVal : int; memorizedVal : int}; let - local = red<<node intArray__selectMaxRank, const + local = red<<node intArray::selectMaxRank, const 10>>(currentRank_withMemorizedRank{currentRank=0;rankOfMemorizedVal=0;memorizedVal=array[0]}, array); rankOfMaximumElement = local.rankOfMemorizedVal; tel --- end of node intArray__getRank_ofMaximumIn_ +-- end of node intArray::getRank_ofMaximumIn_ -node intArray__selectMinRank( +node intArray::selectMinRank( acc_in:intArray::currentRank_withMemorizedRank {currentRank : int; rankOfMemorizedVal : int; memorizedVal : int}; @@ -8906,27 +8906,27 @@ returns ( memorizedVal : int}); let acc_out = currentRank_withMemorizedRank{currentRank=(acc_in.currentRank + - 1);rankOfMemorizedVal= if (intArray___isEqualTo_(acc_in.memorizedVal, elt)) + 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 +-- end of node intArray::selectMinRank -node intArray__getRank_ofMinimumIn_( +node intArray::getRank_ofMinimumIn_( array:int^10) returns ( rankOfMinimumElement:int); var minElement:int; let - minElement = intArray__getMinimumIn_(array); - rankOfMinimumElement = red<<node intArray__selectMinRank, const + minElement = intArray::getMinimumIn_(array); + rankOfMinimumElement = red<<node intArray::selectMinRank, const 10>>(currentRank_withMemorizedRank{currentRank=0;rankOfMemorizedVal=0;memorizedVal=minElement}, array).rankOfMemorizedVal; tel --- end of node intArray__getRank_ofMinimumIn_ +-- end of node intArray::getRank_ofMinimumIn_ -node main__main( +node main::main( a:int^10) returns ( tri:int^10; @@ -8935,27 +8935,27 @@ 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 +-- end of node main::main ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/contractForElementSelectionInArray/noeudsIndependants.lus Opening file /home/jahier/lus2lic/src/test/should_work/packEnvTest/contractForElementSelectionInArray/noeudsIndependants.lus -node noeudsIndependants__equals(a:int; b:int) returns (r:bool); +node noeudsIndependants::equals(a:int; b:int) returns (r:bool); let r = (a = b); tel --- end of node noeudsIndependants__equals -node noeudsIndependants__gt(a:int; b:int) returns (r:bool); +-- end of node noeudsIndependants::equals +node noeudsIndependants::gt(a:int; b:int) returns (r:bool); let r = (a > b); tel --- end of node noeudsIndependants__gt +-- end of node noeudsIndependants::gt ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/contractForElementSelectionInArray/packageTableau.lus @@ -8965,15 +8965,15 @@ Error. No package has been provided ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/contractForElementSelectionInArray/tri.lus Opening file /home/jahier/lus2lic/src/test/should_work/packEnvTest/contractForElementSelectionInArray/tri.lus -const tri__size = 10; -type tri__INTSIZE = int^10; -type tri__Sort_accu = tri::Sort_accu {CurrentRank : int; Tab : int^10}; -type tri__Select_accu = tri::Select_accu {RankToFind : int; CurrentRank : int; Val : int}; -type tri__MinFR_accu = tri::MinFR_accu {MinVal : int; MinRank : int; RankFrom : int; Rank : int}; -type tri__sorted_iter_accu = tri::sorted_iter_accu {prev_elt : int; prop_is_tt : bool}; -type tri__Exchange_accu = tri::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; - -node tri__minFromRank( +const tri::size = 10; +type tri::INTSIZE = int^10; +type tri::Sort_accu = tri::Sort_accu {CurrentRank : int; Tab : int^10}; +type tri::Select_accu = tri::Select_accu {RankToFind : int; CurrentRank : int; Val : int}; +type tri::MinFR_accu = tri::MinFR_accu {MinVal : int; MinRank : int; RankFrom : int; Rank : int}; +type tri::sorted_iter_accu = tri::sorted_iter_accu {prev_elt : int; prop_is_tt : bool}; +type tri::Exchange_accu = tri::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; + +node tri::minFromRank( accu_in:tri::MinFR_accu {MinVal : int; MinRank : int; RankFrom : int; @@ -8992,9 +8992,9 @@ let ((TabEltIn < accu_in.MinVal)) then (accu_in.Rank) else (accu_in.MinRank)) else (accu_in.MinRank);RankFrom=accu_in.RankFrom;Rank=(accu_in.Rank + 1)}; tel --- end of node tri__minFromRank +-- end of node tri::minFromRank -node tri__select( +node tri::select( accu_in:tri::Select_accu {RankToFind : int; CurrentRank : int; Val : int}; @@ -9009,9 +9009,9 @@ let + 1);Val= if ((accu_in.RankToFind = accu_in.CurrentRank)) then (elt) else (accu_in.Val)}; tel --- end of node tri__select +-- end of node tri::select -node tri__Exchange_i_j( +node tri::Exchange_i_j( accu_in:tri::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; @@ -9033,9 +9033,9 @@ let else ( if ((accu_in.Rank = accu_in.RankFrom)) then (accu_in.MinVal) else (eltIn)); tel --- end of node tri__Exchange_i_j +-- end of node tri::Exchange_i_j -node tri__UnarySort( +node tri::UnarySort( accu_in:tri::Sort_accu {CurrentRank : int; Tab : int^10}; eltIn:int) @@ -9048,30 +9048,30 @@ var accu_out_exchange:tri::Exchange_accu {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}; localTab:int^10; let - accu_out_min = red<<node tri__minFromRank, const + accu_out_min = red<<node tri::minFromRank, const 10>>(MinFR_accu{MinVal=0;MinRank=accu_in.CurrentRank;RankFrom=accu_in.CurrentRank;Rank=0}, accu_in.Tab); - accu_out_select = red<<node tri__select, const + accu_out_select = red<<node tri::select, const 10>>(Select_accu{RankToFind=accu_in.CurrentRank;CurrentRank=0;Val=0}, accu_in.Tab); - (accu_out_exchange, localTab) = fillred<<node tri__Exchange_i_j, const + (accu_out_exchange, localTab) = fillred<<node tri::Exchange_i_j, const 10>>(Exchange_accu{MinVal=accu_out_min.MinVal;MinRank=accu_out_min.MinRank;RankFrom=accu_out_select.RankToFind;CurrentVal=accu_out_select.Val;Rank=0}, accu_in.Tab); accu_out = Sort_accu{CurrentRank=(accu_in.CurrentRank + 1);Tab=localTab}; tel --- end of node tri__UnarySort -node tri__main(TIn:int^10) returns (TSorted:int^10); +-- end of node tri::UnarySort +node tri::main(TIn:int^10) returns (TSorted:int^10); var UnarySort_accu_out:tri::Sort_accu {CurrentRank : int; Tab : int^10}; let - UnarySort_accu_out = red<<node tri__UnarySort, const + UnarySort_accu_out = red<<node tri::UnarySort, const 10>>(Sort_accu{CurrentRank=0;Tab=[7, 8, 4, 3, 2, 9, 1, 10, 2, 7]}, [7, 8, 4, 3, 2, 9, 1, 10, 2, 7]); TSorted = UnarySort_accu_out.Tab; tel --- end of node tri__main +-- end of node tri::main -node tri__sorted_iter( +node tri::sorted_iter( accu_in:tri::sorted_iter_accu {prev_elt : int; prop_is_tt : bool}; elt:int) @@ -9082,43 +9082,43 @@ let accu_out = sorted_iter_accu{prev_elt=elt;prop_is_tt=((accu_in.prev_elt <= elt) and accu_in.prop_is_tt)}; tel --- end of node tri__sorted_iter -node tri__Sorted(TIn:int^10) returns (res:bool); +-- end of node tri::sorted_iter +node tri::Sorted(TIn:int^10) returns (res:bool); var accu_out:tri::sorted_iter_accu {prev_elt : int; prop_is_tt : bool}; TSorted:int^10; let - TSorted = tri__main(TIn); - accu_out = red<<node tri__sorted_iter, const + TSorted = tri::main(TIn); + accu_out = red<<node tri::sorted_iter, const 10>>(sorted_iter_accu{prev_elt=0;prop_is_tt=true}, TSorted); res = accu_out.prop_is_tt; tel --- end of node tri__Sorted +-- end of node tri::Sorted ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/modelInst.lus Opening file /home/jahier/lus2lic/src/test/should_work/packEnvTest/modelInst.lus -type Pint__t = int; -node Pint__n(init:int; in:int) returns (ok:int); +type Pint::t = int; +node Pint::n(init:int; in:int) returns (ok:int); let ok = init -> pre(in); tel --- end of node Pint__n -type Preal__t = real; -node Preal__n(init:real; in:real) returns (ok:real); +-- end of node Pint::n +type Preal::t = real; +node Preal::n(init:real; in:real) returns (ok:real); let ok = init -> pre(in); tel --- end of node Preal__n -type Pbool__t = bool; -node Pbool__n(init:bool; in:bool) returns (ok:bool); +-- end of node Preal::n +type Pbool::t = bool; +node Pbool::n(init:bool; in:bool) returns (ok:bool); let ok = init -> pre(in); tel --- end of node Pbool__n -const main__pi = 3.141590; +-- end of node Pbool::n +const main::pi = 3.141590; -node main__main( +node main::main( i:int; ray:real) returns ( @@ -9126,36 +9126,36 @@ returns ( obool:bool; oreal:real); let - oint = Pint__n(0, i); - obool = Pbool__n(true, (i < 50)); - oreal = Preal__n(0., 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 +-- end of node main::main ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/packages.lus Opening file /home/jahier/lus2lic/src/test/should_work/packEnvTest/packages.lus -type preal__t = real; -node preal__fby1(init:real; fb:real) returns (next:real); +type preal::t = real; +node preal::fby1(init:real; fb:real) returns (next:real); let next = init -> pre(fb); tel --- end of node preal__fby1 -type pbool__t = bool; -node pbool__fby1(init:bool; fb:bool) returns (next:bool); +-- end of node preal::fby1 +type pbool::t = bool; +node pbool::fby1(init:bool; fb:bool) returns (next:bool); let next = init -> pre(fb); tel --- end of node pbool__fby1 -type pint__t = int; -node pint__fby1(init:int; fb:int) returns (next:int); +-- end of node pbool::fby1 +type pint::t = int; +node pint::fby1(init:int; fb:int) returns (next:int); let next = init -> pre(fb); tel --- end of node pint__fby1 -type inter__selType = inter::selType {i : int; b : bool; r : real}; +-- end of node pint::fby1 +type inter::selType = inter::selType {i : int; b : bool; r : real}; -node inter__preced( +node inter::preced( in:inter::selType {i : int; b : bool; r : real}) @@ -9168,45 +9168,45 @@ returns ( r : real}); let out2 = selType{i=0;b=true;r=0.}; - out. = pint__fby1(out2.i, in.i); - out. = pbool__fby1(out2.b, in.b); - out. = preal__fby1(out2.r, in.r); + out. = pint::fby1(out2.i, in.i); + out. = pbool::fby1(out2.b, in.b); + out. = preal::fby1(out2.r, in.r); tel --- end of node inter__preced -node mainPack__preced(in:inter__selType) returns (out:inter__selType); +-- end of node inter::preced +node mainPack::preced(in:inter::selType) returns (out:inter::selType); var - out2:inter__selType; + out2:inter::selType; let - (out, out2) = inter__preced(in); + (out, out2) = inter::preced(in); tel --- end of node mainPack__preced -const inter__n = -4; +-- end of node mainPack::preced +const inter::n = -4; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/packages2.lus Opening file /home/jahier/lus2lic/src/test/should_work/packEnvTest/packages2.lus -type preal__t = real; -node preal__fby1(init:real; fb:real) returns (next:real); +type preal::t = real; +node preal::fby1(init:real; fb:real) returns (next:real); let next = init -> pre(fb); tel --- end of node preal__fby1 -type pbool__t = bool; -node pbool__fby1(init:bool; fb:bool) returns (next:bool); +-- end of node preal::fby1 +type pbool::t = bool; +node pbool::fby1(init:bool; fb:bool) returns (next:bool); let next = init -> pre(fb); tel --- end of node pbool__fby1 -type pint__t = int; -node pint__fby1(init:int; fb:int) returns (next:int); +-- end of node pbool::fby1 +type pint::t = int; +node pint::fby1(init:int; fb:int) returns (next:int); let next = init -> pre(fb); tel --- end of node pint__fby1 -type inter__selType = inter::selType {i : int; b : bool; r : real}; -const inter__n = -4; +-- end of node pint::fby1 +type inter::selType = inter::selType {i : int; b : bool; r : real}; +const inter::n = -4; -node inter__preced( +node inter::preced( in:inter::selType {i : int; b : bool; r : real}) @@ -9219,59 +9219,59 @@ returns ( r : real}); let out2 = selType{i=0;b=true;r=0.}; - out. = pint__fby1(out2.i, in.i); - out. = pbool__fby1(out2.b, in.b); - out. = preal__fby1(out2.r, in.r); + out. = pint::fby1(out2.i, in.i); + out. = pbool::fby1(out2.b, in.b); + out. = preal::fby1(out2.r, in.r); tel --- end of node inter__preced -node main__foo(in:int) returns (out:int); +-- end of node inter::preced +node main::foo(in:int) returns (out:int); let out = in; tel --- end of node main__foo +-- end of node main::foo ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_work/to_sort_out/asservi.lus Opening file /home/jahier/lus2lic/src/test/should_work/to_sort_out/asservi.lus -type asservi__pendule; -const asservi__G = 10.000000; -const asservi__L = 2.000000; -const asservi__T = 0.100000; -node asservi__D(x:real) returns (d:real); +type asservi::pendule; +const asservi::G = 10.000000; +const asservi::L = 2.000000; +const asservi::T = 0.100000; +node asservi::D(x:real) returns (d:real); let d = 0.0 -> ((x - pre(x)) / T); tel --- end of node asservi__D -extern function asservi__sin(x:real) returns (y:real); -extern function asservi__cos(x:real) returns (y:real); -node asservi__I(dx:real) returns (x:real); +-- end of node asservi::D +extern function asservi::sin(x:real) returns (y:real); +extern function asservi::cos(x:real) returns (y:real); +node asservi::I(dx:real) returns (x:real); let x = 0.0 -> pre(((T * dx) + x)); tel --- end of node asservi__I -node asservi__I2(d2x:real) returns (x:real); +-- end of node asservi::I +node asservi::I2(d2x:real) returns (x:real); var dx:real; let - dx = asservi__I(d2x); + 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); +-- end of node asservi::I2 +node asservi::PEND(d2x0:real; d2y0:real) returns (teta:real); let - teta = asservi__I2((((asservi__sin(teta) * (d2y0 + G)) - - (asservi__cos(teta) * d2x0)) / L)); + teta = asservi::I2((((asservi::sin(teta) * (d2y0 + G)) - + (asservi::cos(teta) * d2x0)) / L)); tel --- end of node asservi__PEND +-- end of node asservi::PEND -extern function asservi__make_pend( +extern function asservi::make_pend( x0:real; y0:real; x:real; y:real) returns ( - p:asservi__pendule); -node asservi__jeu(x0:real; y0:real) returns (p:asservi__pendule); + p:asservi::pendule); +node asservi::jeu(x0:real; y0:real) returns (p:asservi::pendule); var d2x0:real; d2y0:real; @@ -9279,16 +9279,16 @@ var x:real; y:real; let - 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); + 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); -node asservi__asservi(delta:real) returns (p:asservi__pendule); +-- end of node asservi::jeu +extern function asservi::sqrt(x:real) returns (y:real); +node asservi::asservi(delta:real) returns (p:asservi::pendule); var d2x0:real; d2y0:real; @@ -9299,41 +9299,41 @@ var y:real; let d2y0 = 0.0; - 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 + 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 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/clock/clock.lus Opening file /home/jahier/lus2lic/src/test/should_fail/clock/clock.lus -extern node clock__clock2(u:bool; v:bool when u) returns (y:bool); -extern node clock__clock3(u:bool) returns (x:bool; y:bool when x); +extern node clock::clock2(u:bool; v:bool when u) returns (y:bool); +extern node clock::clock3(u:bool) returns (x:bool; y:bool when x); -extern node clock__clock4( +extern node clock::clock4( u:bool; v:bool when u) returns ( x:bool; y:bool when x); -node clock__clock(a:bool; b:bool) returns (c:bool; d:bool when c); +node clock::clock(a:bool; b:bool) returns (c:bool; d:bool when c); var z:bool; x:bool when z; y:bool when x; let - y = clock__clock2(a, b when a) when x; - (z, x) = clock__clock3(z); - (c, d) = clock__clock4(a, b when c); + y = clock::clock2(a, b when a) when x; + (z, x) = clock::clock3(z); + (c, d) = clock::clock4(a, b when c); tel --- end of node clock__clock +-- end of node clock::clock ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/clock/inonout.lus @@ -9347,50 +9347,50 @@ Opening file /home/jahier/lus2lic/src/test/should_fail/clock/inonout.lus ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/activation1.lus Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/activation1.lus -node activation1__up(in:int) returns (out:int); +node activation1::up(in:int) returns (out:int); let out = (pre(in) + 1); tel --- end of node activation1__up -node activation1__down(in:int) returns (out:int); +-- end of node activation1::up +node activation1::down(in:int) returns (out:int); let out = (pre(in) - 1); tel --- end of node activation1__down -node activation1__activation1(evt:bool; reset:bool) returns (scie:int); +-- end of node activation1::down +node activation1::activation1(evt:bool; reset:bool) returns (scie:int); var go_up:bool; 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__up(scie)) else (activation1__down(scie))); + (activation1::up(scie)) else (activation1::down(scie))); tel --- end of node activation1__activation1 +-- end of node activation1::activation1 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/activation2.lus Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/activation2.lus -node activation2__up(in:int) returns (out:int); +node activation2::up(in:int) returns (out:int); let out = (pre(in) + 1); tel --- end of node activation2__up -node activation2__down(in:int) returns (out:int); +-- end of node activation2::up +node activation2::down(in:int) returns (out:int); let out = (pre(in) - 1); tel --- end of node activation2__down -node activation2__activation2(evt:bool) returns (scie:int); +-- end of node activation2::down +node activation2::activation2(evt:bool) returns (scie:int); var go_up:bool; 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__up(scie)) else - (activation2__down(scie))) 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 +-- end of node activation2::activation2 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/bad_call01.lus @@ -9402,18 +9402,18 @@ Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/bad_call01.lus ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/bad_call03.lus Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/bad_call03.lus -function bad_call03__toto(i1:o^3; i2:o^3) returns (o:o^3); +function bad_call03::toto(i1:o^3; i2:o^3) returns (o:o^3); let - o = Lustre__map<<node Lustre__+, const 3>>(i1, i2); + o = Lustre::map<<node Lustre::+, const 3>>(i1, i2); tel --- end of node bad_call03__toto -node bad_call03__titi(c:real^3; d:real^3) returns (y:real^3); +-- end of node bad_call03::toto +node bad_call03::titi(c:real^3; d:real^3) returns (y:real^3); let - y = bad_call03__toto(c, d); + y = bad_call03::toto(c, d); tel --- end of node bad_call03__titi +-- end of node bad_call03::titi -node bad_call03__bad_call03( +node bad_call03::bad_call03( a:int^3; b:int^3; c:real^3; @@ -9422,21 +9422,21 @@ returns ( x:int^3; y:real^3); let - x = bad_call03__toto(a, b); - y = bad_call03__toto(c, d); + x = bad_call03::toto(a, b); + y = bad_call03::toto(c, d); tel --- end of node bad_call03__bad_call03 +-- end of node bad_call03::bad_call03 ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/bug.lus Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/bug.lus -type bug__tab1 = int^2; -type bug__tab2 = int^3^4; -type bug__tab3 = int^5^6^7; -const bug__ze_const_int = 5; -type bug__bool4 = bool^5; -type bug__really = real; -node bug__bidon(in:bool) returns (out1:bool; out2:bool); +type bug::tab1 = int^2; +type bug::tab2 = int^3^4; +type bug::tab3 = int^5^6^7; +const bug::ze_const_int = 5; +type bug::bool4 = bool^5; +type bug::really = real; +node bug::bidon(in:bool) returns (out1:bool; out2:bool); var toto:int^2; let @@ -9445,43 +9445,43 @@ let out1 = (true or (in and (toto[0] < 20))); out2 = (false and in); tel --- end of node bug__bidon -node bug__edge_detect(in:bool) returns (edge:bool); +-- end of node bug::bidon +node bug::edge_detect(in:bool) returns (edge:bool); var bidon1:bool; bidon2:bool; let edge = false -> ((in and not(pre(in))) or (bidon2 and bidon1)); - (bidon1, bidon2) = bug__bidon(in); + (bidon1, bidon2) = bug::bidon(in); tel --- end of node bug__edge_detect -node bug__after(X:bool) returns (afterX:bool); +-- end of node bug::edge_detect +node bug::after(X:bool) returns (afterX:bool); var bidon1:bool; bidon2:bool; let afterX = false -> (pre((X or afterX)) or (bidon2 and bidon1)); - (bidon1, bidon2) = bug__bidon(X); + (bidon1, bidon2) = bug::bidon(X); tel --- end of node bug__after -node bug__once_since(C:bool; A:bool) returns (X:bool); +-- 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__after(A)) then ((C or false -> + 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 -node bug__implies(X:bool; Y:bool) returns (XimpliesY:bool); +-- end of node bug::once_since +node bug::implies(X:bool; Y:bool) returns (XimpliesY:bool); let XimpliesY = (not(X) or Y); tel --- end of node bug__implies -node bug__once_from_to(C:bool; A:bool; B:bool) returns (X:bool); +-- end of node bug::implies +node bug::once_from_to(C:bool; A:bool; B:bool) returns (X:bool); let - X = bug__implies(B, false -> pre(bug__once_since(C, A))); + X = bug::implies(B, false -> pre(bug::once_since(C, A))); tel --- end of node bug__once_from_to +-- end of node bug::once_from_to -node bug__bug( +node bug::bug( active:bool; action:bool; intI:int; @@ -9496,15 +9496,15 @@ var x:int; y:int; let - begin = active -> bug__edge_detect(active); - en = bug__edge_detect(not(active)); - alarm = not(bug__once_from_to(action, 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)); y = 1 -> if (active) then ((pre(y) + 1)) else (x); tel --- end of node bug__bug +-- end of node bug::bug ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/const.lus @@ -9515,19 +9515,19 @@ Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/const.lus ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/const2.lus Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/const2.lus -type const2__t1 = int; -const const2__M = 3; -type const2__t2 = int^3; -const const2__P = 2; -const const2__N = 6; -type const2__t3 = int^3^6; -const const2__O = 3; -type const2__t4 = int^3^6^3; -type const2__t5 = int^3^6^3^2; -const const2__c10 = 12; -type const2__t6 = int^3^6^3^2^12; -type const2__t7 = int^3^6^3^2^12^3; -type const2__t8 = int^3^6^3^2^12^3^3; +type const2::t1 = int; +const const2::M = 3; +type const2::t2 = int^3; +const const2::P = 2; +const const2::N = 6; +type const2::t3 = int^3^6; +const const2::O = 3; +type const2::t4 = int^3^6^3; +type const2::t5 = int^3^6^3^2; +const const2::c10 = 12; +type const2::t6 = int^3^6^3^2^12; +type const2::t7 = int^3^6^3^2^12^3; +type const2::t8 = int^3^6^3^2^12^3^3; *** Error in file "should_fail/semantics/const2.lus", line 4, col 24 to 25, token '->': *** can't eval constant: The construct -> is not allowed in static expression @@ -9535,7 +9535,7 @@ type const2__t8 = int^3^6^3^2^12^3^3; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/cpt_dc.lus Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/cpt_dc.lus -node cpt_dc__cpt_dc(evt:bool; reset:bool) returns (cpt:int); +node cpt_dc::cpt_dc(evt:bool; reset:bool) returns (cpt:int); var _f3:bool; _f4:int; @@ -9545,14 +9545,14 @@ let cpt = if (reset) then (0) else (( if (_f3) then (0) else (_f4) + if (evt) then (1) else (0))); tel --- end of node cpt_dc__cpt_dc +-- end of node cpt_dc::cpt_dc ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/def.lus Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/def.lus -type def__int4 = int^4; -type def__st = def::st {x : int^4}; -node def__def(a:bool) returns (b:def::st {x : int^4}); +type def::int4 = int^4; +type def::st = def::st {x : int^4}; +node def::def(a:bool) returns (b:def::st {x : int^4}); var c:def::st {x : int^4}; let @@ -9565,7 +9565,7 @@ let c.[2] = b.x[2]; c.[3] = b.x[3]; tel --- end of node def__def +-- end of node def::def ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/import2.lus @@ -9588,33 +9588,33 @@ Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/not_a_constant. ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/piege.lus Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/piege.lus -node piege__aux2(in1:bool; in2:bool) returns (out1:bool; out2:bool); +node piege::aux2(in1:bool; in2:bool) returns (out1:bool; out2:bool); let out1 = true -> pre(in1); out2 = in2; tel --- end of node piege__aux2 -node piege__aux1(in1:bool; in2:bool) returns (out:bool); +-- end of node piege::aux2 +node piege::aux1(in1:bool; in2:bool) returns (out:bool); let out = (in1 or true -> pre(in2)); tel --- end of node piege__aux1 -node piege__piege(in:bool) returns (out:bool); +-- end of node piege::aux1 +node piege::piege(in:bool) returns (out:bool); let - out = (in and piege__aux1(piege__aux2(out, out))); + out = (in and piege::aux1(piege::aux2(out, out))); tel --- end of node piege__piege +-- end of node piege::piege ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/tranche.lus Opening file /home/jahier/lus2lic/src/test/should_fail/semantics/tranche.lus -type tranche__t2 = bool^7^8^9^10; -type tranche__t = bool^3^4; +type tranche::t2 = bool^7^8^9^10; +type tranche::t = bool^3^4; *** Error in file "should_fail/semantics/tranche.lus", line 7, col 6 to 6, token 'n': *** can't eval constant: *** cannot access this abstract constant value -const tranche__n:bool^3^4; +const tranche::n:bool^3^4; ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/x.lus @@ -9641,22 +9641,22 @@ Opening file /home/jahier/lus2lic/src/test/should_fail/type/Gyro.lus ---------------------------------------------------------------------- ====> ../lus2lic -vl 2 --compile-all-items should_fail/type/const2.lus Opening file /home/jahier/lus2lic/src/test/should_fail/type/const2.lus -type const2__t1 = int; -const const2__c1 = 2; -const const2__M = 3; -type const2__t2 = int^3; -const const2__N = 7; -type const2__t3 = int^3^7; -const const2__c2 = true; -const const2__c7 = true; -const const2__O = 8; -type const2__t4 = int^3^7^8; -const const2__P = 9; -type const2__t5 = int^3^7^8^9; -const const2__c10 = 3; -type const2__t6 = int^3^7^8^9^3; -type const2__t7 = int^3^7^8^9^3^8; -type const2__t8 = int^3^7^8^9^3^8^8; +type const2::t1 = int; +const const2::c1 = 2; +const const2::M = 3; +type const2::t2 = int^3; +const const2::N = 7; +type const2::t3 = int^3^7; +const const2::c2 = true; +const const2::c7 = true; +const const2::O = 8; +type const2::t4 = int^3^7^8; +const const2::P = 9; +type const2::t5 = int^3^7^8^9; +const const2::c10 = 3; +type const2::t6 = int^3^7^8^9^3; +type const2::t7 = int^3^7^8^9^3^8; +type const2::t8 = int^3^7^8^9^3^8^8; *** Error in file "should_fail/type/const2.lus", line 16, col 12 to 13, token '<>': type error: *** type 'int*real' was provided whereas *** type 'a*a' was expected