diff --git a/src/TODO b/src/TODO index 1dcbc58a43f99d3dfe19de2031624e4225f56202..301a2b3163f0d829d8f8806bc38e5fe54ec8af3d 100644 --- a/src/TODO +++ b/src/TODO @@ -1,7 +1,6 @@ *** questions -* getEff.ml ligne 50: Can imported nodes have static arguments? * dans le generateur de lic, comment imprimer le nom des packages ? - Pack::toto -> pas du vieux lustre (donc pas reentrant) @@ -38,17 +37,15 @@ le package principal est implicite. Autorise-t'on ce genre de m * mettre pre, current, when, etc. dans predef ? -* dans le cas des constantes statiquement evaluable j'ai defini -">" et consort comme étant polymorphe, parce que c'est +* dans le cas des constantes statiquement evaluables j'ai defini +">" et consort comme étant polymorphes, parce que c'est facile en caml. Mais est-ce une bonne idée ? -* Here/NotHere -> à renommer ? - * le mot cled "struct" est optionel devant une definition de structure -> est-ce vraiment une bonne idée ? -* Ident.idref : a remettre dans SyntaxTree ? en tout cas, je devrait -m'en etre completement deberassé au niveau du compiledData, et ca +* Ident.idref : a remettre dans SyntaxTree ? en tout cas, je devrais +m'en etre completement debarassé au niveau du compiledData, et ca n'est pas le cas pour l'instant... * slice_info_eff width = size ? Le commentaire dit @@ -75,12 +72,17 @@ par exemple, pour les comparaisons, c'est ok les operateurs aritmetiques, bof. * pour l'evaluation statique de l'egalité, j'ai pas fait pareil... --> à discuter (cfpredefInfo.ml) +-> à discuter (cf predefInfo.ml) *********************************************************************************** *** a faire +* lus2lic -n MainPack::preceed should_work/packEnvTest/packages.lus + +leve une exception au lieu d'une zoulie erreur +(le package s'appelle mainPack en fait, pas MainPack!)... + * Quand les constantes enum sont crées, ne devraient-elles pas être créées comme étant des constantes externes ? diff --git a/src/expandPack.ml b/src/expandPack.ml index 4d0408d6953bdc12babf4770a87a5ff18b988951..beac0479291e08948e36d37a1403b945eb66648c 100644 --- a/src/expandPack.ml +++ b/src/expandPack.ml @@ -52,9 +52,8 @@ let (doit: match (p.it) with | StaticParamType s -> ( let te = match (a.it) with - StaticArgIdent idr -> ( + StaticArgIdent idr -> Lxm.flagit (Named_type_exp idr) a.src - ) | StaticArgType x -> x | _ -> instance_error () in @@ -85,9 +84,10 @@ let (doit: | StaticArgNode x -> Lxm.flagit x a.src | _ -> instance_error () in + let sparams = [] in let ni = { name = s; - static_params = None; + static_params = sparams; vars = Some (ParserUtils.build_node_var inl outl None); def = Alias ne; has_mem = has_memory; @@ -98,9 +98,10 @@ let (doit: newprov := x::!newprov ; let y = Lxm.flagit ni p.src in put_in_tab "node" otab s y ; - newdefs := (NodeItem s)::!newdefs + newdefs := (NodeItem (s,sparams))::!newdefs ) - ) in + ) (* check_arg *) + in try ( (*------------TRAITEMENT---------------------------------*) List.iter2 check_arg pars args ; diff --git a/src/getEff.ml b/src/getEff.ml index 383e09ffdb74a8bcf43203e9d7799d4602766f5a..c57a9d9509a5586b27b704da2afe8fde2338f789 100644 --- a/src/getEff.ml +++ b/src/getEff.ml @@ -43,18 +43,9 @@ let (get_static_params_from_idref : SymbolTab.t -> Lxm.t -> Ident.idref -> static_param srcflagged list) = fun symbols lxm idref -> match SymbolTab.find_node symbols (Ident.name_of_idref idref) lxm with - | SymbolTab.Here ni -> ( - match ni.it.static_params with - | None -> [] (* should I raise an error here? *) - | Some sp -> sp - ) - | SymbolTab.NotHere imported_node -> - (* XXX Can imported nodes have static arguments?*) -(* [] *) - finish_me ((Lxm.details lxm) ^ - ": imported node "^(Ident.string_of_long imported_node)^ - " in static args"); - assert false + | SymbolTab.Local ni -> ni.it.static_params + | SymbolTab.Imported(imported_node, params) -> params + (* exported *) let rec (node : CompiledData.id_solver -> SyntaxTreeCore.node_exp srcflagged -> diff --git a/src/lazyCompiler.ml b/src/lazyCompiler.ml index be8d4cadcf284780f0d8fc9409a635bcbba9e339..ef402df376aad9846b00cd92b24059d0454c16fe 100644 --- a/src/lazyCompiler.ml +++ b/src/lazyCompiler.ml @@ -159,8 +159,8 @@ let x_check let (x_pack,xn) = (pack_of_x_key x_key, name_of_x_key x_key) in let x_pack_symbols = SyntaxTab.pack_body_env this.src_tab x_pack in let x_def = match find_x x_pack_symbols xn lxm with - | SymbolTab.Here x_def -> x_def - | SymbolTab.NotHere lid -> + | SymbolTab.Local x_def -> x_def + | SymbolTab.Imported (lid,_) -> print_string ("*** " ^ (Ident.string_of_long lid) ^ "???\n" ^ (Lxm.details lxm)); assert false (* should not occur *) @@ -184,8 +184,8 @@ let x_check_interface package is exported. *) | Some xp_prov_symbols -> let x_def = match find_x xp_prov_symbols xn lxm with - | SymbolTab.Here x -> x - | SymbolTab.NotHere _ -> assert false (* should not occur *) + | SymbolTab.Local x -> x + | SymbolTab.Imported _ -> assert false (* should not occur *) in x_check_interface_do this x_key lxm xp_prov_symbols xp x_def in @@ -226,8 +226,8 @@ let solve_x_idref (* no pack name: we look it up in the symbols table *) try match (find_x symbols s lxm) with - | SymbolTab.Here _ -> x_check this (to_x_key currpack s) lxm - | SymbolTab.NotHere fid -> + | SymbolTab.Local _ -> x_check this (to_x_key currpack s) lxm + | SymbolTab.Imported(fid,params) -> x_check_interface this (to_x_key (Ident.pack_of_long fid) (Ident.of_long fid)) lxm @@ -267,7 +267,7 @@ and (const_check_interface: t -> Ident.long -> Lxm.t -> CompiledData.const_eff) and (solve_type_idref : t -> SymbolTab.t -> Ident.pack_name -> Ident.idref -> Lxm.t -> CompiledData.type_eff) = fun this symbols currpack idr lxm -> - solve_x_idref + solve_x_idref type_check_interface type_check SymbolTab.find_type "type" (fun p id -> Ident.make_long p id) this symbols currpack idr [] lxm @@ -661,13 +661,13 @@ compile all items let compile_all_item this label x_check_interface string_of_x_key string_of_x_eff to_key id item_def = match item_def with - | SymbolTab.Here _item_def -> + | SymbolTab.Local _item_def -> ignore (x_check_interface this (to_key id) (Lxm.dummy "compile all items")) (* Printf.printf "\t\t%s %s = %s\n" *) (* label (string_of_x_key (to_key id)) (string_of_x_eff x_eff) *) - | SymbolTab.NotHere item_def -> () + | SymbolTab.Imported(item_def,_) -> () (* Printf.printf "\t\t%s %s = %s (imported)\n" *) (* label (string_of_x_key (to_key id)) (Ident.string_of_long item_def) *) @@ -681,27 +681,21 @@ let compile_all_constants pack_name this = string_of_const_eff (fun id -> Ident.make_long pack_name id) -let (get_static_params : (node_info Lxm.srcflagged) SymbolTab.hereflagged -> - static_param srcflagged list option) = +let (get_static_params : (node_info Lxm.srcflagged) SymbolTab.elt -> + static_param srcflagged list) = fun node_info_flagged -> match node_info_flagged with - | SymbolTab.Here nif -> - (match nif.it.static_params with - | None -> None - | Some [] -> None - | Some sp -> Some sp - ) - | SymbolTab.NotHere id -> - None (* do not test imported node. there will be tested anyway *) + | SymbolTab.Local nif -> nif.it.static_params + | SymbolTab.Imported(id,sparams) -> sparams let compile_all_nodes pack_name this id ni_f = - match get_static_params ni_f with - | Some sp -> () (* we need static arg to compile such kind of things *) - | None -> - compile_all_item this "node" node_check_interface - (CompiledDataDump.string_of_node_key) - profile_of_node_exp_eff - (fun id -> (Ident.make_long pack_name id, [])) id ni_f + let sp = get_static_params ni_f in + if sp <> [] then () (* we need static arg to compile such kind of things *) + else + compile_all_item this "node" node_check_interface + (CompiledDataDump.string_of_node_key) + profile_of_node_exp_eff + (fun id -> (Ident.make_long pack_name id, [])) id ni_f let (compile_all :t -> unit) = diff --git a/src/parser.mly b/src/parser.mly index 478bcdc5f3f83057fac5b8649b2859ee6986c778..5d4539d44e2227a8d2dbbed3217b07cdeae7179a 100644 --- a/src/parser.mly +++ b/src/parser.mly @@ -223,7 +223,7 @@ let (treat_node_decl : bool -> Lxm.t -> static_param srcflagged list -> let nstr = Lxm.id nlxm in let ninfo = { name = nstr; - static_params = Some statics; + static_params = statics; vars = Some vars; def = Body { asserts = asserts ; eqs = eqs }; has_mem = has_memory; @@ -231,7 +231,7 @@ let (treat_node_decl : bool -> Lxm.t -> static_param srcflagged list -> } in add_info node_table "node" nlxm ninfo; - def_list := (NodeItem nstr) :: !def_list + def_list := (NodeItem (nstr,statics)) :: !def_list (**********************************************************************************) @@ -247,7 +247,7 @@ let (treat_node_alias : bool -> Lxm.t -> static_param srcflagged list -> in let ninfo = { name = nstr; - static_params = Some statics; + static_params = statics; vars = vars; def = Alias value; has_mem = has_memory; @@ -255,7 +255,7 @@ let (treat_node_alias : bool -> Lxm.t -> static_param srcflagged list -> } in add_info node_table "(alias) node" nlxm ninfo; - def_list := (NodeItem nstr) :: !def_list + def_list := (NodeItem (nstr,statics)) :: !def_list @@ -271,7 +271,7 @@ let treat_abstract_or_extern_node_do (* cf the profile of [treat_abstract_node] let vars = build_node_var invars outvars None in let xn = { name = Lxm.id lxm; - static_params = None; + static_params = []; vars = Some vars; def = if is_abstract then Abstract else Extern; has_mem = has_memory; @@ -301,8 +301,9 @@ let (treat_external_node : bool -> Lxm.t -> treat_abstract_or_extern_node_do (* external nodes look like abstract nodes indeed *) has_memory ext_nodelxm inpars outpars false in + let statics = [] in (* no static args for external node (for now at least) *) add_info node_table "(extern) node" ext_nodelxm ninfo ; - def_list := (NodeItem (Lxm.id ext_nodelxm)) :: !def_list + def_list := (NodeItem (Lxm.id (ext_nodelxm),statics)) :: !def_list (**********************************************************************************) diff --git a/src/symbolTab.ml b/src/symbolTab.ml index 255a2684e8725f0f2f5152a3eeaeca616263a4b1..a7b75b74e39ae9499a8db79e5043029c273e75a8 100644 --- a/src/symbolTab.ml +++ b/src/symbolTab.ml @@ -8,14 +8,14 @@ open SyntaxTree open SyntaxTreeCore open Errors -type 'a hereflagged = - Here of 'a -| NotHere of Ident.long +type 'a elt = + | Local of 'a + | Imported of Ident.long * static_param srcflagged list type t = { - st_consts: (Ident.t , (const_info srcflagged) hereflagged) Hashtbl.t ; - st_types : (Ident.t , (type_info srcflagged) hereflagged) Hashtbl.t ; - st_nodes : (Ident.t , (node_info srcflagged) hereflagged) Hashtbl.t ; + st_consts: (Ident.t , (const_info srcflagged) elt) Hashtbl.t ; + st_types : (Ident.t , (type_info srcflagged) elt) Hashtbl.t ; + st_nodes : (Ident.t , (node_info srcflagged) elt) Hashtbl.t ; } (* Création/initialisation d'une symbol_tab *) @@ -56,19 +56,20 @@ let find_node (this: t) (id: Ident.t) lxm = (* Manip de SymbolTab.t *) let add_import_const (this: t) (id: Ident.t) (aid: Ident.long) = - Hashtbl.replace (this.st_consts) id (NotHere aid) + Hashtbl.replace (this.st_consts) id (Imported (aid, [])) let add_import_type (this: t) (id: Ident.t) (aid: Ident.long) = - Hashtbl.replace (this.st_types) id (NotHere aid) + Hashtbl.replace (this.st_types) id (Imported (aid, [])) -let add_import_node (this: t) (id: Ident.t) (aid: Ident.long) = - Hashtbl.replace (this.st_nodes) id (NotHere aid) +let add_import_node (this: t) (id: Ident.t) (aid: Ident.long) + (params:static_param srcflagged list) = + Hashtbl.replace (this.st_nodes) id (Imported (aid, params)) let add_const (this: t) (n: Ident.t) (cix: const_info srcflagged) = - Hashtbl.replace this.st_consts n (Here cix) + Hashtbl.replace this.st_consts n (Local cix) let add_type (this: t) (n: Ident.t) (tix: type_info srcflagged) = ( - Hashtbl.replace this.st_types n (Here tix) ; + Hashtbl.replace this.st_types n (Local tix) ; (* cas particulier des types enums *) match tix.it with EnumType (_, ecl) -> ( @@ -85,7 +86,7 @@ let add_type (this: t) (n: Ident.t) (tix: type_info srcflagged) = ( ) let add_node (this: t) (n: Ident.t) (oix: node_info srcflagged) = - Hashtbl.add this.st_nodes n (Here oix) + Hashtbl.add this.st_nodes n (Local oix) let iter_types this f = ( Hashtbl.iter f this.st_types) diff --git a/src/symbolTab.mli b/src/symbolTab.mli index cc24eba4fb2d9163d8496bac83a1297c1402bfcb..c0be6d0f1f38bb5e88cfcde96a87032715726131 100644 --- a/src/symbolTab.mli +++ b/src/symbolTab.mli @@ -13,10 +13,16 @@ qui sont par d ***********************************************************) open SyntaxTreeCore +open Lxm -type 'a hereflagged = - Here of 'a (* local items *) - | NotHere of Ident.long (* imported items *) +(** Symbol table elements. + +Note that the list of static params does not make sens for types +and consts (Well, maybe it could for types?). +*) +type 'a elt = + | Local of 'a + | Imported of Ident.long * static_param srcflagged list type t @@ -25,14 +31,15 @@ val create : unit -> t (* Manip de SymbolTab.t *) (* Raise a proper compil error message if not found *) -val find_type : t -> Ident.t -> Lxm.t -> (type_info Lxm.srcflagged) hereflagged -val find_const : t -> Ident.t -> Lxm.t -> (const_info Lxm.srcflagged) hereflagged -val find_node : t -> Ident.t -> Lxm.t -> (node_info Lxm.srcflagged) hereflagged +val find_type : t -> Ident.t -> Lxm.t -> (type_info Lxm.srcflagged) elt +val find_const : t -> Ident.t -> Lxm.t -> (const_info Lxm.srcflagged) elt +val find_node : t -> Ident.t -> Lxm.t -> (node_info Lxm.srcflagged) elt (* Ajout de nom d'item importés (via uses) *) val add_import_const : t -> Ident.t -> Ident.long -> unit val add_import_type : t -> Ident.t -> Ident.long -> unit -val add_import_node : t -> Ident.t -> Ident.long -> unit +val add_import_node : t -> Ident.t -> Ident.long -> + static_param srcflagged list -> unit (** Add local items declaration *) val add_type : t -> Ident.t -> type_info Lxm.srcflagged -> unit @@ -41,12 +48,9 @@ val add_node : t -> Ident.t -> node_info Lxm.srcflagged -> unit (* Itérer sur les items *) -val iter_types : - t -> (Ident.t -> (type_info Lxm.srcflagged) hereflagged -> unit) -> unit -val iter_consts : - t -> (Ident.t -> (const_info Lxm.srcflagged) hereflagged -> unit) -> unit -val iter_nodes : - t -> (Ident.t -> (node_info Lxm.srcflagged) hereflagged -> unit) -> unit +val iter_types: t -> (Ident.t -> (type_info Lxm.srcflagged) elt -> unit) -> unit +val iter_consts: t ->(Ident.t -> (const_info Lxm.srcflagged) elt-> unit) -> unit +val iter_nodes : t ->(Ident.t -> (node_info Lxm.srcflagged) elt -> unit) -> unit diff --git a/src/syntaxTab.ml b/src/syntaxTab.ml index 084689bfd09d032e13224d4362150375d7aef741..77e256a43df97441648f8377090473d9ada38d90 100644 --- a/src/syntaxTab.ml +++ b/src/syntaxTab.ml @@ -159,7 +159,7 @@ let init_user_items (this: pack_mng) = ( let export_node (s: Ident.t) (xoi: SyntaxTreeCore.node_info srcflagged) = Verbose.printf " export node %s\n" (Ident.to_string s); put_in_tab "node" this.pm_user_items - (NodeItem s) + (NodeItem (s,xoi.it.static_params)) (Lxm.flagit (Ident.make_long pname s) xoi.src) in @@ -303,37 +303,36 @@ init_pack_mng_stabs (this: t) (pname: Ident.pack_name) (pm: pack_mng) = ( let treat_uses px = ( let pname = px.it in let lxm = px.src in - let pum = try ( - Hashtbl.find this.st_pack_mng_tab pname - ) with Not_found -> ( - raise(Compile_error(lxm, "unknown package")) - ) in + let pum = + try Hashtbl.find this.st_pack_mng_tab pname + with Not_found -> raise(Compile_error(lxm, "unknown package")) + in let fill_used_item (ii: SyntaxTreeCore.item_ident) (iks: Ident.long Lxm.srcflagged) = - ( - match ii with - | ConstItem n -> ( - SymbolTab.add_import_const pm.pm_body_stab n iks.it; - match pm.pm_provide_stab with - Some pt -> SymbolTab.add_import_const pt n iks.it - | None -> () - ) - | TypeItem n -> ( - SymbolTab.add_import_type pm.pm_body_stab n iks.it; - match pm.pm_provide_stab with - Some pt -> SymbolTab.add_import_type pt n iks.it - | None -> () - ) - | NodeItem n -> ( - SymbolTab.add_import_node pm.pm_body_stab n iks.it; - match pm.pm_provide_stab with - Some pt -> SymbolTab.add_import_node pt n iks.it - | None -> () - ) - ) in + (match ii with + | ConstItem n -> ( + SymbolTab.add_import_const pm.pm_body_stab n iks.it; + match pm.pm_provide_stab with + Some pt -> SymbolTab.add_import_const pt n iks.it + | None -> () + ) + | TypeItem n -> ( + SymbolTab.add_import_type pm.pm_body_stab n iks.it; + match pm.pm_provide_stab with + Some pt -> SymbolTab.add_import_type pt n iks.it + | None -> () + ) + | NodeItem (n,sparams) -> ( + SymbolTab.add_import_node pm.pm_body_stab n iks.it sparams; + match pm.pm_provide_stab with + Some pt -> SymbolTab.add_import_node pt n iks.it sparams + | None -> () + ) + ) + in Hashtbl.iter fill_used_item pum.pm_user_items - ) + ) in List.iter treat_uses pg.pg_uses ; diff --git a/src/syntaxTreeCore.ml b/src/syntaxTreeCore.ml index f0fb579fb167af37b400eb33ab1be78b4be52006..3c33819e28f9cfa82096716b899e44e314525520 100644 --- a/src/syntaxTreeCore.ml +++ b/src/syntaxTreeCore.ml @@ -9,7 +9,7 @@ open Lxm (**********************************************************************************) type clock_exp = | BaseClock - | NamedClock of Ident.t srcflagged + | NamedClock of Ident.t (* XXX should be Ident.idref !!!*) srcflagged (**********************************************************************************) (** [type_exp] is used to type flow, parameters, constants. *) @@ -25,7 +25,7 @@ and and node_info = { name : Ident.t; - static_params : static_param srcflagged list option; + static_params : static_param srcflagged list; vars : node_vars option; (* aliased node may have no i/o decl *) def : node_def; has_mem : bool; @@ -184,7 +184,7 @@ type type_info = type item_ident = | ConstItem of Ident.t | TypeItem of Ident.t - | NodeItem of Ident.t + | NodeItem of Ident.t * static_param srcflagged list type item_info = ConstInfo of const_info diff --git a/src/syntaxTreeDump.ml b/src/syntaxTreeDump.ml index a46d3b03de33cf1f8c7a728f83b3d063b27a5790..67cdb0e9f3a71cb71ac5fc8ec5c42274d496d03c 100644 --- a/src/syntaxTreeDump.ml +++ b/src/syntaxTreeDump.ml @@ -43,9 +43,12 @@ let rec packbody (os: Format.formatter) (pkg: SyntaxTree.packbody) = (match d with | ConstItem id -> dump_const os (Hashtbl.find pkg.pk_const_table id) | TypeItem id -> dump_type os (Hashtbl.find pkg.pk_type_table id) - | NodeItem id -> + | NodeItem (id,sparams) -> let {src = lxm ; it = ninfo } = Hashtbl.find pkg.pk_node_table id in - dump_node os {src = lxm ; it = ninfo } + dump_node os {src = lxm ; it = ninfo }; + fprintf os " <<@\n" ; + fprintf os "@[<b 3>@ %a@]@\n" dump_static_param_list sparams; + fprintf os ">>\n" ); Format.fprintf os "@\n" ) @@ -54,7 +57,7 @@ let rec packbody (os: Format.formatter) (pkg: SyntaxTree.packbody) = (match d with ConstItem id | TypeItem id - | NodeItem id -> Ident.to_string id + | NodeItem (id,_) -> Ident.to_string id ) ); flush stdout; @@ -208,13 +211,9 @@ and dump_node (os: Format.formatter) (x: node_info srcflagged) = ( fprintf os "-- %s" (Lxm.details lxm) ; fprintf os " (node definition)@\n" ; fprintf os "node %s" (Ident.to_string ninfo.name); - (match ninfo.static_params with - | None -> () - | Some static_params -> - fprintf os " <<@\n" ; - fprintf os "@[<b 3>@ %a@]@\n" dump_static_param_list static_params; - fprintf os ">>\n" - ); + fprintf os " <<@\n" ; + fprintf os "@[<b 3>@ %a@]@\n" dump_static_param_list ninfo.static_params; + fprintf os ">>\n"; (match ninfo.vars with | None -> () | Some { diff --git a/src/test/should_work/packEnvTest/packages.lus b/src/test/should_work/packEnvTest/packages.lus index 9089714e878f0edfb5357533b70c15c137ac42a5..b4d7e63786a9cdd82d6bcaf338900fac0595e9d2 100644 --- a/src/test/should_work/packEnvTest/packages.lus +++ b/src/test/should_work/packEnvTest/packages.lus @@ -70,8 +70,8 @@ body -- node preced(in: bool) returns (out: bool); node preced(in: inter::selType) returns (out: inter::selType); - var out2 : inter::selType; - let + var out2 : inter::selType; + let out, out2 = inter::preced( in ); tel end diff --git a/src/test/test.res.exp b/src/test/test.res.exp index c00d3ed1af49dd20369c878e01bd97a5be2c6955..8647ff45187926bc84a1e2fd3da7f6561217653d 100644 --- a/src/test/test.res.exp +++ b/src/test/test.res.exp @@ -10328,14 +10328,31 @@ tel Exported types: Exported constants: Exported nodes: +*** Error in file "should_work/packEnvTest/packages.lus", line 75, col 27 to 27, token '=': type mismatch: + the left-hand side is of type inter__selType whereas + the rigth-hand side is of type {i : int; b : bool; r : real} + type inter__selType = {i : int; b : bool; r : real}; type inter__selType; - XXX getEff.ml: - XXX in file "should_work/packEnvTest/packages.lus", line 53, col 13 to 22, token 'pint::fby1': imported node preal::fby1 in static args -> finish me! - -*** oops: an internal error occurred in file getEff.ml, line 57, column 3 -*** when compiling lustre program should_work/packEnvTest/packages.lus +node inter__preced( + in: {i : int; + b : bool; + r : real}) +returns ( + out: {i : int; + b : bool; + r : real}; + out2: {i : int; + b : bool; + r : real}); +let + out2 = xxx todo ; + 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 ---------------------------------------------------------------------- ====> ../lus2lic -vl 3 --compile-all-items should_work/packEnvTest/packages2.lus @@ -10424,11 +10441,33 @@ const inter__n:int; const inter__n = -4; Exported nodes: - XXX getEff.ml: - XXX in file "should_work/packEnvTest/packages2.lus", line 55, col 11 to 20, token 'pint::fby1': imported node preal::fby1 in static args -> finish me! - -*** oops: an internal error occurred in file getEff.ml, line 57, column 3 -*** when compiling lustre program should_work/packEnvTest/packages2.lus +node inter__preced( + in: {i : int; + b : bool; + r : real}) +returns ( + out: {i : int; + b : bool; + r : real}; + out2: {i : int; + b : bool; + r : real}); +let + out2 = xxx todo ; + 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 + * package main + Exported types: + Exported constants: + Exported nodes: +node main__foo(in:int) returns (out:int); +let + out = in; +tel +-- end of node main__foo ---------------------------------------------------------------------- ====> ../lus2lic -vl 3 --compile-all-items should_work/to_sort_out/asservi.lus