DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦4441498c1⟧ Ada Source

    Length: 6144 (0x1800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Generic_Rule_Bundle, seg_03c0d5, separate Generic_Rule_Base

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



separate (Generic_Rule_Base)
package body Generic_Rule_Bundle is

    function As_Natural (R : Rule_Names) return Natural is
    begin
        return Rule_Names'Pos (R) + 1;
    end As_Natural;

    procedure Add (The_Rule : Rule_Names;
                   The_Name : String;
                   Premiss  : Fact_Queries) is
        Ce_Ids : Condition_Elements.Ids (Premiss'Range);
    begin  
        if The_Last_Rule = Rule_Id (Max_Rules) then
            raise Overflow;
        else
            Condition_Elements.Add (Premiss, Ce_Ids);
            The_Last_Rule             := The_Last_Rule + 1;
            The_Rules (The_Last_Rule) :=
               Rule'(The_Query_Count => Premiss'Length,
                     The_Bundle      => The_Bundle,
                     The_Rule        => As_Natural (The_Rule),
                     The_Name        => As_Rule_Name (The_Name),
                     The_Premiss     => Ce_Ids);
        end if;
    end Add;


    procedure Do_Action (For_Rule : Rule_Id; On_Facts : Fact_Collection) is
        The_Action_Bundle : Rule_Bundles
            renames The_Rules (For_Rule).The_Bundle;
        The_Rule_Number   : Natural renames The_Rules (For_Rule).The_Rule;
    begin
        if The_Action_Bundle = The_Bundle then
            case The_Rule_Number is
                when 1 =>
                    Action_1 (On_Facts);
                when 2 =>
                    Action_2 (On_Facts);
                when 3 =>
                    Action_3 (On_Facts);
                when 4 =>
                    Action_4 (On_Facts);
                when 5 =>
                    Action_5 (On_Facts);  
                when 6 =>
                    Action_6 (On_Facts);
                when 7 =>
                    Action_7 (On_Facts);
                when 8 =>
                    Action_8 (On_Facts);
                when 9 =>
                    Action_9 (On_Facts);
                when 10 =>
                    Action_10 (On_Facts);
                when 11 =>
                    Action_11 (On_Facts);
                when 12 =>
                    Action_12 (On_Facts);
                when 13 =>
                    Action_13 (On_Facts);
                when 14 =>
                    Action_14 (On_Facts);
                when 15 =>
                    Action_15 (On_Facts);
                when 16 =>
                    Action_16 (On_Facts);
                when 17 =>
                    Action_17 (On_Facts);
                when 18 =>
                    Action_18 (On_Facts);
                when 19 =>
                    Action_19 (On_Facts);
                when 20 =>
                    Action_20 (On_Facts);
                when others =>
                    null;
            end case;
        else
            raise Illegal_Bundle;
        end if;
    end Do_Action;

begin
    if Rule_1 /= Nothing then
        Add (Rule_1, Name_1, Premiss_1);
    end if;
    if Rule_2 /= Nothing then
        Add (Rule_2, Name_2, Premiss_2);
    end if;
    if Rule_3 /= Nothing then
        Add (Rule_3, Name_3, Premiss_3);
    end if;
    if Rule_4 /= Nothing then
        Add (Rule_4, Name_4, Premiss_4);
    end if;
    if Rule_5 /= Nothing then
        Add (Rule_5, Name_5, Premiss_5);
    end if;  
    if Rule_6 /= Nothing then
        Add (Rule_6, Name_6, Premiss_6);
    end if;
    if Rule_7 /= Nothing then
        Add (Rule_7, Name_7, Premiss_7);
    end if;
    if Rule_8 /= Nothing then
        Add (Rule_8, Name_8, Premiss_8);
    end if;
    if Rule_9 /= Nothing then
        Add (Rule_9, Name_9, Premiss_9);
    end if;
    if Rule_10 /= Nothing then
        Add (Rule_10, Name_10, Premiss_10);
    end if;
    if Rule_11 /= Nothing then
        Add (Rule_11, Name_11, Premiss_11);
    end if;
    if Rule_12 /= Nothing then
        Add (Rule_12, Name_12, Premiss_12);
    end if;
    if Rule_13 /= Nothing then
        Add (Rule_13, Name_13, Premiss_13);
    end if;
    if Rule_14 /= Nothing then
        Add (Rule_14, Name_14, Premiss_14);
    end if;
    if Rule_15 /= Nothing then
        Add (Rule_15, Name_15, Premiss_15);
    end if;
    if Rule_16 /= Nothing then
        Add (Rule_16, Name_16, Premiss_16);
    end if;
    if Rule_17 /= Nothing then
        Add (Rule_17, Name_17, Premiss_17);
    end if;
    if Rule_18 /= Nothing then
        Add (Rule_18, Name_18, Premiss_18);
    end if;
    if Rule_19 /= Nothing then
        Add (Rule_19, Name_19, Premiss_19);
    end if;
    if Rule_20 /= Nothing then
        Add (Rule_20, Name_20, Premiss_20);
    end if;
end Generic_Rule_Bundle;


E3 Meta Data

    nblk1=5
    nid=0
    hdr6=a
        [0x00] rec0=1e rec1=00 rec2=01 rec3=006
        [0x01] rec0=19 rec1=00 rec2=04 rec3=034
        [0x02] rec0=20 rec1=00 rec2=02 rec3=030
        [0x03] rec0=22 rec1=00 rec2=03 rec3=00a
        [0x04] rec0=1b rec1=00 rec2=05 rec3=000
    tail 0x21739c49e856b70e296ec 0x42a00088462063c03