1 |
149 |
jeremybenn |
-- C41321A.ADA
|
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 |
|
|
-- CHECK THAT IMPLICITLY DECLARED RELATIONAL OPERATORS, LOGICAL
|
26 |
|
|
-- OPERATORS, AND THE "NOT" OPERATOR MAY BE SELECTED FROM OUTSIDE
|
27 |
|
|
-- THE PACKAGE USING AN EXPANDED NAME, FOR A DERIVED BOOLEAN TYPE.
|
28 |
|
|
|
29 |
|
|
-- TBN 7/16/86
|
30 |
|
|
|
31 |
|
|
WITH REPORT; USE REPORT;
|
32 |
|
|
PROCEDURE C41321A IS
|
33 |
|
|
|
34 |
|
|
PACKAGE P IS
|
35 |
|
|
TYPE DERIVED_BOOLEAN IS NEW BOOLEAN RANGE FALSE .. TRUE;
|
36 |
|
|
DERIVED_FALSE : DERIVED_BOOLEAN := FALSE;
|
37 |
|
|
DERIVED_TRUE : DERIVED_BOOLEAN := TRUE;
|
38 |
|
|
END P;
|
39 |
|
|
|
40 |
|
|
DBOOL_FALSE : P.DERIVED_BOOLEAN := P.FALSE;
|
41 |
|
|
DBOOL_TRUE : P.DERIVED_BOOLEAN := P.TRUE;
|
42 |
|
|
|
43 |
|
|
BEGIN
|
44 |
|
|
TEST ("C41321A", "CHECK THAT IMPLICITLY DECLARED RELATIONAL " &
|
45 |
|
|
"OPERATORS, LOGICAL OPERATORS, AND THE 'NOT' " &
|
46 |
|
|
"OPERATOR MAY BE SELECTED FROM OUTSIDE THE " &
|
47 |
|
|
"PACKAGE USING AN EXPANDED NAME, FOR A DERIVED " &
|
48 |
|
|
"BOOLEAN TYPE");
|
49 |
|
|
|
50 |
|
|
IF P."=" (DBOOL_FALSE, P.DERIVED_TRUE) THEN
|
51 |
|
|
FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 1");
|
52 |
|
|
END IF;
|
53 |
|
|
|
54 |
|
|
IF P."/=" (DBOOL_TRUE, P.DERIVED_TRUE) THEN
|
55 |
|
|
FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 2");
|
56 |
|
|
END IF;
|
57 |
|
|
|
58 |
|
|
IF P."<" (P.DERIVED_TRUE, P.DERIVED_FALSE) THEN
|
59 |
|
|
FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 3");
|
60 |
|
|
END IF;
|
61 |
|
|
|
62 |
|
|
IF P.">" (DBOOL_TRUE, P.DERIVED_TRUE) THEN
|
63 |
|
|
FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 4");
|
64 |
|
|
END IF;
|
65 |
|
|
|
66 |
|
|
IF P."<=" (P.DERIVED_TRUE, DBOOL_FALSE) THEN
|
67 |
|
|
FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 5");
|
68 |
|
|
END IF;
|
69 |
|
|
|
70 |
|
|
IF P."<=" (P.DERIVED_TRUE, DBOOL_TRUE) THEN
|
71 |
|
|
NULL;
|
72 |
|
|
ELSE
|
73 |
|
|
FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 6");
|
74 |
|
|
END IF;
|
75 |
|
|
|
76 |
|
|
IF P.">=" (P.DERIVED_TRUE, DBOOL_TRUE) THEN
|
77 |
|
|
NULL;
|
78 |
|
|
ELSE
|
79 |
|
|
FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 7");
|
80 |
|
|
END IF;
|
81 |
|
|
|
82 |
|
|
FOR J IN P.DERIVED_BOOLEAN'(P.TRUE) .. P.DERIVED_BOOLEAN'(P.TRUE)
|
83 |
|
|
LOOP
|
84 |
|
|
IF P.">=" (DBOOL_FALSE, J) THEN
|
85 |
|
|
FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 8");
|
86 |
|
|
END IF;
|
87 |
|
|
END LOOP;
|
88 |
|
|
|
89 |
|
|
IF P."AND" (DBOOL_FALSE, P.DERIVED_TRUE) THEN
|
90 |
|
|
FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 9");
|
91 |
|
|
END IF;
|
92 |
|
|
|
93 |
|
|
IF P."OR" (DBOOL_FALSE, P.DERIVED_FALSE) THEN
|
94 |
|
|
FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 10");
|
95 |
|
|
END IF;
|
96 |
|
|
|
97 |
|
|
IF P."XOR" (DBOOL_TRUE, P.DERIVED_TRUE) THEN
|
98 |
|
|
FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 11");
|
99 |
|
|
END IF;
|
100 |
|
|
|
101 |
|
|
IF P."NOT" (P.DERIVED_TRUE) THEN
|
102 |
|
|
FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 12");
|
103 |
|
|
END IF;
|
104 |
|
|
|
105 |
|
|
RESULT;
|
106 |
|
|
END C41321A;
|