| 1 |
-- 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 |
-- The above constant has been chosen for use with delay statements in the |
| 109 |
-- GCC testsuite so that they do not take too long, but may be too small. |
| 110 |
|
| 111 |
Long_Minimum_Task_Switch : constant Duration := 0.1; |
| 112 |
|
| 113 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 114 |
|
| 115 |
-- This is the time required to activate another task and allow it |
| 116 |
-- to run to its first accept statement. We are considering a simple task |
| 117 |
-- with very few Ada statements before the accept. An implementation is |
| 118 |
-- free to specify a delay of several seconds, or even minutes if need be. |
| 119 |
-- The main effect of specifying a longer delay than necessary will be an |
| 120 |
-- extension of the time needed to run the associated tests. |
| 121 |
|
| 122 |
Switch_To_New_Task : constant Duration := 0.001; |
| 123 |
-- ^^^ -- MODIFY HERE AS NEEDED |
| 124 |
|
| 125 |
-- The above constant has been chosen for use with delay statements in the |
| 126 |
-- GCC testsuite so that they do not take too long, but may be too small. |
| 127 |
|
| 128 |
Long_Switch_To_New_Task : constant Duration := 0.1; |
| 129 |
|
| 130 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 131 |
|
| 132 |
-- This is the time which will clear the queues of other tasks |
| 133 |
-- waiting to run. It is expected that this will be about five |
| 134 |
-- times greater than Switch_To_New_Task. |
| 135 |
|
| 136 |
Clear_Ready_Queue : constant Duration := 0.1; |
| 137 |
-- ^^^ --- MODIFY HERE AS NEEDED |
| 138 |
|
| 139 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 140 |
|
| 141 |
-- Some implementations will boot with the time set to 1901/1/1/0.0 |
| 142 |
-- When a delay of Delay_For_Time_Past is given, the implementation |
| 143 |
-- guarantees that a subsequent call to Ada.Calendar.Time_Of(1901,1,1) |
| 144 |
-- will yield a time that has already passed (for example, when used in |
| 145 |
-- a delay_until statement). |
| 146 |
|
| 147 |
Delay_For_Time_Past : constant Duration := 0.001; |
| 148 |
-- ^^^ --- MODIFY HERE AS NEEDED |
| 149 |
|
| 150 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 151 |
|
| 152 |
-- Minimum time interval between calls to the time dependent Reset |
| 153 |
-- procedures in Float_Random and Discrete_Random packages that is |
| 154 |
-- guaranteed to initiate different sequences. See RM A.5.2(45). |
| 155 |
|
| 156 |
Time_Dependent_Reset : constant Duration := 0.001; |
| 157 |
-- ^^^ --- MODIFY HERE AS NEEDED |
| 158 |
|
| 159 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 160 |
|
| 161 |
-- Test CXA5013 will loop, trying to generate the required sequence |
| 162 |
-- of random numbers. If the RNG is faulty, the required sequence |
| 163 |
-- will never be generated. Delay_Per_Random_Test is a time-out value |
| 164 |
-- which allows the test to run for a period of time after which the |
| 165 |
-- test is failed if the required sequence has not been produced. |
| 166 |
-- This value should be the time allowed for the test to run before it |
| 167 |
-- times out. It should be long enough to allow multiple (independent) |
| 168 |
-- runs of the testing code, each generating up to 1000 random |
| 169 |
-- numbers. |
| 170 |
|
| 171 |
Delay_Per_Random_Test : constant Duration := 0.001; |
| 172 |
-- ^^^ --- MODIFY HERE AS NEEDED |
| 173 |
|
| 174 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 175 |
|
| 176 |
-- The time required to execute this procedure must be greater than the |
| 177 |
-- time slice unit on implementations which use time slicing. For |
| 178 |
-- implementations which do not use time slicing the body can be null. |
| 179 |
|
| 180 |
procedure Exceed_Time_Slice; |
| 181 |
|
| 182 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 183 |
|
| 184 |
-- This constant must not depict a random number generator state value. |
| 185 |
-- Using this string in a call to function Value from either the |
| 186 |
-- Discrete_Random or Float_Random packages will result in |
| 187 |
-- Constraint_Error or Program_Error (expected result in test CXA5012). |
| 188 |
-- If there is no such string, set it to "**NONE**". |
| 189 |
|
| 190 |
Non_State_String : constant String := "By No Means A State"; |
| 191 |
-- MODIFY HERE AS NEEDED --- ^^^^^^^^^^^^^^^^^^^ |
| 192 |
|
| 193 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 194 |
|
| 195 |
-- This string constant must be a legal external tag value as used by |
| 196 |
-- CD10001 for the type Some_Tagged_Type in the representation |
| 197 |
-- specification for the value of 'External_Tag. |
| 198 |
|
| 199 |
External_Tag_Value : constant String := "implementation_defined"; |
| 200 |
-- MODIFY HERE AS NEEDED --- ^^^^^^^^^^^^^^^^^^^^^^ |
| 201 |
|
| 202 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 203 |
|
| 204 |
-- The following address constant must be a valid address to locate |
| 205 |
-- the C program CD30005_1. It is shown here as a named number; |
| 206 |
-- the implementation may choose to type the constant as appropriate. |
| 207 |
|
| 208 |
function Cd30005_Proc (X : Integer) return Integer; |
| 209 |
pragma Import (C, Cd30005_Proc, "_cd30005_1"); |
| 210 |
|
| 211 |
pragma Linker_Options ("ACATS4GNATDIR/support/cd300051.o"); |
| 212 |
|
| 213 |
CD30005_1_Foreign_Address : constant System.Address:= Cd30005_Proc'Address; |
| 214 |
|
| 215 |
-- CD30005_1_Foreign_Address : constant System.Address:= |
| 216 |
-- System.Storage_Elements.To_Address ( 16#0000_0000# ) |
| 217 |
-- MODIFY HERE AS REQUIRED --- ^^^^^^^^^^^^^ |
| 218 |
|
| 219 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 220 |
|
| 221 |
-- The following string constant must be the external name resulting |
| 222 |
-- from the C compilation of CD30005_1. The string will be used as an |
| 223 |
-- argument to pragma Import. |
| 224 |
|
| 225 |
CD30005_1_External_Name : constant String := "_cd30005_1"; |
| 226 |
-- MODIFY HERE AS NEEDED --- ^^^^^^^^^ |
| 227 |
|
| 228 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 229 |
|
| 230 |
-- The following constants should represent the largest default alignment |
| 231 |
-- value and the largest alignment value supported by the linker. |
| 232 |
-- See RM 13.3(35). |
| 233 |
|
| 234 |
Max_Default_Alignment : constant := Standard'Maximum_Alignment; |
| 235 |
-- ^ --- MODIFY HERE AS NEEDED |
| 236 |
|
| 237 |
Max_Linker_Alignment : constant := Standard'Maximum_Alignment; |
| 238 |
-- ^ --- MODIFY HERE AS NEEDED |
| 239 |
|
| 240 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 241 |
|
| 242 |
-- The following string constants must be the external names resulting |
| 243 |
-- from the C compilation of CXB30040.C, CXB30060.C, CXB30130.C, and |
| 244 |
-- CXB30131.C. The strings will be used as arguments to pragma Import. |
| 245 |
|
| 246 |
CXB30040_External_Name : constant String := "CXB30040"; |
| 247 |
-- MODIFY HERE AS NEEDED --- ^^^^^^^^ |
| 248 |
|
| 249 |
CXB30060_External_Name : constant String := "CXB30060"; |
| 250 |
-- MODIFY HERE AS NEEDED --- ^^^^^^^^ |
| 251 |
|
| 252 |
CXB30130_External_Name : constant String := "CXB30130"; |
| 253 |
-- MODIFY HERE AS NEEDED --- ^^^^^^^^ |
| 254 |
|
| 255 |
CXB30131_External_Name : constant String := "CXB30131"; |
| 256 |
-- MODIFY HERE AS NEEDED --- ^^^^^^^^ |
| 257 |
|
| 258 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 259 |
|
| 260 |
-- The following string constants must be the external names resulting |
| 261 |
-- from the COBOL compilation of CXB40090.CBL, CXB40091.CBL, and |
| 262 |
-- CXB40092.CBL. The strings will be used as arguments to pragma Import. |
| 263 |
|
| 264 |
CXB40090_External_Name : constant String := "CXB40090"; |
| 265 |
-- MODIFY HERE AS NEEDED --- ^^^^^^^^ |
| 266 |
|
| 267 |
CXB40091_External_Name : constant String := "CXB40091"; |
| 268 |
-- MODIFY HERE AS NEEDED --- ^^^^^^^^ |
| 269 |
|
| 270 |
CXB40092_External_Name : constant String := "CXB40092"; |
| 271 |
-- MODIFY HERE AS NEEDED --- ^^^^^^^^ |
| 272 |
|
| 273 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 274 |
|
| 275 |
-- The following string constants must be the external names resulting |
| 276 |
-- from the Fortran compilation of CXB50040.FTN, CXB50041.FTN, |
| 277 |
-- CXB50050.FTN, and CXB50051.FTN. |
| 278 |
-- |
| 279 |
-- The strings will be used as arguments to pragma Import. |
| 280 |
-- |
| 281 |
-- Note that the use of these four string constants will be split between |
| 282 |
-- two tests, CXB5004 and CXB5005. |
| 283 |
|
| 284 |
CXB50040_External_Name : constant String := "CXB50040"; |
| 285 |
-- MODIFY HERE AS NEEDED --- ^^^^^^^^ |
| 286 |
|
| 287 |
CXB50041_External_Name : constant String := "CXB50041"; |
| 288 |
-- MODIFY HERE AS NEEDED --- ^^^^^^^^ |
| 289 |
|
| 290 |
CXB50050_External_Name : constant String := "CXB50050"; |
| 291 |
-- MODIFY HERE AS NEEDED --- ^^^^^^^^ |
| 292 |
|
| 293 |
CXB50051_External_Name : constant String := "CXB50051"; |
| 294 |
-- MODIFY HERE AS NEEDED --- ^^^^^^^^ |
| 295 |
|
| 296 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 297 |
|
| 298 |
-- The following constants have been defined for use with the |
| 299 |
-- representation clause in FXACA00 of type Sales_Record_Type. |
| 300 |
-- |
| 301 |
-- Char_Bits should be an integer at least as large as the number |
| 302 |
-- of bits needed to hold a character in an array. |
| 303 |
-- A value of 6 * Char_Bits will be used in a representation clause |
| 304 |
-- to reserve space for a six character string. |
| 305 |
-- |
| 306 |
-- Next_Storage_Slot should indicate the next storage unit in the record |
| 307 |
-- representation clause that does not overlap the storage designated for |
| 308 |
-- the six character string. |
| 309 |
|
| 310 |
Char_Bits : constant := 8; |
| 311 |
-- MODIFY HERE AS NEEDED ---^ |
| 312 |
|
| 313 |
Next_Storage_Slot : constant := 6; |
| 314 |
-- MODIFY HERE AS NEEDED ---^ |
| 315 |
|
| 316 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 317 |
|
| 318 |
-- The following string constant must be the path name for the .AW |
| 319 |
-- files that will be processed by the Wide Character processor to |
| 320 |
-- create the C250001 and C250002 tests. The Wide Character processor |
| 321 |
-- will expect to find the files to process at this location. |
| 322 |
|
| 323 |
Test_Path_Root : constant String := |
| 324 |
"ACATS4GNATDIR/tests/c2/"; |
| 325 |
-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --- MODIFY HERE AS NEEDED |
| 326 |
|
| 327 |
-- The following two strings must not be modified unless the .AW file |
| 328 |
-- names have been changed. The Wide Character processor will use |
| 329 |
-- these strings to find the .AW files used in creating the C250001 |
| 330 |
-- and C250002 tests. |
| 331 |
|
| 332 |
Wide_Character_Test : constant String := Test_Path_Root & "c250001"; |
| 333 |
Upper_Latin_Test : constant String := Test_Path_Root & "c250002"; |
| 334 |
|
| 335 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 336 |
|
| 337 |
-- The following instance of Integer_IO or Modular_IO must be supplied |
| 338 |
-- in order for test CD72A02 to compile correctly. |
| 339 |
-- Depending on the choice of base type used for the type |
| 340 |
-- System.Storage_Elements.Integer_Address; one of the two instances will |
| 341 |
-- be correct. Comment out the incorrect instance. |
| 342 |
|
| 343 |
-- package Address_Value_IO is |
| 344 |
-- new Ada.Text_IO.Integer_IO(System.Storage_Elements.Integer_Address); |
| 345 |
|
| 346 |
package Address_Value_IO is |
| 347 |
new Ada.Text_IO.Modular_IO(System.Storage_Elements.Integer_Address); |
| 348 |
|
| 349 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 350 |
|
| 351 |
-- The following constants have been defined for use with various delay |
| 352 |
-- statements in the GCC testsuite so that they do not take too long. |
| 353 |
|
| 354 |
One_Second : constant Duration := 0.001; |
| 355 |
One_Long_Second : constant Duration := 0.1; |
| 356 |
|
| 357 |
end ImpDef; |
| 358 |
|
| 359 |
|
| 360 |
--==================================================================-- |
| 361 |
|
| 362 |
|
| 363 |
package body ImpDef is |
| 364 |
|
| 365 |
-- NOTE: These are example bodies. It is expected that implementors |
| 366 |
-- will write their own versions of these routines. |
| 367 |
|
| 368 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 369 |
|
| 370 |
-- The time required to execute this procedure must be greater than the |
| 371 |
-- time slice unit on implementations which use time slicing. For |
| 372 |
-- implementations which do not use time slicing the body can be null. |
| 373 |
|
| 374 |
Procedure Exceed_Time_Slice is |
| 375 |
T : Integer := 0; |
| 376 |
Loop_Max : constant Integer := 4_000; |
| 377 |
begin |
| 378 |
for I in 1..Loop_Max loop |
| 379 |
T := Report.Ident_Int (1) * Report.Ident_Int (2); |
| 380 |
end loop; |
| 381 |
end Exceed_Time_Slice; |
| 382 |
|
| 383 |
--=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-=====-- |
| 384 |
|
| 385 |
end ImpDef; |