Commit 99a9cc50 authored by jhugues's avatar jhugues

* Also convert to base unit in the case of range

          (e.g. Compute_Execution_Time).



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@5341 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 3f4b355b
......@@ -184,12 +184,40 @@ package body Ocarina.Instances.REAL_Finder is
declare
L, R : Value_Id;
LT, RT : RV.Value_Type;
Base_Value : Node_Id;
begin
L := AADL_Value (ATN.Value (ATN.Number_Value
(ATN.Lower_Bound (N))));
if Present (ATN.Unit_Identifier (ATN.Lower_Bound (N)))
and then Present
(ATN.Corresponding_Entity
(ATN.Unit_Identifier (ATN.Lower_Bound (N))))
then
Base_Value :=
Convert_To_Base
(ATN.Number_Value (ATN.Lower_Bound (N)),
ATN.Corresponding_Entity
(ATN.Unit_Identifier (ATN.Lower_Bound (N))));
L := AADL_Value (ATN.Value (Base_Value));
else
L := AADL_Value (ATN.Value (ATN.Number_Value
(ATN.Lower_Bound (N))));
end if;
LT := Get_Value_Type (L);
R := AADL_Value (ATN.Value (ATN.Number_Value
(ATN.Upper_Bound (N))));
if Present (ATN.Unit_Identifier (ATN.Upper_Bound (N)))
and then Present
(ATN.Corresponding_Entity
(ATN.Unit_Identifier (ATN.Upper_Bound (N))))
then
Base_Value :=
Convert_To_Base
(ATN.Number_Value (ATN.Upper_Bound (N)),
ATN.Corresponding_Entity
(ATN.Unit_Identifier (ATN.Upper_Bound (N))));
R := AADL_Value (ATN.Value (Base_Value));
else
R := AADL_Value (ATN.Value (ATN.Number_Value
(ATN.Upper_Bound (N))));
end if;
RT := Get_Value_Type (R);
if LT.T = LT_Integer then
......
......@@ -59,10 +59,11 @@ Content of set proc_set (test_real_exec_05.aadl:139:18) is
Content of set threads (test_real_exec_05.aadl:141:14) is
rma.erc32_node_a_task1: 20 component instance test_real_exec_05.aadl:27:01
rma.erc32_node_a_task2: 52 component instance test_real_exec_05.aadl:40:01
-> value for y is 6.0
=> Result: TRUE
-> value for y is 6000000000.0
test_real_exec_05.aadl:147:12 Backends: error : Property is false for instance 84 (rma.erc32_cpu_rm)
=> Result: FALSE
theorem variables_iterative_expressions is: TRUE
theorem variables_iterative_expressions is: FALSE
variables_imbricated_iterative_expressions execution
......@@ -75,10 +76,11 @@ Content of set proc_set (test_real_exec_05.aadl:156:18) is
Content of set threads (test_real_exec_05.aadl:158:14) is
rma.erc32_node_a_task1: 20 component instance test_real_exec_05.aadl:27:01
rma.erc32_node_a_task2: 52 component instance test_real_exec_05.aadl:40:01
-> value for y is 4000000003.0
=> Result: TRUE
-> value for y is 7000000000.0
test_real_exec_05.aadl:170:12 Backends: error : Property is false for instance 84 (rma.erc32_cpu_rm)
=> Result: FALSE
theorem variables_imbricated_iterative_expressions is: TRUE
theorem variables_imbricated_iterative_expressions is: FALSE
variables_product_expression execution
......
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