diff --git a/src/TODO b/src/TODO index a8cb90f7a94602577241d967e920f332b94b309b..36b117dcbe2d2e8306427d17d8bee3c257e7e819 100644 --- a/src/TODO +++ b/src/TODO @@ -34,6 +34,22 @@ implicite. Autorise-t'on ce genre de truc ? * verifier que chacun des exemples du repertoire "should_fail" à une correspondance dans le manuel, et reciproquement... +* Que ce soit pour les types, les constantes, ou les noeuds, il est +possible syntaxiquement de ne pas leur donner de definition. + +Pour les noeuds, si cela arrive + - dans la partie "provide", cela correspond à un item abtrait + - dans la partie "body", cela correspond à un item externe + +pour les types et les constantes, le meme objet syntaxique est généré +par le parseur (ExternalConst et ExternalType). + +Mais pour les noeuds, il y en a 2 : ExtNone et AbstractNode. + +Il faudrait faire quelque chose, + - soit rajouter un AbstractConst et un AbstractType + - soit merger ExtNone et AbstractNode + *********************************************************************************** *** a faire diff --git a/src/compiledData.ml b/src/compiledData.ml index 74ad2fb2791f0313df15fe7436757ebefaf5400e..51d3f24353d054a2d27116e71cba3305b57dc828 100644 --- a/src/compiledData.ml +++ b/src/compiledData.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 06/03/2008 (at 16:54) by Erwan Jahier> *) +(** Time-stamp: <modified the 10/03/2008 (at 17:55) by Erwan Jahier> *) (** @@ -253,7 +253,7 @@ Type : user_node_half_eff correspond à un noeud half-checked : on conserve simplement la node_info (on pourra sophistiquer plus tard) ----------------------------------------------------------------------*) -and user_node_half_eff = SyntaxTreeCore.user_node_info srcflagged +and user_node_half_eff = SyntaxTreeCore.node_info srcflagged (*--------------------------------------------------------------------- Type : user_node_eff ----------------------------------------------------------------------- @@ -266,6 +266,7 @@ Type : user_node_eff (et pas du clock-checking) ----------------------------------------------------------------------*) + and user_node_eff = { nf_key : node_key ; nf_in_types : type_eff list ; @@ -305,7 +306,7 @@ Type : node_eff ou comme définition de noeud (alias). Union entre opérateur prédéfini, user_ext_node_eff et user_node_eff ----------------------------------------------------------------------*) -and node_eff = +and node_eff = | PredefEff of by_pos_op | ExtNodeEff of ext_node_eff | UserNodeEff of user_node_eff diff --git a/src/evalNode.ml b/src/evalNode.ml index 1f3e3cbc9f6202d2a18546639df19ca126047443..5117278ff4e4eeafa23a533f890978fb1fe3dcb5 100644 --- a/src/evalNode.ml +++ b/src/evalNode.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 06/03/2008 (at 18:02) by Erwan Jahier> *) +(** Time-stamp: <modified the 10/03/2008 (at 17:39) by Erwan Jahier> *) open Lxm @@ -14,9 +14,9 @@ let (get_static_params_from_idref : SymbolTab.t -> Lxm.t -> Ident.idref -> fun symbols lxm idref -> match SymbolTab.find_node symbols (Ident.name_of_idref idref) lxm with | SymbolTab.Here ni -> ( - match ni.it with - | Node n -> n.uni_static_params - | ExtNode _ -> [] (* currently, ext nodes cannot have static params *) + match ni.it.static_params with + | None -> [] (* should I raise en error here? *) + | Some sp -> sp ) | SymbolTab.NotHere imported_node -> finish_me "imported node in static args"; diff --git a/src/expandPack.ml b/src/expandPack.ml index 79048e0de86992e6169a592c492b202a722a8f70..2d137e21a98272d7b11d4e88f0bbc3b74ae905e4 100644 --- a/src/expandPack.ml +++ b/src/expandPack.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 06/03/2008 (at 15:15) by Erwan Jahier> *) +(** Time-stamp: <modified the 10/03/2008 (at 17:35) by Erwan Jahier> *) open Lxm open SyntaxTree @@ -67,11 +67,9 @@ let (doit: ) | StaticParamConst (s,te) -> ( let ce = match (a.it) with - StaticArgIdent idr -> ( + | StaticArgIdent idr -> SyntaxTreeCore.leafexp a.src (IDENT_n idr) - ) - | - StaticArgConst x -> x + | StaticArgConst x -> x | _ -> instance_error () in let ci = DefinedConst (s, Some te, ce) in @@ -81,21 +79,22 @@ let (doit: put_in_tab "const" ctab s y ; newdefs := (ConstItem s)::!newdefs ) - | StaticParamNode (s,inl,outl,has_memory) -> ( + | StaticParamNode (s, inl, outl, has_memory) -> ( let ne = match (a.it) with - StaticArgIdent idr -> ( - Lxm.flagit ((idr,[])) a.src - ) + | StaticArgIdent idr -> Lxm.flagit ((idr,[])) a.src | StaticArgNode x -> Lxm.flagit x a.src | _ -> instance_error () in - let ni = Node { - uni_name = s; - uni_static_params = [] ; - uni_def = NodeAlias (Some(inl,outl), ne) ; - uni_has_mem = has_memory; - uni_is_safe = true; - } in + let ni = { + name = s; + static_params = None; + vars = Some (ParserUtils.build_node_var inl outl None); + alias = Some ne; + body = None; + has_mem = has_memory; + is_safe = true; + } + in let x = Lxm.flagit (NodeInfo ni) p.src in newprov := x::!newprov ; let y = Lxm.flagit ni p.src in diff --git a/src/lazyCompiler.ml b/src/lazyCompiler.ml index 6db9a091e6e7b1c96eae5736660c640acab601b5..efaf5c240a6002832c39f636371152b4984fa8de 100644 --- a/src/lazyCompiler.ml +++ b/src/lazyCompiler.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 06/03/2008 (at 18:09) by Erwan Jahier> *) +(** Time-stamp: <modified the 11/03/2008 (at 11:04) by Erwan Jahier> *) open Lxm @@ -504,67 +504,100 @@ and (node_check_do: t -> CompiledData.node_key -> Lxm.t -> SymbolTab.t -> with Not_found -> solve_node_idref this symbols pack_name id sargs lxm); } in - let make_user_node_eff itl otl hm = - UserNodeEff { - nf_key = nk; - nf_in_types = itl; - nf_out_types = otl; - nf_in_formal_clocks = []; (* XXX finish me! *) - nf_out_formal_clocks = []; (* XXX finish me! *) - nf_asserts = []; (* XXX finish me! *) - nf_eqs = []; (* XXX finish me! *) - nf_has_memory = hm; - } - in - match node_def.it with - | Node n -> - (match n.uni_def with - | NodeAlias (profile_opt, node_alias) - -> - let res = EvalNode.f node_id_solver symbols node_alias in - (* check that the declared profile matched with the result *) - (match profile_opt with - | None -> () - | Some (vi_il, vi_ol) -> - let aux vi = EvalType.f node_id_solver vi.it.va_type in - let (il,ol) = CompiledData.profile_of_node_eff res in - if - List.map aux vi_il <> il - || List.map aux vi_ol <> ol - then - raise (Compile_error ( - lxm, "type mismatch in the node alias definition")) - (* that error msg could be more precise *) - ); - res - - | NodeAbstract(vi_il, vi_ol) -> - let aux vi = EvalType.f node_id_solver vi.it.va_type in - make_user_node_eff - (List.map aux vi_il) (List.map aux vi_ol) n.uni_has_mem - - | NodeBody nb -> - let type_args id = - let vi = Hashtbl.find nb.nbdy_vartable id in - EvalType.f node_id_solver vi.it.va_type - in - make_user_node_eff - (List.map type_args nb.nbdy_inlist) - (List.map type_args nb.nbdy_outlist) - n.uni_has_mem - ) - | ExtNode en -> - let type_args (_,texp) = EvalType.f node_id_solver texp in - ExtNodeEff { - fe_name = en.eni_name; - fe_in_types =(List.map type_args en.eni_inputs); - fe_out_types = (List.map type_args en.eni_outputs); - fe_has_memory = en.eni_has_mem; - } - - - - + match node_def.it.body, node_def.it.alias with + | None, None -> ( + (* bodyless node that are not alias are abstract or extern; + they may have a profile + + XXX do we compile in the same way ? + XXX add a flag or something to distinguish extern and abstract nodes? + *) + match node_def.it.vars with + | None -> + finish_me " abstract or extern node without profile"; + assert false + | Some vars -> + let vi_il, vi_ol = + List.map (fun id -> Hashtbl.find vars.vartable id) vars.inlist, + List.map (fun id -> Hashtbl.find vars.vartable id) vars.outlist + in + let aux vi = EvalType.f node_id_solver vi.it.var_type in + let type_args id = + let vi = Hashtbl.find vars.vartable id in + EvalType.f node_id_solver vi.it.var_type + in +(* make_user_node_eff *) +(* (List.map aux vi_il) *) +(* (List.map aux vi_ol) *) +(* node_def.it.has_mem; *) + + +(* ExtNodeEff { *) +(* fe_name = en.eni_name; *) +(* fe_in_types =(List.map type_args en.eni_inputs); *) +(* fe_out_types = (List.map type_args en.eni_outputs); *) +(* fe_has_memory = en.eni_has_mem; *) +(* } *) + + UserNodeEff { + nf_key = nk; + nf_in_types = List.map type_args vars.inlist; + nf_out_types = List.map type_args vars.outlist; + nf_in_formal_clocks = []; (* XXX finish me! *) + nf_out_formal_clocks = []; (* XXX finish me! *) + nf_asserts = []; (* XXX finish me! *) + nf_eqs = []; (* List.map type_eq nb.eqs; *) + nf_has_memory = node_def.it.has_mem; + } + ) + | None, Some node_alias -> ( + let res = EvalNode.f node_id_solver symbols node_alias in + match node_def.it.vars with + | None -> res + | Some vars -> + (* check that the declared profile matched with the result *) + let vi_il, vi_ol = + List.map (fun id -> Hashtbl.find vars.vartable id) vars.inlist, + List.map (fun id -> Hashtbl.find vars.vartable id) vars.outlist + in + let aux vi = EvalType.f node_id_solver vi.it.var_type in + let (il,ol) = CompiledData.profile_of_node_eff res in + if + List.map aux vi_il <> il + || List.map aux vi_ol <> ol + then + raise (Compile_error ( + lxm, "type mismatch in the node alias definition")) + (* that error msg could be more precise *) + else + res + ) + | Some _, Some _ -> assert false + (* we cannot have a body and an alias...*) + + | Some nb, None -> ( + match node_def.it.vars with + | None -> assert false (* a node with a body have a profile *) + | Some vars -> + let type_args id = + let vi = Hashtbl.find vars.vartable id in + EvalType.f node_id_solver vi.it.var_type + in + let (type_eq : eq_info srcflagged -> eq_eff) = + fun eq_info -> + finish_me "with with body compilation"; assert false + in + UserNodeEff { + nf_key = nk; + nf_in_types = List.map type_args vars.inlist; + nf_out_types = List.map type_args vars.outlist; + nf_in_formal_clocks = []; (* XXX finish me! *) + nf_out_formal_clocks = []; (* XXX finish me! *) + nf_asserts = []; (* XXX finish me! *) + nf_eqs = []; (* List.map type_eq nb.eqs; *) + nf_has_memory = node_def.it.has_mem; + } + ) (** builds and node_key and calls [node_check] *) and (solve_node_idref : t -> SymbolTab.t -> Ident.pack_name -> Ident.idref -> @@ -630,12 +663,10 @@ let (get_static_params : (node_info Lxm.srcflagged) SymbolTab.hereflagged -> fun node_info_flagged -> match node_info_flagged with | SymbolTab.Here nif -> - (match nif.it with - | Node ni -> - if ni.uni_static_params = [] - then None - else Some ni.uni_static_params - | ExtNode eni -> None (* XXX it should be possible to have some! *) + (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 *) diff --git a/src/parser.mly b/src/parser.mly index 89a7c63e4b0cb9adeb01e1046096fea1ed06a285..1c196e4f813050ab8cd7ccbd3ce86e81b3321cb1 100644 --- a/src/parser.mly +++ b/src/parser.mly @@ -2,33 +2,66 @@ open Lxm open SyntaxTree open SyntaxTreeCore +open ParserUtils -(* les var locales pour ranger les resultat intermédaire *) -let const_table = Hashtbl.create 50 -let type_table = Hashtbl.create 50 -let node_table = Hashtbl.create 50 -let def_list = ref [] +(**********************************************************************************) (* Interface avec SyntaxTree *) - -let idref_of_lxm lxm = ( - try ( - Lxm.flagit (Ident.idref_of_string (Lxm.str lxm)) lxm - ) with _ -> +let idref_of_lxm lxm = + try Lxm.flagit (Ident.idref_of_string (Lxm.str lxm)) lxm + with _ -> print_string ("Parser.idref_of_lxm" ^(Lxm.str lxm)); assert false - ) - -(*--------------------------------------------------------------------- -Traitement des listes d'idents avec valeur éventuelle -(constantes, champs de struct etc...) +(**********************************************************************************) +(** add_info ----------------------------------------------------------------------- -----------------------------------------------------------------------*) -(* Liste de lexemes -> liste de string srcflagged *) +Rôle : + proc générique pour mettre une info 'a dans + une table (Ident.t, 'a srcflagged). + +Effets de bord : + erreur de compil si déjà utilisé +*) +let (add_info : (Ident.t, 'a srcflagged) Hashtbl.t -> + string -> (* une string en cas d'erreur *) + Lxm.t -> (* le lexeme en question *) + 'a -> (* l'info en question *) + unit) = + fun htbl kindof lxm info -> + try + let x = Hashtbl.find htbl (Lxm.id lxm) in + raise ( + Errors.Compile_error ( + lxm, + Printf.sprintf "bad %s declaration, ident already linked at %s" kindof + (Lxm.position x.src) + ) + ) + with Not_found -> + Hashtbl.add htbl (Lxm.id lxm) { src = lxm ; it = info } + -let (lexeme_to_ident_flagged:Lxm.t -> Ident.t Lxm.srcflagged) = +(**********************************************************************************) +(* local tables used to store (via [add_info], see above) intermediary results + + Most of the function below (treat_<something>) returns unit but modifies + one or several of those tables. +*) + +let (const_table:(Ident.t, const_info srcflagged) Hashtbl.t) = Hashtbl.create 50 +let (type_table :(Ident.t, type_info srcflagged) Hashtbl.t) = Hashtbl.create 50 +let (node_table :(Ident.t, node_info srcflagged) Hashtbl.t) = Hashtbl.create 50 +let (def_list : item_ident list ref) = ref [] + + +(**********************************************************************************) +(** Traitement des listes d'idents avec valeur éventuelle + (constantes, champs de struct etc...) +*) + +let (lexeme_to_ident_flagged: Lxm.t -> Ident.t Lxm.srcflagged) = fun x -> {it = (Lxm.id x); src = x } let (lexeme_to_pack_name_flagged:Lxm.t -> Ident.pack_name Lxm.srcflagged) = @@ -40,137 +73,87 @@ type id_valopt = (Lxm.t * type_exp * val_exp option) (* Pas de valeur : le type distribue sur une liste d'ident *) let id_valopt_list_of_id_list (idlist : Lxm.t list) (texp : type_exp) = -( - let treat_id (id : Lxm.t) = (id, texp, None) - in List.map treat_id idlist -) + let treat_id (id : Lxm.t) = (id, texp, None) in + List.map treat_id idlist + (* Avec valeur : il ne doit y avoir qu'un seul ident *) -let id_valopt_of_id_val (id : Lxm.t) (texp : type_exp) (vexp : val_exp) = -( - (id, texp, Some vexp) -) - -let treat_external_const_list lst typ = ( - let f = function lxm -> ( - SyntaxTree.add_info const_table "constant" lxm (ExternalConst ((Lxm.id lxm) , typ)) ; +let id_valopt_of_id_val (id : Lxm.t) (texp : type_exp) (vexp : val_exp) = (* -> unit *) + (id, texp, Some vexp) + +let treat_external_const_list lst typ = (* -> unit *) + let f = function lxm -> + add_info const_table "constant" lxm (ExternalConst ((Lxm.id lxm) , typ)); def_list := (ConstItem (Lxm.id lxm)) :: !def_list - ) in List.iter f lst -) + in + List.iter f lst + -let treat_defined_const lxm typ exp = ( - SyntaxTree.add_info const_table "constant" lxm (DefinedConst ((Lxm.id lxm) , typ, exp)); +let treat_defined_const lxm typ exp = (* -> unit *) + add_info const_table "constant" lxm (DefinedConst ((Lxm.id lxm) , typ, exp)); def_list := (ConstItem (Lxm.id lxm)) :: !def_list -) -let treat_external_type_list lxmlst = ( - let f = function lxm -> ( - SyntaxTree.add_info type_table "type" lxm (ExternalType (Lxm.id lxm)) ; +let treat_external_type_list lxmlst = (* -> unit *) + let f = function lxm -> + add_info type_table "type" lxm (ExternalType (Lxm.id lxm)) ; def_list := (TypeItem (Lxm.id lxm)) :: !def_list - ) in List.iter f lxmlst -) + in + List.iter f lxmlst -let treat_aliased_type lxm typexp = ( - SyntaxTree.add_info type_table "type" lxm (AliasedType ((Lxm.id lxm), typexp)); + +let treat_aliased_type lxm typexp = (* -> unit *) + add_info type_table "type" lxm (AliasedType ((Lxm.id lxm), typexp)); def_list := (TypeItem (Lxm.id lxm)) :: !def_list -) -(**********************************) -(* Traitement d'un type énuméré *) -(**********************************) +(**********************************************************************************) +(* Traitement d'un type énuméré *) let (treat_enum_type : Lxm.t -> Lxm.t list -> unit) = - fun typlxm (* le lexeme du type *) cstlxmlst (* liste des lexemes des valeurs *) -> - ( - let cstnamelist = List.map lexeme_to_ident_flagged cstlxmlst in - (* Enfin, on introduit la définition du type *) - let typstr = Lxm.id typlxm in - SyntaxTree.add_info type_table "type" typlxm (EnumType (typstr, cstnamelist)); - def_list := (TypeItem typstr) :: !def_list - ) - -(**********************************) + fun + typlxm (* le lexeme du type *) + cstlxmlst (* liste des lexemes des valeurs *) + -> + let cstnamelist = List.map lexeme_to_ident_flagged cstlxmlst in + (* Enfin, on introduit la définition du type *) + let typstr = Lxm.id typlxm in + add_info type_table "type" typlxm (EnumType (typstr, cstnamelist)); + def_list := (TypeItem typstr) :: !def_list + +(**********************************************************************************) (* Traitement d'un type structure *) -(**********************************) -let make_struct_type_info - (typlxm : Lxm.t) (* le lexeme du nom de type *) - (flexlist: id_valopt list) (* la liste des champs *) - = (* sortie: struct_type_info *) - ( +let (make_struct_type_info : Lxm.t -> id_valopt list (* la liste des champs *) -> + struct_type_info) = + fun typlxm flexlist -> (* On anticipe la construction de la table de champs *) let ftab = Hashtbl.create 50 in + let (put_in_ftab : (Lxm.t * type_exp * val_exp option) -> string) = (* Traitement d'un champ élémentaire *) - let put_in_ftab ( - (lx : Lxm.t), (* le lexeme du champ *) - (ty : type_exp), (* le type du champ *) - (va : val_exp option) (* l'eventuelle valeur *) - ) = (* sortie: string *) - ( + fun (lx, ty, va) -> (* fabrique le field_info *) let lxstr = Lxm.id lx in - let fi = { fd_name = lxstr ; fd_type = ty ; fd_value =va } in + let fi = { fd_name = lxstr ; fd_type = ty ; fd_value = va } in (* le range dans ftab *) - SyntaxTree.add_info ftab "field" lx fi ; - (* renvoie juste le nom du champs *) - lxstr - ) in - (* remplissage de ftab et recup. de la liste de noms de champ *) + add_info ftab "field" lx fi ; + lxstr (* renvoie juste le nom du champs *) + in let flst = List.map put_in_ftab flexlist in - (* construction du type_info *) - let typstr = Lxm.id typlxm in - { st_name = typstr ; st_flist = flst ; st_ftable = ftab } - ) + { st_name = Lxm.id typlxm ; st_flist = flst ; st_ftable = ftab } + +(**********************************************************************************) let treat_struct_type (typlxm : Lxm.t) (* le lexeme du nom de type *) (flexlist: id_valopt list) (* la liste des champs *) = (* sortie: unit *) - ( - let typstr = Lxm.id typlxm in - let typinfo = StructType - (make_struct_type_info typlxm flexlist) - in - (* met l'info dans la table des types *) - SyntaxTree.add_info type_table "type" typlxm typinfo ; - def_list := (TypeItem typstr) :: !def_list - ) - -(*********************************) -(* Traitement d'un noeud externe *) -(*********************************) -let treat_external_node - (has_memory : bool) - (ext_nodelxm : Lxm.t) - (inpars : ((Lxm.t list) * type_exp) list) (* liste des ins *) - (outpars : ((Lxm.t list) * type_exp) list) (* liste des outs *) - = (* sortie: unit *) - ( - (* N.B. pas de src_info pour les params formels de fonctions *) - let make_a_param - (lxm : Lxm.t) (* le lexeme du param *) - (typ : type_exp) (* le type du param *) - = (* sortie: (string option * type_exp *) - ( - ( Some((Lxm.id lxm)) , typ ) - ) in - (* fabrique la liste à plat des inputs *) - let flat_ins = ParserUtils.flat_flagged_list inpars make_a_param in - (* fabrique la liste à plat des outputs *) - let flat_outs = ParserUtils.flat_flagged_list outpars make_a_param in - (* fabrique le ext_node_info *) - let ext_nodestr = Lxm.id ext_nodelxm in - let en_info = { - eni_name = ext_nodestr; - eni_inputs = flat_ins; - eni_outputs = flat_outs; - eni_has_mem = has_memory; - eni_is_safe = true; - } in - (* range l'info correspondante dans la table des oper *) - SyntaxTree.add_info node_table "(extern) node" ext_nodelxm (ExtNode en_info) ; - def_list := (NodeItem ext_nodestr) :: !def_list - ) - - + let typstr = Lxm.id typlxm in + let typinfo = StructType + (make_struct_type_info typlxm flexlist) + in + (* met l'info dans la table des types *) + add_info type_table "type" typlxm typinfo ; + def_list := (TypeItem typstr) :: !def_list + + +(**********************************************************************************) (********************************************) (* Déclarations de vars et params de noeuds *) (********************************************) @@ -183,163 +166,151 @@ homog - clocked_ids list *) type typed_ids = (Lxm.t list * type_exp) -and clocked_ids = (typed_ids list * clock_exp) - -let rec clocked_ids_to_var_infos vnat vdefs = ( - let makevar lxm te ce = ( - Lxm.flagit - { - va_nature = vnat ; - va_name = (Lxm.id lxm) ; - va_type = te ; - va_clock = ce ; - } - lxm - ) in - ParserUtils.flat_twice_flagged_list vdefs makevar -) - -let treat_node_decl - (has_memory : bool) - (nlxm: Lxm.t) (* le lexeme du nom du noeud *) - (statics: static_param srcflagged list) - (indefs: clocked_ids list) (* descripteur des entrées *) - (outdefs: clocked_ids list) (* descripteur des sorties *) - (locdefs: clocked_ids list) (* descripteur des locales *) - (asserts: (val_exp srcflagged) list) (* liste des assserts *) - (eqs: (eq_info srcflagged) list) (* liste des equations *) - = (* sortie: unit *) - ( - (*------------------*) - (* On anticipe la création de la table de vars *) - (*------------------*) +type clocked_ids = (typed_ids list * clock_exp) + +let (clocked_ids_to_var_infos : var_nature -> + (((Lxm.t list) * type_exp) list * SyntaxTreeCore.clock_exp) list -> + var_info srcflagged list) = + fun vnat vdefs -> + let makevar lxm te ce = + Lxm.flagit + { + var_nature = vnat ; + var_name = (Lxm.id lxm) ; + var_type = te ; + var_clock = ce ; + } + lxm + in + ParserUtils.flat_twice_flagged_list vdefs makevar + + +(**********************************************************************************) +let (treat_node_decl : bool -> Lxm.t -> static_param srcflagged list -> + clocked_ids list (* entrées *) -> + clocked_ids list (* sorties *) -> + clocked_ids list (* locales *) -> + (val_exp srcflagged) list (* assserts *) -> + (eq_info srcflagged) list (* liste des equations *) -> + unit + ) = + fun has_memory nlxm statics indefs outdefs locdefs asserts eqs -> let vtable = Hashtbl.create 50 in - (*------------------*) - (* Procedure de traitement des in, out ou loc *) - (* elle est juste paramétrée par la fonction à fabriquer des var_nature *) - (*------------------*) - let rec treat_vars - (vdefs: clocked_ids list) (* la liste à traiter *) - (nat: Ident.t -> type_exp -> clock_exp -> var_info) (* la nature *) - = ( - match vdefs with - [] -> [] - | ( tids , ck ) :: reste -> ( - let put_var_in_table (lxm: Lxm.t) (ty: type_exp) = ( - let vinfo = (nat (Lxm.id lxm) ty ck) in - SyntaxTree.add_info vtable "variable" lxm vinfo ; - (Lxm.id lxm) - ) (* fin de put_var_in_table *) in - let lres = ParserUtils.flat_flagged_list tids put_var_in_table in - List.append lres (treat_vars reste nat) - ) - ) (* fin de treat_vars *) + let rec (treat_vars : clocked_ids list -> var_nature -> var_info srcflagged list) = + (* Procedure de traitement des in, out ou loc, paramétrée par la [var_nature] *) + fun vdefs nat -> + match vdefs with + | [] -> [] + | (tids, ck)::reste -> + let put_var_in_table (lxm: Lxm.t) (ty: type_exp) = + let vinfo = { + var_nature = nat; var_name = (Lxm.id lxm); + var_type = ty; var_clock = ck + } + in + add_info vtable "variable" lxm vinfo; + Lxm.flagit vinfo lxm + in + (ParserUtils.flat_flagged_list tids put_var_in_table) + @ (treat_vars reste nat) in - (* traitement des entrées *) - let make_input nm ty ck = ( - { va_nature = VarInput; va_name = nm; va_type = ty; va_clock = ck } - ) in - let innames = treat_vars indefs make_input in - (* traitement des sorties *) - let make_output nm ty ck = ( - { va_nature = VarOutput; va_name = nm; va_type = ty; va_clock = ck } - ) in - let outnames = treat_vars outdefs make_output in - (* traitement des locales *) - let make_local nm ty ck = ( - { va_nature = VarLocal; va_name = nm; va_type = ty; va_clock = ck } - ) in - let locnames = treat_vars locdefs make_local in - (* On a enfin tout pour faire un node *) - let nval = NodeBody { - nbdy_inlist = innames; - nbdy_outlist = outnames; - nbdy_loclist = locnames; - nbdy_vartable = vtable; - nbdy_asserts = asserts; - nbdy_eqs = eqs - } in + let invars = treat_vars indefs VarInput + and outvars = treat_vars outdefs VarOutput + and locvars = treat_vars locdefs VarLocal + in + let vars = build_node_var invars outvars (Some locvars) in let nstr = Lxm.id nlxm in let ninfo = { - uni_name = nstr; - uni_static_params = statics; - uni_def = nval; - uni_has_mem = has_memory; - uni_is_safe = true; - } in - (* On met le tout dans la table des oper *) - SyntaxTree.add_info node_table "(extern) node" nlxm (Node (ninfo)) ; + name = nstr; + static_params = Some statics; + vars = Some vars; + alias = None; + body = Some { asserts = asserts ; eqs = eqs }; + has_mem = has_memory; + is_safe = true; + } + in + add_info node_table "node" nlxm ninfo; + def_list := (NodeItem nstr) :: !def_list + + +(**********************************************************************************) +let (treat_node_alias : bool -> Lxm.t -> static_param srcflagged list -> + (var_info srcflagged list * var_info srcflagged list) option -> + node_exp srcflagged -> unit) = + fun has_memory nlxm statics node_profile value -> + let nstr = Lxm.id nlxm in + let vars = + match node_profile with + | None -> None + | Some (invars,outvars) -> Some (build_node_var invars outvars None) + in + let ninfo = { + name = nstr; + static_params = Some statics; + vars = vars; + alias = Some value; + body = None; + has_mem = has_memory; + is_safe = true; + } + in + add_info node_table "(alias) node" nlxm ninfo; def_list := (NodeItem nstr) :: !def_list - ) -let treat_node_alias - (has_memory : bool) - (nlxm: Lxm.t) (* le lexeme du nom du noeud *) - (statics: static_param srcflagged list) (* les params statiques formel *) - (dyn: node_profile option) (* l'eventuel profil dyn *) - (value: node_exp srcflagged) (* la valeur *) -= -( - let nstr = Lxm.id nlxm in - let ninfo = { - uni_name = nstr; - uni_static_params = statics; - uni_def = NodeAlias (dyn, value); - uni_has_mem = has_memory; - uni_is_safe = true; - } in - SyntaxTree.add_info node_table "(extern) node" nlxm (Node (ninfo)) ; - def_list := (NodeItem nstr) :: !def_list -) - -(**********************************) + + + +(**********************************************************************************) (* Traitement d'un noeud abstrait *) -(**********************************) -let treat_abstract_node - (has_memory : bool) - (lxm : Lxm.t) - (inpars : (((Lxm.t list) * type_exp) list * SyntaxTreeCore.clock_exp) list) - (outpars : (((Lxm.t list) * type_exp) list * SyntaxTreeCore.clock_exp) list) - = (* sortie: unit *) - - let invars = clocked_ids_to_var_infos VarInput inpars in - let outvars = clocked_ids_to_var_infos VarOutput outpars in - let xn = Node { - uni_name = Lxm.id lxm; - uni_static_params = []; - uni_def = NodeAbstract (invars, outvars); - uni_has_mem = has_memory; - uni_is_safe = true; - } in - Lxm.flagit - (NodeInfo xn) + +let treat_abstract_node_do (* cf the profile of [treat_abstract_node] *) + has_memory lxm inpars outpars = + let (invars, outvars : var_info srcflagged list * var_info srcflagged list) = + clocked_ids_to_var_infos VarInput inpars, + clocked_ids_to_var_infos VarOutput outpars + in + let vars = build_node_var invars outvars None in + let xn = { + name = Lxm.id lxm; + static_params = None; + vars = Some vars; + alias = None; + body = None; + has_mem = has_memory; + is_safe = true; + } + in + xn + +let (treat_abstract_node : bool -> Lxm.t -> + (((Lxm.t list) * type_exp) list * SyntaxTreeCore.clock_exp) list -> + (((Lxm.t list) * type_exp) list * SyntaxTreeCore.clock_exp) list -> + item_info Lxm.srcflagged) = + fun has_memory lxm inpars outpars -> + Lxm.flagit + (NodeInfo (treat_abstract_node_do has_memory lxm inpars outpars)) lxm -(* Pour les node proto, c'est un peu plus simple -car on ne tabule pas les variables : on garde des listes. -on les met juste "a plat" -*) -let rec flat_clocked_ids - (vdefs: clocked_ids list) (* la liste à traiter *) - (nat: Ident.t -> type_exp -> clock_exp -> var_info) (* la nature *) - = ( - match vdefs with - [] -> [] - | ( tids , ck ) :: reste -> ( - let make_var_info (lxm: Lxm.t) (ty: type_exp) = (nat (Lxm.id lxm) ty ck) in - let lres = ParserUtils.flat_flagged_list tids make_var_info in - List.append lres (flat_clocked_ids reste nat) - ) - ) -let flat_input_ids (vdefs: clocked_ids list) = ( - let make_input nm ty ck = ( - { va_nature = VarInput; va_name = nm; va_type = ty; va_clock = ck } - ) in flat_clocked_ids vdefs make_input -) -let flat_output_ids (vdefs: clocked_ids list) = ( - let make_output nm ty ck = ( - { va_nature = VarOutput; va_name = nm; va_type = ty; va_clock = ck } - ) in flat_clocked_ids vdefs make_output -) + +(**********************************************************************************) +let (treat_external_node : bool -> Lxm.t -> + (((Lxm.t list) * type_exp) list * SyntaxTreeCore.clock_exp) list -> + (((Lxm.t list) * type_exp) list * SyntaxTreeCore.clock_exp) list -> + unit + ) = + fun has_memory ext_nodelxm inpars outpars -> + let ninfo = + treat_abstract_node_do (* external nodes look like abstract nodes indeed *) + has_memory ext_nodelxm inpars outpars + in + add_info node_table "(extern) node" ext_nodelxm ninfo ; + def_list := (NodeItem (Lxm.id ext_nodelxm)) :: !def_list + + +(**********************************************************************************) +(**********************************************************************************) +(**********************************************************************************) + %} %token TK_EOF @@ -830,22 +801,13 @@ sxType: /* extern nodes */ sxExtNodeDecl: - TK_EXTERN TK_FUNCTION sxIdent sxExtNodeParam TK_RETURNS sxExtNodeParam sxOptSemicol + TK_EXTERN TK_FUNCTION sxIdent sxParams TK_RETURNS sxParams sxOptSemicol { treat_external_node false $3 (List.rev $4) (List.rev $6) } -| TK_EXTERN TK_NODE sxIdent sxExtNodeParam TK_RETURNS sxExtNodeParam sxOptSemicol +| TK_EXTERN TK_NODE sxIdent sxParams TK_RETURNS sxParams sxOptSemicol /* WARNING ! il faut remettre les listes à l'endroit */ { treat_external_node true $3 (List.rev $4) (List.rev $6) } ; - -sxExtNodeParam: TK_OPEN_PAR sxTypedIdentsList TK_CLOSE_PAR - { $2 } - | TK_OPEN_PAR sxTypedIdentsList TK_SEMICOL TK_CLOSE_PAR - { $2 } - | TK_OPEN_PAR TK_CLOSE_PAR - { [] } - ; - /* noeuds */ @@ -1369,3 +1331,4 @@ sxOptSemicol : | TK_SEMICOL {} ; + diff --git a/src/parserUtils.ml b/src/parserUtils.ml index 4300b62bfe8d3307e1c869adf888b179d09f319a..d4f597eb2b02769b3f4266918f892490ae78070f 100644 --- a/src/parserUtils.ml +++ b/src/parserUtils.ml @@ -1,6 +1,37 @@ -(** Time-stamp: <modified the 17/12/2007 (at 17:49) by Erwan Jahier> *) +(** Time-stamp: <modified the 10/03/2008 (at 17:35) by Erwan Jahier> *) + +(**********************************************************************************) + +open Lxm +open SyntaxTree +open SyntaxTreeCore + +let (build_node_var : var_info srcflagged list -> var_info srcflagged list -> + var_info srcflagged list option -> node_vars) = + fun invars outvars locvars_opt -> + let get_var_name vif = vif.it.var_name in + { + inlist = List.map get_var_name invars; + outlist = List.map get_var_name outvars; + loclist = ( + match locvars_opt with + | None -> None + | Some locvars -> Some (List.map get_var_name locvars) + ); + vartable = + let tbl = Hashtbl.create 0 in + let add_var_in_tbl vif = Hashtbl.add tbl vif.it.var_name vif in + List.iter add_var_in_tbl invars; + List.iter add_var_in_tbl outvars; + (match locvars_opt with + | None -> () + | Some locvars -> List.iter add_var_in_tbl locvars + ); + tbl; + } + (* Une collection de "meta fonctions" pour faciliter la vie *) diff --git a/src/syntaxTree.ml b/src/syntaxTree.ml index f213c45b8c4c29e796d44e280cd30ab1e3ac8142..f2bb24a9cf3d8b51ef11b71127dde6aad8b9bec1 100644 --- a/src/syntaxTree.ml +++ b/src/syntaxTree.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 07/02/2008 (at 15:16) by Erwan Jahier> *) +(** Time-stamp: <modified the 10/03/2008 (at 11:07) by Erwan Jahier> *) (** (Raw) Abstract syntax tree of source programs. @@ -107,36 +107,6 @@ let make_packbody ctab ttab otab dlst = ( } ) -(*--------------------------------------------------------------------- -add_info ------------------------------------------------------------------------ -Rôle : - proc générique pour mettre une info 'a dans - une table (Ident.t, 'a srcflagged). - -Effets de bord : - erreur de compil si déjà utilisé -----------------------------------------------------------------------*) -let add_info - (htbl : (Ident.t, 'a srcflagged) Hashtbl.t) - (kindof : string) (* une string en cas d'erreur *) - (lxm : Lxm.t) (* le lexeme en question *) - (info : 'a) (* l'info en question *) - = ( - try - let x = Hashtbl.find htbl (Lxm.id lxm) in - raise ( - Compile_error ( - lxm , - (sprintf "bad %s declaration, ident already linked at %s" - kindof (Lxm.position x.src) - ) - ) - ) - with Not_found -> ( - Hashtbl.add htbl (Lxm.id lxm) { src = lxm ; it = info } - ) - ) (*--------------------------------------------------------------------- lexeme_of_left_part diff --git a/src/syntaxTreeCore.ml b/src/syntaxTreeCore.ml index 71caddc3aeb7acb3b0c3f386117df92ad9840201..0af9947e1589b05327ef372407dbea8e9f1ae9b1 100644 --- a/src/syntaxTreeCore.ml +++ b/src/syntaxTreeCore.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 06/03/2008 (at 16:54) by Erwan Jahier> *) +(** Time-stamp: <modified the 11/03/2008 (at 11:41) by Erwan Jahier> *) (** (Raw) Abstract syntax tree of source programs. *) @@ -21,60 +21,49 @@ and | Real_type_exp | Named_type_exp of Ident.idref | Array_type_exp of (type_exp * val_exp) -and - node_info = - | Node of user_node_info - | ExtNode of ext_node_info -and - ext_node_info = { - eni_name : Ident.t; - eni_inputs : (Ident.t option * type_exp) list; - eni_outputs : (Ident.t option * type_exp) list; - eni_has_mem : bool; - eni_is_safe : bool; - } -and - user_node_info = { - uni_name : Ident.t ; - uni_static_params : static_param srcflagged list; - uni_def : node_def; - uni_has_mem : bool; - uni_is_safe : bool; - } + + +and node_info = { + name : Ident.t; + static_params : static_param srcflagged list option; + vars : node_vars option; (* aliased node may have no i/o decl *) + alias : node_exp srcflagged option; + body : node_body option; + has_mem : bool; + is_safe : bool; +} + and static_param = | StaticParamType of Ident.t | StaticParamConst of (Ident.t * type_exp) - | StaticParamNode of + | StaticParamNode of (Ident.t * var_info srcflagged list * var_info srcflagged list * has_mem_flag) -and has_mem_flag = bool - -and node_profile = (var_info srcflagged list * var_info srcflagged list) -and node_def = - | NodeAbstract of node_profile - | NodeBody of node_body - | NodeAlias of node_profile option * node_exp srcflagged - -and node_body = { - nbdy_inlist : Ident.t list; - nbdy_outlist : Ident.t list; - nbdy_loclist : Ident.t list; - nbdy_vartable: var_info_table; - nbdy_asserts : (val_exp srcflagged) list; - nbdy_eqs : (eq_info srcflagged) list +and node_vars = { + inlist : Ident.t list; + outlist : Ident.t list; + loclist : Ident.t list option; (* abstract/ext node have no body *) + vartable: var_info_table; } and var_info_table = (Ident.t, var_info srcflagged) Hashtbl.t and var_info = { - va_nature : var_nature; - va_name : Ident.t; - va_type : type_exp; - va_clock : clock_exp + var_nature : var_nature; + var_name : Ident.t; + var_type : type_exp; + var_clock : clock_exp } and var_nature = | VarInput | VarOutput | VarLocal +and node_body = { + asserts : (val_exp srcflagged) list; + eqs : (eq_info srcflagged) list; +} +and has_mem_flag = bool + + and eq_info = (left_part list * val_exp) and left_part = @@ -251,6 +240,3 @@ let naryexp lxm op elst = CallByPos( {src = lxm ; it = op }, Oper elst ) let bynameexp lxm op nelst = CallByName( {src = lxm ; it = op } , nelst ) -let node_info_has_memory = function - | Node uni -> uni.uni_has_mem - | ExtNode eni -> eni.eni_has_mem diff --git a/src/syntaxTreeDump.ml b/src/syntaxTreeDump.ml index e1a6eed7720355cad1b53e72b5f28b6d0500101f..f24e3d2273ef087cfdb66d6dc046d3d0338b2576 100644 --- a/src/syntaxTreeDump.ml +++ b/src/syntaxTreeDump.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 06/03/2008 (at 16:55) by Erwan Jahier> *) +(** Time-stamp: <modified the 10/03/2008 (at 17:06) by Erwan Jahier> *) open Lxm @@ -70,31 +70,28 @@ let (op2string : SyntaxTreeCore.by_pos_op -> string) = (***********************************************************************************) (* exported *) let rec packbody (os: Format.formatter) (pkg: SyntaxTree.packbody) = - let dump_def (d: item_ident) = ( - ( - try ( - 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 -> ( - match (Hashtbl.find pkg.pk_node_table id) with - | {src = lxm ; it = Node (ninfo) } -> - dump_node os {src = lxm; it = ninfo} - | {src = lxm ; it = ExtNode finfo } -> - dump_ext_node os {src = lxm; it = finfo} - ) - ) - with Not_found -> - print_string ("*** unable to find a definition for " ^ - (match d with - ConstItem id - | TypeItem id - | NodeItem id -> Ident.to_string id - )); - assert false - ) ; - Format.fprintf os "@\n" - ) in + let dump_def (d: item_ident) = + try ( + (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 -> + let {src = lxm ; it = ninfo } = Hashtbl.find pkg.pk_node_table id in + dump_node os {src = lxm ; it = ninfo } + ); + Format.fprintf os "@\n" + ) + with Not_found -> + print_string ("*** unable to find a definition for " ^ + (match d with + ConstItem id + | TypeItem id + | NodeItem id -> Ident.to_string id + ) + ); + flush stdout; + assert false + in (* Format.fprintf os "@?@[<b 0>" ; *) List.iter dump_def pkg.pk_def_list ; (* Format.fprintf os "@]@." *) @@ -174,18 +171,6 @@ and dump_field (os: Format.formatter) (finfo: field_info) = ( fprintf os "%s : %a = %a" (Ident.to_string id) dump_type_exp ty dump_val_exp ex ) -) - (**************************) - (* dump d'une def de func *) - (**************************) -and dump_ext_node (os: Format.formatter) (x: ext_node_info srcflagged) = ( - let lxm = x.src and info = x.it in - fprintf os "-- %s" (Lxm.details lxm) ; - fprintf os " (external function)@\n" ; - fprintf os "function %s (@,@[<b 3>%a@]@,) returns (@,@[<b 3>%a@]@,);@\n" - (Ident.to_string info.eni_name) - dump_param_list info.eni_inputs - dump_param_list info.eni_outputs ) and dump_param_list (os: Format.formatter) @@ -215,17 +200,13 @@ and dump_item_info_list ) and dump_item_info (os: Format.formatter) - (ie: item_info srcflagged) = - ( - match ie.it with - | ConstInfo ci -> dump_const os (Lxm.flagit ci ie.src) - | TypeInfo ti -> dump_type os (Lxm.flagit ti ie.src) - | NodeInfo oi -> ( - match oi with - | Node ninfo -> dump_node os (Lxm.flagit ninfo ie.src) - | ExtNode finfo -> dump_ext_node os (Lxm.flagit finfo ie.src) - ) - ) + (ie: item_info srcflagged) = ( + match ie.it with + | ConstInfo ci -> dump_const os (Lxm.flagit ci ie.src) + | TypeInfo ti -> dump_type os (Lxm.flagit ti ie.src) + | NodeInfo ni -> dump_node os (Lxm.flagit ni ie.src) + ) + and dump_static_param_list (os: Format.formatter) @@ -254,49 +235,62 @@ and dump_static_param (**************************) (* dump d'une def de node *) (**************************) -and dump_node (os: Format.formatter) (x: user_node_info srcflagged) = ( +and dump_node (os: Format.formatter) (x: node_info srcflagged) = ( let lxm = x.src and ninfo = x.it in fprintf os "-- %s" (Lxm.details lxm) ; fprintf os " (node definition)@\n" ; - fprintf os "node %s" (Ident.to_string ninfo.uni_name); - if (ninfo.uni_static_params != []) then ( - fprintf os " <<@\n" ; - fprintf os "@[<b 3>@ %a@]@\n" dump_static_param_list ninfo.uni_static_params ; - fprintf os ">>\n" - ) else () ; - match ninfo.uni_def with - NodeBody nbody -> dump_node_body os nbody - | NodeAlias (_,{it = nexp; src = lxm}) -> - fprintf os " = @,%a;@\n" dump_node_exp nexp - | NodeAbstract _ -> - fprintf os " finish me (dump_node: print abstract node)"; - assert false + 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" + ); + (match ninfo.vars with + | None -> () + | Some { + inlist = inlist; + outlist = outlist; + loclist = loclist_opt; + vartable = vartab; + } -> + let get_info (id: Ident.t) = (Hashtbl.find vartab id).it in + let inlst = List.map get_info inlist in + let outlst = List.map get_info outlist in + fprintf os "(@\n" ; + fprintf os "@[<b 3>@ %a@]@\n" dump_var_decl_list inlst ; + fprintf os ") returns (@\n" ; + fprintf os "@[<b 3>@ %a@]@\n" dump_var_decl_list outlst ; + fprintf os ");@\n" ; + match loclist_opt with + | None -> () + | Some loclist -> + let loclst = List.map get_info loclist in + fprintf os "var@\n"; + fprintf os "@[<b 3> %a;@]@\n" dump_var_decl_list loclst; + ); + + (match ninfo.alias with + | None -> () + | Some {it = nexp; src = lxm} -> fprintf os " = @,%a;@\n" dump_node_exp nexp + ); + (match ninfo.body with + | None -> () + | Some body -> dump_node_body os body + ); + if ninfo.has_mem then () else (); + if ninfo.is_safe then () else (); + ) and dump_node_body (os: Format.formatter) (nbody: node_body) = ( - let vartab = nbody.nbdy_vartable in - let get_info (id: Ident.t) = ( - (Hashtbl.find vartab id).it - ) in - let inlst = List.map get_info nbody.nbdy_inlist in - let outlst = List.map get_info nbody.nbdy_outlist in - let loclst = List.map get_info nbody.nbdy_loclist in - fprintf os "(@\n" ; - fprintf os "@[<b 3>@ %a@]@\n" dump_var_decl_list inlst ; - fprintf os ") returns (@\n" ; - fprintf os "@[<b 3>@ %a@]@\n" dump_var_decl_list outlst ; - fprintf os ");@\n" ; - if (nbody.nbdy_loclist != []) then ( - fprintf os "var@\n"; - fprintf os "@[<b 3> %a;@]@\n" dump_var_decl_list loclst ; - ) else (); - (* le corps *) - fprintf os "@[<b 3>let" ; - (* les assertions *) - dump_assert_list os nbody.nbdy_asserts ; - (* les equations *) - dump_eq_list os nbody.nbdy_eqs ; - fprintf os "@]@\ntel" ; + fprintf os "@[<b 3>let" ; + (* les assertions *) + dump_assert_list os nbody.asserts ; + (* les equations *) + dump_eq_list os nbody.eqs ; + fprintf os "@]@\ntel" ; ) (* déclarations sur plusieurs lignes, indentées ... *) and dump_var_decl_list (os: Format.formatter) (lst: var_info list) = ( @@ -313,9 +307,9 @@ and dump_line_var_decl_list (os: Format.formatter) (lst: var_info srcflagged lis | h::t -> ( fprintf os "%a;@,%a" dump_var_decl h.it dump_line_var_decl_list t ) ) and dump_var_decl (os: Format.formatter) (vinfo: var_info ) = ( - fprintf os "%s : %a" (Ident.to_string vinfo.va_name) dump_type_exp vinfo.va_type ; + fprintf os "%s : %a" (Ident.to_string vinfo.var_name) dump_type_exp vinfo.var_type ; ( - match vinfo.va_clock with + match vinfo.var_clock with BaseClock -> () | NamedClock {it=id;src=lxm} -> (fprintf os " when %s" (Ident.to_string id)) ) diff --git a/src/test/Makefile b/src/test/Makefile index 4d5a07c1c10d50dec2aba015b4eb13e76fb40f1e..48674e77a86369d793d943f65970dab80f396cc8 100644 --- a/src/test/Makefile +++ b/src/test/Makefile @@ -11,11 +11,11 @@ test: echo "Non-regression tests" > test_ok.res echo "Those tests are supposed to generate errors" > test_ko.res for d in ${OK_LUS}; do \ - echo -e "\n$(NL)====> $(LC) $$d" >> test.res; \ + echo -e "\n$(NL)====> $(LC) $$d" >> test_ok.res; \ $(LC) $$d >> test_ok.res 2>&1 ;\ done; \ for d in ${KO_LUS}; do \ - echo -e "\n$(NL)====> $(LC) $$d" >> test.res; \ + echo -e "\n$(NL)====> $(LC) $$d" >> test_ko.res; \ $(LC) $$d >> test_ko.res 2>&1 ;\ done; \ rm -f test.res ; cat test_ok.res test_ko.res > test.res ;\ diff --git a/src/test/test.res.exp b/src/test/test.res.exp index faa9c98e9f94e119a4a2bd8d577eeb7f4ba267f7..55e74e4805e99dde0ce32cc3058181f7c72127af 100644 --- a/src/test/test.res.exp +++ b/src/test/test.res.exp @@ -1,4 +1,7 @@ Non-regression tests + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/Pascal/consensus.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -30,6 +33,9 @@ End of Syntax table dump. ### skipping consensus node dummy::c8 = dummy::consensus<<const 8>>(bool^8) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/Pascal/fby.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -56,6 +62,9 @@ End of Syntax table dump. node dummy::rising_edge = dummy::rising_edge(bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/Pascal/func_with_body.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -78,10 +87,13 @@ End of Syntax table dump. Exported types: Exported constants: Exported nodes: - node dummy::ext = extern ext(int) returns (int) + node dummy::ext = dummy::ext(int) returns (int) on clock XXX node dummy::trivial = dummy::trivial(int) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/Pascal/heater_control.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -143,6 +155,9 @@ End of Syntax table dump. node dummy::oneoftree = dummy::oneoftree(bool, bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/Pascal/left.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -168,6 +183,9 @@ End of Syntax table dump. Exported nodes: node dummy::toto = dummy::toto(bool) returns ( {a : bool^100; b : int}^3) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/Pascal/newpacks.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack inter @@ -247,6 +265,9 @@ End of Syntax table dump. node inter::fby1 = preal::fby1 (imported) node inter::preced = inter::preced( {i : int; b : bool; r : real}) returns ( {i : int; b : bool; r : real}, {i : int; b : bool; r : real}) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/Pascal/onlyroll.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -397,6 +418,9 @@ End of Syntax table dump. node dummy::maintain = dummy::maintain(int, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/Pascal/p.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack inter @@ -476,6 +500,9 @@ End of Syntax table dump. node inter::fby1 = preal::fby1 (imported) node inter::preced = inter::preced( {i : int; b : bool; r : real}) returns ( {i : int; b : bool; r : real}, {i : int; b : bool; r : real}) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/Pascal/packs.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack inter @@ -577,8 +604,14 @@ End of Syntax table dump. node inter::fby1 = preal::fby1 (imported) node inter::preced = inter::preced( {i : int; b : bool; r : real}) returns ( {i : int; b : bool; r : real}, {i : int; b : bool; r : real}) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/Pascal/pfs.lus *** Error in file "should_work/Pascal/pfs.lus", line 43, col 22 to 22, token '[': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/Pascal/struct0.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -604,6 +637,9 @@ End of Syntax table dump. Exported nodes: node dummy::bibi = dummy::bibi(int) returns ( {x : int (1); y : int (2)}) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/Pascal/t0.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -633,8 +669,11 @@ End of Syntax table dump. node dummy::min = dummy::min(int, int) returns (int) on clock XXX ### skipping min_n - node dummy::max = extern max(int, int) returns (int) + node dummy::max = dummy::max(int, int) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/Pascal/test.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack P1 @@ -659,6 +698,9 @@ End of Syntax table dump. Exported constants: const P1::y = 3 Exported nodes: + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/Pascal/trivial.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -682,6 +724,9 @@ End of Syntax table dump. Exported nodes: node dummy::trivial = dummy::trivial(int) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/Pascal/t.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -709,6 +754,9 @@ End of Syntax table dump. ### skipping map2 node dummy::toto = dummy::toto(bool) returns (int^2^3, int^2) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/Pascal/t1.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -735,6 +783,9 @@ End of Syntax table dump. ### skipping fold_left ### skipping consensus ### skipping bt_void + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/Pascal/t2.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -764,6 +815,9 @@ End of Syntax table dump. *** oops: an internal error occurred in file syntaxTab.ml, line 104, column 22 *** when compiling lustre program should_work/Pascal/t2.lus + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/ProduitBool/produitBool.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -820,6 +874,9 @@ End of Syntax table dump. node dummy::PLC = dummy::PLC( {multiplieur : bool^10; rank : int}, bool) returns (bool^20) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/ProduitBool/shift_ludic.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -878,6 +935,9 @@ End of Syntax table dump. node dummy::n_selectOneStage = dummy::n_selectOneStage( {currentRank : int; rankToSelect : int; elementSelected : bool}, bool) returns ( {currentRank : int; rankToSelect : int; elementSelected : bool}) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/ProduitBool/shiftFill_ludic.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -931,6 +991,9 @@ End of Syntax table dump. node dummy::n_selectOneStage = dummy::n_selectOneStage( {currentRank : int; rankToSelect : int; elementSelected : bool}, bool) returns ( {currentRank : int; rankToSelect : int; elementSelected : bool}) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/FillFollowedByRed.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -960,6 +1023,9 @@ End of Syntax table dump. node dummy::FillFollowedByRed = dummy::FillFollowedByRed(real) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/iterFibo.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -988,8 +1054,14 @@ End of Syntax table dump. node dummy::fibo = dummy::fibo(int^2) returns (int^2, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/matrice.lus *** Error in file "should_work/lionel/matrice.lus", line 15, col 22 to 22, token '+': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/pipeline.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1018,10 +1090,19 @@ End of Syntax table dump. node dummy::pipeline = dummy::pipeline(bool^10) returns (bool^10) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/triSel.lus *** Error in file "should_work/lionel/triSel.lus", line 27, col 36 to 36, token ',': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/Gyroscope.lus *** Error in file "should_work/lionel/Gyroscope.lus", line 48, col 1 to 1, token '%': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/calculs_max.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1061,6 +1142,9 @@ End of Syntax table dump. node dummy::calculs_max = dummy::calculs_max(int^10) returns (bool^10) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/deSimone.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1099,14 +1183,29 @@ End of Syntax table dump. node dummy::prop1 = dummy::prop1(bool^10) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/mapiter.lus *** Error in file "should_work/lionel/mapiter.lus", line 42, col 25 to 25, token '=': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/arrays.lus *** Error in file "should_work/lionel/arrays.lus", line 16, col 23 to 23, token '+': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/matrice2.lus *** Error in file "should_work/lionel/matrice2.lus", line 6, col 22 to 22, token '+': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/minus.lus *** Error in file "should_work/lionel/minus.lus", line 8, col 22 to 22, token ',': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/moyenne.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1137,6 +1236,9 @@ End of Syntax table dump. node dummy::moyenne = dummy::moyenne(real^10) returns (real) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/normal.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1276,12 +1378,24 @@ End of Syntax table dump. node dummy::traiteChg = dummy::traiteChg( {mesure_chg : int}^20, {chg2gen : int^20}^20) returns (int^20) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/predefOp.lus *** Error in file "should_work/lionel/predefOp.lus", line 61, col 25 to 26, token '=>': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/redIf.lus *** Error in file "should_work/lionel/redIf.lus", line 3, col 14 to 14, token ',': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/simpleRed.lus *** Error in file "should_work/lionel/simpleRed.lus", line 6, col 15 to 15, token '+': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/lionel/testSilus.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1413,6 +1527,9 @@ End of Syntax table dump. node dummy::traiteChg = dummy::traiteChg( {mesure_chg : int}^20, {chg2gen : int^20}^20) returns (int^20) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/call/bad_call02.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1436,6 +1553,9 @@ End of Syntax table dump. Exported nodes: node dummy::bad_call02 = dummy::bad_call02(int, bool) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/call/call07.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1459,6 +1579,9 @@ End of Syntax table dump. Exported nodes: node dummy::call07 = dummy::call07(bool, bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/call/call01.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1486,8 +1609,14 @@ End of Syntax table dump. node dummy::call01 = dummy::call01(bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/call/call03.lus *** Error in file "should_work/call/call03.lus", line 2, col 18 to 19, token 'or': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/call/call04.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1514,6 +1643,9 @@ End of Syntax table dump. Exported nodes: *** Error in file "should_work/call/call04.lus", line 4, col 13 to 15, token 'map': unknown node + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/call/call05.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1538,8 +1670,11 @@ End of Syntax table dump. Exported nodes: node dummy::call05 = dummy::call05(bool, bool) returns (bool) on clock XXX - node dummy::momo = extern momo(bool, bool) returns (bool) + node dummy::momo = dummy::momo(bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/call/call06.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1564,8 +1699,11 @@ End of Syntax table dump. Exported nodes: node dummy::call06 = dummy::call06(bool, bool) returns (bool, bool) on clock XXX - node dummy::bip = extern bip(bool, bool) returns (bool, bool) + node dummy::bip = dummy::bip(bool, bool) returns (bool, bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/call/call02.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1591,8 +1729,14 @@ End of Syntax table dump. Exported nodes: *** Error in file "should_work/call/call02.lus", line 2, col 13 to 23, token 'Lustre::and': unknown node + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/packEnvTest/contractForElementSelectionInArray/main.lus *** Error in file "should_work/packEnvTest/contractForElementSelectionInArray/main.lus", line 3, col 45 to 45, token '=': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/packEnvTest/contractForElementSelectionInArray/noeudsIndependants.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1619,18 +1763,39 @@ End of Syntax table dump. node dummy::gt = dummy::gt(int, int) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/packEnvTest/contractForElementSelectionInArray/contractForElementSelectionInArray.lus *** Error in file "should_work/packEnvTest/contractForElementSelectionInArray/contractForElementSelectionInArray.lus", line 9, col 50 to 50, token '0': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/packEnvTest/contractForElementSelectionInArray/packageTableau.lus *** Error in file "should_work/packEnvTest/contractForElementSelectionInArray/packageTableau.lus", line 96, col 1 to 1, token '%': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/packEnvTest/contractForElementSelectionInArray/tri.lus *** Error in file "should_work/packEnvTest/contractForElementSelectionInArray/tri.lus", line 181, col 74 to 74, token ';': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/packEnvTest/Condact.lus *** Error in file "should_work/packEnvTest/Condact.lus", line 22, col 3 to 3, token '=': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/packEnvTest/modelInst.lus *** Error in file "should_work/packEnvTest/modelInst.lus", line 28, col 3 to 9, token 'package': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/packEnvTest/packages2.lus *** Error in file "should_work/packEnvTest/packages2.lus", line 63, col 1 to 4, token 'node': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/packEnvTest/packages.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack inter @@ -1710,6 +1875,9 @@ End of Syntax table dump. node inter::fby1 = preal::fby1 (imported) node inter::preced = inter::preced( {i : int; b : bool; r : real}) returns ( {i : int; b : bool; r : real}, {i : int; b : bool; r : real}) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/bob.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1733,6 +1901,9 @@ End of Syntax table dump. Exported nodes: node dummy::bob = dummy::bob(bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/def.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1756,6 +1927,9 @@ End of Syntax table dump. Exported nodes: node dummy::def = dummy::def(bool) returns (bool, bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/ex.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1785,6 +1959,9 @@ End of Syntax table dump. node dummy::id = dummy::id(bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/iter.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1822,6 +1999,9 @@ End of Syntax table dump. node dummy::garcia = dummy::garcia(int, int) returns (int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/iterate.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1857,6 +2037,9 @@ End of Syntax table dump. node dummy::map_redduced = dummy::map_redduced(int, int, int) returns (int, int, int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/lecteur.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1889,6 +2072,9 @@ End of Syntax table dump. node dummy::Environnement = dummy::Environnement(int, bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/lucky.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1927,6 +2113,9 @@ End of Syntax table dump. node dummy::once_since = dummy::once_since(bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/noAlarm.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1950,6 +2139,9 @@ End of Syntax table dump. Exported nodes: node dummy::noAlarm = dummy::noAlarm(bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/notTwo.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -1973,6 +2165,9 @@ End of Syntax table dump. Exported nodes: node dummy::notTwo = dummy::notTwo(bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/onlyroll.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2123,6 +2318,9 @@ End of Syntax table dump. node dummy::maintain = dummy::maintain(int, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/onlyroll2.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2273,6 +2471,9 @@ End of Syntax table dump. node dummy::maintain = dummy::maintain(int, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/test.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2302,6 +2503,9 @@ End of Syntax table dump. node dummy::two_outputs = dummy::two_outputs(bool, bool) returns (bool, bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/titi.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2325,6 +2529,9 @@ End of Syntax table dump. Exported nodes: node dummy::titi = dummy::titi(bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/toolate.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2378,6 +2585,9 @@ End of Syntax table dump. node dummy::toolate = dummy::toolate(bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/toto.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2401,6 +2611,9 @@ End of Syntax table dump. Exported nodes: node dummy::toto = dummy::toto(bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/morel4.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2440,6 +2653,9 @@ End of Syntax table dump. Warning. in file "should_work/fab_test/morel4.lus", line 33, col 17 to 17, token ',': ---> separator mismatch, ';' expected + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/morel5.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2477,6 +2693,9 @@ End of Syntax table dump. node dummy::mcmorel = dummy::mcmorel(int) returns (int^2, int^2^2) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/morel.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2510,6 +2729,9 @@ End of Syntax table dump. node dummy::mcmorel = dummy::mcmorel(int) returns (int^2) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/morel2.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2544,6 +2766,9 @@ End of Syntax table dump. node dummy::mcmorel = dummy::mcmorel(int) returns (int^2) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/fab_test/morel3.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2577,6 +2802,9 @@ End of Syntax table dump. node dummy::mcmorel = dummy::mcmorel(int) returns (int^2) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/cst.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2606,6 +2834,9 @@ End of Syntax table dump. Exported nodes: node dummy::cst = dummy::cst(int) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/CURRENT.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2629,6 +2860,9 @@ End of Syntax table dump. Exported nodes: node dummy::CURRENT = dummy::CURRENT(bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/ex.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2662,6 +2896,9 @@ End of Syntax table dump. Exported nodes: node dummy::ex = dummy::ex( {x : int^1^2^3^4; y : {x : int; y : int^1^2^3^4}}) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/exclusion.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2685,6 +2922,9 @@ End of Syntax table dump. Exported nodes: node dummy::exclusion = dummy::exclusion(bool, bool, bool, bool) returns (bool, bool, bool, bool, bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/PCOND.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2708,6 +2948,9 @@ End of Syntax table dump. Exported nodes: node dummy::PCOND = dummy::PCOND(bool, bool, bool, bool, int, int, bool, bool, bool) returns (bool, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/fby.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2731,6 +2974,9 @@ End of Syntax table dump. Exported nodes: node dummy::followed_by = dummy::followed_by(bool) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/PCOND1.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2754,6 +3000,9 @@ End of Syntax table dump. Exported nodes: node dummy::PCOND1 = dummy::PCOND1(bool, bool, bool, bool, int, int, bool, bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/flo.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2780,6 +3029,9 @@ End of Syntax table dump. node dummy::flo = dummy::flo(bool, bool, bool, bool, bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/SOURIS.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2803,6 +3055,9 @@ End of Syntax table dump. Exported nodes: node dummy::SOURIS = dummy::SOURIS(bool, bool, bool, bool) returns (bool, bool, bool, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/hanane.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2846,6 +3101,9 @@ End of Syntax table dump. Exported nodes: node dummy::hanane = dummy::hanane(bool, int^4^4, {x : int; y : real; z : int^4^4^4}^2) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/Watch.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -2944,9 +3202,9 @@ End of Syntax table dump. const dummy::NULL_POSITION = dummy::NULL_POSITION const dummy::INITIAL_STOPWATCH_TIME = dummy::INITIAL_STOPWATCH_TIME Exported nodes: - node dummy::ALARM_TO_DISPLAY_POS = extern ALARM_TO_DISPLAY_POS(dummy::ALARM_TIME_POSITION) returns (dummy::DISPLAY_POSITION) + node dummy::ALARM_TO_DISPLAY_POS = dummy::ALARM_TO_DISPLAY_POS(dummy::ALARM_TIME_POSITION) returns (dummy::DISPLAY_POSITION) on clock XXX - node dummy::INCREMENT_STOPWATCH_TIME = extern INCREMENT_STOPWATCH_TIME(dummy::STOPWATCH_TIME_TYPE) returns (dummy::STOPWATCH_TIME_TYPE) + node dummy::INCREMENT_STOPWATCH_TIME = dummy::INCREMENT_STOPWATCH_TIME(dummy::STOPWATCH_TIME_TYPE) returns (dummy::STOPWATCH_TIME_TYPE) on clock XXX node dummy::TWO_STATES = dummy::TWO_STATES(bool, bool, bool) returns (bool) on clock XXX @@ -2954,68 +3212,71 @@ End of Syntax table dump. node dummy::Watch = dummy::Watch(bool, bool, bool, bool, bool) returns (dummy::DISPLAY_TYPE, int) on clock XXX - node dummy::IS_ZERO_MOD_10_MN = extern IS_ZERO_MOD_10_MN(dummy::STOPWATCH_TIME_TYPE) returns (bool) + node dummy::IS_ZERO_MOD_10_MN = dummy::IS_ZERO_MOD_10_MN(dummy::STOPWATCH_TIME_TYPE) returns (bool) on clock XXX - node dummy::WATCH_TIME_TO_MAIN_DISPLAY = extern WATCH_TIME_TO_MAIN_DISPLAY(dummy::WATCH_TIME_TYPE) returns (dummy::MAIN_DISPLAY_TYPE) + node dummy::WATCH_TIME_TO_MAIN_DISPLAY = dummy::WATCH_TIME_TO_MAIN_DISPLAY(dummy::WATCH_TIME_TYPE) returns (dummy::MAIN_DISPLAY_TYPE) on clock XXX - node dummy::TOGGLE_24H_IN_ALARM_MODE = extern TOGGLE_24H_IN_ALARM_MODE(dummy::ALARM_TIME_TYPE) returns (dummy::ALARM_TIME_TYPE) + node dummy::TOGGLE_24H_IN_ALARM_MODE = dummy::TOGGLE_24H_IN_ALARM_MODE(dummy::ALARM_TIME_TYPE) returns (dummy::ALARM_TIME_TYPE) on clock XXX - node dummy::MAKE_DISPLAY = extern MAKE_DISPLAY(dummy::MAIN_DISPLAY_TYPE, dummy::MINI_DISPLAY_TYPE, dummy::string, dummy::STATUS_TYPE, dummy::DISPLAY_POSITION, dummy::LABELS_TYPE) returns (dummy::DISPLAY_TYPE) + node dummy::MAKE_DISPLAY = dummy::MAKE_DISPLAY(dummy::LABELS_TYPE, dummy::DISPLAY_POSITION, dummy::STATUS_TYPE, dummy::string, dummy::MINI_DISPLAY_TYPE, dummy::MAIN_DISPLAY_TYPE) returns (dummy::DISPLAY_TYPE) on clock XXX - node dummy::SET_WATCH_TIME = extern SET_WATCH_TIME(dummy::WATCH_TIME_TYPE, dummy::WATCH_TIME_POSITION) returns (dummy::WATCH_TIME_TYPE) + node dummy::SET_WATCH_TIME = dummy::SET_WATCH_TIME(dummy::WATCH_TIME_POSITION, dummy::WATCH_TIME_TYPE) returns (dummy::WATCH_TIME_TYPE) on clock XXX node dummy::STOPWATCH = dummy::STOPWATCH(bool, bool, bool) returns (dummy::STOPWATCH_TIME_TYPE, bool, bool, int) on clock XXX - node dummy::TIME_SCALE = extern TIME_SCALE(int) returns (int) + node dummy::TIME_SCALE = dummy::TIME_SCALE(int) returns (int) on clock XXX - node dummy::SET_ALARM_TIME = extern SET_ALARM_TIME(dummy::ALARM_TIME_TYPE, dummy::ALARM_TIME_POSITION) returns (dummy::ALARM_TIME_TYPE) + node dummy::SET_ALARM_TIME = dummy::SET_ALARM_TIME(dummy::ALARM_TIME_POSITION, dummy::ALARM_TIME_TYPE) returns (dummy::ALARM_TIME_TYPE) on clock XXX - node dummy::LABELS = extern LABELS(bool, bool, bool, bool, bool) returns (dummy::LABELS_TYPE) + node dummy::LABELS = dummy::LABELS(bool, bool, bool, bool, bool) returns (dummy::LABELS_TYPE) on clock XXX - node dummy::IS_O_CLOCK = extern IS_O_CLOCK(dummy::WATCH_TIME_TYPE) returns (bool) + node dummy::IS_O_CLOCK = dummy::IS_O_CLOCK(dummy::WATCH_TIME_TYPE) returns (bool) on clock XXX - node dummy::WATCH_DATE_TO_MINI_DISPLAY = extern WATCH_DATE_TO_MINI_DISPLAY(dummy::WATCH_TIME_TYPE) returns (dummy::MINI_DISPLAY_TYPE) + node dummy::WATCH_DATE_TO_MINI_DISPLAY = dummy::WATCH_DATE_TO_MINI_DISPLAY(dummy::WATCH_TIME_TYPE) returns (dummy::MINI_DISPLAY_TYPE) on clock XXX - node dummy::STOPWATCH_TIME_TO_MAIN_DISPLAY = extern STOPWATCH_TIME_TO_MAIN_DISPLAY(dummy::STOPWATCH_TIME_TYPE) returns (dummy::MAIN_DISPLAY_TYPE) + node dummy::STOPWATCH_TIME_TO_MAIN_DISPLAY = dummy::STOPWATCH_TIME_TO_MAIN_DISPLAY(dummy::STOPWATCH_TIME_TYPE) returns (dummy::MAIN_DISPLAY_TYPE) on clock XXX - node dummy::INCREMENT_WATCH_TIME_IN_SET_MODE = extern INCREMENT_WATCH_TIME_IN_SET_MODE(dummy::WATCH_TIME_TYPE, dummy::WATCH_TIME_POSITION) returns (dummy::WATCH_TIME_TYPE) + node dummy::INCREMENT_WATCH_TIME_IN_SET_MODE = dummy::INCREMENT_WATCH_TIME_IN_SET_MODE(dummy::WATCH_TIME_POSITION, dummy::WATCH_TIME_TYPE) returns (dummy::WATCH_TIME_TYPE) on clock XXX - node dummy::ALARM_TIME_TO_MAIN_DISPLAY = extern ALARM_TIME_TO_MAIN_DISPLAY(dummy::ALARM_TIME_TYPE) returns (dummy::MAIN_DISPLAY_TYPE) + node dummy::ALARM_TIME_TO_MAIN_DISPLAY = dummy::ALARM_TIME_TO_MAIN_DISPLAY(dummy::ALARM_TIME_TYPE) returns (dummy::MAIN_DISPLAY_TYPE) on clock XXX - node dummy::NEXT_WATCH_TIME_POSITION = extern NEXT_WATCH_TIME_POSITION(dummy::WATCH_TIME_POSITION) returns (dummy::WATCH_TIME_POSITION) + node dummy::NEXT_WATCH_TIME_POSITION = dummy::NEXT_WATCH_TIME_POSITION(dummy::WATCH_TIME_POSITION) returns (dummy::WATCH_TIME_POSITION) on clock XXX - node dummy::NEXT_ALARM_TIME_POSITION = extern NEXT_ALARM_TIME_POSITION(dummy::ALARM_TIME_POSITION) returns (dummy::ALARM_TIME_POSITION) + node dummy::NEXT_ALARM_TIME_POSITION = dummy::NEXT_ALARM_TIME_POSITION(dummy::ALARM_TIME_POSITION) returns (dummy::ALARM_TIME_POSITION) on clock XXX node dummy::WATCH = dummy::WATCH(bool, bool, bool, bool, bool, bool) returns (dummy::WATCH_TIME_TYPE, dummy::WATCH_TIME_POSITION, bool, int) on clock XXX node dummy::MORE_RECENT = dummy::MORE_RECENT(bool, int) returns (bool) on clock XXX - node dummy::SOMME = extern SOMME(int, int, int) returns (int) + node dummy::SOMME = dummy::SOMME(int, int, int) returns (int) on clock XXX - node dummy::TOGGLE_24H_IN_WATCH_MODE = extern TOGGLE_24H_IN_WATCH_MODE(dummy::WATCH_TIME_TYPE) returns (dummy::WATCH_TIME_TYPE) + node dummy::TOGGLE_24H_IN_WATCH_MODE = dummy::TOGGLE_24H_IN_WATCH_MODE(dummy::WATCH_TIME_TYPE) returns (dummy::WATCH_TIME_TYPE) on clock XXX - node dummy::WATCH_TO_DISPLAY_POS = extern WATCH_TO_DISPLAY_POS(dummy::WATCH_TIME_POSITION) returns (dummy::DISPLAY_POSITION) + node dummy::WATCH_TO_DISPLAY_POS = dummy::WATCH_TO_DISPLAY_POS(dummy::WATCH_TIME_POSITION) returns (dummy::DISPLAY_POSITION) on clock XXX node dummy::DISPLAY = dummy::DISPLAY(bool, bool, bool, dummy::WATCH_TIME_TYPE, dummy::STOPWATCH_TIME_TYPE, dummy::ALARM_TIME_TYPE, dummy::DISPLAY_POSITION, dummy::STATUS_TYPE, dummy::LABELS_TYPE) returns (dummy::DISPLAY_TYPE) on clock XXX - node dummy::COMPARE_WATCH_ALARM_TIME = extern COMPARE_WATCH_ALARM_TIME(dummy::WATCH_TIME_TYPE, dummy::ALARM_TIME_TYPE) returns (bool) + node dummy::COMPARE_WATCH_ALARM_TIME = dummy::COMPARE_WATCH_ALARM_TIME(dummy::ALARM_TIME_TYPE, dummy::WATCH_TIME_TYPE) returns (bool) on clock XXX node dummy::EDGE = dummy::EDGE(bool) returns (bool) on clock XXX - node dummy::WATCH_TIME_TO_MINI_DISPLAY = extern WATCH_TIME_TO_MINI_DISPLAY(dummy::WATCH_TIME_TYPE) returns (dummy::MINI_DISPLAY_TYPE) + node dummy::WATCH_TIME_TO_MINI_DISPLAY = dummy::WATCH_TIME_TO_MINI_DISPLAY(dummy::WATCH_TIME_TYPE) returns (dummy::MINI_DISPLAY_TYPE) on clock XXX - node dummy::STATUS = extern STATUS(bool, bool, bool, bool) returns (dummy::STATUS_TYPE) + node dummy::STATUS = dummy::STATUS(bool, bool, bool, bool) returns (dummy::STATUS_TYPE) on clock XXX - node dummy::CONFIRM_TIME = extern CONFIRM_TIME(dummy::WATCH_TIME_TYPE) returns (dummy::WATCH_TIME_TYPE) + node dummy::CONFIRM_TIME = dummy::CONFIRM_TIME(dummy::WATCH_TIME_TYPE) returns (dummy::WATCH_TIME_TYPE) on clock XXX - node dummy::INCREMENT_WATCH_TIME = extern INCREMENT_WATCH_TIME(dummy::WATCH_TIME_TYPE) returns (dummy::WATCH_TIME_TYPE) + node dummy::INCREMENT_WATCH_TIME = dummy::INCREMENT_WATCH_TIME(dummy::WATCH_TIME_TYPE) returns (dummy::WATCH_TIME_TYPE) on clock XXX node dummy::BUTTONS = dummy::BUTTONS(bool, bool, bool, bool) returns (bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool) on clock XXX - node dummy::WATCH_DAY_TO_ALPHA_DISPLAY = extern WATCH_DAY_TO_ALPHA_DISPLAY(dummy::WATCH_TIME_TYPE) returns (dummy::string) + node dummy::WATCH_DAY_TO_ALPHA_DISPLAY = dummy::WATCH_DAY_TO_ALPHA_DISPLAY(dummy::WATCH_TIME_TYPE) returns (dummy::string) on clock XXX node dummy::ALARM = dummy::ALARM(bool, bool, bool, bool, bool, bool, bool, dummy::WATCH_TIME_TYPE) returns (dummy::ALARM_TIME_TYPE, bool, dummy::ALARM_TIME_POSITION, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/X.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3039,6 +3300,9 @@ End of Syntax table dump. Exported nodes: node dummy::X = dummy::X(bool, int) returns (bool, int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/nc7.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3074,6 +3338,9 @@ End of Syntax table dump. node dummy::nc7 = dummy::nc7(int) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/import1.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3098,8 +3365,11 @@ End of Syntax table dump. Exported nodes: node dummy::import1 = dummy::import1(int, int) returns (int) on clock XXX - node dummy::imp = extern imp(int) returns (int) + node dummy::imp = dummy::imp(int) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/X1.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3123,6 +3393,9 @@ End of Syntax table dump. Exported nodes: node dummy::X1 = dummy::X1(bool, int) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/initial.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3146,6 +3419,9 @@ End of Syntax table dump. Exported nodes: node dummy::initial = dummy::initial(bool) returns (bool, int, real) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/X2.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3169,6 +3445,9 @@ End of Syntax table dump. Exported nodes: node dummy::X2 = dummy::X2(bool, int) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/X3.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3192,6 +3471,9 @@ End of Syntax table dump. Exported nodes: node dummy::X3 = dummy::X3(int, bool) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/minmax1.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3215,6 +3497,9 @@ End of Syntax table dump. Exported nodes: node dummy::minmax1 = dummy::minmax1(int, int) returns (int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/minmax2.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3241,6 +3526,9 @@ End of Syntax table dump. node dummy::minmax = dummy::minmax(int, int) returns (int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/X6.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3264,6 +3552,9 @@ End of Syntax table dump. Exported nodes: node dummy::X6 = dummy::X6(int, bool) returns (int, bool, bool, int, int, int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/minmax3.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3290,6 +3581,9 @@ End of Syntax table dump. node dummy::minmax = dummy::minmax(int, int) returns (int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/_N_uu.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3313,6 +3607,9 @@ End of Syntax table dump. Exported nodes: node dummy::_N_uu = dummy::_N_uu(bool, bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/cpt.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3336,6 +3633,9 @@ End of Syntax table dump. Exported nodes: node dummy::cpt = dummy::cpt(bool, bool) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/s.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3359,6 +3659,9 @@ End of Syntax table dump. Exported nodes: node dummy::s = dummy::s(int, int) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/activation_ec.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3382,6 +3685,9 @@ End of Syntax table dump. Exported nodes: node dummy::activation_ec = dummy::activation_ec(bool) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/drapfab.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3405,6 +3711,9 @@ End of Syntax table dump. Exported nodes: node dummy::drapfab = dummy::drapfab(bool, bool, bool) returns (bool, bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/minmax4.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3431,6 +3740,9 @@ End of Syntax table dump. node dummy::minmax = dummy::minmax(int, int) returns (int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/after.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3454,6 +3766,9 @@ End of Syntax table dump. Exported nodes: node dummy::after = dummy::after(bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/alarme.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3492,6 +3807,9 @@ End of Syntax table dump. node dummy::decompte = dummy::decompte(bool, int, bool) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/minmax4_bis.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3518,6 +3836,9 @@ End of Syntax table dump. node dummy::minmax = dummy::minmax(int, int) returns (int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/arbitre.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3549,10 +3870,13 @@ End of Syntax table dump. node dummy::my_switch = dummy::my_switch(bool, bool, bool) returns (bool) on clock XXX - node dummy::xedge = extern xedge(bool) returns (bool) + node dummy::xedge = dummy::xedge(bool) returns (bool) on clock XXX node dummy::arbitre = dummy::arbitre(bool, bool, bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/minmax5.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3577,8 +3901,11 @@ End of Syntax table dump. Exported nodes: node dummy::minmax5 = dummy::minmax5(int, int, int, int) returns (int, int, int, int) on clock XXX - node dummy::minmax = extern minmax(int, int) returns (int, int) + node dummy::minmax = dummy::minmax(int, int) returns (int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/argos.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3602,6 +3929,9 @@ End of Syntax table dump. Exported nodes: node dummy::argos = dummy::argos(bool, bool) returns (bool, bool, bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/minmax5_random.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3626,8 +3956,11 @@ End of Syntax table dump. Exported nodes: node dummy::minmax5_random = dummy::minmax5_random(int, int, int, int) returns (int, int, int, int) on clock XXX - node dummy::minmax = extern minmax(int, int) returns (int, int) + node dummy::minmax = dummy::minmax(int, int) returns (int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/assertion.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3651,6 +3984,9 @@ End of Syntax table dump. Exported nodes: node dummy::assertion = dummy::assertion(bool, bool, bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/minmax6.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3677,6 +4013,9 @@ End of Syntax table dump. node dummy::minmax = dummy::minmax(int, int) returns (int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/mm.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3704,6 +4043,9 @@ End of Syntax table dump. Exported nodes: node dummy::mm = dummy::mm(int, int) returns (int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/aux.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3727,6 +4069,9 @@ End of Syntax table dump. Exported nodes: node dummy::aux = dummy::aux(bool) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/mm1.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3754,6 +4099,9 @@ End of Syntax table dump. Exported nodes: node dummy::mm1 = dummy::mm1(int, int) returns ( {a : int; b : int}) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/aux1.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3777,6 +4125,9 @@ End of Syntax table dump. Exported nodes: node dummy::aux1 = dummy::aux1(int, int) returns (int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/mm22.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3804,6 +4155,9 @@ End of Syntax table dump. Exported nodes: node dummy::mm22 = dummy::mm22(int, int) returns ( {a : int; b : int}) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/bascule.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3827,6 +4181,9 @@ End of Syntax table dump. Exported nodes: node dummy::bascule = dummy::bascule(bool, bool) returns (bool, bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/mm3.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3854,6 +4211,9 @@ End of Syntax table dump. Exported nodes: node dummy::mm3 = dummy::mm3( {a : int; b : int}) returns ( {a : int; b : int}) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/call.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3878,14 +4238,17 @@ End of Syntax table dump. Exported types: Exported constants: Exported nodes: - node dummy::f = extern f(int) returns (int) + node dummy::f = dummy::f(int) returns (int) on clock XXX node dummy::n = dummy::n(int, bool) returns (int, int) on clock XXX - node dummy::p = extern p(int) returns (int, int) + node dummy::p = dummy::p(int) returns (int, int) on clock XXX node dummy::call = dummy::call(int, bool) returns (int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/mouse.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3912,6 +4275,9 @@ End of Syntax table dump. node dummy::edge = dummy::edge(bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/ck2.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3935,6 +4301,9 @@ End of Syntax table dump. Exported nodes: node dummy::ck2 = dummy::ck2(bool, bool, int) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/mouse1.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3958,6 +4327,9 @@ End of Syntax table dump. Exported nodes: node dummy::mouse1 = dummy::mouse1(bool, bool, int) returns (bool, bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/ck3.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -3981,6 +4353,9 @@ End of Syntax table dump. Exported nodes: node dummy::ck3 = dummy::ck3(bool, bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/mouse2.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4007,6 +4382,9 @@ End of Syntax table dump. node dummy::edge = dummy::edge(bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/ck4.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4030,6 +4408,9 @@ End of Syntax table dump. Exported nodes: node dummy::ck4 = dummy::ck4(int, bool) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/mouse3.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4053,6 +4434,9 @@ End of Syntax table dump. Exported nodes: node dummy::mouse3 = dummy::mouse3(bool, bool, int) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/ck5.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4079,6 +4463,9 @@ End of Syntax table dump. node dummy::ck5 = dummy::ck5(bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/ck6.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4102,12 +4489,15 @@ End of Syntax table dump. Exported types: Exported constants: Exported nodes: - node dummy::p = extern p(int) returns (int, int) + node dummy::p = dummy::p(int) returns (int, int) on clock XXX node dummy::ck6 = dummy::ck6(bool, bool, int, int) returns (int, int) on clock XXX node dummy::N = dummy::N(bool, int, int) returns (int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/multiclock.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4134,6 +4524,9 @@ End of Syntax table dump. node dummy::moyenne = dummy::moyenne(int, int) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/ck7.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4157,6 +4550,9 @@ End of Syntax table dump. Exported nodes: node dummy::ck7 = dummy::ck7(bool, int, int) returns (int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/nc1.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4183,6 +4579,9 @@ End of Syntax table dump. node dummy::nc1 = dummy::nc1(bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/nc10.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4218,8 +4617,50 @@ End of Syntax table dump. node dummy::n4 = dummy::n4(int, int, int, int) returns (int, int) on clock XXX -*** Error in file "should_work/NONREG/clock.lus", line 20, col 40 to 43, token 'when': syntax error +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/clock.lus +*** SyntaxTab.create pass 1 +*** SyntaxTab.create pass 2 + init pack dummy + export node inOnOut + export node outOnIn + export node clock + export node outOnOut + export node inOnIn + export node all +*** SyntaxTab.create pass 3 + init symbol tables for pack dummy +*** SyntaxTab.create done +*** « Syntax table dump: + - Package or model list: + clock (pack) + + - Raw model table: + - Raw Package table: dummy + - Package manager table: dummy +End of Syntax table dump. » +-- MAIN NODE: "clock::main" +*** Dump the exported items of the packages. + * package dummy + Exported types: + Exported constants: + Exported nodes: + node dummy::inOnOut = dummy::inOnOut(bool, bool) returns (bool) on clock XXX + + node dummy::outOnIn = dummy::outOnIn(bool, bool) returns (bool) on clock XXX + + node dummy::clock = dummy::clock(bool) returns (bool) on clock XXX + + node dummy::outOnOut = dummy::outOnOut(bool, bool) returns (bool, bool) on clock XXX + + node dummy::inOnIn = dummy::inOnIn(bool, bool) returns (bool) on clock XXX + + node dummy::all = dummy::all(bool, bool) returns (bool, bool) on clock XXX + + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/nc2.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4246,6 +4687,9 @@ End of Syntax table dump. node dummy::nc2 = dummy::nc2(bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/cminus.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4275,6 +4719,9 @@ End of Syntax table dump. node dummy::cminus = dummy::cminus(bool, bool, bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/nc3.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4301,6 +4748,9 @@ End of Syntax table dump. node dummy::nc3 = dummy::nc3(bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/compteur.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4324,6 +4774,9 @@ End of Syntax table dump. Exported nodes: node dummy::compteur = dummy::compteur(bool) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/nc4.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4353,6 +4806,9 @@ End of Syntax table dump. node dummy::nc4 = dummy::nc4(bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/deconne.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4385,14 +4841,17 @@ End of Syntax table dump. const dummy::L = 2.000000 const dummy::T = 0.100000 Exported nodes: - node dummy::make_pend = extern make_pend(real, real, real, real) returns (dummy::pendule) + node dummy::make_pend = dummy::make_pend(real, real, real, real) returns (dummy::pendule) on clock XXX - node dummy::cos = extern cos(real) returns (real) + node dummy::cos = dummy::cos(real) returns (real) on clock XXX - node dummy::sin = extern sin(real) returns (real) + node dummy::sin = dummy::sin(real) returns (real) on clock XXX node dummy::deconne = dummy::deconne(real) returns (dummy::pendule) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/nc5.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4428,6 +4887,9 @@ End of Syntax table dump. node dummy::nc5 = dummy::nc5(int) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/dep.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4451,6 +4913,9 @@ End of Syntax table dump. Exported nodes: node dummy::dep = dummy::dep(int) returns (int, int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/nc6.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4486,6 +4951,9 @@ End of Syntax table dump. node dummy::nc6 = dummy::nc6(int) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/dependeur.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4509,6 +4977,9 @@ End of Syntax table dump. Exported nodes: node dummy::dependeur = dummy::dependeur(int) returns (int, int, int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/node_caller1.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4547,6 +5018,9 @@ End of Syntax table dump. node dummy::ex5 = dummy::ex5(int) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/dependeur_struct.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4572,6 +5046,9 @@ End of Syntax table dump. Exported nodes: node dummy::dependeur_struct = dummy::dependeur_struct(int) returns ( {h : int; m : int; s : int; ms : int}) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/eq1.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4595,6 +5072,9 @@ End of Syntax table dump. Exported nodes: node dummy::eq1 = dummy::eq1(bool, bool, bool, bool, bool) returns (bool, bool, bool, bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/long_et_stupide_nom_de_noeud.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4618,6 +5098,9 @@ End of Syntax table dump. Exported nodes: node dummy::long_et_stupide_nom_de_noeud = dummy::long_et_stupide_nom_de_noeud(int) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/nc8.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4653,6 +5136,9 @@ End of Syntax table dump. node dummy::nc8 = dummy::nc8(int) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/nc9.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4688,6 +5174,9 @@ End of Syntax table dump. node dummy::nc9 = dummy::nc9(int) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/o2l_feux_compl.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4711,6 +5200,9 @@ End of Syntax table dump. Exported nodes: node dummy::o2l_feux_compl = dummy::o2l_feux_compl(bool, bool, bool, bool, bool) returns (bool, bool, bool, bool, bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/patrick.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4734,6 +5226,9 @@ End of Syntax table dump. Exported nodes: node dummy::patrick = dummy::patrick(int, int, bool, bool) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/poussoir.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4763,6 +5258,9 @@ End of Syntax table dump. node dummy::poussoir = dummy::poussoir(bool, bool) returns (bool, bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/rs.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4786,8 +5284,14 @@ End of Syntax table dump. Exported nodes: node dummy::rs = dummy::rs(bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/simple.lus *** Error in file "should_work/NONREG/simple.lus", line 2, col 20 to 20, token '{': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/stopwatch.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4814,6 +5318,9 @@ End of Syntax table dump. node dummy::stopwatch = dummy::stopwatch(bool, bool, bool) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/testCA.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4837,6 +5344,9 @@ End of Syntax table dump. Exported nodes: node dummy::testCA = dummy::testCA(int) returns (int, int, int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/trivial.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4863,6 +5373,9 @@ End of Syntax table dump. node dummy::trivial = dummy::trivial(bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/trivial2.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4889,6 +5402,9 @@ End of Syntax table dump. node dummy::trivial2 = dummy::trivial2(bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/uu.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4912,6 +5428,9 @@ End of Syntax table dump. Exported nodes: node dummy::uu = dummy::uu(bool, bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/v1.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4935,6 +5454,9 @@ End of Syntax table dump. Exported nodes: node dummy::v1 = dummy::v1(int, bool) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/enum.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -4974,6 +5496,9 @@ End of Syntax table dump. Exported nodes: node dummy::boo = dummy::boo(int) returns (enum {dummy::bleu, dummy::blanc, dummy::rouge}, enum {dummy::blue, dummy::white, dummy::redd}) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/NONREG/Int.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack mainPack @@ -5007,6 +5532,9 @@ End of Syntax table dump. Int8::n = 8 can be provided. *** oops: an internal error occurred in file lazyCompiler.ml, line 330, column 5 *** when compiling lustre program should_work/NONREG/Int.lus + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/alias.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5039,6 +5567,9 @@ End of Syntax table dump. node dummy::aliasGivenNode = dummy::unNoeud(int, int^3) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/bred.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5062,6 +5593,9 @@ End of Syntax table dump. Exported nodes: node dummy::bred = dummy::bred(bool^2) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/clock1_2ms.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5091,8 +5625,14 @@ End of Syntax table dump. node dummy::clock1_2ms = dummy::clock1_2ms(bool) returns (bool, bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/decl.lus *** Error in file "should_work/demo/decl.lus", line 19, col 19 to 19, token ',': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/lustre_test1_ok.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5125,8 +5665,14 @@ End of Syntax table dump. node dummy::TransFnc_1 = dummy::TransFnc_1(real) returns (real) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/mapdeRed.lus *** Error in file "should_work/demo/mapdeRed.lus", line 12, col 17 to 17, token '+': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/mapiter.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5153,6 +5699,9 @@ End of Syntax table dump. node dummy::mapiter = dummy::mapiter(int^7^3) returns (int^7^3) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/plus.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5176,6 +5725,9 @@ End of Syntax table dump. Exported nodes: node dummy::plus = dummy::plus(int, int) returns (int, int, int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/pre_x.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5199,6 +5751,9 @@ End of Syntax table dump. Exported nodes: node dummy::pre_x = dummy::pre_x(int, int) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/rediter.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5225,6 +5780,9 @@ End of Syntax table dump. node dummy::rediter = dummy::rediter(int^5^3) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/sample_time_change.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5257,6 +5815,9 @@ End of Syntax table dump. node dummy::sample_time_change = dummy::sample_time_change(bool, bool, real) returns (real) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/mapiter_lv4.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5290,6 +5851,9 @@ End of Syntax table dump. node dummy::m_incr_tab_7 = dummy::m_incr_tab_7(int^7) returns (int^7) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/bred_lv4.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5315,10 +5879,49 @@ End of Syntax table dump. Exported nodes: node dummy::bred = dummy::bred(bool^2) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/Gyroscope2.lus *** Error in file "should_work/demo/Gyroscope2.lus", line 106, col 1 to 1, token '%': syntax error -*** Error in file "should_work/demo/clock.lus", line 4, col 37 to 40, token 'when': syntax error +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/clock.lus +*** SyntaxTab.create pass 1 +*** SyntaxTab.create pass 2 + init pack dummy + export node clock + export node clock2 + export node clock3 + export node clock4 +*** SyntaxTab.create pass 3 + init symbol tables for pack dummy +*** SyntaxTab.create done +*** « Syntax table dump: + - Package or model list: + clock (pack) + + - Raw model table: + - Raw Package table: dummy + - Package manager table: dummy +End of Syntax table dump. » +-- MAIN NODE: "clock::main" +*** Dump the exported items of the packages. + * package dummy + Exported types: + Exported constants: + Exported nodes: + node dummy::clock = dummy::clock(bool, bool) returns (bool, bool) on clock XXX + + node dummy::clock2 = dummy::clock2(bool, bool) returns (bool) on clock XXX + + node dummy::clock3 = dummy::clock3(bool) returns (bool, bool) on clock XXX + + node dummy::clock4 = dummy::clock4(bool, bool) returns (bool, bool) on clock XXX + + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/declaration.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5385,16 +5988,19 @@ End of Syntax table dump. Exported nodes: node dummy::declaration = dummy::declaration(int) returns (int) on clock XXX - node dummy::f1 = extern f1(enum {dummy::bleu, dummy::blanc, dummy::rouge}, enum {dummy::bleu, dummy::blanc, dummy::rouge}, enum {dummy::bleu, dummy::blanc, dummy::rouge}) returns (bool^2) + node dummy::f1 = dummy::f1(enum {dummy::bleu, dummy::blanc, dummy::rouge}, enum {dummy::bleu, dummy::blanc, dummy::rouge}, enum {dummy::bleu, dummy::blanc, dummy::rouge}) returns (bool^2) on clock XXX - node dummy::n1 = extern n1(dummy::t1, dummy::t1, dummy::t1) returns (bool) + node dummy::n1 = dummy::n1(dummy::t1, dummy::t1, dummy::t1) returns (bool) on clock XXX - node dummy::n2 = extern n2(dummy::t1^8, dummy::t1^8, dummy::t1^8, bool) returns (dummy::t1^8^5) + node dummy::n2 = dummy::n2(bool, dummy::t1^8, dummy::t1^8, dummy::t1^8) returns (dummy::t1^8^5) on clock XXX node dummy::n4 = dummy::n4(bool) returns (bool) on clock XXX node dummy::n5 = dummy::n5(real) returns (real) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/def.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5440,6 +6046,9 @@ End of Syntax table dump. Exported nodes: node dummy::def = dummy::def(bool, int^4^4, {x : int; y : real; z : int^4^4^4}^2, int^23) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/filliter.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5473,6 +6082,9 @@ End of Syntax table dump. node dummy::incr_acc = dummy::incr_acc(int) returns (int, int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/filter.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5500,6 +6112,9 @@ End of Syntax table dump. Exported nodes: node dummy::filter = dummy::filter(real, real) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/map_red_iter.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5548,10 +6163,19 @@ End of Syntax table dump. node dummy::map_red_iter = dummy::map_red_iter(int, {mesure_gen : int}, {elt_bidon : int; chg2gen : int^20}, int^20, bool^20) returns (int^20) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/mappredef.lus *** Error in file "should_work/demo/mappredef.lus", line 10, col 14 to 14, token ',': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/demo/redoptest.lus *** Error in file "should_work/demo/redoptest.lus", line 8, col 17 to 17, token '+': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_work/to_sort_out/asservi.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5592,15 +6216,15 @@ End of Syntax table dump. Exported nodes: node dummy::jeu = dummy::jeu(real, real) returns (dummy::pendule) on clock XXX - node dummy::make_pend = extern make_pend(real, real, real, real) returns (dummy::pendule) + node dummy::make_pend = dummy::make_pend(real, real, real, real) returns (dummy::pendule) on clock XXX - node dummy::sqrt = extern sqrt(real) returns (real) + node dummy::sqrt = dummy::sqrt(real) returns (real) on clock XXX - node dummy::cos = extern cos(real) returns (real) + node dummy::cos = dummy::cos(real) returns (real) on clock XXX node dummy::D = dummy::D(real) returns (real) on clock XXX - node dummy::sin = extern sin(real) returns (real) + node dummy::sin = dummy::sin(real) returns (real) on clock XXX node dummy::asservi = dummy::asservi(real) returns (dummy::pendule) on clock XXX @@ -5611,8 +6235,14 @@ End of Syntax table dump. node dummy::I2 = dummy::I2(real) returns (real) on clock XXX Those tests are supposed to generate errors + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_fail/syntax/record.lus *** Error in file "should_fail/syntax/record.lus", line 7, col 29 to 29, token '{': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_fail/semantics/x.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5643,6 +6273,9 @@ End of Syntax table dump. > const ref in file "should_fail/semantics/x.lus", line 8, col 11 to 11, token 'n' > const ref in file "should_fail/semantics/x.lus", line 2, col 11 to 11, token 'm' + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_fail/semantics/def.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5670,8 +6303,14 @@ End of Syntax table dump. Exported nodes: node dummy::def = dummy::def(bool) returns ( {x : int^4}) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_fail/semantics/not_a_constant.lus *** Error in file "should_fail/semantics/not_a_constant.lus", line 10, col 23 to 24, token '--': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_fail/semantics/activation2.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5701,6 +6340,9 @@ End of Syntax table dump. node dummy::activation2 = dummy::activation2(bool) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_fail/semantics/activation1.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5730,6 +6372,9 @@ End of Syntax table dump. node dummy::activation1 = dummy::activation1(bool, bool) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_fail/semantics/bug.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5783,8 +6428,14 @@ End of Syntax table dump. node dummy::once_since = dummy::once_since(bool, bool) returns (bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_fail/semantics/const.lus *** Error in file "should_fail/semantics/const.lus", line 18, col 17 to 17, token ',': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_fail/semantics/cpt_dc.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5808,10 +6459,19 @@ End of Syntax table dump. Exported nodes: node dummy::cpt_dc = dummy::cpt_dc(bool, bool) returns (int) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_fail/semantics/import2.lus *** Error in file "should_fail/semantics/import2.lus", line 2, col 1 to 4, token 'node': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_fail/semantics/m.lus *** Error in file "should_fail/semantics/m.lus", line 3, col 23 to 23, token ',': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_fail/semantics/piege.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5841,6 +6501,9 @@ End of Syntax table dump. node dummy::aux2 = dummy::aux2(bool, bool) returns (bool, bool) on clock XXX + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_fail/semantics/bad_call01.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5867,8 +6530,14 @@ End of Syntax table dump. *** Error in file "dummy", line 0, col 0 to 0, token 'dummy': recursion loop detected: > node ref in file "should_fail/semantics/bad_call01.lus", line 2, col 13 to 16, token 'titi' + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_fail/semantics/bad_call03.lus *** Error in file "should_fail/semantics/bad_call03.lus", line 2, col 18 to 18, token '+': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_fail/semantics/tranche.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5899,6 +6568,9 @@ End of Syntax table dump. Exported constants: *** Error in file "should_fail/semantics/tranche.lus", line 7, col 6 to 6, token 'n': can't eval constant: external constant not allowed (in file "should_fail/semantics/tranche.lus", line 7, col 6 to 6, token 'n') + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_fail/semantics/const2.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy @@ -5943,10 +6615,19 @@ End of Syntax table dump. *** Error in file "should_fail/semantics/const2.lus", line 4, col 13 to 16, token 'when': can't eval constant: operation when not allowed in static expression const dummy::c10 = 12 + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_fail/clock/clock.lus *** Error in file "should_fail/clock/clock.lus", line 6, col 1 to 4, token 'node': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_fail/type/Gyro.lus *** Error in file "should_fail/type/Gyro.lus", line 11, col 42 to 42, token ',': syntax error + +---------------------------------------------------------------------- +====> ../lus2lic -vl 3 should_fail/type/const2.lus *** SyntaxTab.create pass 1 *** SyntaxTab.create pass 2 init pack dummy