No flags found
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
ae9370e
... +1 ...
4e440c6
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
117 | 117 | -- element of the list. |
|
118 | 118 | ||
119 | 119 | if No (AIN.In_Modes (List_Node)) |
|
120 | - | or else AINU.Is_Empty (ATN.Modes (AIN.In_Modes (List_Node))) |
|
120 | + | or else AINU.Is_Empty (AIN.Modes (AIN.In_Modes (List_Node))) |
|
121 | 121 | or else In_Mode = No_Name |
|
122 | 122 | then |
|
123 | 123 | return List_Node; |
|
124 | 124 | else |
|
125 | - | M := AIN.First_Node (ATN.Modes (AIN.In_Modes (List_Node))); |
|
125 | + | M := AIN.First_Node (AIN.Modes (AIN.In_Modes (List_Node))); |
|
126 | 126 | ||
127 | 127 | while Present (M) loop |
|
128 | 128 | -- Depending on the nature of the traversed tree |
39 | 39 | package body Ocarina.Instances.Components.Modes is |
|
40 | 40 | ||
41 | 41 | use Ocarina.ME_AADL.AADL_Tree.Nodes; |
|
42 | - | use Ocarina.ME_AADL.AADL_Tree.Nutils; |
|
43 | 42 | use Ocarina.ME_AADL.AADL_Instances.Nodes; |
|
44 | 43 | use Ocarina.ME_AADL.AADL_Instances.Nutils; |
|
45 | 44 | use Ocarina.ME_AADL.AADL_Instances.Entities; |
355 | 354 | ||
356 | 355 | AIN.Set_In_Modes |
|
357 | 356 | (Subclause_Instance, |
|
358 | - | New_Node (K_In_Modes, ATN.Loc (Subclause_In_Modes))); |
|
359 | - | ATN.Set_Modes |
|
357 | + | New_Node (AIN.K_In_Modes, ATN.Loc (Subclause_In_Modes))); |
|
358 | + | AIN.Set_Modes |
|
360 | 359 | (AIN.In_Modes (Subclause_Instance), |
|
361 | 360 | AINU.New_List (K_List_Id, ATN.Loc (Subclause_In_Modes))); |
|
362 | 361 |
365 | 364 | declare |
|
366 | 365 | Mode_List : |
|
367 | 366 | List_Id renames |
|
368 | - | ATN.Modes (AIN.In_Modes (Subclause_Instance)); |
|
367 | + | AIN.Modes (AIN.In_Modes (Subclause_Instance)); |
|
369 | 368 | begin |
|
370 | 369 | while Present (MoT) loop |
|
371 | 370 | case ATN.Kind (MoT) is |
1781 | 1781 | ||
1782 | 1782 | if Present (AIN.In_Modes (Call_Seq)) |
|
1783 | 1783 | and then not AINU.Is_Empty |
|
1784 | - | (ATN.Modes (AIN.In_Modes (Call_Seq))) |
|
1784 | + | (AIN.Modes (AIN.In_Modes (Call_Seq))) |
|
1785 | 1785 | then |
|
1786 | 1786 | -- Generate a case statement alternative that |
|
1787 | 1787 | -- handles this sequence. |
|
1788 | 1788 | ||
1789 | 1789 | N := |
|
1790 | 1790 | Make_Case_Statement_Alternative |
|
1791 | 1791 | (In_Modes_To_Choices |
|
1792 | - | (ATN.Modes (In_Modes (Call_Seq))), |
|
1792 | + | (AIN.Modes (In_Modes (Call_Seq))), |
|
1793 | 1793 | Alt_Sts); |
|
1794 | 1794 | Append_Node_To_List (N, Alternatives); |
|
1795 | 1795 | CS_Cnt := CS_Cnt + 1; |
474 | 474 | ||
475 | 475 | while Present (List_Node) loop |
|
476 | 476 | if No |
|
477 | - | (Get_First_Homonym_Instance |
|
478 | - | (AIN.Connections (New_Instance), |
|
479 | - | List_Node)) |
|
477 | + | (Get_First_Homonym_Instance |
|
478 | + | (AIN.Connections (New_Instance), |
|
479 | + | List_Node)) |
|
480 | 480 | then |
|
481 | 481 | Instance_Node := |
|
482 | 482 | Instantiate_Connection |
498 | 498 | end loop; |
|
499 | 499 | end if; |
|
500 | 500 | ||
501 | - | -- Modes |
|
501 | + | end if; |
|
502 | 502 | ||
503 | - | if not ATNU.Is_Empty (ATN.Modes (Component)) then |
|
504 | - | if AIN.Modes (New_Instance) = No_List then |
|
505 | - | AIN.Set_Modes (New_Instance, New_List (K_List_Id, No_Location)); |
|
506 | - | end if; |
|
503 | + | -- Modes |
|
507 | 504 | ||
508 | - | if AIN.Mode_transitions (New_Instance) = No_List then |
|
509 | - | Set_Mode_transitions |
|
510 | - | (New_Instance, |
|
511 | - | New_List (K_List_Id, No_Location)); |
|
512 | - | end if; |
|
505 | + | if not ATNU.Is_Empty (ATN.Modes (Component)) then |
|
506 | + | if AIN.Modes (New_Instance) = No_List then |
|
507 | + | AIN.Set_Modes (New_Instance, New_List (K_List_Id, No_Location)); |
|
508 | + | end if; |
|
513 | 509 | ||
514 | - | -- We must instantiate all modes before any mode |
|
515 | - | -- transition since the mode transition instantiation |
|
516 | - | -- uses the instantiated modes. |
|
510 | + | if AIN.Mode_transitions (New_Instance) = No_List then |
|
511 | + | Set_Mode_transitions |
|
512 | + | (New_Instance, |
|
513 | + | New_List (K_List_Id, No_Location)); |
|
514 | + | end if; |
|
517 | 515 | ||
518 | - | List_Node := ATN.First_Node (ATN.Modes (Component)); |
|
516 | + | -- We must instantiate all modes before any mode |
|
517 | + | -- transition since the mode transition instantiation |
|
518 | + | -- uses the instantiated modes. |
|
519 | 519 | ||
520 | - | while Present (List_Node) loop |
|
521 | - | if ATN.Kind (List_Node) = K_Mode then |
|
522 | - | Instance_Node := |
|
523 | - | Instantiate_Mode (Instance_Root, New_Instance, List_Node); |
|
520 | + | List_Node := ATN.First_Node (ATN.Modes (Component)); |
|
524 | 521 | ||
525 | - | -- Apply the properties to the instantiated mode |
|
522 | + | while Present (List_Node) loop |
|
523 | + | if ATN.Kind (List_Node) = K_Mode then |
|
524 | + | Instance_Node := |
|
525 | + | Instantiate_Mode (Instance_Root, New_Instance, List_Node); |
|
526 | 526 | ||
527 | - | if Present (Instance_Node) then |
|
528 | - | Success := |
|
529 | - | Apply_Properties |
|
530 | - | (Instance_Root, |
|
531 | - | Instance_Node, |
|
532 | - | ATN.Properties (List_Node), |
|
533 | - | Override_Mode => True) |
|
534 | - | and then Success; |
|
535 | - | end if; |
|
527 | + | -- Apply the properties to the instantiated mode |
|
536 | 528 | ||
537 | - | if Present (Instance_Node) then |
|
538 | - | Append_Node_To_List |
|
539 | - | (Instance_Node, |
|
540 | - | AIN.Modes (New_Instance)); |
|
541 | - | else |
|
542 | - | Display_Instantiation_Error (List_Node); |
|
543 | - | Success := False; |
|
544 | - | end if; |
|
529 | + | if Present (Instance_Node) then |
|
530 | + | Success := |
|
531 | + | Apply_Properties |
|
532 | + | (Instance_Root, |
|
533 | + | Instance_Node, |
|
534 | + | ATN.Properties (List_Node), |
|
535 | + | Override_Mode => True) |
|
536 | + | and then Success; |
|
545 | 537 | end if; |
|
546 | 538 | ||
547 | - | List_Node := ATN.Next_Node (List_Node); |
|
548 | - | end loop; |
|
539 | + | if Present (Instance_Node) then |
|
540 | + | Append_Node_To_List |
|
541 | + | (Instance_Node, |
|
542 | + | AIN.Modes (New_Instance)); |
|
543 | + | else |
|
544 | + | Display_Instantiation_Error (List_Node); |
|
545 | + | Success := False; |
|
546 | + | end if; |
|
547 | + | end if; |
|
549 | 548 | ||
550 | - | -- Mode transitions |
|
549 | + | List_Node := ATN.Next_Node (List_Node); |
|
550 | + | end loop; |
|
551 | 551 | ||
552 | - | List_Node := ATN.First_Node (ATN.Modes (Component)); |
|
552 | + | -- Mode transitions |
|
553 | 553 | ||
554 | - | while Present (List_Node) loop |
|
555 | - | if Kind (List_Node) = K_Mode_Transition then |
|
556 | - | Instance_Node := |
|
557 | - | Instantiate_Mode_Transition |
|
558 | - | (Instance_Root, |
|
559 | - | New_Instance, |
|
560 | - | List_Node); |
|
554 | + | List_Node := ATN.First_Node (ATN.Modes (Component)); |
|
561 | 555 | ||
562 | - | if Present (Instance_Node) then |
|
563 | - | Append_Node_To_List |
|
564 | - | (Instance_Node, |
|
565 | - | AIN.Mode_transitions (New_Instance)); |
|
566 | - | else |
|
567 | - | Display_Instantiation_Error (Component); |
|
568 | - | Success := False; |
|
569 | - | end if; |
|
556 | + | while Present (List_Node) loop |
|
557 | + | if Kind (List_Node) = K_Mode_Transition then |
|
558 | + | Instance_Node := |
|
559 | + | Instantiate_Mode_Transition |
|
560 | + | (Instance_Root, |
|
561 | + | New_Instance, |
|
562 | + | List_Node); |
|
563 | + | ||
564 | + | if Present (Instance_Node) then |
|
565 | + | Append_Node_To_List |
|
566 | + | (Instance_Node, |
|
567 | + | AIN.Mode_transitions (New_Instance)); |
|
568 | + | else |
|
569 | + | Display_Instantiation_Error (Component); |
|
570 | + | Success := False; |
|
570 | 571 | end if; |
|
572 | + | end if; |
|
571 | 573 | ||
572 | - | List_Node := ATN.Next_Node (List_Node); |
|
573 | - | end loop; |
|
574 | - | end if; |
|
574 | + | List_Node := ATN.Next_Node (List_Node); |
|
575 | + | end loop; |
|
576 | + | end if; |
|
575 | 577 | ||
578 | + | if Kind (Component) = K_Component_Implementation then |
|
576 | 579 | -- At this point, we have all necessary elements to solve |
|
577 | 580 | -- the "in_modes" clauses of subcomponents, call sequences, |
|
578 | 581 | -- connections. "in modes" of property association is done |
Learn more Showing 6 files with coverage changes found.
src/core/tree/ocarina-me_aadl-aadl_instances-debug.adb
src/backends/ast_asn1/ocarina-backends-asn1_values.adb
src/backends/ast_asn1/ocarina-backends-asn1_tree-nutils.adb
src/backends/asn1_deployment/ocarina-backends-asn1.adb
src/backends/asn1_deployment/ocarina-backends-asn1-deployment.adb
src/backends/ast_asn1/ocarina-backends-asn1_tree-generator.adb
Files | Coverage |
---|---|
src | 0.47% 70.52% |
Project Totals (369 files) | 70.52% |
4e440c6
c400179
ae9370e