Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
kazoo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TASTE
kazoo
Commits
840a1f4c
Commit
840a1f4c
authored
Aug 19, 2019
by
Maxime Perrotin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleanup
parent
9752eae4
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
59 additions
and
47 deletions
+59
-47
src/taste-backend-code_generators.adb
src/taste-backend-code_generators.adb
+1
-0
src/taste-concurrency_view.adb
src/taste-concurrency_view.adb
+1
-0
src/taste-deployment_view.ads
src/taste-deployment_view.ads
+15
-34
src/taste-dump.adb
src/taste-dump.adb
+3
-4
src/taste-parser_utils.adb
src/taste-parser_utils.adb
+25
-0
src/taste-parser_utils.ads
src/taste-parser_utils.ads
+8
-0
templates/concurrency_view/aadl_2_threads/partition.tmplt
templates/concurrency_view/aadl_2_threads/partition.tmplt
+3
-1
templates/concurrency_view/aadl_2_threads/system.tmplt
templates/concurrency_view/aadl_2_threads/system.tmplt
+1
-2
templates/concurrency_view/aadl_4_makefile/system.tmplt
templates/concurrency_view/aadl_4_makefile/system.tmplt
+1
-5
test/test-cv/Makefile
test/test-cv/Makefile
+1
-1
No files found.
src/taste-backend-code_generators.adb
View file @
840a1f4c
...
...
@@ -65,6 +65,7 @@ package body TASTE.Backend.Code_Generators is
Tmplt
:
constant
String
:=
Prefix_Skeletons
&
"makefile.tmplt"
;
begin
Register_Filter
(
"COUCOU"
,
My_Custom_Filter
'
Access
);
if
not
Exists
(
Tmplt
)
then
raise
ACG_Error
with
"Missing makefile.tmplt"
;
end
if
;
...
...
src/taste-concurrency_view.adb
View file @
840a1f4c
...
...
@@ -613,6 +613,7 @@ package body TASTE.Concurrency_View is
end
;
end
loop
;
if
Trig_Sys
and
File_Sys
/=
""
and
Nodes
/=
""
then
-- Generate from system.tmplt
Set_Sys
:=
CV
.
Configuration
.
To_Template
&
Assoc
(
"Nodes"
,
Nodes
)
&
Assoc
(
"Node_Names"
,
Node_Names
)
...
...
src/taste-deployment_view.ads
View file @
840a1f4c
...
...
@@ -61,8 +61,8 @@ package TASTE.Deployment_View is
type
Taste_Bus
is
record
Name
:
Unbounded_String
;
AADL_Package
:
Unbounded_String
;
Name
,
AADL_Package
,
Classifier
:
Unbounded_String
;
Properties
:
Property_Maps
.
Map
;
end
record
;
...
...
@@ -71,48 +71,29 @@ package TASTE.Deployment_View is
type
Bus_Connection
is
tagged
record
Source_Node
:
Unbounded_String
;
Source_Port
:
Unbounded_String
;
Bus_Name
:
Unbounded_String
;
Dest_Node
:
Unbounded_String
;
Source_Node
,
Source_Port
,
Bus_Name
,
Dest_Node
,
Dest_Port
:
Unbounded_String
;
end
record
;
function
To_Template
(
B
:
Bus_Connection
)
return
Translate_Set
is
(
+
Assoc
(
"Source_Node"
,
B
.
Source_Node
)
&
Assoc
(
"Source_Port"
,
B
.
Source_Port
)
&
Assoc
(
"Bus_Name"
,
B
.
Bus_Name
)
&
Assoc
(
"Dest_Node"
,
B
.
Dest_Node
)
&
Assoc
(
"Dest_Port"
,
B
.
Dest_Port
));
package
Bus_Connections
is
new
Indefinite_Vectors
(
Natural
,
Bus_Connection
);
type
Taste_Device_Driver
is
tagged
record
Name
:
Unbounded_String
;
Package_Name
:
Unbounded_String
;
Device_Classifier
:
Unbounded_String
;
Associated_Processor_Name
:
Unbounded_String
;
Device_Configuration
:
Unbounded_String
;
Accessed_Bus_Name
:
Unbounded_String
;
Accessed_Port_Name
:
Unbounded_String
;
ASN1_Filename
:
Unbounded_String
;
ASN1_Typename
:
Unbounded_String
;
Name
,
Package_Name
,
Device_Classifier
,
Associated_Processor_Name
,
Device_Configuration
,
Accessed_Bus_Name
,
Accessed_Port_Name
,
ASN1_Filename
,
ASN1_Typename
,
ASN1_Module
:
Unbounded_String
;
end
record
;
function
To_Template
(
D
:
Taste_Device_Driver
)
return
Translate_Set
is
(
+
Assoc
(
"Name"
,
D
.
Name
)
&
Assoc
(
"Package_Name"
,
D
.
Package_Name
)
&
Assoc
(
"Device_Classifier"
,
D
.
Device_Classifier
)
&
Assoc
(
"Associated_Processor_Name"
,
D
.
Associated_Processor_Name
)
&
Assoc
(
"Device_Configuration"
,
D
.
Device_Configuration
)
&
Assoc
(
"Accessed_Bus_Name"
,
D
.
Accessed_Bus_Name
)
&
Assoc
(
"Accessed_Port_Name"
,
D
.
Accessed_Port_Name
)
&
Assoc
(
"ASN1_Filename"
,
D
.
ASN1_Filename
)
&
Assoc
(
"ASN1_Typename"
,
D
.
ASN1_Typename
)
&
Assoc
(
"ASN1_Module"
,
D
.
ASN1_Module
));
package
Taste_Drivers
is
new
Indefinite_Vectors
(
Natural
,
Taste_Device_Driver
);
...
...
src/taste-dump.adb
View file @
840a1f4c
...
...
@@ -44,10 +44,6 @@ package body TASTE.Dump is
others
=>
False
);
Output_File
:
File_Type
;
-- output path will be determined by the templates
-- CV_Out_Dir : constant String :=
-- CV.Base_Output_Path.Element & "/concurrency_view/";
-- Tags that are built over the whole system
-- and cleant up between each template folder:
begin
...
...
@@ -126,11 +122,13 @@ package body TASTE.Dump is
Result
:
Unbounded_String
;
begin
for
I
of
Interfaces
loop
Result
:=
Result
&
String
'(
Parse
(
IF_Template
,
I
))
&
Newline
;
end
loop
;
return
Result
;
end
Process_Interfaces
;
begin
Document_Template
(
Prefix
,
"interfaceview.tmplt"
,
IV_Tags
);
if
not
Check
or
not
Trigger
then
Put_Info
(
"Nothing generated from "
&
Path
);
return
;
...
...
@@ -251,6 +249,7 @@ package body TASTE.Dump is
&
Assoc
(
"Dest_Ports"
,
Dest_Ports
);
-- Output is made of interface, deployment and data views
Document_Template
(
Prefix
,
"interfaceview.tmplt"
,
IV_Tags
);
Output_Tags
:=
+
Assoc
(
"Interface_View"
,
String
'(
Parse
(
IV_Template
,
IV_Tags
)))
&
Assoc
(
"Deployment_View"
,
...
...
src/taste-parser_utils.adb
View file @
840a1f4c
...
...
@@ -13,6 +13,7 @@ with Ada.Characters.Latin_1,
GNAT
.
Strings
,
GNAT
.
Command_Line
,
Templates_Parser
.
Utils
,
Templates_Parser
.
Query
,
Ocarina
.
AADL_Values
,
Ocarina
.
Configuration
,
Ocarina
.
FE_AADL
.
Parser
,
...
...
@@ -56,6 +57,22 @@ package body TASTE.Parser_Utils is
New_Line
;
end
Banner
;
-- Generate documentation for a translate set
procedure
Document_Template
(
Source_Folder
,
Template_Name
:
String
;
T
:
Translate_Set
)
is
procedure
Action
(
Item
:
Association
;
Quit
:
in
out
Boolean
)
is
begin
Put_Debug
(
" "
&
Templates_Parser
.
Query
.
Variable
(
Item
)
&
" - "
&
Templates_Parser
.
Query
.
Kind
(
Item
)'
Img
);
Quit
:=
False
;
end
Action
;
procedure
Iterate
is
new
For_Every_Association
(
Action
);
begin
Put_Debug
(
Template_Name
&
" (subfolder "
&
Source_Folder
&
")"
);
Iterate
(
T
);
end
Document_Template
;
-- Strip function as in Python
function
Strip_String
(
Input_String
:
String
)
return
String
is
use
Ada
.
Characters
.
Latin_1
;
...
...
@@ -66,6 +83,14 @@ package body TASTE.Parser_Utils is
return
Ada
.
Strings
.
Fixed
.
Trim
(
Input_String
,
Strip_Set
,
Strip_Set
);
end
Strip_String
;
function
My_Custom_Filter
(
Value
,
Parameters
:
String
;
dummy_Context
:
Filter_Context
)
return
String
is
begin
Put_Debug
(
Parameters
&
" - "
&
Value
);
return
Value
;
end
My_Custom_Filter
;
procedure
Parse_Command_Line
(
Result
:
out
Taste_Configuration
)
is
Config
:
Command_Line_Configuration
;
Version
:
aliased
Boolean
:=
False
;
...
...
src/taste-parser_utils.ads
View file @
840a1f4c
...
...
@@ -75,6 +75,14 @@ package TASTE.Parser_Utils is
package
String_Holders
is
new
Indefinite_Holders
(
String
);
function
My_Custom_Filter
(
Value
,
Parameters
:
String
;
dummy_Context
:
Filter_Context
)
return
String
;
-- Generate documentation for a translate set
procedure
Document_Template
(
Source_Folder
,
Template_Name
:
String
;
T
:
Translate_Set
);
AADL_Parser_Error
:
exception
;
function
Get_APLC_Binding
(
E
:
Node_Id
)
return
List_Id
;
...
...
templates/concurrency_view/aadl_2_threads/partition.tmplt
View file @
840a1f4c
...
...
@@ -55,7 +55,7 @@ subcomponents
@@TABLE'ALIGN_ON(":")@@
@_Thread_Names_@ : thread @_Thread_Names_@_Thread::@_Thread_Names_@.others;
@@END_TABLE@@
@@IF@@ @_In_Port_Names'Length_@ > 0 @@-- Add poller thread to map AIR ports to POHIC ports
@@IF@@ @_In_Port_Names'Length_@ > 0
and @_VP_Platform_@ = PLATFORM_AIR
@@-- Add poller thread to map AIR ports to POHIC ports
Poll_Port : thread Port_Poller.i;
@@END_IF@@
@@IF@@ @_Thread_Src_Name'Length_@ > 0 or @_In_Port_Names'Length_@ > 0 or @_Out_Port_Names'Length_@ > 0
...
...
@@ -71,4 +71,6 @@ connections
port @_Connected_Threads_@.OUTPORT_@_Part_Out_Port_Name_@ -> OUTPORT_@_Part_Out_Port_Name_@;
@@END_TABLE@@
@@END_IF@@
@@-- CHECKME: There are no connections to the protected object data and it does not seem to matter
@@-- (check buildsupport output for the difference)
end @_CAPITALIZE:Name_@.final;
templates/concurrency_view/aadl_2_threads/system.tmplt
View file @
840a1f4c
...
...
@@ -56,7 +56,7 @@ properties
end
TASTE_Protected
.
Object
;
@@
END_IF
@@
@@
IF
@@
@
_Partition_
Names
'Length_@ > 0 @@-- AIR : we need a port polling threads
@@
IF
@@
@
_Partition_
VP
'Length_@ > 0 @@-- AIR : we need a port polling threads
-- Required by AIR to allow inter-partition communications
subprogram do_ports_polling
properties
...
...
@@ -64,7 +64,6 @@ properties
Source_Name => "user_ports_polling";
Source_Text => ("air_polling.c");
end do_ports_polling;
thread Port_Poller
end Port_Poller;
...
...
templates/concurrency_view/aadl_4_makefile/system.tmplt
View file @
840a1f4c
...
...
@@ -68,8 +68,4 @@ clean:
rm -rf *_adainit deploymentview_final
@@END_TABLE@@
@@INLINE(.PHONY: )( )()@@
@@TABLE@@
@_LOWER:Block_Names_@
@@END_TABLE@@
@@END_INLINE@@
.PHONY: @_REPLACE_ALL(,/):LOWER:Block_Names_@
test/test-cv/Makefile
View file @
840a1f4c
...
...
@@ -24,7 +24,7 @@ test-parse-ada: clean-ada
test-parse-c
:
clean-c
$(KAZOO)
-p
--gw
\
-o
output.pohic
\
--glue
--glue
--debug
buildsupport_pohic
:
buildsupport
-o
output.buildsupport.pohic
-p
--aadlv2
--glue
-i
InterfaceView.aadl
-c
DeploymentView.aadl
-d
DataView.aadl ../common/ocarina_components.aadl ../common/TASTE_IV_Properties.aadl ../common/TASTE_DV_Properties.aadl
...
...
Write
Preview
Markdown
is supported
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