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

⟦fe6131897⟧ Ada Source

    Length: 7168 (0x1c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package Generic_Rule_Base, seg_02baa1

Derivation

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

E3 Source Code



with Output_Stream;
generic

    Max_Rules                      : in Positive := 50;  
    Max_Condition_Elements_By_Rule : in Positive := 10;
    Max_Condition_Elements         : in Positive := 200;

    type Rule_Bundles is (<>);

    type Fact_Name       is private;
    type Fact_Collection is array (Positive range <>) of Fact_Name;
    Empty_Fact_Collection : Fact_Collection;
    with procedure Fact_Put (The_Collection : Fact_Collection;
                             Where          : Output_Stream.Object);

    type Fact_Query is private;
    Null_Fact_Query : Fact_Query;
    type Fact_Queries is array (Positive range <>) of Fact_Query;
    Null_Premiss : Fact_Queries;

    with function Retrieve (Filter : Fact_Queries) return Fact_Collection is <>;
    with procedure Queries_Put (The_Queries : Fact_Queries;
                                Where       : Output_Stream.Object);

package Generic_Rule_Base is

    subtype Rule_Id is Natural;
    No_Rule : constant Rule_Id := 0;

    function  Count             return Natural;
    function  Get (R : Rule_Id) return Rule_Bundles;
    procedure Put (R : Rule_Id; Where : Output_Stream.Object);

    procedure Null_Action (On : Fact_Collection);
    generic
        with procedure Do_Action (For_Rule : Rule_Id;
                                  On_Facts : Fact_Collection);
    procedure Infere;

    function Inference_Count    return Natural;
    function Elapsed_Time       return Duration;
    function Firings_Per_Second return Natural;


    Illegal_Bundle  : exception;
    Illegal_Rule_Id : exception;
    Overflow        : exception;

    generic
        The_Bundle : Rule_Bundles;
        type Rule_Names is (<>);
        Nothing : Rule_Names := Rule_Names'Last;

        Rule_1    : Rule_Names   := Nothing;
        Name_1    : String       := Rule_Names'Image (Rule_1);
        Premiss_1 : Fact_Queries := Null_Premiss;
        with procedure Action_1 (On : Fact_Collection) is
           Generic_Rule_Base.Null_Action;

        Rule_2    : Rule_Names   := Nothing;
        Name_2    : String       := Rule_Names'Image (Rule_2);
        Premiss_2 : Fact_Queries := Null_Premiss;
        with procedure Action_2 (On : Fact_Collection) is
           Generic_Rule_Base.Null_Action;

        Rule_3    : Rule_Names   := Nothing;
        Name_3    : String       := Rule_Names'Image (Rule_3);
        Premiss_3 : Fact_Queries := Null_Premiss;
        with procedure Action_3 (On : Fact_Collection) is
           Generic_Rule_Base.Null_Action;

        Rule_4    : Rule_Names   := Nothing;
        Name_4    : String       := Rule_Names'Image (Rule_4);
        Premiss_4 : Fact_Queries := Null_Premiss;
        with procedure Action_4 (On : Fact_Collection) is
           Generic_Rule_Base.Null_Action;

        Rule_5    : Rule_Names   := Nothing;
        Name_5    : String       := Rule_Names'Image (Rule_5);
        Premiss_5 : Fact_Queries := Null_Premiss;
        with procedure Action_5 (On : Fact_Collection) is
           Generic_Rule_Base.Null_Action;

    package Generic_Rule_Bundle is
        procedure Do_Action (For_Rule : Rule_Id; On_Facts : Fact_Collection);
    end Generic_Rule_Bundle;
end Generic_Rule_Base;

E3 Meta Data

    nblk1=6
    nid=3
    hdr6=a
        [0x00] rec0=1d rec1=00 rec2=01 rec3=00a
        [0x01] rec0=1d rec1=00 rec2=02 rec3=030
        [0x02] rec0=03 rec1=00 rec2=05 rec3=052
        [0x03] rec0=16 rec1=00 rec2=04 rec3=02a
        [0x04] rec0=06 rec1=00 rec2=06 rec3=000
        [0x05] rec0=01 rec1=00 rec2=04 rec3=001
    tail 0x21724740283f0439f522e 0x42a00088462063c03
Free Block Chain:
  0x3: 0000  00 00 00 20 80 17 65 5f 4e 61 6d 65 73 27 49 6d  ┆      e_Names'Im┆