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