blob: e1230c9149d1773c6c1ac3616a0e9b788b48665e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- B I N D O . V A L I D A T O R S --
-- --
-- S p e c --
-- --
-- Copyright (C) 2019-2021, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT 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 GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- For full architecture, see unit Bindo.
-- The following unit contains facilities to verify the validity of the
-- various graphs used in determining the elaboration order of units.
with Bindo.Graphs;
use Bindo.Graphs;
use Bindo.Graphs.Invocation_Graphs;
use Bindo.Graphs.Library_Graphs;
package Bindo.Validators is
----------------------
-- Cycle_Validators --
----------------------
package Cycle_Validators is
Invalid_Cycle : exception;
-- Exception raised when the library graph contains an invalid cycle
procedure Validate_Cycles (G : Library_Graph);
-- Ensure that all cycles of library graph G meet the following
-- requirements:
--
-- * Are of proper kind
-- * Have enough edges to form a circuit
-- * No edge is repeated
--
-- Diagnose issues and raise Invalid_Cycle if this is not the case.
end Cycle_Validators;
----------------------------------
-- Elaboration_Order_Validators --
----------------------------------
package Elaboration_Order_Validators is
Invalid_Elaboration_Order : exception;
-- Exception raised when the elaboration order contains invalid data
procedure Validate_Elaboration_Order (Order : Unit_Id_Table);
-- Ensure that elaboration order Order meets the following requirements:
--
-- * All units that must be elaborated appear in the order
-- * No other units appear in the order
--
-- Diagnose issues and raise Invalid_Elaboration_Order if this is not
-- the case.
end Elaboration_Order_Validators;
---------------------------------
-- Invocation_Graph_Validators --
---------------------------------
package Invocation_Graph_Validators is
Invalid_Invocation_Graph : exception;
-- Exception raised when the invocation graph contains invalid data
procedure Validate_Invocation_Graph (G : Invocation_Graph);
-- Ensure that invocation graph G meets the following requirements:
--
-- * All attributes of edges are properly set
-- * All attributes of vertices are properly set
--
-- Diagnose issues and raise Invalid_Invocation_Graph if this is not the
-- case.
end Invocation_Graph_Validators;
------------------------------
-- Library_Graph_Validators --
------------------------------
package Library_Graph_Validators is
Invalid_Library_Graph : exception;
-- Exception raised when the library graph contains invalid data
procedure Validate_Library_Graph (G : Library_Graph);
-- Ensure that library graph G meets the following requirements:
--
-- * All attributes edges are properly set
-- * All attributes of vertices are properly set
--
-- Diagnose issues and raise Invalid_Library_Graph if this is not the
-- case.
end Library_Graph_Validators;
end Bindo.Validators;
|