------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Cheddar is a GNU GPL real-time scheduling analysis tool. -- This program provides services to automatically check schedulability and -- other performance criteria of real-time architecture models. -- -- Copyright (C) 2002-2020, Frank Singhoff, Alain Plantec, Jerome Legrand, -- Hai Nam Tran, Stephane Rubini -- -- The Cheddar project was started in 2002 by -- Frank Singhoff, Lab-STICC UMR 6285, Université de Bretagne Occidentale -- -- Cheddar has been published in the "Agence de Protection des Programmes/France" in 2008. -- Since 2008, Ellidiss technologies also contributes to the development of -- Cheddar and provides industrial support. -- -- The full list of contributors and sponsors can be found in AUTHORS.txt and SPONSORS.txt -- -- 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 -- ----------------------------------------------------------------------------- -- Last update : -- $Rev$ -- $Date$ -- $Author: nam $ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with unbounded_strings; use unbounded_strings; with framework_config; use framework_config; with cfgs; use cfgs; with sets; with cfg_nodes; use cfg_nodes; with cfg_edges; use cfg_edges; package cfg_set is ---------------------------------------------------------- -- Definition of basic block set ---------------------------------------------------------- package cfg_set is new sets (max_element => framework_config.max_cfgs, element => cfg_ptr, free => free, copy => copy, put => put, xml_string => xml_string, xml_ref_string => xml_ref_string); use cfg_set; type cfgs_set is new cfg_set.set with private; subtype cfgs_range is cfg_set.element_range; subtype cfgs_iterator is cfg_set.iterator; ---------------------------------------------------------- -- Exceptions defined in the set package ---------------------------------------------------------- -- Raised when a given CFG node is not in a CFG node set -- cfg_not_found : exception; -- Raised when parameters provided to Add_Basic_Block are wrong -- invalid_parameter : exception; ---------------------------------------------------- -- CHECK ---------------------------------------------------- procedure check_cfg (name : in Unbounded_String; cfg_nodes_tbl : in cfg_nodes_table; cfg_edges_tbl : in cfg_edges_table); ---------------------------------------------------- -- ADD ---------------------------------------------------- procedure add_cfg (my_cfgs : in out cfgs_set; a_cfg : in out cfg_ptr); -- Add a CFG node pointer to a set procedure add_cfg (my_cfgs : in out cfgs_set; a_cfg : in out cfg_ptr; name : in Unbounded_String; cfg_nodes_tbl : in cfg_nodes_table; cfg_edges_tbl : in cfg_edges_table); procedure add_cfg (my_cfgs : in out cfgs_set; name : in Unbounded_String; cfg_nodes_tbl : in cfg_nodes_table; cfg_edges_tbl : in cfg_edges_table); ------------------------------------------------------ -- SEARCH ------------------------------------------------------ function search_cfg (my_cfgs : in cfgs_set; name : in Unbounded_String) return cfg_ptr; --Search CFG node by name function search_cfg_by_id (my_cfgs : in cfgs_set; id : in Unbounded_String) return cfg_ptr; --Search CFG node by cheddar_private_id private type cfgs_set is new cfg_set.set with null record; end cfg_set;