Commit ceb07469 authored by hugues.jerome's avatar hugues.jerome

* Minor reformatting


git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@789 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 67f925ad
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2005-2009, GET-Telecom Paris. --
-- Copyright (C) 2005-2010, GET-Telecom Paris. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -146,8 +146,9 @@ package body Ocarina.Instances.Finder is
R : constant Node_Id := AIN.Root_System (Instance_Root);
N : Node_Id;
begin
if Ocarina.ME_AADL.AADL_Tree.Nutils.Is_Empty (AIN.Flows (R)) and then
Present (First_Node) and then Present (Last_Node) then
if Ocarina.ME_AADL.AADL_Tree.Nutils.Is_Empty (AIN.Flows (R))
and then Present (First_Node) and then Present (Last_Node)
then
First_Node := No_Node;
Last_Node := No_Node;
return;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2006-2009, GET-Telecom Paris. --
-- Copyright (C) 2006-2010, GET-Telecom Paris. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -465,9 +465,7 @@ package body Ocarina.Instances.Queries is
In_Mode => In_Mode);
begin
if not Type_Of_Property_Is_A_List
(ATE.Get_Referenced_Entity
(AIN.Property_Name
(Property)))
(ATE.Get_Referenced_Entity (AIN.Property_Name (Property)))
then
return No_List;
end if;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009, GET-Telecom Paris. --
-- Copyright (C) 2009-2010, GET-Telecom Paris. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -132,12 +132,9 @@ package body Ocarina.Instances.REAL_Checker.Queries.Relational_Predicates is
M := 1;
Found := False;
while M < (Last (R2) + 1) and then
(not Distinct or else not found) loop
if Predicate (R1.Table (N),
R2.Table (M), Option) then
while M < (Last (R2) + 1)
and then (not Distinct or else not found) loop
if Predicate (R1.Table (N), R2.Table (M), Option) then
if not Reversed then
Append (Result, R1.Table (N));
else
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009, GET-Telecom Paris. --
-- Copyright (C) 2009-2010, GET-Telecom Paris. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -130,9 +130,7 @@ package body Ocarina.Instances.REAL_Checker.Queries is
EL : Node_List;
begin
Init (Results);
Find_All_Flows
(Root_Instance,
EL.First, EL.Last);
Find_All_Flows (Root_Instance, EL.First, EL.Last);
while Present (EL.First) loop
Append (Results, EL.First);
......@@ -430,10 +428,7 @@ package body Ocarina.Instances.REAL_Checker.Queries is
-- Is_Empty --
--------------
function Is_Empty
(Set : Result_Set)
return Boolean
is
function Is_Empty (Set : Result_Set) return Boolean is
begin
return (Last (Set) < First);
end Is_Empty;
......@@ -442,21 +437,16 @@ package body Ocarina.Instances.REAL_Checker.Queries is
-- Cardinal --
--------------
function Cardinal
(Set : Result_Set)
return Natural
is
function Cardinal (Set : Result_Set) return Natural is
begin
return Natural (Last (Set));
return Natural (Last (Set) - First + 1);
end Cardinal;
---------------
-- Empty_Set --
---------------
function Empty_Set
return Result_Set
is
function Empty_Set return Result_Set is
R : Result_Set;
begin
Init (R);
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2009, GET-Telecom Paris. --
-- Copyright (C) 2009-2010, GET-Telecom Paris. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -50,9 +50,7 @@ package body Ocarina.Analyzer.AADL.Queries is
package ATN renames Ocarina.ME_AADL.AADL_Tree.Nodes;
function Get_Category_Of_Entity
(Entity : Node_Id)
return Named_Element;
function Get_Category_Of_Entity (Entity : Node_Id) return Named_Element;
----------------------------
-- Compute_Property_Value --
......@@ -129,11 +127,9 @@ package body Ocarina.Analyzer.AADL.Queries is
-- Get_Category_Of_Entity --
----------------------------
function Get_Category_Of_Entity
(Entity : Node_Id)
return Named_Element
is
function Get_Category_Of_Entity (Entity : Node_Id) return Named_Element is
pragma Assert (Present (Entity));
begin
case Kind (Entity) is
when K_Component_Type
......@@ -245,10 +241,6 @@ package body Ocarina.Analyzer.AADL.Queries is
end if;
end Get_Enumeration_Property;
------------------------------
-- Get_Enumeration_Property --
------------------------------
function Get_Enumeration_Property
(Entity : Node_Id;
Name : Name_Id;
......@@ -429,10 +421,9 @@ package body Ocarina.Analyzer.AADL.Queries is
Property_Name => Name,
In_Mode => In_Mode);
begin
if not Type_Of_Property_Is_A_List
(Get_Referenced_Entity
(Property_Name
(Property)))
if No (Property)
or else not Type_Of_Property_Is_A_List
(Get_Referenced_Entity (Property_Name (Property)))
then
return No_List;
end if;
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2005-2009, GET-Telecom Paris. --
-- Copyright (C) 2005-2010, GET-Telecom Paris. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
......@@ -366,8 +366,7 @@ package body Ocarina.Processor.Properties is
-- Resolve_Value --
-------------------
function Resolve_Value (Root, Property : Node_Id) return Boolean
is
function Resolve_Value (Root, Property : Node_Id) return Boolean is
use Ocarina.ME_AADL.AADL_Tree.Nutils;
use Ocarina.Analyzer.AADL.Queries;
......@@ -573,7 +572,6 @@ package body Ocarina.Processor.Properties is
Evaluated_Value := No_Node;
else
case Kind (Property_Value) is
when K_Enumeration_Term =>
Evaluated_Value := New_Node (Kind (Property_Value),
Loc (Property_Value));
......
......@@ -1214,7 +1214,6 @@ module Ocarina::ME_AADL::AADL_Tree::Nodes {
Node_Id Applies_To;
};
// property_association ::=
// [ property_set_identifier :: ] property_name_identifier ( => | +=> )
// [ constant ] property_value [ in_binding ] [ in_modes ] ;
......
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