Commit 8f6a1bcd authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Set up initial data model for CV backend

parent fe03d600
...@@ -357,7 +357,7 @@ package body TASTE.Backend.Code_Generators is ...@@ -357,7 +357,7 @@ package body TASTE.Backend.Code_Generators is
function CP_Template (F : Taste_Terminal_Function) return Translate_Set is function CP_Template (F : Taste_Terminal_Function) return Translate_Set is
package Sort_Set is new Ordered_Sets (Unbounded_String); package Sort_Set is new Ordered_Sets (Unbounded_String);
use Sort_Set; use Sort_Set;
Sorts_Set : Set; Sorts_Set : Set;
Unique_Sorts : Vector_Tag; Unique_Sorts : Vector_Tag;
Corr_Module : Vector_Tag; Corr_Module : Vector_Tag;
Names : Vector_Tag; Names : Vector_Tag;
......
...@@ -41,4 +41,12 @@ package body TASTE.Concurrency_View is ...@@ -41,4 +41,12 @@ package body TASTE.Concurrency_View is
end loop; end loop;
end Debug_Dump; end Debug_Dump;
function Concurrency_View_Template (CV : Taste_Concurrency_View)
return CV_As_Template is
Result : CV_As_Template;
pragma Unreferenced (CV);
begin
return Result;
end Concurrency_View_Template;
end TASTE.Concurrency_View; end TASTE.Concurrency_View;
...@@ -5,8 +5,10 @@ ...@@ -5,8 +5,10 @@
-- Model of the Concurrency View -- Model of the Concurrency View
with Ada.Containers.Indefinite_Ordered_Maps, with Ada.Containers.Indefinite_Ordered_Maps,
Ada.Containers.Indefinite_Vectors,
Ada.Strings.Unbounded, Ada.Strings.Unbounded,
Text_IO, Text_IO,
Templates_Parser,
TASTE.Parser_Utils, TASTE.Parser_Utils,
TASTE.Interface_View, TASTE.Interface_View,
TASTE.Deployment_View; TASTE.Deployment_View;
...@@ -14,6 +16,7 @@ with Ada.Containers.Indefinite_Ordered_Maps, ...@@ -14,6 +16,7 @@ with Ada.Containers.Indefinite_Ordered_Maps,
use Ada.Containers, use Ada.Containers,
Ada.Strings.Unbounded, Ada.Strings.Unbounded,
Text_IO, Text_IO,
Templates_Parser,
TASTE.Parser_Utils, TASTE.Parser_Utils,
TASTE.Interface_View, TASTE.Interface_View,
TASTE.Deployment_View; TASTE.Deployment_View;
...@@ -72,4 +75,31 @@ package TASTE.Concurrency_View is ...@@ -72,4 +75,31 @@ package TASTE.Concurrency_View is
procedure Debug_Dump (CV : Taste_Concurrency_View; procedure Debug_Dump (CV : Taste_Concurrency_View;
Output : File_Type); Output : File_Type);
-- Set of types to transform the AST into String Template entities
type ST_port is
record
Header : Translate_Set;
end record;
package ST_Ports is new Indefinite_Vectors (Natural, ST_Port);
type ST_Thread is
record
Header : Translate_Set;
Output_Ports : ST_Ports.Vector;
end record;
package ST_Threads is new Indefinite_Ordered_Maps (String, ST_Thread);
-- package ST_Blocks is new Indefinite_Ordered_Maps (String, ST_Block);
type CV_As_Template is
record
Threads : ST_Threads.Map;
-- Blocks : ST_Blocks.Map;
end record;
function Concurrency_View_Template (CV : Taste_Concurrency_View)
return CV_As_Template;
end TASTE.Concurrency_View; end TASTE.Concurrency_View;
Supports Markdown
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