----------------------------------------------------------- --------------------- -- -- -- OCARINA COMPONENTS -- -- -- -- O C A R I N A . A N A L Y Z E R -- -- -- -- S p e c -- -- -- -- Copyright (C) 2005-2007, 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 -- -- Free Software Foundation; either version 2, or (at your option) any -- -- later version. Ocarina is distributed in the hope that it will be -- -- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -- -- Public License for more details. You should have received a copy of the -- -- GNU General Public License distributed with Ocarina; see file COPYING. -- -- If not, write to the Free Software Foundation, 51 Franklin Street, Fifth -- -- Floor, Boston, MA 02111-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- Ocarina is maintained by the Ocarina team -- -- (ocarina-users@listes.enst.fr) -- -- -- ------------------------------------------------------------------------------ with Types; use Types; package Ocarina.Analyzer is type AADL_Legality_Rules is (Standard, Devel); type Analyzer_Options is record Display_Debug_Messages : Boolean; -- If False, debugging messages (import file notification...) -- will not be displayed Legality_Rules : AADL_Legality_Rules; -- Indicate what rules to use to check. Standard corresponds to -- AADL 1.0. end record; Default_Analyzer_Options : constant Analyzer_Options := Analyzer_Options' (Display_Debug_Messages => False, Legality_Rules => Standard); function Analyze_Tree (Root : Node_Id; Options : Analyzer_Options) return Boolean; -- Create the links between the abstract syntax tree nodes and -- check the correctness of the tree. This function must be -- invoked after all the AADL elements have been integrated into -- the tree. Root must be the Node_Id of the tree root. Return -- True if everything in the tree is correct, else False. The -- 'Analyzer_Options' parameter specify the analyzer options -- Allwo_Automatic_Importation is set to True, then the analyzer -- will try to parse additional files if declarations are missing. type Entity_List is record First_Entity : Node_Id; Last_Entity : Node_Id; end record; Empty_Entity_List : constant Entity_List := (No_Node, No_Node); procedure Append_Entity_To_Entity_List (Entity : Node_Id; List : in out Entity_List); -- Append Entity to List only if Entity does not already exist in -- the list. Thus we avoid duplicates that would create loops in -- the list. procedure Clear_Entity_List (List : in out Entity_List); -- Clear all links between the nodes of List. private function Have_Modes_In_Common (Declaration1 : Node_Id; Declaration2 : Node_Id) return Boolean; -- Check if Declaration1 and Declaration2 have some modes in -- common. E.g. if they have modes in common in their 'in modes' -- statements. If Declaration1 or Declaration2 does not have any -- 'in modes' statement, then return True. If the kind of -- Declaration1 or Declaration2 cannot be associated with modes, -- then return False. function Is_A_Refinement (Node : Node_Id) return Boolean; end Ocarina.Analyzer;