Commit 7de992e4 authored by jhugues's avatar jhugues

* Correct connection direction tests



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@4758 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent f916247b
......@@ -928,29 +928,25 @@ package body Ocarina.Analyzer.AADL.Semantics is
case Kind (Connection_Destination) is
when K_Port_Spec | K_Parameter =>
-- We do not check strict correspondence between port
-- directions: an in port can be connected to an in/out
-- port. This seems strange, but the examples provided
-- with Osate accept this situation. After all, it can
-- make sense: an in/out port could have two different
-- connections.
if Present (Inversed_Entity (Connection_Source))
or else Present (Inversed_Entity (Connection_Destination))
if (Present (Inversed_Entity (Connection_Source))
and then Connection_Source
/= Inversed_Entity (Connection_Source))
or else (Present (Inversed_Entity (Connection_Destination))
and then Connection_Destination
/= Inversed_Entity (Connection_Destination))
then
--
-- XXX to be refined
Directions := True;
else
Directions := (not Source_Is_Local
and then not Destination_Is_Local
Directions := ((not Source_Is_Local)
and then (not Destination_Is_Local)
and then Is_Out (Connection_Source)
and then Is_In (Connection_Destination))
or else (Source_Is_Local
and then not Destination_Is_Local
and then (not Destination_Is_Local)
and then Is_In (Connection_Source)
and then Is_In (Connection_Destination))
or else (not Source_Is_Local
or else ((not Source_Is_Local)
and then Destination_Is_Local
and then Is_Out (Connection_Source)
and then Is_Out (Connection_Destination))
......
......@@ -84,11 +84,11 @@ thread implementation t.i
-- bad: event to param
parameter in_event -> call7.in_out_param ;
-- bad: event to param
-- bad: event to param XXX
parameter out_event -> call8.in_param ;
-- bad: event to param
-- bad: event to param XXX
parameter out_event -> call8.out_param ;
-- bad: event to param
-- bad: event to param XXX
parameter out_event -> call8.in_out_param ;
-- bad: event to param
......@@ -198,7 +198,7 @@ thread implementation t.p
connections
-- bad: in cannot be dest, event cannot be dest
parameter call.out_param -> in_event ;
-- bad: event cannot be dest
-- bad: event cannot be dest XXX
parameter call.in_out_param -> out_event ;
-- bad: in cannot be src, event cannot be dest
parameter call.in_param -> in_out_event ;
......@@ -249,7 +249,7 @@ subprogram implementation sub.a
parameter in_param -> call1.in_param ;
-- bad: call.out_param cannot be a dest
parameter in_param -> call1.out_param ;
-- bood: in to in/out
-- good: in to in/out
parameter in_param -> call1.in_out_param ;
-- bad: out_param cannot be source
......
ParameterConnections.aadl:41:05: in_data (port spec) and out_param (parameter) do not have compatible directions
ParameterConnections.aadl:46:05: out_data (port spec) and in_param (parameter) do not have compatible directions
ParameterConnections.aadl:48:05: out_data (port spec) and out_param (parameter) do not have compatible directions
ParameterConnections.aadl:50:05: out_data (port spec) and in_out_param (parameter) do not have compatible directions
ParameterConnections.aadl:55:05: in_out_data (port spec) and out_param (parameter) do not have compatible directions
ParameterConnections.aadl:62:05: in_event_data (port spec) and out_param (parameter) do not have compatible directions
ParameterConnections.aadl:67:05: out_event_data (port spec) and in_param (parameter) do not have compatible directions
ParameterConnections.aadl:69:05: out_event_data (port spec) and out_param (parameter) do not have compatible directions
ParameterConnections.aadl:71:05: out_event_data (port spec) and in_out_param (parameter) do not have compatible directions
ParameterConnections.aadl:76:05: in_out_event_data (port spec) and out_param (parameter) do not have compatible directions
ParameterConnections.aadl:81:15: in_event (entity reference) points to in_event (port spec) , which is not of a proper type
ParameterConnections.aadl:83:15: in_event (entity reference) points to in_event (port spec) , which is not of a proper type
ParameterConnections.aadl:85:15: in_event (entity reference) points to in_event (port spec) , which is not of a proper type
......@@ -7,6 +17,13 @@ ParameterConnections.aadl:92:15: out_event (entity reference) points to out_eve
ParameterConnections.aadl:95:15: in_out_event (entity reference) points to in_out_event (port spec) , which is not of a proper type
ParameterConnections.aadl:97:15: in_out_event (entity reference) points to in_out_event (port spec) , which is not of a proper type
ParameterConnections.aadl:99:15: in_out_event (entity reference) points to in_out_event (port spec) , which is not of a proper type
ParameterConnections.aadl:110:05: out_param (parameter) and in_data (port spec) do not have compatible directions
ParameterConnections.aadl:114:05: in_param (parameter) and in_out_data (port spec) do not have compatible directions
ParameterConnections.aadl:129:05: in_param (parameter) and in_event_data (port spec) do not have compatible directions
ParameterConnections.aadl:142:05: in_out_param (parameter) and in_event_data (port spec) do not have compatible directions
ParameterConnections.aadl:144:05: in_param (parameter) and out_event_data (port spec) do not have compatible directions
ParameterConnections.aadl:155:05: out_param (parameter) and in_event_data (port spec) do not have compatible directions
ParameterConnections.aadl:159:05: in_param (parameter) and in_out_event_data (port spec) do not have compatible directions
ParameterConnections.aadl:174:32: in_event (entity reference) points to in_event (port spec) , which is not of a proper type
ParameterConnections.aadl:187:36: in_event (entity reference) points to in_event (port spec) , which is not of a proper type
ParameterConnections.aadl:189:32: out_event (entity reference) points to out_event (port spec) , which is not of a proper type
......@@ -15,5 +32,23 @@ ParameterConnections.aadl:202:36: out_event (entity reference) points to out_ev
ParameterConnections.aadl:204:32: in_out_event (entity reference) points to in_out_event (port spec) , which is not of a proper type
ParameterConnections.aadl:215:33: out_event (entity reference) points to out_event (port spec) , which is not of a proper type
ParameterConnections.aadl:217:36: in_out_event (entity reference) points to in_out_event (port spec) , which is not of a proper type
ParameterConnections.aadl:219:05: in_param (parameter) and in_data (port spec) do not have compatible directions
ParameterConnections.aadl:230:33: in_out_event (entity reference) points to in_out_event (port spec) , which is not of a proper type
ParameterConnections.aadl:232:05: in_out_param (parameter) and in_data (port spec) do not have compatible directions
ParameterConnections.aadl:234:05: in_param (parameter) and out_data (port spec) do not have compatible directions
ParameterConnections.aadl:251:05: in_param (parameter) and out_param (parameter) do not have compatible directions
ParameterConnections.aadl:256:05: out_param (parameter) and in_param (parameter) do not have compatible directions
ParameterConnections.aadl:258:05: out_param (parameter) and out_param (parameter) do not have compatible directions
ParameterConnections.aadl:260:05: out_param (parameter) and in_out_param (parameter) do not have compatible directions
ParameterConnections.aadl:265:05: in_out_param (parameter) and out_param (parameter) do not have compatible directions
ParameterConnections.aadl:278:05: in_param (parameter) and in_param (parameter) do not have compatible directions
ParameterConnections.aadl:293:05: in_param (parameter) and out_param (parameter) do not have compatible directions
ParameterConnections.aadl:297:05: in_out_param (parameter) and in_param (parameter) do not have compatible directions
ParameterConnections.aadl:308:05: in_param (parameter) and in_out_param (parameter) do not have compatible directions
ParameterConnections.aadl:310:05: out_param (parameter) and in_param (parameter) do not have compatible directions
ParameterConnections.aadl:327:05: in_param (parameter) and in_param (parameter) do not have compatible directions
ParameterConnections.aadl:329:05: out_param (parameter) and out_param (parameter) do not have compatible directions
ParameterConnections.aadl:344:05: in_out_param (parameter) and out_param (parameter) do not have compatible directions
ParameterConnections.aadl:346:05: in_param (parameter) and in_out_param (parameter) do not have compatible directions
ParameterConnections.aadl:359:05: in_param (parameter) and out_param (parameter) do not have compatible directions
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