Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
kazoo
Commits
932b4596
Commit
932b4596
authored
Oct 23, 2018
by
Maxime Perrotin
Browse files
Check if functions are on the same node
parent
7ea77e1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/taste-aadl_parser.adb
View file @
932b4596
...
...
@@ -252,7 +252,7 @@ package body TASTE.AADL_Parser is
-- Create one protected block per application code
for
F
of
Model
.
Interface_View
.
Flat_Functions
loop
declare
New_
Block
:
Protected_Block
:=
Block
:
Protected_Block
:=
(
Name
=>
F
.
Name
,
Node
=>
Model
.
Deployment_View
.
Find_Node
(
To_String
(
F
.
Name
)),
others
=>
<>
);
...
...
@@ -267,19 +267,41 @@ package body TASTE.AADL_Parser is
then
Unprotected_Operation
else
Protected_Operation
);
-- Check in the DV if any caller is remote
for
Caller
of
PI
.
Remote_Interfaces
loop
null
;
for
Remote
of
PI
.
Remote_Interfaces
loop
declare
Remote_Node
:
constant
Option_Node
.
Option
:=
Model
.
Deployment_View
.
Find_Node
(
To_String
(
Remote
.
Function_Name
));
begin
if
not
Remote_Node
.
Has_Value
then
raise
Concurrency_View_Error
with
"Calling function "
&
To_String
(
Remote
.
Function_Name
)
&
": could not find binding (parser bug?)"
;
end
if
;
if
not
Block
.
Node
.
Has_Value
then
raise
Concurrency_View_Error
with
"Function "
&
To_String
(
F
.
Name
)
&
": cound not find binding (parser bug?)"
;
end
if
;
if
Block
.
Node
.
Unsafe_Just
/=
Remote_Node
.
Unsafe_Just
then
-- At least one caller is on a different node
New_PI
.
Local_Caller
:=
False
;
end
if
;
end
;
end
loop
;
New_
Block
.
Provided
.
Insert
(
Key
=>
To_String
(
PI
.
Name
),
Block
.
Provided
.
Insert
(
Key
=>
To_String
(
PI
.
Name
),
New_Item
=>
New_PI
);
end
;
end
loop
;
New_
Block
.
Required
:=
F
.
Required
;
Block
.
Required
:=
F
.
Required
;
-- Find calling threads and add them to New_Block.Calling_Threads
-- Add the block to the Concurrency View
Result
.
Blocks
.
Insert
(
Key
=>
To_String
(
New_
Block
.
Name
),
New_Item
=>
New_
Block
);
Result
.
Blocks
.
Insert
(
Key
=>
To_String
(
Block
.
Name
),
New_Item
=>
Block
);
end
;
end
loop
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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