Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
Ocarina
Commits
51988726
Commit
51988726
authored
May 26, 2015
by
Arnaud Schach
Browse files
Merge remote-tracking branch 'remotes/openaadl/master'
parents
a40b450b
fe56d1cc
Changes
30
Expand all
Hide whitespace changes
Inline
Side-by-side
src/backends/ocarina-backends-c_common-mapping.adb
View file @
51988726
...
...
@@ -1365,10 +1365,22 @@ package body Ocarina.Backends.C_Common.Mapping is
-------------------------
function
Map_Scade_Parameter
(
Parameter
:
Node_Id
)
return
Node_Id
is
Scade_Name
:
Name_Id
;
begin
Get_Name_String
(
Get_Scade_Signal
(
Parameter
)
)
;
Scade_Name
:=
Get_Scade_Signal
(
Parameter
);
return
CTU
.
Make_Defining_Identifier
(
Name_Find
,
C_Conversion
=>
False
);
if
Scade_Name
=
No_Name
then
Scade_Name
:=
Get_Source_Name
(
Parameter
);
end
if
;
if
Scade_Name
=
No_Name
then
Display_Located_Error
(
AIN
.
Loc
(
Parameter
),
"The Parameter does not specify a SCADE mapping"
,
Fatal
=>
True
);
end
if
;
return
CTU
.
Make_Defining_Identifier
(
Scade_Name
,
C_Conversion
=>
False
);
end
Map_Scade_Parameter
;
----------------------
...
...
@@ -2445,8 +2457,8 @@ package body Ocarina.Backends.C_Common.Mapping is
when
Subprogram_Simulink
=>
Add_Include
(
Make_Include_Clause
(
Make_Defining_Identifier
(
Get_Source_Name
(
S
),
Fals
e
),
Fals
e
),
(
Make_Defining_Identifier
(
Get_Source_Name
(
S
),
Tru
e
),
Tru
e
),
True
);
if
not
AINU
.
Is_Empty
(
Features
(
S
))
then
...
...
@@ -2528,7 +2540,7 @@ package body Ocarina.Backends.C_Common.Mapping is
when
Subprogram_Scade
=>
Add_Include
(
Make_Include_Clause
(
Map_Scade_Function_Name
(
S
)),
(
Make_Include_Clause
(
Map_Scade_Function_Name
(
S
)
,
True
),
Preserve_Case
=>
True
);
-- At first, we declare structures used as parameters
-- for SCADE functions. So, if the subprograms has IN
...
...
src/backends/ocarina-backends-cheddar.adb
View file @
51988726
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2010-201
4
ESA & ISAE. --
-- Copyright (C) 2010-201
5
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
...
...
@@ -41,7 +41,6 @@ with Ocarina.Backends.XML_Tree.Nutils;
with
Ocarina
.
Backends
.
XML_Tree
.
Generator
;
with
GNAT
.
Command_Line
;
use
GNAT
.
Command_Line
;
with
GNAT
.
OS_Lib
;
use
GNAT
.
OS_Lib
;
with
Ocarina
.
Namet
;
use
Ocarina
.
Namet
;
...
...
@@ -56,8 +55,6 @@ package body Ocarina.Backends.Cheddar is
package
XTU
renames
Ocarina
.
Backends
.
XML_Tree
.
Nutils
;
Generated_Sources_Directory
:
Name_Id
:=
No_Name
;
Invoke_Cheddar
:
Boolean
:=
False
;
Cheddarlite_Path
:
String_Access
;
procedure
Visit_Architecture_Instance
(
E
:
Node_Id
);
-- Most top level visitor routine. E is the root of the AADL
...
...
@@ -90,33 +87,14 @@ package body Ocarina.Backends.Cheddar is
Display_Error
(
"XML generation failed"
,
Fatal
=>
True
);
end
if
;
Create_Directory
(
Generated_Sources_Directory
);
Enter_Directory
(
Generated_Sources_Directory
);
-- Create the XML file
XML_Tree
.
Generator
.
Generate
(
XML_Root
);
if
Invoke_Cheddar
then
if
Cheddarlite_Path
=
null
then
Cheddarlite_Path
:=
Locate_Exec_On_Path
(
"cheddarlite"
);
end
if
;
declare
Args
:
GNAT
.
OS_Lib
.
Argument_List
(
1
..
4
);
Success
:
Boolean
;
begin
Args
(
1
)
:=
new
String
'(
"-file"
);
Args
(
2
)
:=
new
String
'(
"rma_impl_cheddar.xml"
);
Args
(
3
)
:=
new
String
'(
"-request"
);
Args
(
4
)
:=
new
String
'(
"all"
);
Spawn
(
Cheddarlite_Path
.
all
,
Args
,
Success
);
if
not
Success
then
raise
Program_Error
;
end
if
;
end
;
end
if
;
Leave_Directory
;
end
Generate
;
...
...
@@ -133,9 +111,6 @@ package body Ocarina.Backends.Cheddar is
when
ASCII
.
NUL
=>
exit
;
when
'b'
=>
Invoke_Cheddar
:=
True
;
when
'o'
=>
declare
D
:
constant
String
:=
Parameter
;
...
...
src/backends/ocarina-backends-deos_conf-schedule.adb
View file @
51988726
-- with Locations;
with
Ada
.
Strings
;
use
Ada
.
Strings
;
with
Ada
.
Strings
.
Fixed
;
use
Ada
.
Strings
.
Fixed
;
with
Ocarina
.
Namet
;
use
Ocarina
.
Namet
;
with
Ocarina
.
ME_AADL
;
with
Ocarina
.
ME_AADL
.
AADL_Tree
.
Nodes
;
with
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nodes
;
with
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nutils
;
with
Ocarina
.
ME_AADL
.
AADL_Instances
.
Entities
;
...
...
@@ -32,6 +31,7 @@ package body Ocarina.Backends.Deos_Conf.Schedule is
-- use Ocarina.Backends.Properties;
-- use Ocarina.Backends.Deos_Conf.Mapping;
package
ATN
renames
Ocarina
.
ME_AADL
.
AADL_Tree
.
Nodes
;
package
AINU
renames
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nutils
;
package
XTN
renames
Ocarina
.
Backends
.
XML_Tree
.
Nodes
;
package
XTU
renames
Ocarina
.
Backends
.
XML_Tree
.
Nutils
;
...
...
@@ -165,7 +165,6 @@ package body Ocarina.Backends.Deos_Conf.Schedule is
begin
Offset
:=
0
;
for
J
in
Module_Schedule
'
Range
loop
Time_Window_Node
:=
Make_XML_Node
(
"PartitionTimeWindow"
);
Append_Node_To_List
...
...
@@ -177,8 +176,8 @@ package body Ocarina.Backends.Deos_Conf.Schedule is
-- For now, we assume the partition duration
-- is in milliseconds.
--
Slot_Duration
:=
To_
Milli
seconds
(
Module_Schedule
(
J
).
Duration
)
*
1_000_000
;
Slot_Duration
:=
To_
Nano
seconds
(
Module_Schedule
(
J
).
Duration
);
XTU
.
Add_Attribute
(
"Duration"
,
Trim
(
Unsigned_Long_Long
'
Image
(
Slot_Duration
),
Left
),
...
...
@@ -195,7 +194,9 @@ package body Ocarina.Backends.Deos_Conf.Schedule is
"false"
,
Time_Window_Node
);
XTU
.
Add_Attribute
(
"PartitionNameRef"
,
Get_Name_String
(
Module_Schedule
(
J
).
Partition
),
(
ATN
.
Display_Name
(
ATN
.
Identifier
(
Module_Schedule
(
J
).
Partition
))),
Time_Window_Node
);
Offset
:=
Offset
+
Slot_Duration
;
end
loop
;
...
...
src/backends/ocarina-backends-properties-arinc653.adb
View file @
51988726
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--
Copyright (C) 2014 ESA & ISAE.
--
-- Copyright (C) 2014
-2015
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
...
...
@@ -121,17 +121,11 @@ package body Ocarina.Backends.Properties.ARINC653 is
begin
while
Present
(
L
)
loop
if
Name
(
Identifier
(
L
))
=
Partition_Name
then
-- Partition is a component reference. XXX For
-- now, we do not fully resolve this part during
-- analysis or instance, we thus resort to a
-- work-around, that is to simply return the
-- name of the referenced component.
-- Partition is a component reference
Result
(
J
).
Partition
:=
Display_Name
(
First_Node
(
List_Items
(
Reference_Term
(
Property_Expression
(
L
)))));
Entity
(
Reference_Term
(
Property_Expression
(
L
)));
elsif
Name
(
Identifier
(
L
))
=
Duration_Name
then
Result
(
J
).
Duration
:=
Convert_Value_To_Time_Type
...
...
src/backends/ocarina-backends-properties-arinc653.ads
View file @
51988726
...
...
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--
Copyright (C) 2014 ESA & ISAE.
--
-- Copyright (C) 2014
-2015
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
...
...
@@ -37,7 +37,7 @@
package
Ocarina
.
Backends
.
Properties
.
ARINC653
is
type
Schedule_Window_Record_Term
is
record
Partition
:
N
am
e_Id
;
Partition
:
N
od
e_Id
;
Duration
:
Time_Type
;
Periodic_Processing_Start
:
Boolean
;
end
record
;
...
...
@@ -47,7 +47,7 @@ package Ocarina.Backends.Properties.ARINC653 is
Empty_Schedule_Window_Record_Term_Array
:
constant
Schedule_Window_Record_Term_Array
(
1
..
0
)
:=
(
others
=>
(
No_N
am
e
,
(
0
,
Picosecond
),
False
));
:=
(
others
=>
(
No_N
od
e
,
(
0
,
Picosecond
),
False
));
function
Get_Module_Schedule_Property
(
E
:
Node_Id
)
...
...
src/backends/ocarina-backends-vxworks653_conf-schedule.adb
View file @
51988726
-- with Locations;
with
Ocarina
.
Namet
;
use
Ocarina
.
Namet
;
with
Ocarina
.
ME_AADL
;
with
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nodes
;
...
...
@@ -14,6 +13,7 @@ with Ocarina.Backends.Utils;
with
Ocarina
.
Backends
.
XML_Tree
.
Nodes
;
with
Ocarina
.
Backends
.
XML_Tree
.
Nutils
;
-- with Ocarina.Backends.Vxworks653_Conf.Mapping;
with
Ocarina
.
ME_AADL
.
AADL_Tree
.
Nodes
;
package
body
Ocarina
.
Backends
.
Vxworks653_Conf
.
Schedule
is
...
...
@@ -31,6 +31,7 @@ package body Ocarina.Backends.Vxworks653_Conf.Schedule is
-- use Ocarina.Backends.Properties;
-- use Ocarina.Backends.Vxworks653_Conf.Mapping;
package
ATN
renames
Ocarina
.
ME_AADL
.
AADL_Tree
.
Nodes
;
package
AINU
renames
Ocarina
.
ME_AADL
.
AADL_Instances
.
Nutils
;
package
XTN
renames
Ocarina
.
Backends
.
XML_Tree
.
Nodes
;
package
XTU
renames
Ocarina
.
Backends
.
XML_Tree
.
Nutils
;
...
...
@@ -181,8 +182,9 @@ package body Ocarina.Backends.Vxworks653_Conf.Schedule is
--
Partition_Duration
:=
(
Long_Double
(
To_Milliseconds
(
Module_Schedule
(
J
).
Duration
))
/
Long_Double
(
1000.0
));
(
To_Nanoseconds
(
Module_Schedule
(
J
).
Duration
))
/
Long_Double
(
1_000_000_000.0
));
XTU
.
Add_Attribute
(
"Duration"
,
XV
.
New_Floating_Point_Value
(
Partition_Duration
),
Partition_Window_Node
);
...
...
@@ -190,7 +192,9 @@ package body Ocarina.Backends.Vxworks653_Conf.Schedule is
"1"
,
Partition_Window_Node
);
XTU
.
Add_Attribute
(
"PartitionNameRef"
,
Get_Name_String
(
Module_Schedule
(
J
).
Partition
),
(
ATN
.
Display_Name
(
ATN
.
Identifier
(
Module_Schedule
(
J
).
Partition
))),
Partition_Window_Node
);
end
loop
;
end
Fill_Scheduling_Slots
;
...
...
src/core/instance/ocarina-instances.adb
View file @
51988726
...
...
@@ -173,8 +173,12 @@ package body Ocarina.Instances is
if
Root_System_Name
/=
No_Name
then
List_Node
:=
Root_Systems
.
First
;
while
Present
(
List_Node
)
loop
exit
when
ATE
.
Get_Name_Of_Entity
(
List_Node
,
False
)
=
Root_System_Name
;
exit
when
(
ATE
.
Get_Name_Of_Entity
(
List_Node
,
False
)
=
Root_System_Name
or
else
ATE
.
Get_Name_Of_Entity
(
List_Node
,
False
,
True
)
=
Root_System_Name
);
List_Node
:=
ATN
.
Next_Entity
(
List_Node
);
end
loop
;
...
...
@@ -188,7 +192,8 @@ package body Ocarina.Instances is
List_Node
:=
Root_Systems
.
First
;
while
Present
(
List_Node
)
loop
Error_Loc
(
1
)
:=
ATN
.
Loc
(
List_Node
);
Error_Name
(
1
)
:=
ATE
.
Get_Name_Of_Entity
(
List_Node
);
Error_Name
(
1
)
:=
ATE
.
Get_Name_Of_Entity
(
List_Node
,
False
,
True
);
DE
(
"%"
);
List_Node
:=
ATN
.
Next_Entity
(
List_Node
);
end
loop
;
...
...
src/core/mgmt/ocarina-options.ads
View file @
51988726
...
...
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
4
ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
...
...
@@ -47,7 +47,6 @@ package Ocarina.Options is
Show_Libraries
,
Show_Usage
,
Parse_Scenario_Files_First
,
Analyze_With_Cheddar
,
Shell
,
Python_Shell
);
...
...
src/core/model/ocarina-analyzer-aadl-finder.adb
View file @
51988726
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009 Telecom ParisTech, 2010-201
4
ESA & ISAE. --
-- Copyright (C) 2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
...
...
@@ -69,12 +69,13 @@ package body Ocarina.Analyzer.AADL.Finder is
function
Filter_Declarations_According_To_Modes
(
Declaration_Node
:
Node_Id
;
In_Modes
:
Node_Id
)
return
Node_Id
;
-- Given a chained list of homonyms 'Declaration_Node', if
-- In_Modes is not nul, return the node coprresponding to the
-- declaration that matches these modes or else the declaration
-- that has no "in modes" clause or else No_Node. If In_Modes is
-- nul, return the node coprresponding to the declaration with no
-- "in modes" clause or else No_Node.
-- Given a chained list of homonyms 'Declaration_Node',
--
-- * if In_Modes is not null, return the node coprresponding to
-- the declaration that matches these modes or else the
-- declaration that has no "in modes" clause or else No_Node.
-- * if In_Modes is nul, return the node coprresponding to the
-- declaration with no "in modes" clause or else No_Node.
--------------------------------------------
-- Filter_Declarations_According_To_Modes --
...
...
@@ -449,7 +450,8 @@ package body Ocarina.Analyzer.AADL.Finder is
or
else
Kind
(
Property_Container
)
=
K_Constant_Property_Declaration
or
else
Kind
(
Property_Container
)
=
K_Property_Type
or
else
Kind
(
Property_Container
)
=
K_Property_Definition_Declaration
or
else
Kind
(
Property_Container
)
=
K_Property_Type_Declaration
);
or
else
Kind
(
Property_Container
)
=
K_Property_Type_Declaration
or
else
Kind
(
Property_Container
)
=
K_Record_Term_Element
);
List_Node
:
Node_Id
:=
No_Node
;
Property_Type
:
Node_Id
;
...
...
@@ -475,25 +477,58 @@ package body Ocarina.Analyzer.AADL.Finder is
Property_Type
:=
Property_Name_Type
(
Pointed_Node
);
end
if
;
if
Kind
(
Property_Type
)
/=
K_Enumeration_Type
then
if
Kind
(
Property_Type
)
/=
K_Enumeration_Type
and
then
Kind
(
Property_Type
)
/=
K_Record_Type
then
return
No_Node
;
elsif
not
Is_Empty
(
Identifiers
(
Property_Type
))
then
List_Node
:=
First_Node
(
Identifiers
(
Property_Type
));
end
if
;
while
Present
(
List_Node
)
loop
if
Ocarina
.
ME_AADL
.
AADL_Tree
.
Nodes
.
Name
(
List_Node
)
=
Name
(
Identifier
(
Default_Value
))
then
Resolve_Term_In_Property
(
Property_Container
,
Default_Value
,
K_Enumeration_Term
);
return
Pointed_Node
;
end
if
;
if
Kind
(
Property_Type
)
=
K_Enumeration_Type
and
then
not
Is_Empty
(
Identifiers
(
Property_Type
))
then
List_Node
:=
First_Node
(
Identifiers
(
Property_Type
));
List_Node
:=
Next_Node
(
List_Node
);
end
loop
;
while
Present
(
List_Node
)
loop
if
Ocarina
.
ME_AADL
.
AADL_Tree
.
Nodes
.
Name
(
List_Node
)
=
Name
(
Identifier
(
Default_Value
))
then
Resolve_Term_In_Property
(
Property_Container
,
Default_Value
,
K_Enumeration_Term
);
return
Pointed_Node
;
end
if
;
List_Node
:=
Next_Node
(
List_Node
);
end
loop
;
elsif
Kind
(
Property_Type
)
=
K_Record_Type
then
-- When processing a Record_Type, we iterate over
-- the property container that holds the record
-- term element (i.e. foo => bar) and check that
--
List_Node
:=
First_Node
(
List_Items
(
Property_Type
));
while
Present
(
List_Node
)
loop
-- A property type is a list of record_type element
-- XXX should use case insensitive match ?
if
Ocarina
.
ME_AADL
.
AADL_Tree
.
Nodes
.
Display_Name
(
Identifier
(
List_Node
))
=
Display_Name
(
Identifier
(
Property_Container
))
then
Resolve_Term_In_Property
(
List_Node
,
-- Property_Container,
Default_Value
,
K_Enumeration_Term
);
return
Pointed_Node
;
end
if
;
List_Node
:=
Next_Node
(
List_Node
);
end
loop
;
end
if
;
end
if
;
when
K_Enumeration_Type
=>
...
...
@@ -521,7 +556,6 @@ package body Ocarina.Analyzer.AADL.Finder is
end
case
;
return
No_Node
;
end
Find_Property_Enumeration
;
-------------------------------------------------------
...
...
src/core/model/ocarina-analyzer-aadl-links.adb
View file @
51988726
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009 Telecom ParisTech, 2010-201
4
ESA & ISAE. --
-- Copyright (C) 2009 Telecom ParisTech, 2010-201
5
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
...
...
@@ -2555,19 +2555,13 @@ package body Ocarina.Analyzer.AADL.Links is
-- Link_Property_Name --
------------------------
function
Link_Property_Name
function
Link_Property_
Type_
Name
(
Root
:
Node_Id
;
Node
:
Node_Id
)
return
Boolean
Node
:
Node_Id
;
Type_Designator
:
Node_Id
)
return
Boolean
is
pragma
Assert
(
Kind
(
Root
)
=
K_AADL_Specification
);
pragma
Assert
(
Kind
(
Node
)
=
K_Property_Definition_Declaration
);
pragma
Assert
(
Present
(
Property_Name_Type
(
Node
)));
Success
:
Boolean
:=
True
;
List_Node
:
Node_Id
;
Type_Designator
:
constant
Node_Id
:=
Property_Type_Designator
(
Property_Name_Type
(
Node
));
Property_Type
:
constant
Node_Id
:=
Property_Name_Type
(
Node
);
Success
:
Boolean
:=
True
;
begin
case
Kind
(
Type_Designator
)
is
when
K_Unique_Property_Type_Identifier
=>
...
...
@@ -2576,10 +2570,10 @@ package body Ocarina.Analyzer.AADL.Links is
begin
Pointed_Node
:=
Find_Property_Entity
(
Root
=>
Root
,
Property_Set_Identifier
=>
Property_Set_Identifier
(
Type_Designator
),
Property_Identifier
=>
Identifier
(
Type_Designator
));
(
Root
=>
Root
,
Property_Set_Identifier
=>
Property_Set_Identifier
(
Type_Designator
),
Property_Identifier
=>
Identifier
(
Type_Designator
));
if
No
(
Pointed_Node
)
then
DAE
...
...
@@ -2587,7 +2581,10 @@ package body Ocarina.Analyzer.AADL.Links is
Message1
=>
"does not point to anything"
);
Success
:=
False
;
elsif
Kind
(
Pointed_Node
)
/=
K_Property_Type_Declaration
then
elsif
(
Kind
(
Pointed_Node
)
/=
K_Property_Type_Declaration
and
then
Kind
(
Pointed_Node
)
/=
K_Property_Definition_Declaration
)
then
DAE
(
Node1
=>
Node
,
Message1
=>
" points to "
,
...
...
@@ -2609,10 +2606,49 @@ package body Ocarina.Analyzer.AADL.Links is
when
K_Range_Type
=>
Success
:=
Link_Type_Designator
(
Root
,
Type_Designator
);
when
K_Classifier_Type
|
K_Reference_Type
|
K_Enumeration_Type
|
K_Boolean_Type
|
K_String_Type
=>
null
;
-- Nothing to do here
when
K_Record_Type
=>
declare
J
:
Node_Id
;
begin
J
:=
First_Node
(
List_Items
(
Type_Designator
));
while
Present
(
J
)
loop
Success
:=
Success
and
then
Link_Property_Type_Name
(
Root
,
J
,
Property_Type_Designator
(
J
));
J
:=
Next_Node
(
J
);
end
loop
;
end
;
when
others
=>
null
;
raise
Program_Error
;
-- Null;
end
case
;
return
Success
;
end
Link_Property_Type_Name
;
function
Link_Property_Name
(
Root
:
Node_Id
;
Node
:
Node_Id
)
return
Boolean
is
pragma
Assert
(
Kind
(
Root
)
=
K_AADL_Specification
);
pragma
Assert
(
Kind
(
Node
)
=
K_Property_Definition_Declaration
or
else
Kind
(
Node
)
=
K_Record_Type_Element
);
pragma
Assert
(
Present
(
Property_Name_Type
(
Node
)));
Success
:
Boolean
:=
True
;
List_Node
:
Node_Id
;
Type_Designator
:
constant
Node_Id
:=
Property_Type_Designator
(
Property_Name_Type
(
Node
));
Property_Type
:
constant
Node_Id
:=
Property_Name_Type
(
Node
);
begin
Success
:=
Link_Property_Type_Name
(
Root
,
Node
,
Type_Designator
);
-- Link optional default value
if
Default_Value
(
Node
)
/=
No_Node
then
...
...
@@ -2698,7 +2734,6 @@ package body Ocarina.Analyzer.AADL.Links is
(
Classifier_Ref
(
List_Node
),
Get_Referenced_Entity
(
Classifier_Ref
(
List_Node
)),
Warning
=>
True
);
-- Not finding the corresponding entity is not a
-- problem if the property is not to be used.
end
if
;
...
...
@@ -2744,7 +2779,10 @@ package body Ocarina.Analyzer.AADL.Links is
or
else
Kind
(
Property_Type
)
=
K_Real_Type
or
else
Kind
(
Property_Type
)
=
K_Integer_Type
or
else
Kind
(
Property_Type
)
=
K_Property_Type
or
else
Kind
(
Property_Type
)
=
K_Constant_Property_Declaration
);
or
else
Kind
(
Property_Type
)
=
K_Constant_Property_Declaration
or
else
Kind
(
Property_Type
)
=
K_Record_Type_Element
or
else
Kind
(
Property_Type
)
=
K_Property_Term
or
else
Kind
(
Property_Type
)
=
K_Unique_Property_Type_Identifier
);
Success
:
Boolean
:=
True
;
Pointed_Node
:
Node_Id
;
...
...
@@ -2753,6 +2791,7 @@ package body Ocarina.Analyzer.AADL.Links is
Corresponding_Container
:
Node_Id
;
Type_Designator
:
Node_Id
;
begin
case
Kind
(
Node
)
is
when
K_Component_Classifier_Term
=>
Pop_Scope
;
...
...
@@ -2910,7 +2949,6 @@ package body Ocarina.Analyzer.AADL.Links is
end
if
;
when
K_Unique_Property_Const_Identifier
|
K_Property_Term
=>
if
Kind
(
Container
)
=
K_Component_Type
or
else
Kind
(
Container
)
=
K_Component_Implementation
or
else
Kind
(
Container
)
=
K_Feature_Group_Type
...
...
@@ -2940,29 +2978,107 @@ package body Ocarina.Analyzer.AADL.Links is
-- If we did not find anything, we look for an enumeration in
-- properties
if
Present
(
Property_Type
)
and
then
Kind
(
Property_Type
)
=
K_Property_Type
and
then
(
Kind
(
Property_Type
)
=
K_Property_Type
or
else
Kind
(
Property_Type
)
=
K_Unique_Property_Type_Identifier
)
then
if
Present
(
Property_Type_Designator
(
Property_Type
))
then
if
Kind
(
Property_Type
)
=
K_Property_Type
and
then
Present
(
Property_Type_Designator
(
Property_Type
))
then
Type_Designator
:=
Property_Type_Designator
(
Property_Type
);
else
Type_Designator
:=
Property_Type_Designator
(
Entity
(
Property_Type
));
end
if
;
if
No
(
Pointed_Node
)
and
then
(
Kind
(
Type_Designator
)
=
K_Unique_Property_Type_Identifier
or
else
Kind
(
Type_Designator
)
=
K_Enumeration_Type
)
then
Pointed_Node
:=
Find_Property_Enumeration
(
Root
,
Container
,
Property_Container
,
Node
,
Type_Designator
);
if
No
(
Pointed_Node
)
then
if
(
Kind
(
Type_Designator
)
=
K_Unique_Property_Type_Identifier
or