Commit ede003eb authored by hugues.jerome's avatar hugues.jerome
Browse files

* In AADLv2, access connections do not need type prefix



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@1952 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 82d99657
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009, GET-Telecom Paris. --
-- Copyright (C) 2008-2011, European Space Agency (ESA). --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -109,6 +109,8 @@ package body Ocarina.BE_AADL.Components.Connections is
Print_Tokens ((T_Subprogram, T_Group, T_Access));
when CT_Access_Virtual_Bus =>
Print_Tokens ((T_Virtual, T_Bus, T_Access));
when CT_Access =>
Print_Token (T_Access);
when CT_Error =>
raise Program_Error;
end case;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009, GET-Telecom Paris. --
-- Copyright (C) 2008-2011, European Space Agency (ESA). --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -52,11 +52,13 @@ package body Ocarina.Files is
procedure Add_File_To_Parse_List (File_Name : Name_Id) is
File_Name_With_Extension : Name_Id;
-- Full_Name : Name_Id;
Do_Add : Boolean := True;
begin
Get_Name_String (File_Name);
if Name_Buffer (Name_Len - 4 .. Name_Len) /= ".aadl" then
if Name_Len < 5
or else Name_Buffer (Name_Len - 4 .. Name_Len) /= ".aadl"
then
Add_Str_To_Name_Buffer (".aadl");
end if;
File_Name_With_Extension := Name_Find;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009-2010, European Space Agency (ESA). --
-- Copyright (C) 2009-2011, European Space Agency (ESA). --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -204,7 +204,8 @@ package body Ocarina.Analyzer.AADL.Queries is
| CT_Access_Data
| CT_Access_Subprogram
| CT_Access_Subprogram_Group
| CT_Access_Virtual_Bus =>
| CT_Access_Virtual_Bus
| CT_Access =>
return PO_Access_Connection;
end case;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009, GET-Telecom Paris. --
-- Copyright (C) 2009-2011, European Space Agency (ESA). --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -700,11 +700,13 @@ package body Ocarina.Analyzer.AADL.Semantics is
when CT_Port_Connection
| CT_Access_Subprogram_Group
| CT_Access_Virtual_Bus =>
| CT_Access_Virtual_Bus
| CT_Access =>
Success := True;
-- XXX Incomplete TODO
when CT_Data | CT_Data_Delayed =>
when CT_Data
| CT_Data_Delayed =>
Success := Kind (Connection_End) = K_Port_Spec
and then Is_Data (Connection_End)
and then not Is_Event (Connection_End);
......@@ -1032,7 +1034,8 @@ package body Ocarina.Analyzer.AADL.Semantics is
when CT_Port_Connection
| CT_Access_Subprogram_Group
| CT_Access_Virtual_Bus =>
| CT_Access_Virtual_Bus
| CT_Access =>
Success := True;
-- XXX incomplete TODO
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2004-2009, GET-Telecom Paris. --
-- Copyright (C) 2004-2011, European Space Agency (ESA). --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -106,8 +106,10 @@ package body Ocarina.Analyzer.Messages is
if Loc /= No_Location then
Write_Str (Image (Loc) & ": ");
else
Write_Str (Image
(Ocarina.Me_AADL.AADL_Tree.Nodes.Loc (Node1)) & ": ");
if Present (Node1) then
Write_Str
(Image (Ocarina.Me_AADL.AADL_Tree.Nodes.Loc (Node1)) & ": ");
end if;
end if;
if Message0 /= "" then
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2008-2009, GET-Telecom Paris. --
-- Copyright (C) 2008-2011, European Space Agency (ESA). --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -72,6 +72,7 @@ package Ocarina.ME_AADL is
type Connection_Type is
(CT_Error,
-- AADL_V1
CT_Event_Data,
CT_Data_Delayed,
......@@ -88,12 +89,13 @@ package Ocarina.ME_AADL is
-- AADL_V2
CT_Access_Virtual_Bus,
CT_Port_Connection,
CT_Access_Subprogram_Group);
CT_Access_Subprogram_Group,
CT_Access);
-- Note: CT_Data represents Data_Immediate in AADL_V1
subtype Port_Connection_Type is Connection_Type
range CT_Data .. CT_Event_Data;
range CT_Data .. CT_Event_Data; -- XXX is this type empty ????
type Flow_Category is (FC_Source, FC_Sink, FC_Path);
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009, GET-Telecom Paris. --
-- Copyright (C) 2008-2011, European Space Agency (ESA). --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -230,7 +230,6 @@ package body Ocarina.FE_AADL.Parser.Components.Connections is
end if;
case Token is
when T_Data => -- data_connection or access_connection
Scan_Token;
......@@ -423,6 +422,15 @@ package body Ocarina.FE_AADL.Parser.Components.Connections is
Category := CT_Access_Virtual_Bus;
when T_Access =>
-- In AADLv2, we can have just
if AADL_Version = AADL_V2 then
Category := CT_Access;
else
raise Program_Error;
end if;
when others =>
if Present (Identifier) then
case AADL_Version is
......@@ -435,7 +443,11 @@ package body Ocarina.FE_AADL.Parser.Components.Connections is
Skip_Tokens (T_Semicolon);
return No_Node;
else
-- nothing was parsed, try to parse other stuff
-- Nothing was parsed, try to parse other stuff
-- XXX WRONG WRONG WRONG, should be either none, or
-- raise an error
Restore_Lexer (Loc);
return No_Node;
end if;
......@@ -444,7 +456,6 @@ package body Ocarina.FE_AADL.Parser.Components.Connections is
-- parse connection source et destination
if not Is_Refinement then
Source := P_Connection_Reference (Code);
if No (Source) then
......@@ -532,7 +543,8 @@ package body Ocarina.FE_AADL.Parser.Components.Connections is
| CT_Access_Data
| CT_Access_Subprogram
| CT_Access_Subprogram_Group
| CT_Access_Virtual_Bus =>
| CT_Access_Virtual_Bus
| CT_Access =>
In_Modes := P_In_Modes (PC_In_Modes);
when CT_Error =>
......
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