File: xmlreport.ads

package info (click to toggle)
spark 2012.0.deb-9
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 29,260 kB
  • ctags: 3,098
  • sloc: ada: 186,243; cpp: 13,497; makefile: 685; yacc: 440; lex: 176; ansic: 119; sh: 16
file content (305 lines) | stat: -rw-r--r-- 11,457 bytes parent folder | download | duplicates (3)
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
-------------------------------------------------------------------------------
-- (C) Altran Praxis Limited
-------------------------------------------------------------------------------
--
-- The SPARK toolset 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 3, or (at your option) any later
-- version. The SPARK toolset 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 the SPARK toolset; see file
-- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy of
-- the license.
--
--=============================================================================

with E_Strings;
with SPARK_IO;
with SPARK_XML;

--# inherit E_Strings,
--#         FileSystem,
--#         SPARK_IO,
--#         SPARK_XML,
--#         SystemErrors;

package XMLReport
--# own State;
is

   type Sections is (
                     S_Report,
                     S_Prologue,
                     S_Commandline,
                     S_Compiler_Data,
                     S_Cyclic_Requirements,
                     S_Indexes,
                     S_Target_Config,
                     S_Messages,
                     S_Meta_Files,
                     S_Units_Not_Found,
                     S_Warnings_Config,
                     S_Results,
                     S_Listing,
                     S_Units_In_File,
                     S_Justifications,
                     S_Full_Justifications);

   Max_Meta_File_Depth : constant Integer := 50;

   subtype Meta_File_Id is SPARK_XML.Tag_Depth;

   procedure Init;
   --# global out State;
   --# derives State from ;

   -- Producers for simple container tags.
   -- These have no attributes of their own and only contain other tags.
   -- The only exception is the Listing tag, which contains large amounts of text,
   -- and is also included.

   procedure Start_Section (Section : in Sections;
                            Report  : in SPARK_IO.File_Type);
   --# global in out SPARK_IO.File_Sys;
   --#        in out State;
   --# derives SPARK_IO.File_Sys from *,
   --#                                Report,
   --#                                Section,
   --#                                State &
   --#         State             from *,
   --#                                Section;

   procedure End_Section (Section : in Sections;
                          Report  : in SPARK_IO.File_Type);
   --# global in out SPARK_IO.File_Sys;
   --#        in out State;
   --# derives SPARK_IO.File_Sys from *,
   --#                                Report,
   --#                                Section,
   --#                                State &
   --#         State             from *,
   --#                                Section;

   -- Simple tags, ones whose opening and closing tags are generated
   -- at the same time.  E.g. <filename>file.txt</filename>
   procedure Filename (Plain_Output : in     Boolean;
                       File         : in out E_Strings.T);
   --# global in out State;
   --# derives File  from *,
   --#                    Plain_Output,
   --#                    State &
   --#         State from *;

   procedure Index (Plain_Output : in     Boolean;
                    Idx          : in out E_Strings.T);
   --# global in out State;
   --# derives Idx   from *,
   --#                    Plain_Output,
   --#                    State &
   --#         State from *;

   procedure Compiler_Item (Item   : in E_Strings.T;
                            Val    : in E_Strings.T;
                            Report : in SPARK_IO.File_Type);
   --# global in out SPARK_IO.File_Sys;
   --#        in out State;
   --# derives SPARK_IO.File_Sys from *,
   --#                                Item,
   --#                                Report,
   --#                                State,
   --#                                Val &
   --#         State             from *,
   --#                                Item;

   procedure Suppressed (Item : in out E_Strings.T);
   --# global in out State;
   --# derives Item,
   --#         State from *,
   --#                    State;

   procedure Suppressed_Pragma (Item : in out E_Strings.T);
   --# global in out State;
   --# derives Item,
   --#         State from *,
   --#                    State;

   procedure Option (Opt : in out E_Strings.T);
   --# global in out State;
   --# derives Opt,
   --#         State from *,
   --#                    State;

   procedure Unit (Name   : in E_Strings.T;
                   Typ    : in E_Strings.T;
                   Report : in SPARK_IO.File_Type);
   --# global in out SPARK_IO.File_Sys;
   --#        in out State;
   --# derives SPARK_IO.File_Sys from *,
   --#                                Name,
   --#                                Report,
   --#                                State,
   --#                                Typ &
   --#         State             from *,
   --#                                Name,
   --#                                Typ;

   -- Ada Units in a file.
   procedure Ada_Unit
     (Name        : in E_Strings.T;
      Typ         : in E_Strings.T;
      Unit_Status : in E_Strings.T;
      Report      : in SPARK_IO.File_Type);
   --# global in out SPARK_IO.File_Sys;
   --#        in out State;
   --# derives SPARK_IO.File_Sys from *,
   --#                                Name,
   --#                                Report,
   --#                                State,
   --#                                Typ,
   --#                                Unit_Status &
   --#         State             from *,
   --#                                Name,
   --#                                Typ,
   --#                                Unit_Status;

   -- Message construction.

   procedure Start_Message
     (Class  : in E_Strings.T;
      Code   : in Integer;
      Line   : in Integer;
      Offset : in Integer;
      Report : in SPARK_IO.File_Type);
   --# global in out SPARK_IO.File_Sys;
   --#        in out State;
   --# derives SPARK_IO.File_Sys from *,
   --#                                Class,
   --#                                Code,
   --#                                Line,
   --#                                Offset,
   --#                                Report,
   --#                                State &
   --#         State             from *,
   --#                                Class,
   --#                                Code,
   --#                                Line,
   --#                                Offset;

   procedure Symbol (Sym     : in E_Strings.T;
                     Sym_Num : in Integer;
                     Report  : in SPARK_IO.File_Type);
   --# global in out SPARK_IO.File_Sys;
   --#        in out State;
   --# derives SPARK_IO.File_Sys from *,
   --#                                Report,
   --#                                State,
   --#                                Sym,
   --#                                Sym_Num &
   --#         State             from *,
   --#                                Sym_Num;

   procedure End_Message (Report : in SPARK_IO.File_Type);
   --# global in out SPARK_IO.File_Sys;
   --#        in out State;
   --# derives SPARK_IO.File_Sys from *,
   --#                                Report,
   --#                                State &
   --#         State             from *;

   -- Metafile contruction

   procedure Start_Meta_File (Name   : in E_Strings.T;
                              Report : in SPARK_IO.File_Type);
   --# global in out SPARK_IO.File_Sys;
   --#        in out State;
   --# derives SPARK_IO.File_Sys from *,
   --#                                Name,
   --#                                Report,
   --#                                State &
   --#         State             from *,
   --#                                Name;

   procedure End_Meta_File (Report : in SPARK_IO.File_Type);
   --# global in out SPARK_IO.File_Sys;
   --#        in out State;
   --# derives SPARK_IO.File_Sys from *,
   --#                                Report,
   --#                                State &
   --#         State             from *;

   -- Results Section contents

   procedure Start_File (Plain_Output : in Boolean;
                         F_Name       : in E_Strings.T;
                         Report       : in SPARK_IO.File_Type);
   --# global in out SPARK_IO.File_Sys;
   --#        in out State;
   --# derives SPARK_IO.File_Sys from *,
   --#                                F_Name,
   --#                                Plain_Output,
   --#                                Report,
   --#                                State &
   --#         State             from *,
   --#                                F_Name,
   --#                                Plain_Output;

   procedure End_File (Report : in SPARK_IO.File_Type);
   --# global in out SPARK_IO.File_Sys;
   --#        in out State;
   --# derives SPARK_IO.File_Sys from *,
   --#                                Report,
   --#                                State &
   --#         State             from *;

   procedure Brief_Justifications (Matched   : in Natural;
                                   Unmatched : in Natural;
                                   Report    : in SPARK_IO.File_Type);
   --# global in out SPARK_IO.File_Sys;
   --#        in out State;
   --# derives SPARK_IO.File_Sys from *,
   --#                                Matched,
   --#                                Report,
   --#                                State,
   --#                                Unmatched &
   --#         State             from *,
   --#                                Matched,
   --#                                Unmatched;

   procedure Start_Full_Justification
     (Class      : in E_Strings.T;
      Code       : in Integer;
      Line_From  : in Integer;
      Line_To    : in E_Strings.T;
      Match_No   : in Integer;
      Match_Line : in Integer;
      Report     : in SPARK_IO.File_Type);
   --# global in out SPARK_IO.File_Sys;
   --#        in out State;
   --# derives SPARK_IO.File_Sys from *,
   --#                                Class,
   --#                                Code,
   --#                                Line_From,
   --#                                Line_To,
   --#                                Match_Line,
   --#                                Match_No,
   --#                                Report,
   --#                                State &
   --#         State             from *,
   --#                                Class,
   --#                                Code,
   --#                                Line_From,
   --#                                Line_To,
   --#                                Match_Line,
   --#                                Match_No;

   procedure End_Full_Justification (Report : in SPARK_IO.File_Type);
   --# global in out SPARK_IO.File_Sys;
   --#        in out State;
   --# derives SPARK_IO.File_Sys from *,
   --#                                Report,
   --#                                State &
   --#         State             from *;

end XMLReport;