1 |
294 |
jeremybenn |
-- IMPDEF.A
|
2 |
|
|
--
|
3 |
|
|
-- Grant of Unlimited Rights
|
4 |
|
|
--
|
5 |
|
|
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
|
6 |
|
|
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
|
7 |
|
|
-- unlimited rights in the software and documentation contained herein.
|
8 |
|
|
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
|
9 |
|
|
-- this public release, the Government intends to confer upon all
|
10 |
|
|
-- recipients unlimited rights equal to those held by the Government.
|
11 |
|
|
-- These rights include rights to use, duplicate, release or disclose the
|
12 |
|
|
-- released technical data and computer software in whole or in part, in
|
13 |
|
|
-- any manner and for any purpose whatsoever, and to have or permit others
|
14 |
|
|
-- to do so.
|
15 |
|
|
--
|
16 |
|
|
-- DISCLAIMER
|
17 |
|
|
--
|
18 |
|
|
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
|
19 |
|
|
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
|
20 |
|
|
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
|
21 |
|
|
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
|
22 |
|
|
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
|
23 |
|
|
-- PARTICULAR PURPOSE OF SAID MATERIAL.
|
24 |
|
|
--*
|
25 |
|
|
--
|
26 |
|
|
-- DESCRIPTION:
|
27 |
|
|
-- This package provides tailorable entities for a particular
|
28 |
|
|
-- implementation. Each entity may be modified to suit the needs
|
29 |
|
|
-- of the implementation. Default values are provided to act as
|
30 |
|
|
-- a guide.
|
31 |
|
|
--
|
32 |
|
|
-- The entities in this package are those which are used in at least
|
33 |
|
|
-- one core test. Entities which are used exclusively in tests for
|
34 |
|
|
-- annexes C-H are located in annex-specific child units of this package.
|
35 |
|
|
--
|
36 |
|
|
-- CHANGE HISTORY:
|
37 |
|
|
-- 12 DEC 93 SAIC Initial PreRelease version
|
38 |
|
|
-- 02 DEC 94 SAIC Second PreRelease version
|
39 |
|
|
-- 16 May 95 SAIC Added constants specific to tests of the random
|
40 |
|
|
-- number generator.
|
41 |
|
|
-- 16 May 95 SAIC Added Max_RPC_Call_Time constant.
|
42 |
|
|
-- 17 Jul 95 SAIC Added Non_State_String constant.
|
43 |
|
|
-- 21 Aug 95 SAIC Created from existing IMPSPEC.ADA and IMPBODY.ADA
|
44 |
|
|
-- files.
|
45 |
|
|
-- 30 Oct 95 SAIC Added external name string constants.
|
46 |
|
|
-- 24 Jan 96 SAIC Added alignment constants.
|
47 |
|
|
-- 29 Jan 96 SAIC Moved entities not used in core tests into annex-
|
48 |
|
|
-- specific child packages. Adjusted commentary.
|
49 |
|
|
-- Renamed Validating_System_Programming_Annex to
|
50 |
|
|
-- Validating_Annex_C. Added similar Validating_Annex_?
|
51 |
|
|
-- constants for the other non-core annexes (D-H).
|
52 |
|
|
-- 01 Mar 96 SAIC Added external name string constants.
|
53 |
|
|
-- 21 Mar 96 SAIC Added external name string constants.
|
54 |
|
|
-- 02 May 96 SAIC Removed constants for draft test CXA5014, which was
|
55 |
|
|
-- removed from the tentative ACVC 2.1 suite.
|
56 |
|
|
-- Added constants for use with FXACA00.
|
57 |
|
|
-- 06 Jun 96 SAIC Added constants for wide character test files.
|
58 |
|
|
-- 11 Dec 96 SAIC Updated constants for wide character test files.
|
59 |
|
|
-- 13 Dec 96 SAIC Added Address_Value_IO
|
60 |
|
|
-- 13 Sep 99 RLB Added more external name string constants.
|
61 |
|
|
-- 16 Sep 99 RLB Corrected definition of Non_State_String constant.
|
62 |
|
|
--
|
63 |
|
|
--!
|
64 |
|
|
|
65 |
|
|
with Report;
|
66 |
|
|
with Ada.Text_IO;
|
67 |
|
|
with System.Storage_Elements;
|
68 |
|
|
|
69 |
|
|
package ImpDef is
|
70 |
|
|
|
71 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
72 |
|
|
|
73 |
|
|
-- The following boolean constants indicate whether this validation will
|
74 |
|
|
-- include any of annexes C-H. The values of these booleans affect the
|
75 |
|
|
-- behavior of the test result reporting software.
|
76 |
|
|
--
|
77 |
|
|
-- True means the associated annex IS included in the validation.
|
78 |
|
|
-- False means the associated annex is NOT included.
|
79 |
|
|
|
80 |
|
|
Validating_Annex_C : constant Boolean := True;
|
81 |
|
|
-- ^^^^^ --- MODIFY HERE AS NEEDED
|
82 |
|
|
|
83 |
|
|
Validating_Annex_D : constant Boolean := True;
|
84 |
|
|
-- ^^^^^ --- MODIFY HERE AS NEEDED
|
85 |
|
|
|
86 |
|
|
Validating_Annex_E : constant Boolean := True;
|
87 |
|
|
-- ^^^^^ --- MODIFY HERE AS NEEDED
|
88 |
|
|
|
89 |
|
|
Validating_Annex_F : constant Boolean := True;
|
90 |
|
|
-- ^^^^^ --- MODIFY HERE AS NEEDED
|
91 |
|
|
|
92 |
|
|
Validating_Annex_G : constant Boolean := True;
|
93 |
|
|
-- ^^^^^ --- MODIFY HERE AS NEEDED
|
94 |
|
|
|
95 |
|
|
Validating_Annex_H : constant Boolean := True;
|
96 |
|
|
-- ^^^^^ --- MODIFY HERE AS NEEDED
|
97 |
|
|
|
98 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
99 |
|
|
|
100 |
|
|
-- This is the minimum time required to allow another task to get
|
101 |
|
|
-- control. It is expected that the task is on the Ready queue.
|
102 |
|
|
-- A duration of 0.0 would normally be sufficient but some number
|
103 |
|
|
-- greater than that is expected.
|
104 |
|
|
|
105 |
|
|
Minimum_Task_Switch : constant Duration := 0.001;
|
106 |
|
|
-- ^^^ --- MODIFY HERE AS NEEDED
|
107 |
|
|
|
108 |
|
|
Long_Minimum_Task_Switch : constant Duration := 0.1;
|
109 |
|
|
|
110 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
111 |
|
|
|
112 |
|
|
-- This is the time required to activate another task and allow it
|
113 |
|
|
-- to run to its first accept statement. We are considering a simple task
|
114 |
|
|
-- with very few Ada statements before the accept. An implementation is
|
115 |
|
|
-- free to specify a delay of several seconds, or even minutes if need be.
|
116 |
|
|
-- The main effect of specifying a longer delay than necessary will be an
|
117 |
|
|
-- extension of the time needed to run the associated tests.
|
118 |
|
|
|
119 |
|
|
Switch_To_New_Task : constant Duration := 0.001;
|
120 |
|
|
-- ^^^ -- MODIFY HERE AS NEEDED
|
121 |
|
|
|
122 |
|
|
Long_Switch_To_New_Task : constant Duration := 0.1;
|
123 |
|
|
|
124 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
125 |
|
|
|
126 |
|
|
-- This is the time which will clear the queues of other tasks
|
127 |
|
|
-- waiting to run. It is expected that this will be about five
|
128 |
|
|
-- times greater than Switch_To_New_Task.
|
129 |
|
|
|
130 |
|
|
Clear_Ready_Queue : constant Duration := 0.1;
|
131 |
|
|
-- ^^^ --- MODIFY HERE AS NEEDED
|
132 |
|
|
|
133 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
134 |
|
|
|
135 |
|
|
-- Some implementations will boot with the time set to 1901/1/1/0.0
|
136 |
|
|
-- When a delay of Delay_For_Time_Past is given, the implementation
|
137 |
|
|
-- guarantees that a subsequent call to Ada.Calendar.Time_Of(1901,1,1)
|
138 |
|
|
-- will yield a time that has already passed (for example, when used in
|
139 |
|
|
-- a delay_until statement).
|
140 |
|
|
|
141 |
|
|
Delay_For_Time_Past : constant Duration := 0.001;
|
142 |
|
|
-- ^^^ --- MODIFY HERE AS NEEDED
|
143 |
|
|
|
144 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
145 |
|
|
|
146 |
|
|
-- Minimum time interval between calls to the time dependent Reset
|
147 |
|
|
-- procedures in Float_Random and Discrete_Random packages that is
|
148 |
|
|
-- guaranteed to initiate different sequences. See RM A.5.2(45).
|
149 |
|
|
|
150 |
|
|
Time_Dependent_Reset : constant Duration := 0.001;
|
151 |
|
|
-- ^^^ --- MODIFY HERE AS NEEDED
|
152 |
|
|
|
153 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
154 |
|
|
|
155 |
|
|
-- Test CXA5013 will loop, trying to generate the required sequence
|
156 |
|
|
-- of random numbers. If the RNG is faulty, the required sequence
|
157 |
|
|
-- will never be generated. Delay_Per_Random_Test is a time-out value
|
158 |
|
|
-- which allows the test to run for a period of time after which the
|
159 |
|
|
-- test is failed if the required sequence has not been produced.
|
160 |
|
|
-- This value should be the time allowed for the test to run before it
|
161 |
|
|
-- times out. It should be long enough to allow multiple (independent)
|
162 |
|
|
-- runs of the testing code, each generating up to 1000 random
|
163 |
|
|
-- numbers.
|
164 |
|
|
|
165 |
|
|
Delay_Per_Random_Test : constant Duration := 0.001;
|
166 |
|
|
-- ^^^ --- MODIFY HERE AS NEEDED
|
167 |
|
|
|
168 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
169 |
|
|
|
170 |
|
|
-- The time required to execute this procedure must be greater than the
|
171 |
|
|
-- time slice unit on implementations which use time slicing. For
|
172 |
|
|
-- implementations which do not use time slicing the body can be null.
|
173 |
|
|
|
174 |
|
|
procedure Exceed_Time_Slice;
|
175 |
|
|
|
176 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
177 |
|
|
|
178 |
|
|
-- This constant must not depict a random number generator state value.
|
179 |
|
|
-- Using this string in a call to function Value from either the
|
180 |
|
|
-- Discrete_Random or Float_Random packages will result in
|
181 |
|
|
-- Constraint_Error or Program_Error (expected result in test CXA5012).
|
182 |
|
|
-- If there is no such string, set it to "**NONE**".
|
183 |
|
|
|
184 |
|
|
Non_State_String : constant String := "By No Means A State";
|
185 |
|
|
-- MODIFY HERE AS NEEDED --- ^^^^^^^^^^^^^^^^^^^
|
186 |
|
|
|
187 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
188 |
|
|
|
189 |
|
|
-- This string constant must be a legal external tag value as used by
|
190 |
|
|
-- CD10001 for the type Some_Tagged_Type in the representation
|
191 |
|
|
-- specification for the value of 'External_Tag.
|
192 |
|
|
|
193 |
|
|
External_Tag_Value : constant String := "implementation_defined";
|
194 |
|
|
-- MODIFY HERE AS NEEDED --- ^^^^^^^^^^^^^^^^^^^^^^
|
195 |
|
|
|
196 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
197 |
|
|
|
198 |
|
|
-- The following address constant must be a valid address to locate
|
199 |
|
|
-- the C program CD30005_1. It is shown here as a named number;
|
200 |
|
|
-- the implementation may choose to type the constant as appropriate.
|
201 |
|
|
|
202 |
|
|
function Cd30005_Proc (X : Integer) return Integer;
|
203 |
|
|
pragma Import (C, Cd30005_Proc, "_cd30005_1");
|
204 |
|
|
|
205 |
|
|
pragma Linker_Options ("ACATS4GNATDIR/support/cd300051.o");
|
206 |
|
|
|
207 |
|
|
CD30005_1_Foreign_Address : constant System.Address:= Cd30005_Proc'Address;
|
208 |
|
|
|
209 |
|
|
-- CD30005_1_Foreign_Address : constant System.Address:=
|
210 |
|
|
-- System.Storage_Elements.To_Address ( 16#0000_0000# )
|
211 |
|
|
-- --MODIFY HERE AS REQUIRED --- ^^^^^^^^^^^^^
|
212 |
|
|
|
213 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
214 |
|
|
|
215 |
|
|
-- The following string constant must be the external name resulting
|
216 |
|
|
-- from the C compilation of CD30005_1. The string will be used as an
|
217 |
|
|
-- argument to pragma Import.
|
218 |
|
|
|
219 |
|
|
CD30005_1_External_Name : constant String := "_cd30005_1";
|
220 |
|
|
-- MODIFY HERE AS NEEDED --- ^^^^^^^^^
|
221 |
|
|
|
222 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
223 |
|
|
|
224 |
|
|
-- The following constants should represent the largest default alignment
|
225 |
|
|
-- value and the largest alignment value supported by the linker.
|
226 |
|
|
-- See RM 13.3(35).
|
227 |
|
|
|
228 |
|
|
Max_Default_Alignment : constant := Standard'Maximum_Alignment;
|
229 |
|
|
-- ^ --- MODIFY HERE AS NEEDED
|
230 |
|
|
|
231 |
|
|
Max_Linker_Alignment : constant := Standard'Maximum_Alignment;
|
232 |
|
|
-- ^ --- MODIFY HERE AS NEEDED
|
233 |
|
|
|
234 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
235 |
|
|
|
236 |
|
|
-- The following string constants must be the external names resulting
|
237 |
|
|
-- from the C compilation of CXB30040.C, CXB30060.C, CXB30130.C, and
|
238 |
|
|
-- CXB30131.C. The strings will be used as arguments to pragma Import.
|
239 |
|
|
|
240 |
|
|
CXB30040_External_Name : constant String := "CXB30040";
|
241 |
|
|
-- MODIFY HERE AS NEEDED --- ^^^^^^^^
|
242 |
|
|
|
243 |
|
|
CXB30060_External_Name : constant String := "CXB30060";
|
244 |
|
|
-- MODIFY HERE AS NEEDED --- ^^^^^^^^
|
245 |
|
|
|
246 |
|
|
CXB30130_External_Name : constant String := "CXB30130";
|
247 |
|
|
-- MODIFY HERE AS NEEDED --- ^^^^^^^^
|
248 |
|
|
|
249 |
|
|
CXB30131_External_Name : constant String := "CXB30131";
|
250 |
|
|
-- MODIFY HERE AS NEEDED --- ^^^^^^^^
|
251 |
|
|
|
252 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
253 |
|
|
|
254 |
|
|
-- The following string constants must be the external names resulting
|
255 |
|
|
-- from the COBOL compilation of CXB40090.CBL, CXB40091.CBL, and
|
256 |
|
|
-- CXB40092.CBL. The strings will be used as arguments to pragma Import.
|
257 |
|
|
|
258 |
|
|
CXB40090_External_Name : constant String := "CXB40090";
|
259 |
|
|
-- MODIFY HERE AS NEEDED --- ^^^^^^^^
|
260 |
|
|
|
261 |
|
|
CXB40091_External_Name : constant String := "CXB40091";
|
262 |
|
|
-- MODIFY HERE AS NEEDED --- ^^^^^^^^
|
263 |
|
|
|
264 |
|
|
CXB40092_External_Name : constant String := "CXB40092";
|
265 |
|
|
-- MODIFY HERE AS NEEDED --- ^^^^^^^^
|
266 |
|
|
|
267 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
268 |
|
|
|
269 |
|
|
-- The following string constants must be the external names resulting
|
270 |
|
|
-- from the Fortran compilation of CXB50040.FTN, CXB50041.FTN,
|
271 |
|
|
-- CXB50050.FTN, and CXB50051.FTN.
|
272 |
|
|
--
|
273 |
|
|
-- The strings will be used as arguments to pragma Import.
|
274 |
|
|
--
|
275 |
|
|
-- Note that the use of these four string constants will be split between
|
276 |
|
|
-- two tests, CXB5004 and CXB5005.
|
277 |
|
|
|
278 |
|
|
CXB50040_External_Name : constant String := "CXB50040";
|
279 |
|
|
-- MODIFY HERE AS NEEDED --- ^^^^^^^^
|
280 |
|
|
|
281 |
|
|
CXB50041_External_Name : constant String := "CXB50041";
|
282 |
|
|
-- MODIFY HERE AS NEEDED --- ^^^^^^^^
|
283 |
|
|
|
284 |
|
|
CXB50050_External_Name : constant String := "CXB50050";
|
285 |
|
|
-- MODIFY HERE AS NEEDED --- ^^^^^^^^
|
286 |
|
|
|
287 |
|
|
CXB50051_External_Name : constant String := "CXB50051";
|
288 |
|
|
-- MODIFY HERE AS NEEDED --- ^^^^^^^^
|
289 |
|
|
|
290 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
291 |
|
|
|
292 |
|
|
-- The following constants have been defined for use with the
|
293 |
|
|
-- representation clause in FXACA00 of type Sales_Record_Type.
|
294 |
|
|
--
|
295 |
|
|
-- Char_Bits should be an integer at least as large as the number
|
296 |
|
|
-- of bits needed to hold a character in an array.
|
297 |
|
|
-- A value of 6 * Char_Bits will be used in a representation clause
|
298 |
|
|
-- to reserve space for a six character string.
|
299 |
|
|
--
|
300 |
|
|
-- Next_Storage_Slot should indicate the next storage unit in the record
|
301 |
|
|
-- representation clause that does not overlap the storage designated for
|
302 |
|
|
-- the six character string.
|
303 |
|
|
|
304 |
|
|
Char_Bits : constant := 8;
|
305 |
|
|
-- MODIFY HERE AS NEEDED ---^
|
306 |
|
|
|
307 |
|
|
Next_Storage_Slot : constant := 6;
|
308 |
|
|
-- MODIFY HERE AS NEEDED ---^
|
309 |
|
|
|
310 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
311 |
|
|
|
312 |
|
|
-- The following string constant must be the path name for the .AW
|
313 |
|
|
-- files that will be processed by the Wide Character processor to
|
314 |
|
|
-- create the C250001 and C250002 tests. The Wide Character processor
|
315 |
|
|
-- will expect to find the files to process at this location.
|
316 |
|
|
|
317 |
|
|
Test_Path_Root : constant String :=
|
318 |
|
|
"ACATS4GNATDIR/tests/c2/";
|
319 |
|
|
-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --- MODIFY HERE AS NEEDED
|
320 |
|
|
|
321 |
|
|
-- The following two strings must not be modified unless the .AW file
|
322 |
|
|
-- names have been changed. The Wide Character processor will use
|
323 |
|
|
-- these strings to find the .AW files used in creating the C250001
|
324 |
|
|
-- and C250002 tests.
|
325 |
|
|
|
326 |
|
|
Wide_Character_Test : constant String := Test_Path_Root & "c250001";
|
327 |
|
|
Upper_Latin_Test : constant String := Test_Path_Root & "c250002";
|
328 |
|
|
|
329 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
330 |
|
|
|
331 |
|
|
-- The following instance of Integer_IO or Modular_IO must be supplied
|
332 |
|
|
-- in order for test CD72A02 to compile correctly.
|
333 |
|
|
-- Depending on the choice of base type used for the type
|
334 |
|
|
-- System.Storage_Elements.Integer_Address; one of the two instances will
|
335 |
|
|
-- be correct. Comment out the incorrect instance.
|
336 |
|
|
|
337 |
|
|
-- package Address_Value_IO is
|
338 |
|
|
-- new Ada.Text_IO.Integer_IO(System.Storage_Elements.Integer_Address);
|
339 |
|
|
|
340 |
|
|
package Address_Value_IO is
|
341 |
|
|
new Ada.Text_IO.Modular_IO(System.Storage_Elements.Integer_Address);
|
342 |
|
|
|
343 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
344 |
|
|
|
345 |
|
|
One_Second : constant Duration := 0.001;
|
346 |
|
|
One_Long_Second : constant Duration := 0.1;
|
347 |
|
|
|
348 |
|
|
end ImpDef;
|
349 |
|
|
|
350 |
|
|
|
351 |
|
|
--==================================================================--
|
352 |
|
|
|
353 |
|
|
|
354 |
|
|
package body ImpDef is
|
355 |
|
|
|
356 |
|
|
-- NOTE: These are example bodies. It is expected that implementors
|
357 |
|
|
-- will write their own versions of these routines.
|
358 |
|
|
|
359 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
360 |
|
|
|
361 |
|
|
-- The time required to execute this procedure must be greater than the
|
362 |
|
|
-- time slice unit on implementations which use time slicing. For
|
363 |
|
|
-- implementations which do not use time slicing the body can be null.
|
364 |
|
|
|
365 |
|
|
Procedure Exceed_Time_Slice is
|
366 |
|
|
T : Integer := 0;
|
367 |
|
|
Loop_Max : constant Integer := 4_000;
|
368 |
|
|
begin
|
369 |
|
|
for I in 1..Loop_Max loop
|
370 |
|
|
T := Report.Ident_Int (1) * Report.Ident_Int (2);
|
371 |
|
|
end loop;
|
372 |
|
|
end Exceed_Time_Slice;
|
373 |
|
|
|
374 |
|
|
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====--
|
375 |
|
|
|
376 |
|
|
end ImpDef;
|