---------------------------------------------------- -- Reserve for Isaac's analysis ---------------------------------------------------- with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Framework_Config; use Framework_Config; with Ada.Exceptions; use Ada.Exceptions; with Translate; use Translate; with Objects; use Objects; with Objects.extended; use Objects.extended; with unbounded_strings; use unbounded_strings; with Atomic_Operations; use Atomic_Operations; with CFG_Node_Set; use CFG_Node_Set; with CFG_Nodes; use CFG_Nodes; with sets; with Task_Groups; use Task_Groups; with Processors; use Processors; package Partitioning_Algorithm_Set is ---------------------------------------------------- ---------------------------------------------------- -- This package is used for Modeling Partition Algorithms -- each node is an atomic operation. -- -- Notes: in the implementation of Cheddar, a Partition Algorithms is always instantiated -- an Atomic_Operation. -- Definition of a set ---------------------------------------------------- package Partitioning_Algorithm_Set is new Sets ( max_element => Framework_Config.Max_CFG_Nodes, element => Partitioning_Algorithm_Ptr, free => Free, copy => Copy, put => Put, xml_string => XML_String, xml_ref_string => XML_Ref_String); use Partitioning_Algorithm_Set; type Partitioning_Algorithms_Set is new Partitioning_Algorithm_Set.set with private; subtype Partitioning_Algorithms_Range is Partitioning_Algorithm_Set.element_range; subtype Partitioning_Algorithms_Iterator is Partitioning_Algorithm_Set.iterator; ---------------------------------------------------------- -- Exceptions defined in the set package ---------------------------------------------------------- -- Raised when a given CFG node is not in a CFG node set -- partitioning_algorithm_Not_Found : exception; -- Raised when parameters provided to Add_Basic_Block are wrong -- Invalid_Parameter : exception; ---------------------------------------------------- -- CHECK - Partitioning_Algorithm ---------------------------------------------------- procedure Check_Partitioning_Algorithm (My_Partitioning_Algorithm : in Partitioning_Algorithms_Set; name : in Unbounded_String); -- task_set : in Generic_Task_Group_Ptr; -- processor_set : in Multi_Cores_Processor_Ptr); ---------------------------------------------------- -- ADD - Partitioning_Algorithm ---------------------------------------------------- procedure Add_Partitioning_Algorithm (My_Partitioning_Algorithms : in out Partitioning_Algorithms_Set; A_Partitioning_Algorithm: in out Partitioning_Algorithm_Ptr; name : in Unbounded_String; -- task_set : in Generic_Task_Group_Ptr; -- Processor_set : in Multi_Cores_Processor_Ptr; task_sorting : in Task_Sort_Type; looping : in Loop_Operation_Type; processor_sorting : in Processor_Sort_Type; feasibility_test : in Feasibility_Test_Type); procedure Add_Partitioning_Algorithm (My_Partitioning_Algorithms : in out Partitioning_Algorithms_Set; name : in Unbounded_String; -- task_set : in Generic_Task_Group_Ptr; -- Processor_set : in Multi_Cores_Processor_Ptr; task_sorting : in Task_Sort_Type; looping : in Loop_Operation_Type; processor_sorting : in Processor_Sort_Type; feasibility_test : in Feasibility_Test_Type); ------------------------------------------------------ -- UPDATE - Partitioning_Algorithm ------------------------------------------------------ procedure Update_Partitioning_Algorithm (My_Partitioning_Algorithms : in out Partitioning_Algorithms_Set; name : in Unbounded_String; New_name : in Unbounded_String; -- task_set : in Generic_Task_Group_Ptr; -- Processor_set : in Multi_Cores_Processor_Ptr; task_sorting : in Task_Sort_Type; looping : in Loop_Operation_Type; processor_sorting : in Processor_Sort_Type; feasibility_test : in Feasibility_Test_Type); ------------------------------------------------------ -- SEARCH ------------------------------------------------------ function Search_Partitioning_Algorithm (My_Partitioning_Algorithms : in Partitioning_Algorithms_Set; name : in Unbounded_String) return Partitioning_Algorithm_Ptr; function Search_Partitioning_Algorithm_By_Id (My_Partitioning_Algorithms : in Partitioning_Algorithms_Set; id : in Unbounded_String) return Partitioning_Algorithm_Ptr; ------------------------------------------------------ -- DELETE ------------------------------------------------------ procedure Delete_Partitioning_Algorithm (My_Partitioning_Algorithms : in out Partitioning_Algorithms_Set; A_Partitioning_Algorithm : in out Partitioning_Algorithm_Ptr); procedure Delete_Partitioning_Algorithm (My_Partitioning_Algorithms : in out Partitioning_Algorithms_Set; name : in Unbounded_String); private type Partitioning_Algorithms_Set is new Partitioning_Algorithm_Set.set with null record; end Partitioning_Algorithm_Set;