1------------------------------------------------------------------------------
2--                                                                          --
3--                 ASIS-for-GNAT IMPLEMENTATION COMPONENTS                  --
4--                                                                          --
5--        A S I S . D A T A _ D E C O M P O S I T I O N . V C H E C K       --
6--                                                                          --
7--                                 S p e c                                  --
8--                                                                          --
9--            Copyright (c) 1995-2006, Free Software Foundation, Inc.       --
10--                                                                          --
11-- ASIS-for-GNAT is free software; you can redistribute it and/or modify it --
12-- under terms of the  GNU General Public License  as published by the Free --
13-- Software Foundation;  either version 2,  or  (at your option)  any later --
14-- version. ASIS-for-GNAT is distributed  in the hope  that it will be use- --
15-- ful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- --
16-- CHANTABILITY or  FITNESS FOR A  PARTICULAR PURPOSE.  See the GNU General --
17-- Public License for more details.  You should have received a copy of the --
18-- GNU  General  Public  License  distributed with  ASIS-for-GNAT; see file --
19-- COPYING.  If not,  write  to the  Free Software Foundation,  51 Franklin --
20-- Street, Fifth Floor, Boston, MA 02110-1301, USA.                         --
21--                                                                          --
22--                                                                          --
23--                                                                          --
24--                                                                          --
25--                                                                          --
26--                                                                          --
27--                                                                          --
28--                                                                          --
29-- ASIS-for-GNAT was originally developed  by the ASIS-for-GNAT team at the --
30-- Software  Engineering  Laboratory  of  the Swiss  Federal  Institute  of --
31-- Technology (LGL-EPFL) in Lausanne,  Switzerland, in cooperation with the --
32-- Scientific  Research  Computer  Center of  Moscow State University (SRCC --
33-- MSU), Russia,  with funding partially provided  by grants from the Swiss --
34-- National  Science  Foundation  and  the  Swiss  Academy  of  Engineering --
35-- Sciences. ASIS-for-GNAT is now maintained by AdaCore                     --
36-- (http://www.adacore.com).                                                --
37--                                                                          --
38------------------------------------------------------------------------------
39
40--  This package contains validity checks for abstractions declared in
41--  Asis.Data_Decomposition (see 22.1, 22.3)
42
43private package Asis.Data_Decomposition.Vcheck is
44
45   type Component_Kinds is (Not_A_Component, Arr, Rec);
46
47   procedure Check_Validity
48     (Comp  : Record_Component;
49      Query : String);
50   --  Checks if Comp is valid in a sense as defined in 22.1. Raises
51   --  Asis_Failed and sets the corresponding error status and diagnosis in
52   --  case if the check fails. The Query parameter is supposed to be the name
53   --  of the query where the check is performad.
54
55   procedure Check_Validity
56     (Comp  : Array_Component;
57      Query : String);
58   --  Checks if Comp is valid in a sense as defined in 22.3. Raises
59   --  Asis_Failed and sets the corresponding error status and diagnosis in
60   --  case if the check fails. The Query parameter is supposed to be the name
61   --  of the query where the check is performad.
62
63   procedure Raise_ASIS_Inappropriate_Component
64     (Diagnosis      : String;
65      Component_Kind : Component_Kinds);
66   --  Raises ASIS_Inappropriate_Element with Value_Error Error Status.
67   --  Diagnosis usially is the name of the query where the exception is
68   --  raised. Component_Kind, if not equal to Not_A_Component, is used to put
69   --  in the ASIS diagnosis string some information to distinguish the
70   --  queries with the same name which are defined for both Record_Component
71   --  and Array_Component.
72
73end Asis.Data_Decomposition.Vcheck;
74