Commit a412545c authored by jhugues's avatar jhugues

* Correct finder to support correctly rule 11.1.2 (N2)

	Update reference output and property sets accordingly



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@3532 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent e4979458
all.aadl:66:03: warning: Field references a component type
all.aadl:66:03: warning: Field references a component type
all.aadl:124:03: warning: proc_1 references a component type
all.aadl:125:03: warning: proc_2 references a component type
all.aadl:126:03: warning: ram references a component type
all.aadl:127:03: warning: ram_2 references a component type
ocarina: Total: 0 error and 6 warnings
resources execution
requirement : connections
Content of set proc_set (lib.real:25:18) is
shared.impl_sn: 13 component instance all.aadl:302:01
Content of set cnx_set (lib.real:27:14) is
shared.impl_tr: 200 component instance all.aadl:279:01
Content of set proc_set (lib.real:25:18) is
shared.impl_tr: 200 component instance all.aadl:279:01
Content of set cnx_set (lib.real:27:14) is
shared.impl_sn: 13 component instance all.aadl:302:01
theorem connections is: TRUE
requirement : memory_size
Content of set proc_set (lib.real:42:18) is
shared.impl_sn: 13 component instance all.aadl:302:01
Content of set threads (lib.real:44:14) is
shared.impl_sn_th1: 43 component instance all.aadl:209:01
shared.impl_sn_th2: 112 component instance all.aadl:233:01
Content of set mem_set (lib.real:46:17) is
shared.impl_ram: 586 component instance all.aadl:93:01
Content of set proc_set (lib.real:42:18) is
shared.impl_tr: 200 component instance all.aadl:279:01
Content of set threads (lib.real:44:14) is
shared.impl_tr_th1: 219 component instance all.aadl:259:01
shared.impl_tr_th2: 371 component instance all.aadl:259:01
Content of set mem_set (lib.real:46:17) is
shared.impl_ram_2: 597 component instance all.aadl:93:01
theorem memory_size is: TRUE
requirement : mutexes
Content of set proc_set (lib.real:63:18) is
shared.impl_sn: 13 component instance all.aadl:302:01
Content of set protected_data_set (lib.real:65:25) is
Content of set proc_set (lib.real:63:18) is
shared.impl_tr: 200 component instance all.aadl:279:01
Content of set protected_data_set (lib.real:65:25) is
theorem mutexes is: TRUE
requirement : latency
requirement : buses_rate
Content of set cnx_set (lib.real:8:17) is
shared.impl_cnx_1: 614 connection instance all.aadl:130:03
shared.impl_cnx_2: 626 connection instance all.aadl:131:03
Content of set connected_data_set (lib.real:10:25) is
lib.real:12:33 Backends: warning : property "assert_properties::access_bandwidth" is not defined on element 607 (shared.impl_a_bus) all.aadl:104:01Bus_Set
lib.real:12:72 Backends: error : Property is false for instance 607 (shared.impl_a_bus)
theorem buses_rate is: FALSE
lib.real:85:01 Backends: fatal error : requirements are not fulfilled
all.aadl:11:03: Criticity (property definition declaration) does not point to anything
all.aadl:18:03: Actual_Subprogram_Type (property definition declaration) does not point to anything
Cannot analyze AADL specifications
......@@ -16,16 +16,16 @@ Min_Interrupt_Priority : constant aadlinteger => 29;
Max_Interrupt_Priority : constant aadlinteger => 31;
-- Maximum and minimum interrupt priority
Priority_Type : type aadlinteger 0 .. value (Max_Priority_Value);
Priority_Type : type aadlinteger 0 .. value (ASSERT_Properties::Max_Priority_Value);
-- We must define a property type to be able to reference it
Priority : Priority_Type applies to
Priority : ASSERT_Properties::Priority_Type applies to
(thread,
thread group,
process);
Interrupt_Priority : aadlinteger
value(Min_Interrupt_Priority) .. value (Max_Interrupt_Priority) applies to
value(ASSERT_Properties::Min_Interrupt_Priority) .. value (ASSERT_Properties::Max_Interrupt_Priority) applies to
(thread,
thread group,
process);
......@@ -40,7 +40,7 @@ Transmission_Type : type enumeration
-- Message transmission kind
Encoding_type : type enumeration (native, uper, acn);
Encoding : Encoding_type applies to (parameter);
Encoding : ASSERT_Properties::Encoding_type applies to (parameter);
Freq_Units : type units (
Hz,
......@@ -49,17 +49,17 @@ Freq_Units : type units (
GHz => MHz * 1000);
-- Frequency units
Max_Frequency : constant aadlinteger Freq_Units => 1000 GHz;
Max_Frequency : constant aadlinteger ASSERT_Properties::Freq_Units => 1000 GHz;
-- Maximal Frequency
Frequency : type aadlinteger 0 Hz .. value (Max_Frequency) units Freq_Units;
Frequency : type aadlinteger 0 Hz .. value (ASSERT_Properties::Max_Frequency) units ASSERT_Properties::Freq_Units;
-- Frequency of a processor
---------------
-- Partition --
---------------
Criticality : Criticality_Level_Type applies to (process, system);
Criticality : ASSERT_Properties::Criticality_Level_Type applies to (process, system);
Local_Scheduling_Policy : Supported_Scheduling_Protocols
applies to (process, system);
Time_Budget : aadlinteger applies to (process, system);
......@@ -71,8 +71,8 @@ Storage_Budget : Size applies to (process, system);
-- RCM VM --
------------
Min_Priority : Priority_Type applies to (processor);
Max_Priority : Priority_Type applies to (processor);
Min_Priority : ASSERT_Properties::Priority_Type applies to (processor);
Max_Priority : ASSERT_Properties::Priority_Type applies to (processor);
--Min_Interrupt_Priority : Priority_Type applies to (processor);
--Max_Interrupt_Priority : Priority_Type applies to (processor);
......@@ -109,7 +109,7 @@ Budget_Exhausted_Recovery_Call : Time applies to (processor);
-- Processor
Processor_Speed : Frequency applies to (processor);
Processor_Speed : ASSERT_Properties::Frequency applies to (processor);
-- XXX to be replaced with AADLv2 property
-- Interconnection
......@@ -122,7 +122,7 @@ Processor_Speed : Frequency applies to (processor);
-- Transmission_Time.
Interconnection_Speed_Factor : aadlreal applies to (bus);
Transmission_Kind : Transmission_Type applies to (bus);
Transmission_Kind : ASSERT_Properties::Transmission_Type applies to (bus);
Bandwidth : Data_Volume applies to (bus);
......@@ -168,7 +168,7 @@ ASN1_types: type enumeration
astring);
ASN1_Basic_Type : ASN1_types applies to (data);
ASN1_Basic_Type : ASSERT_Properties::ASN1_types applies to (data);
APLC_Binding : list of aadlstring applies to (process);
......@@ -186,7 +186,7 @@ RCMoperationKind_list: type enumeration
immediate,
any);
RCMoperationKind: RCMoperationKind_list
RCMoperationKind: ASSERT_Properties::RCMoperationKind_list
applies to (server subprogram, event port, event data port);
RCMceiling: aadlinteger
......
......@@ -49,16 +49,16 @@ property set ARINC653 is
Supported_Memory_Kind : type enumeration (memory_data, memory_code);
HM_Errors : list of Supported_Error_Code
HM_Errors : list of ARINC653::Supported_Error_Code
applies to (processor, virtual processor, thread);
HM_Actions : list of Supported_Recovery_Action
HM_Actions : list of ARINC653::Supported_Recovery_Action
applies to (processor, virtual processor, thread);
HM_Callback : classifier (Subprogram Classifier)
applies to (thread, virtual processor, processor);
Memory_Kind : Supported_Memory_Kind applies to (memory);
Memory_Kind : ARINC653::Supported_Memory_Kind applies to (memory);
Access_Type : ARINC653::Supported_Access_Type applies to (memory);
......@@ -66,7 +66,7 @@ property set ARINC653 is
Supported_DAL_Type : type enumeration (LEVEL_A, LEVEL_B, LEVEL_C, LEVEL_D, LEVEL_E);
DAL : Supported_DAL_Type applies to (virtual processor);
DAL : ARINC653::Supported_DAL_Type applies to (virtual processor);
System_Overhead_Time : Time applies to (processor, virtual processor);
......
......@@ -19,7 +19,7 @@ ASN1_types: type enumeration
achoice,
aoctetstring);
ASN1_Basic_Type : ASN1_types applies to (data);
ASN1_Basic_Type : ASSERT_Properties::ASN1_types applies to (data);
----------------------------
-- Types and enumerations --
......@@ -72,7 +72,7 @@ Frequency : type aadlinteger 0 Hz .. Max_Aadlinteger
-- Partition --
---------------
Criticality : Criticality_Level_Type applies to (process, system);
Criticality : ASSERT_Properties::Criticality_Level_Type applies to (process, system);
Local_Scheduling_Policy : Supported_Scheduling_Protocols
applies to (process, system);
Time_Budget : aadlinteger applies to (process, system);
......@@ -122,7 +122,7 @@ Budget_Exhausted_Recovery_Call : Time applies to (processor);
-- Processor
Processor_Speed : Frequency applies to (processor);
Processor_Speed : ASSERT_Properties::Frequency applies to (processor);
-- XXX to be replaced with AADLv2 property
-- Interconnection
......@@ -135,7 +135,7 @@ Processor_Speed : Frequency applies to (processor);
-- Transmission_Time.
Interconnection_Speed_Factor : aadlreal applies to (bus);
Transmission_Kind : Transmission_Type applies to (bus);
Transmission_Kind : ASSERT_Properties::Transmission_Type applies to (bus);
Bandwidth : Data_Volume applies to (bus);
......@@ -181,7 +181,7 @@ RCMoperationKind_list: type enumeration
immediate,
any);
RCMoperationKind: RCMoperationKind_list
RCMoperationKind: ASSERT_Properties::RCMoperationKind_list
applies to (event port, event data port);
RCMceiling: aadlinteger
......
......@@ -44,7 +44,7 @@ property set POK is
Major_Frame : Time applies to (processor);
Scheduler : Available_Schedulers
Scheduler : POK::Available_Schedulers
applies to (processor, virtual processor);
Slots: list of Time applies to (processor);
......@@ -57,11 +57,11 @@ property set POK is
Supported_Error_Code: type enumeration (Deadline_Missed, Application_Error, Numeric_Error, Illegal_Request, Stack_Overflow, Memory_Violation, Hardware_Fault, Power_Fail, Partition_Configuration, Partition_Init, Partition_Scheduling, Partition_Process, Kernel_Init, Kernel_Scheduling);
Recovery_Errors : list of Supported_Error_Code applies to (processor, virtual processor, thread);
Recovery_Errors : list of POK::Supported_Error_Code applies to (processor, virtual processor, thread);
Supported_Recovery_Action: type enumeration (Ignore, Confirm, Thread_Restart, Thread_Stop_And_Start_Another, Thread_Stop, Partition_Restart, Partition_Stop, Kernel_Stop, Kernel_Restart, Nothing);
Recovery_Actions : list of Supported_Recovery_Action applies to (processor, virtual processor, thread);
Recovery_Actions : list of POK::Supported_Recovery_Action applies to (processor, virtual processor, thread);
-- There is two properties that handle errors and their recovery at the processor and virtual processor level
-- These two properties must be declared both in the component.
-- For example, we declare the properties like that:
......@@ -108,7 +108,7 @@ property set POK is
Device_Name : aadlstring applies to (device);
Additional_Features : list of Supported_Additional_Features applies to (virtual processor, processor);
Additional_Features : list of POK::Supported_Additional_Features applies to (virtual processor, processor);
Supported_Additional_Features: type enumeration (libmath, libc_stdlib, libc_stdio, libc_string, io, pci, console, libc);
......@@ -122,5 +122,5 @@ property set POK is
Supported_POK_Protocols: type enumeration (ceasar,des,blowfish,unknown);
Protocol : Supported_POK_Protocols applies to (virtual bus);
Protocol : POK::Supported_POK_Protocols applies to (virtual bus);
end POK;
......@@ -29,7 +29,7 @@ property set Taste is
aoctetstring,
astring);
ASN1_Basic_Type : ASN1_types applies to (data);
ASN1_Basic_Type : Taste::ASN1_types applies to (data);
FS_Default_Value : aadlstring applies to (data);
......@@ -93,7 +93,7 @@ Frequency : type aadlinteger 0 Hz .. Max_Aadlinteger
-- Partition --
---------------
Criticality : Criticality_Level_Type applies to (process, system);
Criticality : Taste::Criticality_Level_Type applies to (process, system);
Local_Scheduling_Policy : Supported_Scheduling_Protocols
applies to (process, system);
Time_Budget : aadlinteger applies to (process, system);
......@@ -143,7 +143,7 @@ Budget_Exhausted_Recovery_Call : Time applies to (processor);
-- Processor
Processor_Speed : Frequency applies to (processor);
Processor_Speed : Taste::Frequency applies to (processor);
-- XXX to be replaced with AADLv2 property
-- Interconnection
......@@ -156,7 +156,7 @@ Processor_Speed : Frequency applies to (processor);
-- Transmission_Time.
Interconnection_Speed_Factor : aadlreal applies to (bus);
Transmission_Kind : Transmission_Type applies to (bus);
Transmission_Kind : Taste::Transmission_Type applies to (bus);
Bandwidth : Data_Volume applies to (bus);
......@@ -202,7 +202,7 @@ RCMoperationKind_list: type enumeration
immediate,
any);
RCMoperationKind: RCMoperationKind_list
RCMoperationKind: Taste::RCMoperationKind_list
applies to (event port, event data port, access, subprogram access);
RCMceiling: aadlinteger
......@@ -218,7 +218,7 @@ dataviewpath : list of aadlstring applies to (package);
Encoding_type : type enumeration (native, uper, acn);
Encoding : Encoding_type applies to (parameter);
Encoding : Taste::Encoding_type applies to (parameter);
Ada_Package_Name : aadlstring applies to (data);
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009, GET-Telecom Paris. --
-- Copyright (C) 2009-2011, European Space Agency (ESA). --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -988,12 +988,16 @@ package body Ocarina.Analyzer.AADL.Finder is
Property_Set : Node_Id;
Found_Property_Declaration : Node_Id := No_Node;
begin
-- Per strict conformance to AADL legality rules, all property
-- entities should be either fully qualified, or part of
-- pre-declared property sets.
if Present (Property_Set_Identifier) then
Property_Set := Node_In_Scope
(Property_Set_Identifier, Entity_Scope (Root));
-- If we found the property set, then we look for the
-- property in it.
-- If we found the corresponding property set, then we look
-- for the property in it.
if Present (Property_Set) then
Found_Property_Declaration := Node_In_Scope
......@@ -1003,31 +1007,20 @@ package body Ocarina.Analyzer.AADL.Finder is
end if;
else
if Present (Current_Scope) and then
Kind (Corresponding_Entity (Current_Scope)) = K_Property_Set
then
-- If we are in a property set, we search here
Found_Property_Declaration := Node_In_Scope
(Property_Identifier, Current_Scope);
end if;
-- If we did not find anything so far, we try the implicit
-- property sets.
if No (Found_Property_Declaration) then
for S in Standard_Property_Set_Type'Range loop
Set_Str_To_Name_Buffer (Image (S));
Property_Set := Node_In_Scope (Name_Find, Entity_Scope (Root));
for S in Standard_Property_Set_Type'Range loop
Set_Str_To_Name_Buffer (Image (S));
Property_Set := Node_In_Scope (Name_Find, Entity_Scope (Root));
if Present (Property_Set) then
Found_Property_Declaration := Node_In_Scope
(Property_Identifier, Entity_Scope (Property_Set));
end if;
if Present (Property_Set) then
Found_Property_Declaration := Node_In_Scope
(Property_Identifier, Entity_Scope (Property_Set));
end if;
exit when Present (Found_Property_Declaration);
end loop;
end if;
exit when Present (Found_Property_Declaration);
end loop;
end if;
return Found_Property_Declaration;
......
testrange.aadl:39:02: throughput2 (property association) does not point to anything
testrange.aadl:23:01: throughputNoresolve (property definition declaration) does not point to anything
Cannot analyze AADL specifications
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment