------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- This source file was automatically generated by Platypus -- see http://dossen.univ-brest.fr/apl -- -- Any modification of this file will be lost. -- Please see the "platypus" directory instead : it contains the Cheddar's -- model and its meta-model. ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Cheddar is a free real time scheduling tool. -- This program provides services to automatically check temporal constraints -- of real time tasks. -- -- Copyright (C) 2002-2014 Frank Singhoff -- Cheddar is developed by the LAB-STICC Team, University of Brest -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- -- -- Contact : cheddar@listes.univ-brest.fr -- To post to this mailing list, you must be subscribed -- (see http//beru.univ-brest.fr/~singhoff/cheddar for details) -- ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with Text_io; use Text_io; with unbounded_strings; use unbounded_strings; with CFG_Nodes; use CFG_Nodes; use CFG_Nodes.CFG_Nodes_Table_Package; with primitive_xml_strings; use primitive_xml_strings; Package Body DFG_Nodes is -- --------= DFG_Variable =-------- procedure Initialize(obj : in out DFG_Variable) is begin initialize(Named_Object(obj)); end Initialize; function Copy ( obj : in DFG_Variable ) return DFG_Variable_Ptr is New_DFG_Variable : DFG_Variable_Ptr; begin New_DFG_Variable := new DFG_Variable'(obj); return (New_DFG_Variable); end Copy; function Copy ( obj : in DFG_Variable_Ptr ) return DFG_Variable_Ptr is begin return copy(obj.all); end Copy; procedure Put(obj : in DFG_Variable) is begin put(Named_Object(obj)); end Put; procedure Put(obj : in DFG_Variable_Ptr) is begin Put(Obj.All); end Put; procedure Put_Name ( obj : in DFG_Variable_Ptr) is begin Put ( To_String ( Obj.Name ) ); end Put_Name; function Get_Name (obj : in DFG_Variable) return Unbounded_String is begin return obj.name; end Get_Name; function Get_Name (obj : in DFG_Variable_ptr) return Unbounded_String is begin return obj.name; end Get_Name; function type_of ( obj : in DFG_Variable ) return unbounded_string_list is list : unbounded_string_list; s : unbounded_string_ptr; begin Initialize(list); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.NAMED_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("DFG_NODES.DFG_VARIABLE"); Add (list, s); return list; end type_of; function type_of ( obj : in DFG_Variable_Ptr ) return unbounded_string_list is begin return type_of(obj.all); end type_of; procedure Build_Attributes_XML_String(obj : in DFG_Variable; result : in out Unbounded_String) is begin Build_Attributes_XML_String(Named_Object(obj), result); end Build_Attributes_XML_String; function XML_String(obj : in DFG_Variable) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); Build_Attributes_XML_String(obj, result); result := result & to_unbounded_string(""); return (result); end XML_String; function XML_String(obj : in DFG_Variable_Ptr) return Unbounded_String is begin if obj /= null then return XML_String(obj.all); else return Empty_String; end if; end XML_String; function XML_Ref_String(obj : in DFG_Variable) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); return (result); end XML_Ref_String; function XML_Ref_String(obj : in DFG_Variable_Ptr) return Unbounded_String is begin return XML_Ref_String(obj.all); end XML_Ref_String; -- --------= DFG_Statement =-------- procedure Initialize(obj : in out DFG_Statement) is begin initialize(Named_Object(obj)); end Initialize; function Copy ( obj : in DFG_Statement ) return DFG_Statement_Ptr is New_DFG_Statement : DFG_Statement_Ptr; begin New_DFG_Statement := new DFG_Statement'(obj); return (New_DFG_Statement); end Copy; function Copy ( obj : in DFG_Statement_Ptr ) return DFG_Statement_Ptr is begin return copy(obj.all); end Copy; procedure Put(obj : in DFG_Statement) is begin put(Named_Object(obj)); put("Defined_Variable: "); if obj.Defined_Variable /= null then put(obj.Defined_Variable.all); else put("null"); end if;put ( "; " ); put("Used_Variables: "); put(obj.Used_Variables); put ( "; " ); end Put; procedure Put(obj : in DFG_Statement_Ptr) is begin Put(Obj.All); end Put; procedure Put_Name ( obj : in DFG_Statement_Ptr) is begin Put ( To_String ( Obj.Name ) ); end Put_Name; function Get_Name (obj : in DFG_Statement) return Unbounded_String is begin return obj.name; end Get_Name; function Get_Name (obj : in DFG_Statement_ptr) return Unbounded_String is begin return obj.name; end Get_Name; function type_of ( obj : in DFG_Statement ) return unbounded_string_list is list : unbounded_string_list; s : unbounded_string_ptr; begin Initialize(list); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("OBJECTS.NAMED_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("DFG_NODES.DFG_STATEMENT"); Add (list, s); return list; end type_of; function type_of ( obj : in DFG_Statement_Ptr ) return unbounded_string_list is begin return type_of(obj.all); end type_of; procedure Build_Attributes_XML_String(obj : in DFG_Statement; result : in out Unbounded_String) is begin Build_Attributes_XML_String(Named_Object(obj), result); result := result & to_unbounded_string(""); if (XML_String(obj.Used_Variables) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.Used_Variables) & to_unbounded_string(""); end if; end Build_Attributes_XML_String; function XML_String(obj : in DFG_Statement) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); Build_Attributes_XML_String(obj, result); result := result & to_unbounded_string(""); return (result); end XML_String; function XML_String(obj : in DFG_Statement_Ptr) return Unbounded_String is begin if obj /= null then return XML_String(obj.all); else return Empty_String; end if; end XML_String; function XML_Ref_String(obj : in DFG_Statement) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); return (result); end XML_Ref_String; function XML_Ref_String(obj : in DFG_Statement_Ptr) return Unbounded_String is begin return XML_Ref_String(obj.all); end XML_Ref_String; -- --------= DFG_Cfg_Type =-------- procedure Initialize(obj : out DFG_Cfg_Type) is begin obj.Nb_Blocks := 0; end Initialize; procedure Put(obj : in DFG_Cfg_Type) is begin put("Blocks: "); put(obj.Blocks); put ( "; " ); put("Nb_Blocks: "); standards_io.natural_io.put(obj.Nb_Blocks); put ( "; " ); end Put; procedure Put(obj : in DFG_Cfg_Type_Ptr) is begin Put(Obj.All); end Put; procedure Build_Attributes_XML_String(obj : in DFG_Cfg_Type; result : in out Unbounded_String) is begin if (XML_String(obj.Blocks) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.Blocks) & to_unbounded_string(""); end if; if (XML_String(obj.Nb_Blocks) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.Nb_Blocks) & to_unbounded_string(""); end if; end Build_Attributes_XML_String; function XML_String(obj : in DFG_Cfg_Type) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); Build_Attributes_XML_String(obj, result); result := result & to_unbounded_string(""); return (result); end XML_String; function XML_String(obj : in DFG_Cfg_Type_Ptr) return Unbounded_String is begin if obj /= null then return XML_String(obj.all); else return Empty_String; end if; end XML_String; function XML_Ref_String(obj : in DFG_Cfg_Type) return Unbounded_String is result : Unbounded_String; begin raise xml_ref_string_error; return to_unbounded_string(""); end XML_Ref_String; function Copy ( obj : in DFG_Cfg_Type ) return DFG_Cfg_Type_Ptr is New_DFG_Cfg_Type : DFG_Cfg_Type_Ptr; begin New_DFG_Cfg_Type := new DFG_Cfg_Type'(obj); return (New_DFG_Cfg_Type); end Copy; function Copy ( obj : in DFG_Cfg_Type_Ptr ) return DFG_Cfg_Type_Ptr is begin return copy(obj.all); end Copy; -- --------= DFG_Def_Use_Association =-------- procedure Initialize(obj : out DFG_Def_Use_Association) is begin null; end Initialize; procedure Put(obj : in DFG_Def_Use_Association) is begin put("Def_Variable: "); if obj.Def_Variable /= null then put(obj.Def_Variable.all); else put("null"); end if;put ( "; " ); put("Def_Statement: "); if obj.Def_Statement /= null then put(obj.Def_Statement.all); else put("null"); end if;put ( "; " ); put("Use_Statement: "); if obj.Use_Statement /= null then put(obj.Use_Statement.all); else put("null"); end if;put ( "; " ); end Put; procedure Put(obj : in DFG_Def_Use_Association_Ptr) is begin Put(Obj.All); end Put; procedure Build_Attributes_XML_String(obj : in DFG_Def_Use_Association; result : in out Unbounded_String) is begin result := result & to_unbounded_string(""); result := result & to_unbounded_string(""); result := result & to_unbounded_string(""); end Build_Attributes_XML_String; function XML_String(obj : in DFG_Def_Use_Association) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); Build_Attributes_XML_String(obj, result); result := result & to_unbounded_string(""); return (result); end XML_String; function XML_String(obj : in DFG_Def_Use_Association_Ptr) return Unbounded_String is begin if obj /= null then return XML_String(obj.all); else return Empty_String; end if; end XML_String; function XML_Ref_String(obj : in DFG_Def_Use_Association) return Unbounded_String is result : Unbounded_String; begin raise xml_ref_string_error; return to_unbounded_string(""); end XML_Ref_String; function Copy ( obj : in DFG_Def_Use_Association ) return DFG_Def_Use_Association_Ptr is New_DFG_Def_Use_Association : DFG_Def_Use_Association_Ptr; begin New_DFG_Def_Use_Association := new DFG_Def_Use_Association'(obj); return (New_DFG_Def_Use_Association); end Copy; function Copy ( obj : in DFG_Def_Use_Association_Ptr ) return DFG_Def_Use_Association_Ptr is begin return copy(obj.all); end Copy; -- --------= DFG_Var_Association =-------- procedure Initialize(obj : out DFG_Var_Association) is begin null; end Initialize; procedure Put(obj : in DFG_Var_Association) is begin put("Def_Variable: "); if obj.Def_Variable /= null then put(obj.Def_Variable.all); else put("null"); end if;put ( "; " ); put("Statement: "); if obj.Statement /= null then put(obj.Statement.all); else put("null"); end if;put ( "; " ); end Put; procedure Put(obj : in DFG_Var_Association_Ptr) is begin Put(Obj.All); end Put; procedure Build_Attributes_XML_String(obj : in DFG_Var_Association; result : in out Unbounded_String) is begin result := result & to_unbounded_string(""); result := result & to_unbounded_string(""); end Build_Attributes_XML_String; function XML_String(obj : in DFG_Var_Association) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); Build_Attributes_XML_String(obj, result); result := result & to_unbounded_string(""); return (result); end XML_String; function XML_String(obj : in DFG_Var_Association_Ptr) return Unbounded_String is begin if obj /= null then return XML_String(obj.all); else return Empty_String; end if; end XML_String; function XML_Ref_String(obj : in DFG_Var_Association) return Unbounded_String is result : Unbounded_String; begin raise xml_ref_string_error; return to_unbounded_string(""); end XML_Ref_String; function Copy ( obj : in DFG_Var_Association ) return DFG_Var_Association_Ptr is New_DFG_Var_Association : DFG_Var_Association_Ptr; begin New_DFG_Var_Association := new DFG_Var_Association'(obj); return (New_DFG_Var_Association); end Copy; function Copy ( obj : in DFG_Var_Association_Ptr ) return DFG_Var_Association_Ptr is begin return copy(obj.all); end Copy; -- --------= DFG_Def_Use_Info =-------- procedure Initialize(obj : out DFG_Def_Use_Info) is begin null; end Initialize; procedure Put(obj : in DFG_Def_Use_Info) is begin put("Def_In: "); put(obj.Def_In); put ( "; " ); put("Def_Out: "); put(obj.Def_Out); put ( "; " ); put("Use_Out: "); put(obj.Use_Out); put ( "; " ); put("Def_Use_Asso: "); put(obj.Def_Use_Asso); put ( "; " ); end Put; procedure Put(obj : in DFG_Def_Use_Info_Ptr) is begin Put(Obj.All); end Put; procedure Build_Attributes_XML_String(obj : in DFG_Def_Use_Info; result : in out Unbounded_String) is begin if (XML_String(obj.Def_In) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.Def_In) & to_unbounded_string(""); end if; if (XML_String(obj.Def_Out) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.Def_Out) & to_unbounded_string(""); end if; if (XML_String(obj.Use_Out) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.Use_Out) & to_unbounded_string(""); end if; if (XML_String(obj.Def_Use_Asso) /= Empty_String) then result := result & to_unbounded_string("") & XML_String(obj.Def_Use_Asso) & to_unbounded_string(""); end if; end Build_Attributes_XML_String; function XML_String(obj : in DFG_Def_Use_Info) return Unbounded_String is result : Unbounded_String; begin result := to_unbounded_string(""); Build_Attributes_XML_String(obj, result); result := result & to_unbounded_string(""); return (result); end XML_String; function XML_String(obj : in DFG_Def_Use_Info_Ptr) return Unbounded_String is begin if obj /= null then return XML_String(obj.all); else return Empty_String; end if; end XML_String; function XML_Ref_String(obj : in DFG_Def_Use_Info) return Unbounded_String is result : Unbounded_String; begin raise xml_ref_string_error; return to_unbounded_string(""); end XML_Ref_String; function Copy ( obj : in DFG_Def_Use_Info ) return DFG_Def_Use_Info_Ptr is New_DFG_Def_Use_Info : DFG_Def_Use_Info_Ptr; begin New_DFG_Def_Use_Info := new DFG_Def_Use_Info'(obj); return (New_DFG_Def_Use_Info); end Copy; function Copy ( obj : in DFG_Def_Use_Info_Ptr ) return DFG_Def_Use_Info_Ptr is begin return copy(obj.all); end Copy; End DFG_Nodes;