CVS difference for acats/cd/cd30004.a

Differences between 1.2 and version 1.3
Log of other versions for file acats/cd/cd30004.a

--- acats/cd/cd30004.a	1999/03/11 01:40:50	1.2
+++ acats/cd/cd30004.a	1999/07/08 18:44:10	1.3
@@ -3,51 +3,40 @@
 --                             Grant of Unlimited Rights
 --
 --     Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
--- d DCA100-97-D-0025, the U.S. Government obtained 
+--     F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
 --     unlimited rights in the software and documentation contained herein.
---  defined in DFAR 252.227-7013(a)(19).  By making 
---  the Government intends to confer upon all 
---  rights  equal to those held by the Government.  
---  rights to use, duplicate, release or disclose the 
--- ata and computer software in whole or in part, in 
--- ny purpose whatsoever, and to have or permit others 
+--     Unlimited rights are defined in DFAR 252.227-7013(a)(19).  By making
+--     this public release, the Government intends to confer upon all
+--     recipients unlimited rights  equal to those held by the Government.
+--     These rights include rights to use, duplicate, release or disclose the
+--     released technical data and computer software in whole or in part, in
+--     any manner and for any purpose whatsoever, and to have or permit others
 --     to do so.
 --
 --                                    DISCLAIMER
 --
 --     ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
---   THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED 
+--     DISCLOSED ARE AS IS.  THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
 --     WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
--- ION OR OTHER INFORMATION RELEASED, MADE AVAILABLE 
+--     SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
 --     OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
 --     PARTICULAR PURPOSE OF SAID MATERIAL.
 --*
 --
 -- OBJECTIVE:
 --
---
 --      Check that the unspecified Size of static discrete
 --      subtypes is the number of bits needed to represent each value
 --      belonging to the subtype using an unbiased representation, where
 --      space for a sign bit is provided only in the event the subtype
 --      contains negative values.  Check that for first subtypes specified
---  reflecting this representation.
+--      Sizes are supported reflecting this representation. [ARM 95 13.3(55)].
 --
--- ypes implemented with levels of indirection, the
--- ize of the pointers, not the size of what is
--- 
---
 -- TEST DESCRIPTION:
 --      This test defines a few types that should have distinctly recognizable
 --      sizes.  A packed record which should result in very specific bits
 --      sizes for it's components is used to check the first part of the
--- h of a task type, a protected type and an access
--- Each of them have a value whose size should far
---  reference semantics of any implementation.  The
--- ues using what may today seem wildly large values
--- lementations indirect references; however the
--- nt to determine correctness, and will withstand
--- in computer architecture.
+--      objective.
 --
 -- APPLICABILITY CRITERIA:
 --      All implementations must attempt to compile this test.
@@ -66,6 +55,7 @@
 --      06 MAY 96   SAIC   Revised for 2.1
 --      26 FEB 97   PWB.CTA Added pragma Pack for type Check_Record
 --      16 FEB 98   EDS    Modified Documentation.
+--      06 JUL 99   RLB    Repaired comments, removed junk test cases.
 --!
 ----------------------------------------------------------------- CD30004_0
 
@@ -97,38 +87,48 @@
   pragma Pack ( Check_Record );
 
   procedure TC_Check_Values;
-  procedure TC_Check_Record;
--- ecified Size of static discrete and fixed point
--- ber of bits needed to represent each value
--- btype using an unbiased representation, where
--- t is provided only in the event the subtype
--- alues.  Check that for first subtypes specified
---  reflecting this representation.
+  procedure TC_Check_Specified_Sizes;
 
 end CD30004_0;
 
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 with Report;
-with TCTouch;
+with Impdef;
 package body CD30004_0 is
 
   procedure TC_Check_Values is
   begin
 
-    if Bits_2'Size > 2 then
-      Report.Failed("Bits_2'Size not 2 bits");
+    if Bits_2'Size /= 2 then
+      if Impdef.Validating_Annex_C then
+         Report.Failed("Bits_2'Size not 2 bits");
+      else -- Recommended levels of support are not binding.
+         Report.Comment("Bits_2'Size not 2 bits");
+      end if;
     end if;
 
-    if Bits_14'Size > 14 then
-      Report.Failed("Bits_14'Size not 14 bits");
+    if Bits_14'Size /= 14 then
+      if Impdef.Validating_Annex_C then
+         Report.Failed("Bits_14'Size not 14 bits");
+      else
+         Report.Comment("Bits_14'Size not 14 bits");
+      end if;
     end if;
 
-    if Bits_3'Size > 3 then
-      Report.Failed("Bits_3'Size not 3 bits");
+    if Bits_3'Size /= 3 then
+      if Impdef.Validating_Annex_C then
+         Report.Failed("Bits_3'Size not 3 bits");
+      else
+         Report.Comment("Bits_3'Size not 3 bits");
+      end if;
     end if;
 
-    if Bits_5'Size > 5 then
-      Report.Failed("Bits_5'Size not 5 bits");
+    if Bits_5'Size /= 5 then
+      if Impdef.Validating_Annex_C then
+         Report.Failed("Bits_5'Size not 5 bits");
+      else
+         Report.Comment("Bits_5'Size not 5 bits");
+      end if;
     end if;
 
 
@@ -142,149 +142,25 @@
 
   end TC_Check_Values;
 
