Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
Ocarina
Commits
5758ceb6
Commit
5758ceb6
authored
Mar 22, 2013
by
yoogx
Browse files
* Provide an error message in case ports of threads are not connected
For issue #10
parent
be277956
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/backends/ocarina-backends-pn-components.adb
View file @
5758ceb6
...
@@ -2707,20 +2707,35 @@ package body Ocarina.Backends.PN.Components is
...
@@ -2707,20 +2707,35 @@ package body Ocarina.Backends.PN.Components is
A_PN_Arc
:
Node_Id
;
A_PN_Arc
:
Node_Id
;
Source_Point
:
Node_Id
;
Source_Point
:
Node_Id
;
Endpoint
:
Node_Id
;
Endpoint
:
Node_Id
;
Ports
:
List_Id
;
Build_Data_Port
:
Boolean
:=
Is_Data
;
Build_Data_Port
:
Boolean
:=
Is_Data
;
begin
begin
if
Is_In
(
Port_Instance
)
then
if
Is_In
(
Port_Instance
)
then
-- in port
-- in port
Endpoint
:=
Port_Instance
;
Endpoint
:=
Port_Instance
;
Source_Point
:=
Item
Ports
:=
Get_Source_Ports
(
Port_Instance
);
(
AIN
.
First_Node
(
Get_Source_Ports
(
Port_Instance
)));
if
AINU
.
Is_Empty
(
Ports
)
then
Display_Located_Error
(
AIN
.
Loc
(
Port_Instance
),
"This IN port is not connected to any destination"
,
Fatal
=>
True
);
else
Source_Point
:=
Item
(
AIN
.
First_Node
(
Ports
));
end
if
;
else
else
-- out port
-- out port
Source_Point
:=
Port_Instance
;
Source_Point
:=
Port_Instance
;
Endpoint
:=
Item
Ports
:=
Get_Destination_Ports
(
Port_Instance
);
(
AIN
.
First_Node
(
Get_Destination_Ports
(
Port_Instance
)));
if
AINU
.
Is_Empty
(
Ports
)
then
Display_Located_Error
(
AIN
.
Loc
(
Port_Instance
),
"This OUT port is not connected to any destination"
,
Fatal
=>
True
);
else
Endpoint
:=
Item
(
AIN
.
First_Node
(
Ports
));
end
if
;
-- for out data ports only
-- for out data ports only
-- to avoid endless fireable transition
-- to avoid endless fireable transition
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment