-------------------------------------------------------------------------------
--                                                                           --
--                "DHRYSTONE" Benchmark Program                              --
--                -----------------------------                              --
--                                                                           --
--         Version ADA/1                                                     --
--                                                                           --
--         Date:   04/15/84                                                  --
--                                                                           --
--         Author: Reinhold P. Weicker                                       --
--                                                                           --
--                                                                           --
--  As published in Communications of ACM, October 1984  Vol 27 No 10        --
--                                                                           --
-------------------------------------------------------------------------------
--                                                                           --
-- The following program contains statements of a high-level programming     --
-- language (Ada) in a distribution considered representative:               --
--                                                                           --
--   assignments               53%                                           --
--   control statements        32%                                           --
--   procedures, function call 15%                                           --

-- 100 statements are dynamically executed. The program is balanced with     --
-- respect to the three aspects:                                             --
--                                                                           --
--    - statement type                                                       --
--    - operand type (for simple data types)                                 --
--    - operand access                                                       --
--         operand global, local, parameter, or constant.                    --
--                                                                           --
-- The combination of these three aspects is balanced only approximately.    --
--                                                                           --
-- The program does not compute anything meaningful, but it is syntactically --
-- and semantically correct. All variables have a value assigned to them     --
-- before they are used as a source operand                                  --
-------------------------------------------------------------------------------
package Global_Def is
------------------

-- global definintions

    type Enumeration is (Ident_1, Ident_2, Ident_3, Ident_4, Ident_5);

    subtype One_To_Thirty is Integer range 1 .. 30;
    subtype One_To_Fifty is Integer range 1 .. 50;
    subtype Capital_Letter is Character range 'A' .. 'Z';

    type String_30 is array (One_To_Thirty) of Character;
    pragma Pack (String_30);

    type Array_1_Dim_Integer is array (One_To_Fifty) of Integer;
    type Array_2_Dim_Integer is array (One_To_Fifty, One_To_Fifty) of Integer;

    type Record_Type (Discr : Enumeration := Ident_1);

    type Record_Pointer is access Record_Type;

    type Record_Type (Discr : Enumeration := Ident_1) is
        record
            Pointer_Comp : Record_Pointer;
            case Discr is
                when Ident_1 =>         -- only this variant is used,
                                        -- but in some cases discriminant
                                        -- checks are necessary
                    Enum_Comp : Enumeration;
                    Int_Comp : One_To_Fifty;
                    String_Comp : String_30;
                when Ident_2 =>
                    Enum_Comp_2 : Enumeration;
                    String_Comp_2 : String_30;
                when others =>
                    Char_Comp_1, Char_Comp_2 : Character;
            end case;
        end record;

end Global_Def;