-  procedure TC_Check_Record is
+  procedure TC_Check_Specified_Sizes is
 
     type Spec_Record is new Check_Record;
       for Spec_Record'Size use 64;                           -- ANX-C RQMT.
 
-    Default        : Check_Record;
-    Size_Specified : Spec_Record;
-
-    procedure Check_Pairs( Default_1, Default_2 : Natural;
-                           Spec_1,    Spec_2    : Natural;
-                           Item : String ) is
-      The_Error : String := "Size clause alters layout with respect to "
-                            & Item;
-    begin
-      if Default_1 < Default_2 then
-        if Spec_1 >= Spec_2 then
-          Report.Failed(The_Error);
-        end if;
-      elsif Default_1 = Default_2 then
-        if Spec_1 /= Spec_2 then
-          Report.Failed(The_Error);
-        end if;
-      elsif Default_1 > Default_2 then
-        if Spec_1 <= Spec_2 then
-          Report.Failed(The_Error);
-        end if;
-      else
-        Report.Failed("Not less, not equal, not greater");
-      end if;
-
-    end Check_Pairs;
-
-  begin
-
--- of a Size clause does not affect the internal
--- s.
-
-    Check_Pairs( Default.B14'Position,        Default.B2'Position,
-                 Size_Specified.B14'Position, Size_Specified.B2'Position,
-                 "First and Second components" );
-
-    Check_Pairs( Default.B2'Position,         Default.B3'Position,
-                 Size_Specified.B2'Position,  Size_Specified.B3'Position,
-                 "Second and Third components" );
-
-    Check_Pairs( Default.B3'Position,         Default.B5'Position,
-                 Size_Specified.B3'Position,  Size_Specified.B5'Position,
-                 "Third and Fourth components" );
-
-    Check_Pairs( Default.B5'Position,         Default.C'Position,
-                 Size_Specified.B5'Position,  Size_Specified.C'Position,
-                 "Fourth and Fifth components" );
-
-  end TC_Check_Record;
-
-end CD30004_0;
-
------------------------------------------------------------------ CD30004_1
-
-package CD30004_1 is
-
--- ypes implemented with levels of indirection, the
--- ize of the pointers, not the size of what is
--- 
-
-  task type Task_Type_T is
-    entry Task_Entry_One( TC_Character : Character );
-    entry Task_Entry_Two( TC_String : out String );
-  end Task_Type_T;
-
-  type Access_String is access String;
-
-  procedure TC_Check_Values;
--- ypes implemented with levels of indirection, the
--- ize of the pointers, not the size of what is
--- 
-
-end CD30004_1;
-
--- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-with Report;
-with TCTouch;
-package body CD30004_1 is
-
-  -- all the code in the task is merely to keep the
-  -- optimizer from getting carried away.
-
-  task body Task_Type_T is
-    Recondite_Secrets : String(1.. 1024);
   begin
-
-    select
-
-      accept Task_Entry_One ( TC_Character : Character ) do
-        Recondite_Secrets := ( others => TC_Character );
-      end Task_Entry_One;
-
-      accept Task_Entry_Two ( TC_String : out String ) do
-       TC_String := Recondite_Secrets(1..TC_String'Length);
-      end Task_Entry_Two;
-
-      or terminate;
 
-    end select;
-
-  end Task_Type_T;
-
-  procedure TC_Check_Values is
-    TC_Task_Object          : Task_Type_T;
-    TC_Access_String_Object : Access_String;
-
-    procedure Check_TO( TTT : in Task_Type_T ) is
-    begin
-      if TTT'Size > 1024 then
-        Report.Failed("task objects are not indirect/by-reference");
-      end if;
-    end Check_TO;
-
-  begin
-
-    -- giving the implementation yards of leeway, if the 'Size of the task
-    -- or the protected object are greater than 1K, it's not indirect...
-
-    Check_TO( TC_Task_Object );
-
-    TC_Access_String_Object := new String'("This will be much longer than " &
-                          "the designator value designating this long and " &
-                          "otherwise meaningless string.");
-
-    if TC_Access_String_Object'Size >= TC_Access_String_Object.all'Size then
-     Report.Failed("'Size for access type is "
-                               & Integer'Image(TC_Access_String_Object'Size));
+    if Spec_Record'Size /= 64 then
+      Report.Failed("Spec_Record'Size not 64 bits");
     end if;
 
-  end TC_Check_Values;
+  end TC_Check_Specified_Sizes;
 
-end CD30004_1;
+end CD30004_0;
 
 ------------------------------------------------------------------- CD30004
 
 with Report;
 with CD30004_0;
-with CD30004_1;
 
 procedure CD30004 is
 
@@ -297,16 +173,11 @@
                "bit is provided only in the event the subtype contains " &
                "negative values.  Check that for first subtypes " &
                "specified Sizes are supported reflecting this " &
-               "representation. " &
-               "Check that for subtypes implemented with levels of " &
-               "indirection, the Size includes the size of the pointers, " &
-               "not the size of what is pointed at" );
-   
-  CD30004_0.TC_Check_Values;
+               "representation.");
 
-  CD30004_0.TC_Check_Record;
+  CD30004_0.TC_Check_Values;
 
-  CD30004_1.TC_Check_Values;
+  CD30004_0.TC_Check_Specified_Sizes;
 
   Report.Result;
 

Questions? Ask the ACAA Technical Agent