kazoo.adb 965 Bytes
Newer Older
Maxime Perrotin's avatar
Maxime Perrotin committed
1 2
with Ada.Exceptions,
     GNAT.OS_Lib,
3
     TASTE,
4
     TASTE.AADL_Parser,
Maxime Perrotin's avatar
Maxime Perrotin committed
5
     TASTE.Parser_Utils,
6 7
     TASTE.Model_Transformations,
     TASTE.Dump;
8
use TASTE.AADL_Parser,
Maxime Perrotin's avatar
Maxime Perrotin committed
9
    TASTE.Parser_Utils,
10
    TASTE.Model_Transformations;
Maxime Perrotin's avatar
Maxime Perrotin committed
11

Maxime Perrotin's avatar
Maxime Perrotin committed
12
procedure Kazoo is
Maxime Perrotin's avatar
Maxime Perrotin committed
13
begin
taste's avatar
taste committed
14 15
   declare
      Model       : constant TASTE_Model := Parse_Project;
Maxime Perrotin's avatar
Maxime Perrotin committed
16
      Transformed :          TASTE_Model := Transform (Model);
taste's avatar
taste committed
17
   begin
18
      if Model.Configuration.Debug_Flag then
19
         TASTE.Dump.Dump_Input_Model (Model);
20
         Transformed.Dump;
21 22
      end if;

Maxime Perrotin's avatar
Maxime Perrotin committed
23 24
      if Transformed.Configuration.Glue then
         Transformed.Add_Concurrency_View;
Maxime Perrotin's avatar
Maxime Perrotin committed
25
         Transformed.Concurrency_View.Generate_CV;
Maxime Perrotin's avatar
Maxime Perrotin committed
26
      end if;
27

28 29
      Transformed.Generate_Build_Script;
      Transformed.Generate_Code;
taste's avatar
taste committed
30
   end;
Maxime Perrotin's avatar
Maxime Perrotin committed
31
exception
32 33
   when TASTE.Quit_TASTE =>
      GNAT.OS_Lib.OS_Exit (1);
Maxime Perrotin's avatar
Maxime Perrotin committed
34 35 36
   when Error : others =>
      Put_Error (Ada.Exceptions.Exception_Message (Error));
      GNAT.OS_Lib.OS_Exit (1);
Maxime Perrotin's avatar
Maxime Perrotin committed
37
end Kazoo;