Commit 3464c3df authored by jhugues's avatar jhugues

* Update on previous fix

git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@6249 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 824b3ff3
...@@ -161,19 +161,32 @@ package body Ocarina.Analyzer.AADL.Names is ...@@ -161,19 +161,32 @@ package body Ocarina.Analyzer.AADL.Names is
end if; end if;
pragma Assert (Present (Alias)); pragma Assert (Present (Alias));
In_Node := Node_Explicitly_In_Scope (Alias, Current_Scope); if Name (Alias) = Name (Build_Package_Identifier
(Package_Name (Package_Node)))
if In_Node = No_Node then then
Display_Analyzer_Error
(Alias, "alias definition refer to self package",
Loc => Loc (Name_Visibility_Node));
Success := False; Success := False;
Display_Analyzer_Error (Alias, "is not visible");
else
In_Node := Node_Explicitly_In_Scope
(Alias, Current_Scope);
if In_Node = No_Node then
Success := False;
Display_Analyzer_Error (Alias, "is not visible");
end if;
end if; end if;
end; end;
when others => when others =>
null; null;
end case; end case;
exit when not Success;
List_Node := Next_Node (List_Node); List_Node := Next_Node (List_Node);
end loop; end loop;
Push_Scope (Entity_Scope (Package_Node)); Push_Scope (Entity_Scope (Package_Node));
return Success; return Success;
end Check_Import_Declaration; end Check_Import_Declaration;
...@@ -630,7 +643,6 @@ package body Ocarina.Analyzer.AADL.Names is ...@@ -630,7 +643,6 @@ package body Ocarina.Analyzer.AADL.Names is
---------------------------- ----------------------------
function Check_Names_In_Package (Node : Node_Id) return Boolean is function Check_Names_In_Package (Node : Node_Id) return Boolean is
pragma Assert (Kind (Node) = K_Package_Specification); pragma Assert (Kind (Node) = K_Package_Specification);
Success : Boolean := True; Success : Boolean := True;
...@@ -647,7 +659,9 @@ package body Ocarina.Analyzer.AADL.Names is ...@@ -647,7 +659,9 @@ package body Ocarina.Analyzer.AADL.Names is
if not Enter_Name_In_Scope (Identifier (List_Node)) then if not Enter_Name_In_Scope (Identifier (List_Node)) then
Success := False; Success := False;
end if; end if;
end if; end if;
exit when not Success;
List_Node := Next_Node (List_Node); List_Node := Next_Node (List_Node);
end loop; end loop;
......
example_001.aadl:5:01: (package name) is not a package or a property set visible or existing example_001.aadl:5:01: (package name) is not a package or a property set visible or existing
example_001.aadl:5:27: Safety_Properties (identifier) is not a package or a property set visible or existing example_001.aadl:5:27: Safety_Properties (identifier) is not a package or a property set visible or existing
example_001.aadl:10:43: Avionics::DataTypes::AirData (identifier) is not visible
Cannot analyze AADL specifications Cannot analyze AADL specifications
example_009.aadl:7:06: base_types (identifier) is not a package or a property set visible or existing example_009.aadl:7:06: base_types (identifier) is not a package or a property set visible or existing
example_009.aadl:78:06: base_types (identifier) is not a package or a property set visible or existing example_009.aadl:78:06: base_types (identifier) is not a package or a property set visible or existing
example_009.aadl:81:29: "Address.others" conflicts with declaration at line 66
Cannot analyze AADL specifications Cannot analyze AADL specifications
example_015.aadl:6:08: Buses (identifier) is not a package or a property set visible or existing example_015.aadl:6:08: Buses (identifier) is not a package or a property set visible or existing
example_015.aadl:7:08: UserTypes (identifier) is not a package or a property set visible or existing
Cannot analyze AADL specifications Cannot analyze AADL specifications
test.aadl:5:05: (package name) is not a package or a property set visible or existing test.aadl:5:05: (package name) is not a package or a property set visible or existing
test.aadl:6:05: (package name) is not a package or a property set visible or existing
test.aadl:7:05: (package name) is not a package or a property set visible or existing
: Security::Verification::Position (identifier) is not visible
test.aadl:11:49: Control::Target::Proc.Impl (identifier) is not visible
test.aadl:12:27: thefeature (identifier) is not visible
: Command::Launcher (identifier) is not visible
: Foo (identifier) is not visible
test.aadl:23:05: (package name) is not a package or a property set visible or existing
Cannot analyze AADL specifications Cannot analyze AADL specifications
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