Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
kazoo
Commits
6467a515
Commit
6467a515
authored
Apr 06, 2019
by
Maxime Perrotin
Browse files
Fix use of 'Indent tag
parent
08f5fd45
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/taste-concurrency_view.adb
View file @
6467a515
...
...
@@ -4,12 +4,15 @@
with
Ada
.
Directories
,
Ada
.
IO_Exceptions
,
Ada
.
Exceptions
;
Ada
.
Exceptions
,
Ada
.
Characters
.
Latin_1
;
use
Ada
.
Directories
;
package
body
TASTE
.
Concurrency_View
is
Newline
:
Character
renames
Ada
.
Characters
.
Latin_1
.
LF
;
procedure
Debug_Dump
(
CV
:
Taste_Concurrency_View
;
Output
:
File_Type
)
is
procedure
Dump_Partition
(
Partition
:
CV_Partition
)
is
begin
...
...
@@ -188,8 +191,8 @@ package body TASTE.Concurrency_View is
is
Partition
:
constant
CV_Partition
:=
CV
.
Nodes
(
Node_Name
).
Partitions
(
Partition_Name
);
Threads
:
Ta
g
;
Blocks
:
Ta
g
;
Threads
:
Unbounded_Strin
g
;
Blocks
:
Unbounded_Strin
g
;
Partition_Assoc
:
Translate_Set
;
begin
for
T
of
Partition
.
Threads
loop
...
...
@@ -199,29 +202,29 @@ package body TASTE.Concurrency_View is
Result
:
constant
String
:=
(
Parse
(
Path
&
"/thread.tmplt"
,
Thread_Assoc
));
begin
Threads
:=
Threads
&
Result
;
Threads
:=
Threads
&
Newline
&
Result
;
end
;
end
loop
;
for
B
of
Partition
.
Blocks
loop
declare
Tmpl
:
constant
Block_As_Template
:=
B
.
Prepare_Template
;
Block_Assoc
:
Translate_Set
:=
Tmpl
.
Header
;
PI_Tag
:
Ta
g
;
RI_Tag
:
Ta
g
;
PI_Tag
:
Unbounded_Strin
g
;
RI_Tag
:
Unbounded_Strin
g
;
begin
for
PI_Assoc
of
Tmpl
.
Provided
loop
PI_Tag
:=
PI_Tag
PI_Tag
:=
PI_Tag
&
Newline
&
String
'(
Parse
(
Path
&
"/pi.tmplt"
,
PI_Assoc
));
end
loop
;
for
RI_Assoc
of
Tmpl
.
Required
loop
RI_Tag
:=
RI_Tag
RI_Tag
:=
RI_Tag
&
Newline
&
String
'(
Parse
(
Path
&
"/ri.tmplt"
,
RI_Assoc
));
end
loop
;
Block_Assoc
:=
Block_Assoc
&
Assoc
(
"Provided"
,
PI_Tag
)
&
Assoc
(
"Required"
,
RI_Tag
);
Blocks
:=
Blocks
&
Blocks
:=
Blocks
&
Newline
&
String
'(
Parse
(
Path
&
"/block.tmplt"
,
Block_Assoc
));
end
;
end
loop
;
...
...
@@ -229,12 +232,12 @@ package body TASTE.Concurrency_View is
-- (see taste-deployment_view.ads for the complete list)
Partition_Assoc
:=
Partition
.
Deployment_Partition
.
To_Template
&
Assoc
(
"Threads"
,
Threads
)
&
Assoc
(
"Blocks"
,
Blocks
);
&
Assoc
(
"Blocks"
,
Blocks
);
return
Parse
(
Path
&
"/partition.tmplt"
,
Partition_Assoc
);
end
Generate_Partition
;
Partitions
:
Ta
g
;
Partitions
:
Unbounded_Strin
g
;
Node_Assoc
:
Translate_Set
;
begin
...
...
src/taste-data_view.ads
View file @
6467a515
...
...
@@ -25,16 +25,17 @@ package TASTE.Data_View is
Data_View_Error
:
exception
;
-- Extra files needed to parse the Data view (dependency hell)
Data_View_AADL_Lib
:
String_Vectors
.
Vector
:=
Empty_Vector
&
"aadl_project.aadl"
&
"taste_properties.aadl"
&
"communication_properties.aadl"
&
"timing_properties.aadl"
&
"programming_properties.aadl"
&
"memory_properties.aadl"
&
"base_types.aadl"
&
"data_model.aadl"
&
"deployment.aadl"
;
Data_View_AADL_Lib
:
String_Vectors
.
Vector
:=
Empty_Vector
&
"aadl_project.aadl"
&
"taste_properties.aadl"
&
"communication_properties.aadl"
&
"timing_properties.aadl"
&
"programming_properties.aadl"
&
"memory_properties.aadl"
&
"base_types.aadl"
&
"data_model.aadl"
&
"deployment.aadl"
;
type
ASN1_Module
is
record
...
...
templates/concurrency_view/process/block.tmplt
View file @
6467a515
...
...
@@ -8,11 +8,8 @@
protected @_CAPITALIZE:Name_@ is -- part of node "@_CAPITALIZE:Node_Name_@"
-- Calling Threads: @_Calling_Threads_@
@
@TABLE@
@
@_Provided'INDENT_@
@
@END_TABLE@
@
@
_Provided'Indent_
@
@
_Required'Indent_
@
@@TABLE@@
@_Required'INDENT_@
@@END_TABLE@@
end @_CAPITALIZE:Name_@;
templates/concurrency_view/process/node.tmplt
View file @
6467a515
...
...
@@ -4,9 +4,8 @@
@@--
@
_Partitions_
@
:
List
of
rendered
code
for
partitions
@@--
In
standard
TASTE
systems
there
is
only
one
partition
per
node
package
body
@
_CAPITALIZE
:
Node_Name_
@
is
@
_Partitions_
@
@@
TABLE
@@
@
_Partitions
'Indent_@
@@END_TABLE@@
end
@
_CAPITALIZE
:
Node_Name_
@;
templates/concurrency_view/process/partition.tmplt
View file @
6467a515
@@--
The
following
tags
are
available
in
this
template
:
@@--
@@--
@
_Name_
@
:
Partition
name
(
usually
the
name
of
the
binary
)
@@--
@
_Threads_
@
:
List
of
threads
@@--
@
_Blocks_
@
:
List
of
protected
functions
@@--
@
_Threads_
@
:
Code
generated
for
the
threads
@@--
@
_Blocks_
@
:
Code
generated
for
protected
functions
@@--
@
_Coverage_
@
:
True
if
user
requested
code
coverage
enable
@@--
@
_Package_Name_
@
:
AADL
Package
name
for
the
target
(
e
.
g
.
ocarina_porocessors_x86
)
@@--
@
_CPU_Name_
@
:
CPU
Name
(
e
.
g
.
x86_linux
)
...
...
@@ -19,12 +19,8 @@ package @_CAPITALIZE:Partition_Name_@ is
--
CPU
Classifier
:
@
_CPU_Classifier_
@
--
Bound
Functions
:
@
_Bound_Functions_
@
@@
TABLE
@@
@
_Threads_
@
@@--
should
have
'Indent
@@END_TABLE@@
@
_Threads
'Indent_@
@@TABLE@@
@_Blocks_@ @@-- should have '
Indent
@@
END_TABLE
@@
@_Blocks'
Indent_
@
end
@
_CAPITALIZE
:
Partition_Name_
@;
templates/concurrency_view/process/pi.tmplt
View file @
6467a515
...
...
@@ -11,4 +11,4 @@ procedure @_CAPITALIZE:Name_@ is -- @_Direction_@ of function @_Parent_Function
@@TABLE@@
-- @_Param_Names_@ : @_Param_Types_@ (@_Param_Directions_@)
@@END_TABLE@@
end @_CAPITALIZE:Name_@
end @_CAPITALIZE:Name_@
;
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