Commit 4f5c3e4c authored by yoogx's avatar yoogx

* Refine test for 9.4 (L7)

        For issue #50
parent ff7e1af2
......@@ -1021,7 +1021,7 @@ package body Ocarina.Analyzer.AADL.Semantics is
Directions := True;
-- There is no direction for a port group
when K_Subcomponent_Access =>
when K_Subcomponent_Access | K_Subcomponent =>
Directions := Is_Bidirectional (Node)
or else
......@@ -1033,7 +1033,9 @@ package body Ocarina.Analyzer.AADL.Semantics is
(not Source_Is_Local and then
not Destination_Is_Local and then
not Is_Provided (Connection_Destination) and then
not (Kind (Connection_Destination) = K_Subcomponent_Access
and then Is_Provided (Connection_Destination))
and then
Kind (Connection_Source) = K_Subcomponent_Access and then
Is_Provided (Connection_Source))
......@@ -1049,14 +1051,18 @@ package body Ocarina.Analyzer.AADL.Semantics is
(not Source_Is_Local
and then Destination_Is_Local
and then Is_Provided (Connection_Destination)
and then
(Kind (Connection_Destination) = K_Subcomponent_Access
and then Is_Provided (Connection_Destination))
and then Kind (Connection_Source) = K_Subcomponent_Access
and then Is_Provided (Connection_Source))
or else
(Source_Is_Local
and then Destination_Is_Local
and then Is_Provided (Connection_Destination)
and then
(Kind (Connection_Destination) = K_Subcomponent_Access
and then Is_Provided (Connection_Destination))
and then Kind (Connection_Source) = K_Subcomponent)
or else
......@@ -1071,15 +1077,15 @@ package body Ocarina.Analyzer.AADL.Semantics is
(((Source_Is_Local and then not Destination_Is_Local)
or else (not Source_Is_Local and then Destination_Is_Local))
and then not Is_Provided (Connection_Destination)
and then
((Kind (Connection_Destination) = K_Subcomponent_Access
and then not Is_Provided (Connection_Destination))
or else Kind (Connection_Destination) = K_Subcomponent)
and then
((Kind (Connection_Source) = K_Subcomponent_Access
and then not Is_Provided (Connection_Source))
or else Kind (Connection_Source) = K_Subcomponent));
when K_Subcomponent =>
Directions := Is_Bidirectional (Node);
when others =>
Directions := True;
end case;
......
......@@ -290,5 +290,6 @@ tests/github/issue_36/test.aadl
tests/github/issue_39/pb1.aadl
tests/github/issue_47/test.aadl
tests/github/issue_50/test.aadl
tests/github/issue_50/test2.aadl
tests/root_system/test.aadl
package Test
public
system t1
features
rba: requires bus access b1.i1;
end t1;
bus b1 end b1;
bus implementation b1.i1 end b1.i1;
system s end s;
system implementation s.impl
subcomponents
part1: system t1;
bus1: bus b1;
connections
c1: bus access part1.rba -> bus1;
end s.impl;
end Test;
\ No newline at end of file
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