Commit 9fb6c2c8 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add dump function for Concurrency View

parent 9f561b09
......@@ -437,12 +437,23 @@ package body TASTE.AADL_Parser is
Model.Deployment_View.Debug_Dump (Output);
Close (Output);
end if;
if Model.Configuration.Glue then
Create (File => Output,
Mode => Out_File,
Name => Output_Path & "/ConcurrencyView.dump");
Put_Info ("Dump of the Concurrency View");
Model.Concurrency_View.Debug_Dump (Output);
Close (Output);
end if;
Create (File => Output,
Mode => Out_File,
Name => Output_Path & "/DataView.dump");
Put_Info ("Dump of the Data View");
Model.Data_View.Debug_Dump (Output);
Close (Output);
Create (File => Output,
Mode => Out_File,
Name => Output_Path & "/commandline.dump");
......
-- *************************** taste aadl parser *********************** --
-- (c) 2018 European Space Agency - maxime.perrotin@esa.int
-- LGPL license, see LICENSE file
-- Concurrency View
package body TASTE.Concurrency_View is
procedure Debug_Dump (CV : Taste_Concurrency_View; Output : File_Type) is
begin
for Each of CV.Blocks loop
Put_Line (Output, "Protected Block : " & To_String (Each.Name));
end loop;
for Each of CV.Threads loop
Put_Line (Output, "Thread : " & To_String (Each.Name));
end loop;
end Debug_Dump;
end TASTE.Concurrency_View;
......@@ -6,12 +6,14 @@
with Ada.Containers.Indefinite_Ordered_Maps,
Ada.Strings.Unbounded,
Text_IO,
TASTE.Parser_Utils,
TASTE.Interface_View,
TASTE.Deployment_View;
use Ada.Containers,
Ada.Strings.Unbounded,
Text_IO,
TASTE.Parser_Utils,
TASTE.Interface_View,
TASTE.Deployment_View;
......@@ -61,10 +63,13 @@ package TASTE.Concurrency_View is
package AADL_Threads is new Indefinite_Ordered_Maps (String, AADL_Thread);
type Taste_Concurrency_View is
type Taste_Concurrency_View is tagged
record
Threads : AADL_Threads.Map;
Blocks : Protected_Blocks.Map;
end record;
procedure Debug_Dump (CV : Taste_Concurrency_View;
Output : File_Type);
end TASTE.Concurrency_View;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment