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
1621ade4
Commit
1621ade4
authored
May 07, 2018
by
Maxime Perrotin
Browse files
Iterate on the vertical transformations
parent
a7a1b0d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/taste-model_transformations.adb
View file @
1621ade4
...
...
@@ -46,8 +46,6 @@ package body TASTE.Model_Transformations is
if
(
PI
.
RCM
=
Cyclic_Operation
or
PI
.
RCM
=
Sporadic_Operation
)
and
then
Count_Passive_PI
+
Count_Active_PI
>
1
then
-- Create a separate function to handle this PI
-- It will be later translated into a thread
declare
New_F
:
Taste_Terminal_Function
:=
(
Name
=>
F
.
Name
&
"_"
&
PI
.
Name
,
...
...
@@ -56,10 +54,31 @@ package body TASTE.Model_Transformations is
others
=>
<>
);
New_F_PI
:
Taste_Interface
:=
PI
;
New_F_RI
:
Taste_Interface
:=
PI
;
Remote
:
constant
Remote_Entity
:=
(
Function_Name
=>
F
.
Name
,
Interface_Name
=>
PI
.
Name
);
begin
New_F_PI
.
Parent_Function
:=
New_F
.
Name
;
New_F_RI
.
Parent_Function
:=
New_F
.
Name
;
-- Set the information about the function to which the new
-- RI is connected.
New_F_RI
.
Remote_Interfaces
.
Clear
;
New_F_RI
.
Remote_Interfaces
.
Append
(
Remote
);
-- Update the Remote interfaces of the callers of the PI to
-- make them point to the new function
-- TODO (need access to the model..)
-- we can probably do it after we return, since we will have
-- both the list of new funcxtions and the model
-- Change the nature of the PI that triggered a new function
-- (Unprotected if the function only contained one active PI,
-- and possibly any number of other unprotected PIs)
PI
.
RCM
:=
(
if
Count_Active_PI
>
1
then
Protected_Operation
else
Unprotected_Operation
);
-- Add the PI and RI to the new function
New_F
.
Provided
.
Insert
(
Key
=>
To_String
(
PI
.
Name
),
New_Item
=>
New_F_PI
);
New_F
.
Required
.
Insert
(
Key
=>
To_String
(
New_F_RI
.
Name
),
...
...
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